blob: 7fc3bfd1276cd22a27a34b150f60576a311247cf [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002# From configure.in Revision: 1.334 .
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
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001228# The later defininition of _XOPEN_SOURCE disables certain features
1229# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1230
1231cat >>confdefs.h <<\_ACEOF
1232#define _GNU_SOURCE 1
1233_ACEOF
1234
1235
1236# The definition of _GNU_SOURCE potentially causes a change of the value
1237# of _XOPEN_SOURCE. So define it only conditionally.
1238
1239
1240cat >>confdefs.h <<\_ACEOF
1241#define _XOPEN_SOURCE 500
1242_ACEOF
1243
1244
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001245# Arguments passed to configure.
1246
1247CONFIG_ARGS="$ac_configure_args"
1248
Michael W. Hudson54241132001-12-07 15:38:26 +00001249
Jack Jansene578a632001-08-15 01:27:14 +00001250# Check whether --enable-framework or --disable-framework was given.
1251if test "${enable_framework+set}" = set; then
1252 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
Jack Jansene578a632001-08-15 01:27:14 +00001254 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001256 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001257 esac
1258 case $enableval in
1259 no)
1260 PYTHONFRAMEWORK=
1261 PYTHONFRAMEWORKDIR=no-framework
1262 PYTHONFRAMEWORKPREFIX=
1263 PYTHONFRAMEWORKINSTALLDIR=
1264 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001265 ;;
1266 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001267 PYTHONFRAMEWORK=Python
1268 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001269 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001270 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1271 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001272 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001273
Guido van Rossum563e7081996-09-10 18:20:48 +00001274else
Martin v. Löwis11437992002-04-12 09:54:03 +00001275
Jack Jansene578a632001-08-15 01:27:14 +00001276 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001277 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001278 PYTHONFRAMEWORKPREFIX=
1279 PYTHONFRAMEWORKINSTALLDIR=
1280 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001281
Martin v. Löwis11437992002-04-12 09:54:03 +00001282fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001283
1284
1285
1286
Jack Jansene578a632001-08-15 01:27:14 +00001287
1288##AC_ARG_WITH(dyld,
1289##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1290##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001291# Set name for machine-dependent library files
1292
Martin v. Löwis11437992002-04-12 09:54:03 +00001293echo "$as_me:$LINENO: checking MACHDEP" >&5
1294echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001295if test -z "$MACHDEP"
1296then
Guido van Rossum563e7081996-09-10 18:20:48 +00001297 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +00001298 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001299 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001300 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001301 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001302 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001303 ac_md_system=`echo $ac_sys_system |
1304 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1305 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001306 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001307 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001308
Guido van Rossum07397971997-04-29 21:49:50 +00001309 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001310 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001311 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001312 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001313 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001314 esac
1315fi
Guido van Rossum91922671997-10-09 20:24:13 +00001316
1317#
1318# SGI compilers allow the specification of the both the ABI and the
1319# ISA on the command line. Depending on the values of these switches,
1320# different and often incompatable code will be generated.
1321#
1322# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1323# thus supply support for various ABI/ISA combinations. The MACHDEP
1324# variable is also adjusted.
1325#
1326
1327if test ! -z "$SGI_ABI"
1328then
1329 CC="cc $SGI_ABI"
1330 LDFLAGS="$SGI_ABI $LDFLAGS"
1331 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1332fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001333echo "$as_me:$LINENO: result: $MACHDEP" >&5
1334echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001335
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001337echo "$as_me:$LINENO: checking for --without-gcc" >&5
1338echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1339
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001340# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001341if test "${with_gcc+set}" = set; then
1342 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001343
Guido van Rossum7f43da71994-08-01 12:15:30 +00001344 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001345 no) CC=cc
1346 without_gcc=yes;;
1347 yes) CC=gcc
1348 without_gcc=no;;
1349 *) CC=$withval
1350 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001351 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001352else
Martin v. Löwis11437992002-04-12 09:54:03 +00001353
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001354 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001355 AIX*) CC=cc_r
1356 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001357 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001358 case $BE_HOST_CPU in
1359 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001360 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001361 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001362 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001363 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001364 ;;
1365 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001366 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001367 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001368 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001369 ;;
1370 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001371 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1372echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1373 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001374 ;;
1375 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001376 AR="\$(srcdir)/Modules/ar_beos"
1377 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001378 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001379 Monterey*)
1380 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001381 without_gcc=;;
1382 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001383 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001384fi;
1385echo "$as_me:$LINENO: result: $without_gcc" >&5
1386echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001387
1388
Guido van Rossum95012191999-12-16 17:50:52 +00001389
Fred Drakea1a84e72001-03-06 05:52:16 +00001390MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001391echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1392echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1393
Guido van Rossum95012191999-12-16 17:50:52 +00001394# Check whether --with-cxx or --without-cxx was given.
1395if test "${with_cxx+set}" = set; then
1396 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001397
Martin v. Löwis22352952000-12-13 17:37:02 +00001398 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001399 case $withval in
1400 no) CXX=
1401 with_cxx=no;;
1402 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001403 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001404 with_cxx=$withval;;
1405 esac
1406else
Martin v. Löwis11437992002-04-12 09:54:03 +00001407
Guido van Rossum95012191999-12-16 17:50:52 +00001408 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001409 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001410
Martin v. Löwis11437992002-04-12 09:54:03 +00001411fi;
1412echo "$as_me:$LINENO: result: $with_cxx" >&5
1413echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001414
1415if test "$with_cxx" = "yes"
1416then
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1418echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1419 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001420fi
1421
1422
1423
1424
Martin v. Löwis11437992002-04-12 09:54:03 +00001425if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001426then
1427 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1428do
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 # 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 +00001430set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001431echo "$as_me:$LINENO: checking for $ac_word" >&5
1432echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1433if test "${ac_cv_prog_CXX+set}" = set; then
1434 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001435else
1436 if test -n "$CXX"; then
1437 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1438else
Martin v. Löwis11437992002-04-12 09:54:03 +00001439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1440for as_dir in $PATH
1441do
1442 IFS=$as_save_IFS
1443 test -z "$as_dir" && as_dir=.
1444 for ac_exec_ext in '' $ac_executable_extensions; do
1445 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1446 ac_cv_prog_CXX="$ac_prog"
1447 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1448 break 2
1449 fi
1450done
1451done
1452
Martin v. Löwis22352952000-12-13 17:37:02 +00001453fi
1454fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001455CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001456if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 echo "$as_me:$LINENO: result: $CXX" >&5
1458echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001459else
Martin v. Löwis11437992002-04-12 09:54:03 +00001460 echo "$as_me:$LINENO: result: no" >&5
1461echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001462fi
1463
Martin v. Löwis11437992002-04-12 09:54:03 +00001464 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001465done
1466test -n "$CXX" || CXX="notfound"
1467
1468 if test "$CXX" = "notfound"
1469 then
1470 CXX=
1471 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001473ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001474ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1475ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1476ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1477 cat >conftest.$ac_ext <<_ACEOF
1478#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001479#include "confdefs.h"
1480
Martin v. Löwis11437992002-04-12 09:54:03 +00001481#ifdef F77_DUMMY_MAIN
1482# ifdef __cplusplus
1483 extern "C"
1484# endif
1485 int F77_DUMMY_MAIN() { return 1; }
1486#endif
1487int
1488main ()
1489{
Michael W. Hudson54241132001-12-07 15:38:26 +00001490
Martin v. Löwis11437992002-04-12 09:54:03 +00001491 ;
1492 return 0;
1493}
1494_ACEOF
1495ac_clean_files_save=$ac_clean_files
1496ac_clean_files="$ac_clean_files a.out a.exe"
1497# Try to create an executable without -o first, disregard a.out.
1498# It will help us diagnose broken compilers, and finding out an intuition
1499# of exeext.
1500echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1501echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1502ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1503if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1504 (eval $ac_link_default) 2>&5
1505 ac_status=$?
1506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1507 (exit $ac_status); }; then
1508 # Find the output, starting from the most likely. This scheme is
1509# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1510# resort.
1511
1512# Be careful to initialize this variable, since it used to be cached.
1513# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1514ac_cv_exeext=
1515for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1516 ls a.out conftest 2>/dev/null;
1517 ls a.* conftest.* 2>/dev/null`; do
1518 case $ac_file in
1519 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1520 a.out ) # We found the default executable, but exeext='' is most
1521 # certainly right.
1522 break;;
1523 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1524 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1525 export ac_cv_exeext
1526 break;;
1527 * ) break;;
1528 esac
1529done
1530else
1531 echo "$as_me: failed program was:" >&5
1532cat conftest.$ac_ext >&5
1533{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1534echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1535 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001536fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001537
1538ac_exeext=$ac_cv_exeext
1539echo "$as_me:$LINENO: result: $ac_file" >&5
1540echo "${ECHO_T}$ac_file" >&6
1541
1542# Check the compiler produces executables we can run. If not, either
1543# the compiler is broken, or we cross compile.
1544echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1545echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1546# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1547# If not cross compiling, check that we can run a simple program.
1548if test "$cross_compiling" != yes; then
1549 if { ac_try='./$ac_file'
1550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1551 (eval $ac_try) 2>&5
1552 ac_status=$?
1553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1554 (exit $ac_status); }; }; then
1555 cross_compiling=no
1556 else
1557 if test "$cross_compiling" = maybe; then
1558 cross_compiling=yes
1559 else
1560 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1561If you meant to cross compile, use \`--host'." >&5
1562echo "$as_me: error: cannot run C++ compiled programs.
1563If you meant to cross compile, use \`--host'." >&2;}
1564 { (exit 1); exit 1; }; }
1565 fi
1566 fi
1567fi
1568echo "$as_me:$LINENO: result: yes" >&5
1569echo "${ECHO_T}yes" >&6
1570
1571rm -f a.out a.exe conftest$ac_cv_exeext
1572ac_clean_files=$ac_clean_files_save
1573# Check the compiler produces executables we can run. If not, either
1574# the compiler is broken, or we cross compile.
1575echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1576echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1577echo "$as_me:$LINENO: result: $cross_compiling" >&5
1578echo "${ECHO_T}$cross_compiling" >&6
1579
1580echo "$as_me:$LINENO: checking for suffix of executables" >&5
1581echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1582if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1583 (eval $ac_link) 2>&5
1584 ac_status=$?
1585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1586 (exit $ac_status); }; then
1587 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1588# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1589# work properly (i.e., refer to `conftest.exe'), while it won't with
1590# `rm'.
1591for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1592 case $ac_file in
1593 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1594 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1595 export ac_cv_exeext
1596 break;;
1597 * ) break;;
1598 esac
1599done
1600else
1601 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1602echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1603 { (exit 1); exit 1; }; }
1604fi
1605
1606rm -f conftest$ac_cv_exeext
1607echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1608echo "${ECHO_T}$ac_cv_exeext" >&6
1609
1610rm -f conftest.$ac_ext
1611EXEEXT=$ac_cv_exeext
1612ac_exeext=$EXEEXT
1613
1614 ac_ext=c
1615ac_cpp='$CPP $CPPFLAGS'
1616ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1617ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1618ac_compiler_gnu=$ac_cv_c_compiler_gnu
1619
1620
Martin v. Löwis22352952000-12-13 17:37:02 +00001621
1622 fi
1623fi
1624
Guido van Rossum8b131c51995-03-09 14:10:13 +00001625# If the user switches compilers, we can't believe the cache
1626if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1627then
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1629(it is also a good idea to do 'make clean' before compiling)" >&5
1630echo "$as_me: error: cached CC is different -- throw away $cache_file
1631(it is also a good idea to do 'make clean' before compiling)" >&2;}
1632 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001633fi
1634
Martin v. Löwis11437992002-04-12 09:54:03 +00001635ac_ext=c
1636ac_cpp='$CPP $CPPFLAGS'
1637ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1638ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1639ac_compiler_gnu=$ac_cv_c_compiler_gnu
1640if test -n "$ac_tool_prefix"; then
1641 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1642set dummy ${ac_tool_prefix}gcc; ac_word=$2
1643echo "$as_me:$LINENO: checking for $ac_word" >&5
1644echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1645if test "${ac_cv_prog_CC+set}" = set; then
1646 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001647else
1648 if test -n "$CC"; then
1649 ac_cv_prog_CC="$CC" # Let the user override the test.
1650else
Martin v. Löwis11437992002-04-12 09:54:03 +00001651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1652for as_dir in $PATH
1653do
1654 IFS=$as_save_IFS
1655 test -z "$as_dir" && as_dir=.
1656 for ac_exec_ext in '' $ac_executable_extensions; do
1657 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1658 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1659 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1660 break 2
1661 fi
1662done
1663done
1664
Jack Jansendd19cf82001-12-06 22:36:17 +00001665fi
1666fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001667CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001668if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001669 echo "$as_me:$LINENO: result: $CC" >&5
1670echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001671else
Martin v. Löwis11437992002-04-12 09:54:03 +00001672 echo "$as_me:$LINENO: result: no" >&5
1673echo "${ECHO_T}no" >&6
1674fi
1675
1676fi
1677if test -z "$ac_cv_prog_CC"; then
1678 ac_ct_CC=$CC
1679 # Extract the first word of "gcc", so it can be a program name with args.
1680set dummy gcc; ac_word=$2
1681echo "$as_me:$LINENO: checking for $ac_word" >&5
1682echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1683if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1684 echo $ECHO_N "(cached) $ECHO_C" >&6
1685else
1686 if test -n "$ac_ct_CC"; then
1687 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1688else
1689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1690for as_dir in $PATH
1691do
1692 IFS=$as_save_IFS
1693 test -z "$as_dir" && as_dir=.
1694 for ac_exec_ext in '' $ac_executable_extensions; do
1695 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1696 ac_cv_prog_ac_ct_CC="gcc"
1697 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1698 break 2
1699 fi
1700done
1701done
1702
1703fi
1704fi
1705ac_ct_CC=$ac_cv_prog_ac_ct_CC
1706if test -n "$ac_ct_CC"; then
1707 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1708echo "${ECHO_T}$ac_ct_CC" >&6
1709else
1710 echo "$as_me:$LINENO: result: no" >&5
1711echo "${ECHO_T}no" >&6
1712fi
1713
1714 CC=$ac_ct_CC
1715else
1716 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001717fi
1718
Jack Jansendd19cf82001-12-06 22:36:17 +00001719if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 if test -n "$ac_tool_prefix"; then
1721 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1722set dummy ${ac_tool_prefix}cc; ac_word=$2
1723echo "$as_me:$LINENO: checking for $ac_word" >&5
1724echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1725if test "${ac_cv_prog_CC+set}" = set; then
1726 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001727else
1728 if test -n "$CC"; then
1729 ac_cv_prog_CC="$CC" # Let the user override the test.
1730else
Martin v. Löwis11437992002-04-12 09:54:03 +00001731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1732for as_dir in $PATH
1733do
1734 IFS=$as_save_IFS
1735 test -z "$as_dir" && as_dir=.
1736 for ac_exec_ext in '' $ac_executable_extensions; do
1737 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1738 ac_cv_prog_CC="${ac_tool_prefix}cc"
1739 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1740 break 2
1741 fi
1742done
1743done
1744
1745fi
1746fi
1747CC=$ac_cv_prog_CC
1748if test -n "$CC"; then
1749 echo "$as_me:$LINENO: result: $CC" >&5
1750echo "${ECHO_T}$CC" >&6
1751else
1752 echo "$as_me:$LINENO: result: no" >&5
1753echo "${ECHO_T}no" >&6
1754fi
1755
1756fi
1757if test -z "$ac_cv_prog_CC"; then
1758 ac_ct_CC=$CC
1759 # Extract the first word of "cc", so it can be a program name with args.
1760set dummy cc; ac_word=$2
1761echo "$as_me:$LINENO: checking for $ac_word" >&5
1762echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1763if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1764 echo $ECHO_N "(cached) $ECHO_C" >&6
1765else
1766 if test -n "$ac_ct_CC"; then
1767 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1768else
1769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1770for as_dir in $PATH
1771do
1772 IFS=$as_save_IFS
1773 test -z "$as_dir" && as_dir=.
1774 for ac_exec_ext in '' $ac_executable_extensions; do
1775 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1776 ac_cv_prog_ac_ct_CC="cc"
1777 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1778 break 2
1779 fi
1780done
1781done
1782
1783fi
1784fi
1785ac_ct_CC=$ac_cv_prog_ac_ct_CC
1786if test -n "$ac_ct_CC"; then
1787 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1788echo "${ECHO_T}$ac_ct_CC" >&6
1789else
1790 echo "$as_me:$LINENO: result: no" >&5
1791echo "${ECHO_T}no" >&6
1792fi
1793
1794 CC=$ac_ct_CC
1795else
1796 CC="$ac_cv_prog_CC"
1797fi
1798
1799fi
1800if test -z "$CC"; then
1801 # Extract the first word of "cc", so it can be a program name with args.
1802set dummy cc; ac_word=$2
1803echo "$as_me:$LINENO: checking for $ac_word" >&5
1804echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1805if test "${ac_cv_prog_CC+set}" = set; then
1806 echo $ECHO_N "(cached) $ECHO_C" >&6
1807else
1808 if test -n "$CC"; then
1809 ac_cv_prog_CC="$CC" # Let the user override the test.
1810else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001811 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1813for as_dir in $PATH
1814do
1815 IFS=$as_save_IFS
1816 test -z "$as_dir" && as_dir=.
1817 for ac_exec_ext in '' $ac_executable_extensions; do
1818 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1819 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1820 ac_prog_rejected=yes
1821 continue
1822 fi
1823 ac_cv_prog_CC="cc"
1824 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1825 break 2
1826 fi
1827done
1828done
1829
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001830if test $ac_prog_rejected = yes; then
1831 # We found a bogon in the path, so make sure we never use it.
1832 set dummy $ac_cv_prog_CC
1833 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001834 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001835 # We chose a different compiler from the bogus one.
1836 # However, it has the same basename, so the bogon will be chosen
1837 # first if we set CC to just the basename; use the full file name.
1838 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001839 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001840 shift
1841 ac_cv_prog_CC="$@"
1842 fi
1843fi
1844fi
1845fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001846CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001847if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001848 echo "$as_me:$LINENO: result: $CC" >&5
1849echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001850else
Martin v. Löwis11437992002-04-12 09:54:03 +00001851 echo "$as_me:$LINENO: result: no" >&5
1852echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001853fi
1854
Martin v. Löwis11437992002-04-12 09:54:03 +00001855fi
1856if test -z "$CC"; then
1857 if test -n "$ac_tool_prefix"; then
1858 for ac_prog in cl
1859 do
1860 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1861set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1862echo "$as_me:$LINENO: checking for $ac_word" >&5
1863echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1864if test "${ac_cv_prog_CC+set}" = set; then
1865 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001866else
1867 if test -n "$CC"; then
1868 ac_cv_prog_CC="$CC" # Let the user override the test.
1869else
Martin v. Löwis11437992002-04-12 09:54:03 +00001870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1871for as_dir in $PATH
1872do
1873 IFS=$as_save_IFS
1874 test -z "$as_dir" && as_dir=.
1875 for ac_exec_ext in '' $ac_executable_extensions; do
1876 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1877 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1878 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1879 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001880 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001881done
1882done
1883
1884fi
1885fi
1886CC=$ac_cv_prog_CC
1887if test -n "$CC"; then
1888 echo "$as_me:$LINENO: result: $CC" >&5
1889echo "${ECHO_T}$CC" >&6
1890else
1891 echo "$as_me:$LINENO: result: no" >&5
1892echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001893fi
1894
Martin v. Löwis11437992002-04-12 09:54:03 +00001895 test -n "$CC" && break
1896 done
1897fi
1898if test -z "$CC"; then
1899 ac_ct_CC=$CC
1900 for ac_prog in cl
1901do
1902 # Extract the first word of "$ac_prog", so it can be a program name with args.
1903set dummy $ac_prog; ac_word=$2
1904echo "$as_me:$LINENO: checking for $ac_word" >&5
1905echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1906if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1907 echo $ECHO_N "(cached) $ECHO_C" >&6
1908else
1909 if test -n "$ac_ct_CC"; then
1910 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1911else
1912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1913for as_dir in $PATH
1914do
1915 IFS=$as_save_IFS
1916 test -z "$as_dir" && as_dir=.
1917 for ac_exec_ext in '' $ac_executable_extensions; do
1918 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1919 ac_cv_prog_ac_ct_CC="$ac_prog"
1920 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1921 break 2
1922 fi
1923done
1924done
Jack Jansendd19cf82001-12-06 22:36:17 +00001925
Martin v. Löwis11437992002-04-12 09:54:03 +00001926fi
1927fi
1928ac_ct_CC=$ac_cv_prog_ac_ct_CC
1929if test -n "$ac_ct_CC"; then
1930 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1931echo "${ECHO_T}$ac_ct_CC" >&6
1932else
1933 echo "$as_me:$LINENO: result: no" >&5
1934echo "${ECHO_T}no" >&6
1935fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001936
Martin v. Löwis11437992002-04-12 09:54:03 +00001937 test -n "$ac_ct_CC" && break
1938done
Michael W. Hudson54241132001-12-07 15:38:26 +00001939
Martin v. Löwis11437992002-04-12 09:54:03 +00001940 CC=$ac_ct_CC
1941fi
1942
1943fi
1944
1945
1946test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1947echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1948 { (exit 1); exit 1; }; }
1949
1950# Provide some information about the compiler.
1951echo "$as_me:$LINENO:" \
1952 "checking for C compiler version" >&5
1953ac_compiler=`set X $ac_compile; echo $2`
1954{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1955 (eval $ac_compiler --version </dev/null >&5) 2>&5
1956 ac_status=$?
1957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1958 (exit $ac_status); }
1959{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1960 (eval $ac_compiler -v </dev/null >&5) 2>&5
1961 ac_status=$?
1962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1963 (exit $ac_status); }
1964{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1965 (eval $ac_compiler -V </dev/null >&5) 2>&5
1966 ac_status=$?
1967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1968 (exit $ac_status); }
1969
1970cat >conftest.$ac_ext <<_ACEOF
1971#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001972#include "confdefs.h"
1973
Martin v. Löwis11437992002-04-12 09:54:03 +00001974#ifdef F77_DUMMY_MAIN
1975# ifdef __cplusplus
1976 extern "C"
1977# endif
1978 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001980int
1981main ()
1982{
1983
1984 ;
1985 return 0;
1986}
1987_ACEOF
1988ac_clean_files_save=$ac_clean_files
1989ac_clean_files="$ac_clean_files a.out a.exe"
1990# Try to create an executable without -o first, disregard a.out.
1991# It will help us diagnose broken compilers, and finding out an intuition
1992# of exeext.
1993echo "$as_me:$LINENO: checking for C compiler default output" >&5
1994echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1995ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1996if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1997 (eval $ac_link_default) 2>&5
1998 ac_status=$?
1999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2000 (exit $ac_status); }; then
2001 # Find the output, starting from the most likely. This scheme is
2002# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2003# resort.
2004
2005# Be careful to initialize this variable, since it used to be cached.
2006# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2007ac_cv_exeext=
2008for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2009 ls a.out conftest 2>/dev/null;
2010 ls a.* conftest.* 2>/dev/null`; do
2011 case $ac_file in
2012 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2013 a.out ) # We found the default executable, but exeext='' is most
2014 # certainly right.
2015 break;;
2016 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2017 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2018 export ac_cv_exeext
2019 break;;
2020 * ) break;;
2021 esac
2022done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002023else
Martin v. Löwis11437992002-04-12 09:54:03 +00002024 echo "$as_me: failed program was:" >&5
2025cat conftest.$ac_ext >&5
2026{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2027echo "$as_me: error: C compiler cannot create executables" >&2;}
2028 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002029fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002030
Martin v. Löwis11437992002-04-12 09:54:03 +00002031ac_exeext=$ac_cv_exeext
2032echo "$as_me:$LINENO: result: $ac_file" >&5
2033echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002034
Martin v. Löwis11437992002-04-12 09:54:03 +00002035# Check the compiler produces executables we can run. If not, either
2036# the compiler is broken, or we cross compile.
2037echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2038echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2039# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2040# If not cross compiling, check that we can run a simple program.
2041if test "$cross_compiling" != yes; then
2042 if { ac_try='./$ac_file'
2043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2044 (eval $ac_try) 2>&5
2045 ac_status=$?
2046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2047 (exit $ac_status); }; }; then
2048 cross_compiling=no
2049 else
2050 if test "$cross_compiling" = maybe; then
2051 cross_compiling=yes
2052 else
2053 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2054If you meant to cross compile, use \`--host'." >&5
2055echo "$as_me: error: cannot run C compiled programs.
2056If you meant to cross compile, use \`--host'." >&2;}
2057 { (exit 1); exit 1; }; }
2058 fi
2059 fi
2060fi
2061echo "$as_me:$LINENO: result: yes" >&5
2062echo "${ECHO_T}yes" >&6
2063
2064rm -f a.out a.exe conftest$ac_cv_exeext
2065ac_clean_files=$ac_clean_files_save
2066# Check the compiler produces executables we can run. If not, either
2067# the compiler is broken, or we cross compile.
2068echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2069echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2070echo "$as_me:$LINENO: result: $cross_compiling" >&5
2071echo "${ECHO_T}$cross_compiling" >&6
2072
2073echo "$as_me:$LINENO: checking for suffix of executables" >&5
2074echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2075if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2076 (eval $ac_link) 2>&5
2077 ac_status=$?
2078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2079 (exit $ac_status); }; then
2080 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2081# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2082# work properly (i.e., refer to `conftest.exe'), while it won't with
2083# `rm'.
2084for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2085 case $ac_file in
2086 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2087 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2088 export ac_cv_exeext
2089 break;;
2090 * ) break;;
2091 esac
2092done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002093else
Martin v. Löwis11437992002-04-12 09:54:03 +00002094 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2095echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2096 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002097fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002098
Martin v. Löwis11437992002-04-12 09:54:03 +00002099rm -f conftest$ac_cv_exeext
2100echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2101echo "${ECHO_T}$ac_cv_exeext" >&6
2102
2103rm -f conftest.$ac_ext
2104EXEEXT=$ac_cv_exeext
2105ac_exeext=$EXEEXT
2106echo "$as_me:$LINENO: checking for suffix of object files" >&5
2107echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2108if test "${ac_cv_objext+set}" = set; then
2109 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002110else
Martin v. Löwis11437992002-04-12 09:54:03 +00002111 cat >conftest.$ac_ext <<_ACEOF
2112#line $LINENO "configure"
2113#include "confdefs.h"
2114
2115#ifdef F77_DUMMY_MAIN
2116# ifdef __cplusplus
2117 extern "C"
2118# endif
2119 int F77_DUMMY_MAIN() { return 1; }
2120#endif
2121int
2122main ()
2123{
2124
2125 ;
2126 return 0;
2127}
2128_ACEOF
2129rm -f conftest.o conftest.obj
2130if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2131 (eval $ac_compile) 2>&5
2132 ac_status=$?
2133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2134 (exit $ac_status); }; then
2135 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2136 case $ac_file in
2137 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2138 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2139 break;;
2140 esac
2141done
2142else
2143 echo "$as_me: failed program was:" >&5
2144cat conftest.$ac_ext >&5
2145{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2146echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2147 { (exit 1); exit 1; }; }
2148fi
2149
2150rm -f conftest.$ac_cv_objext conftest.$ac_ext
2151fi
2152echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2153echo "${ECHO_T}$ac_cv_objext" >&6
2154OBJEXT=$ac_cv_objext
2155ac_objext=$OBJEXT
2156echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2157echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2158if test "${ac_cv_c_compiler_gnu+set}" = set; then
2159 echo $ECHO_N "(cached) $ECHO_C" >&6
2160else
2161 cat >conftest.$ac_ext <<_ACEOF
2162#line $LINENO "configure"
2163#include "confdefs.h"
2164
2165#ifdef F77_DUMMY_MAIN
2166# ifdef __cplusplus
2167 extern "C"
2168# endif
2169 int F77_DUMMY_MAIN() { return 1; }
2170#endif
2171int
2172main ()
2173{
2174#ifndef __GNUC__
2175 choke me
2176#endif
2177
2178 ;
2179 return 0;
2180}
2181_ACEOF
2182rm -f conftest.$ac_objext
2183if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2184 (eval $ac_compile) 2>&5
2185 ac_status=$?
2186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2187 (exit $ac_status); } &&
2188 { ac_try='test -s conftest.$ac_objext'
2189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2190 (eval $ac_try) 2>&5
2191 ac_status=$?
2192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2193 (exit $ac_status); }; }; then
2194 ac_compiler_gnu=yes
2195else
2196 echo "$as_me: failed program was:" >&5
2197cat conftest.$ac_ext >&5
2198ac_compiler_gnu=no
2199fi
2200rm -f conftest.$ac_objext conftest.$ac_ext
2201ac_cv_c_compiler_gnu=$ac_compiler_gnu
2202
2203fi
2204echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2205echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2206GCC=`test $ac_compiler_gnu = yes && echo yes`
2207ac_test_CFLAGS=${CFLAGS+set}
2208ac_save_CFLAGS=$CFLAGS
2209CFLAGS="-g"
2210echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2211echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2212if test "${ac_cv_prog_cc_g+set}" = set; then
2213 echo $ECHO_N "(cached) $ECHO_C" >&6
2214else
2215 cat >conftest.$ac_ext <<_ACEOF
2216#line $LINENO "configure"
2217#include "confdefs.h"
2218
2219#ifdef F77_DUMMY_MAIN
2220# ifdef __cplusplus
2221 extern "C"
2222# endif
2223 int F77_DUMMY_MAIN() { return 1; }
2224#endif
2225int
2226main ()
2227{
2228
2229 ;
2230 return 0;
2231}
2232_ACEOF
2233rm -f conftest.$ac_objext
2234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2235 (eval $ac_compile) 2>&5
2236 ac_status=$?
2237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2238 (exit $ac_status); } &&
2239 { ac_try='test -s conftest.$ac_objext'
2240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2241 (eval $ac_try) 2>&5
2242 ac_status=$?
2243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2244 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002245 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002246else
Martin v. Löwis11437992002-04-12 09:54:03 +00002247 echo "$as_me: failed program was:" >&5
2248cat conftest.$ac_ext >&5
2249ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002250fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002251rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002252fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002253echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2254echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002255if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002256 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002257elif test $ac_cv_prog_cc_g = yes; then
2258 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002259 CFLAGS="-g -O2"
2260 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002261 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002262 fi
2263else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002264 if test "$GCC" = yes; then
2265 CFLAGS="-O2"
2266 else
2267 CFLAGS=
2268 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002269fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002270# Some people use a C++ compiler to compile C. Since we use `exit',
2271# in C++ we need to declare it. In case someone uses the same compiler
2272# for both compiling C and C++ we need to have the C++ compiler decide
2273# the declaration of exit, since it's the most demanding environment.
2274cat >conftest.$ac_ext <<_ACEOF
2275#ifndef __cplusplus
2276 choke me
2277#endif
2278_ACEOF
2279rm -f conftest.$ac_objext
2280if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2281 (eval $ac_compile) 2>&5
2282 ac_status=$?
2283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2284 (exit $ac_status); } &&
2285 { ac_try='test -s conftest.$ac_objext'
2286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2287 (eval $ac_try) 2>&5
2288 ac_status=$?
2289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2290 (exit $ac_status); }; }; then
2291 for ac_declaration in \
2292 ''\
2293 '#include <stdlib.h>' \
2294 'extern "C" void std::exit (int) throw (); using std::exit;' \
2295 'extern "C" void std::exit (int); using std::exit;' \
2296 'extern "C" void exit (int) throw ();' \
2297 'extern "C" void exit (int);' \
2298 'void exit (int);'
2299do
2300 cat >conftest.$ac_ext <<_ACEOF
2301#line $LINENO "configure"
2302#include "confdefs.h"
2303#include <stdlib.h>
2304$ac_declaration
2305#ifdef F77_DUMMY_MAIN
2306# ifdef __cplusplus
2307 extern "C"
2308# endif
2309 int F77_DUMMY_MAIN() { return 1; }
2310#endif
2311int
2312main ()
2313{
2314exit (42);
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319rm -f conftest.$ac_objext
2320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2321 (eval $ac_compile) 2>&5
2322 ac_status=$?
2323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2324 (exit $ac_status); } &&
2325 { ac_try='test -s conftest.$ac_objext'
2326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2327 (eval $ac_try) 2>&5
2328 ac_status=$?
2329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2330 (exit $ac_status); }; }; then
2331 :
2332else
2333 echo "$as_me: failed program was:" >&5
2334cat conftest.$ac_ext >&5
2335continue
2336fi
2337rm -f conftest.$ac_objext conftest.$ac_ext
2338 cat >conftest.$ac_ext <<_ACEOF
2339#line $LINENO "configure"
2340#include "confdefs.h"
2341$ac_declaration
2342#ifdef F77_DUMMY_MAIN
2343# ifdef __cplusplus
2344 extern "C"
2345# endif
2346 int F77_DUMMY_MAIN() { return 1; }
2347#endif
2348int
2349main ()
2350{
2351exit (42);
2352 ;
2353 return 0;
2354}
2355_ACEOF
2356rm -f conftest.$ac_objext
2357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2358 (eval $ac_compile) 2>&5
2359 ac_status=$?
2360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2361 (exit $ac_status); } &&
2362 { ac_try='test -s conftest.$ac_objext'
2363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2364 (eval $ac_try) 2>&5
2365 ac_status=$?
2366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2367 (exit $ac_status); }; }; then
2368 break
2369else
2370 echo "$as_me: failed program was:" >&5
2371cat conftest.$ac_ext >&5
2372fi
2373rm -f conftest.$ac_objext conftest.$ac_ext
2374done
2375rm -f conftest*
2376if test -n "$ac_declaration"; then
2377 echo '#ifdef __cplusplus' >>confdefs.h
2378 echo $ac_declaration >>confdefs.h
2379 echo '#endif' >>confdefs.h
2380fi
2381
2382else
2383 echo "$as_me: failed program was:" >&5
2384cat conftest.$ac_ext >&5
2385fi
2386rm -f conftest.$ac_objext conftest.$ac_ext
2387ac_ext=c
2388ac_cpp='$CPP $CPPFLAGS'
2389ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2390ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2391ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002392
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002393
2394# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002395
2396ac_ext=c
2397ac_cpp='$CPP $CPPFLAGS'
2398ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2399ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2400ac_compiler_gnu=$ac_cv_c_compiler_gnu
2401echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2402echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002403# On Suns, sometimes $CPP names a directory.
2404if test -n "$CPP" && test -d "$CPP"; then
2405 CPP=
2406fi
2407if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002408 if test "${ac_cv_prog_CPP+set}" = set; then
2409 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002410else
Martin v. Löwis11437992002-04-12 09:54:03 +00002411 # Double quotes because CPP needs to be expanded
2412 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2413 do
2414 ac_preproc_ok=false
2415for ac_c_preproc_warn_flag in '' yes
2416do
2417 # Use a header file that comes with gcc, so configuring glibc
2418 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002419 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002420 # not just through cpp. "Syntax error" is here to catch this case.
2421 cat >conftest.$ac_ext <<_ACEOF
2422#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002423#include "confdefs.h"
2424#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002425 Syntax error
2426_ACEOF
2427if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2428 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2429 ac_status=$?
2430 egrep -v '^ *\+' conftest.er1 >conftest.err
2431 rm -f conftest.er1
2432 cat conftest.err >&5
2433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2434 (exit $ac_status); } >/dev/null; then
2435 if test -s conftest.err; then
2436 ac_cpp_err=$ac_c_preproc_warn_flag
2437 else
2438 ac_cpp_err=
2439 fi
2440else
2441 ac_cpp_err=yes
2442fi
2443if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002444 :
2445else
Martin v. Löwis11437992002-04-12 09:54:03 +00002446 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002447 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002448 # Broken: fails on valid input.
2449continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002450fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002451rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002452
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 # OK, works on sane cases. Now check whether non-existent headers
2454 # can be detected and how.
2455 cat >conftest.$ac_ext <<_ACEOF
2456#line $LINENO "configure"
2457#include "confdefs.h"
2458#include <ac_nonexistent.h>
2459_ACEOF
2460if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2461 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2462 ac_status=$?
2463 egrep -v '^ *\+' conftest.er1 >conftest.err
2464 rm -f conftest.er1
2465 cat conftest.err >&5
2466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2467 (exit $ac_status); } >/dev/null; then
2468 if test -s conftest.err; then
2469 ac_cpp_err=$ac_c_preproc_warn_flag
2470 else
2471 ac_cpp_err=
2472 fi
2473else
2474 ac_cpp_err=yes
2475fi
2476if test -z "$ac_cpp_err"; then
2477 # Broken: success on invalid input.
2478continue
2479else
2480 echo "$as_me: failed program was:" >&5
2481 cat conftest.$ac_ext >&5
2482 # Passes both tests.
2483ac_preproc_ok=:
2484break
2485fi
2486rm -f conftest.err conftest.$ac_ext
2487
2488done
2489# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2490rm -f conftest.err conftest.$ac_ext
2491if $ac_preproc_ok; then
2492 break
2493fi
2494
2495 done
2496 ac_cv_prog_CPP=$CPP
2497
2498fi
2499 CPP=$ac_cv_prog_CPP
2500else
2501 ac_cv_prog_CPP=$CPP
2502fi
2503echo "$as_me:$LINENO: result: $CPP" >&5
2504echo "${ECHO_T}$CPP" >&6
2505ac_preproc_ok=false
2506for ac_c_preproc_warn_flag in '' yes
2507do
2508 # Use a header file that comes with gcc, so configuring glibc
2509 # with a fresh cross-compiler works.
2510 # On the NeXT, cc -E runs the code through the compiler's parser,
2511 # not just through cpp. "Syntax error" is here to catch this case.
2512 cat >conftest.$ac_ext <<_ACEOF
2513#line $LINENO "configure"
2514#include "confdefs.h"
2515#include <assert.h>
2516 Syntax error
2517_ACEOF
2518if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2519 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2520 ac_status=$?
2521 egrep -v '^ *\+' conftest.er1 >conftest.err
2522 rm -f conftest.er1
2523 cat conftest.err >&5
2524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2525 (exit $ac_status); } >/dev/null; then
2526 if test -s conftest.err; then
2527 ac_cpp_err=$ac_c_preproc_warn_flag
2528 else
2529 ac_cpp_err=
2530 fi
2531else
2532 ac_cpp_err=yes
2533fi
2534if test -z "$ac_cpp_err"; then
2535 :
2536else
2537 echo "$as_me: failed program was:" >&5
2538 cat conftest.$ac_ext >&5
2539 # Broken: fails on valid input.
2540continue
2541fi
2542rm -f conftest.err conftest.$ac_ext
2543
2544 # OK, works on sane cases. Now check whether non-existent headers
2545 # can be detected and how.
2546 cat >conftest.$ac_ext <<_ACEOF
2547#line $LINENO "configure"
2548#include "confdefs.h"
2549#include <ac_nonexistent.h>
2550_ACEOF
2551if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2552 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2553 ac_status=$?
2554 egrep -v '^ *\+' conftest.er1 >conftest.err
2555 rm -f conftest.er1
2556 cat conftest.err >&5
2557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2558 (exit $ac_status); } >/dev/null; then
2559 if test -s conftest.err; then
2560 ac_cpp_err=$ac_c_preproc_warn_flag
2561 else
2562 ac_cpp_err=
2563 fi
2564else
2565 ac_cpp_err=yes
2566fi
2567if test -z "$ac_cpp_err"; then
2568 # Broken: success on invalid input.
2569continue
2570else
2571 echo "$as_me: failed program was:" >&5
2572 cat conftest.$ac_ext >&5
2573 # Passes both tests.
2574ac_preproc_ok=:
2575break
2576fi
2577rm -f conftest.err conftest.$ac_ext
2578
2579done
2580# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2581rm -f conftest.err conftest.$ac_ext
2582if $ac_preproc_ok; then
2583 :
2584else
2585 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2586echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2587 { (exit 1); exit 1; }; }
2588fi
2589
2590ac_ext=c
2591ac_cpp='$CPP $CPPFLAGS'
2592ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2593ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2594ac_compiler_gnu=$ac_cv_c_compiler_gnu
2595
2596
2597
2598echo "$as_me:$LINENO: checking for AIX" >&5
2599echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2600cat >conftest.$ac_ext <<_ACEOF
2601#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002602#include "confdefs.h"
2603#ifdef _AIX
2604 yes
2605#endif
2606
Martin v. Löwis11437992002-04-12 09:54:03 +00002607_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002608if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2609 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 echo "$as_me:$LINENO: result: yes" >&5
2611echo "${ECHO_T}yes" >&6
2612cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002613#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002614_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002615
2616else
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 echo "$as_me:$LINENO: result: no" >&5
2618echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002619fi
2620rm -f conftest*
2621
Michael W. Hudson54241132001-12-07 15:38:26 +00002622
Martin v. Löwis11437992002-04-12 09:54:03 +00002623echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2624echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2625if test "${ac_cv_header_stdc+set}" = set; then
2626 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002627else
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 cat >conftest.$ac_ext <<_ACEOF
2629#line $LINENO "configure"
2630#include "confdefs.h"
2631#include <stdlib.h>
2632#include <stdarg.h>
2633#include <string.h>
2634#include <float.h>
2635
2636_ACEOF
2637if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2638 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2639 ac_status=$?
2640 egrep -v '^ *\+' conftest.er1 >conftest.err
2641 rm -f conftest.er1
2642 cat conftest.err >&5
2643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2644 (exit $ac_status); } >/dev/null; then
2645 if test -s conftest.err; then
2646 ac_cpp_err=$ac_c_preproc_warn_flag
2647 else
2648 ac_cpp_err=
2649 fi
2650else
2651 ac_cpp_err=yes
2652fi
2653if test -z "$ac_cpp_err"; then
2654 ac_cv_header_stdc=yes
2655else
2656 echo "$as_me: failed program was:" >&5
2657 cat conftest.$ac_ext >&5
2658 ac_cv_header_stdc=no
2659fi
2660rm -f conftest.err conftest.$ac_ext
2661
2662if test $ac_cv_header_stdc = yes; then
2663 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2664 cat >conftest.$ac_ext <<_ACEOF
2665#line $LINENO "configure"
2666#include "confdefs.h"
2667#include <string.h>
2668
2669_ACEOF
2670if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2671 egrep "memchr" >/dev/null 2>&1; then
2672 :
2673else
2674 ac_cv_header_stdc=no
2675fi
2676rm -f conftest*
2677
2678fi
2679
2680if test $ac_cv_header_stdc = yes; then
2681 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2682 cat >conftest.$ac_ext <<_ACEOF
2683#line $LINENO "configure"
2684#include "confdefs.h"
2685#include <stdlib.h>
2686
2687_ACEOF
2688if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2689 egrep "free" >/dev/null 2>&1; then
2690 :
2691else
2692 ac_cv_header_stdc=no
2693fi
2694rm -f conftest*
2695
2696fi
2697
2698if test $ac_cv_header_stdc = yes; then
2699 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2700 if test "$cross_compiling" = yes; then
2701 :
2702else
2703 cat >conftest.$ac_ext <<_ACEOF
2704#line $LINENO "configure"
2705#include "confdefs.h"
2706#include <ctype.h>
2707#if ((' ' & 0x0FF) == 0x020)
2708# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2709# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2710#else
2711# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2712 || ('j' <= (c) && (c) <= 'r') \
2713 || ('s' <= (c) && (c) <= 'z'))
2714# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2715#endif
2716
2717#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2718int
2719main ()
2720{
2721 int i;
2722 for (i = 0; i < 256; i++)
2723 if (XOR (islower (i), ISLOWER (i))
2724 || toupper (i) != TOUPPER (i))
2725 exit(2);
2726 exit (0);
2727}
2728_ACEOF
2729rm -f conftest$ac_exeext
2730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2731 (eval $ac_link) 2>&5
2732 ac_status=$?
2733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2734 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2736 (eval $ac_try) 2>&5
2737 ac_status=$?
2738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2739 (exit $ac_status); }; }; then
2740 :
2741else
2742 echo "$as_me: program exited with status $ac_status" >&5
2743echo "$as_me: failed program was:" >&5
2744cat conftest.$ac_ext >&5
2745( exit $ac_status )
2746ac_cv_header_stdc=no
2747fi
2748rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2749fi
2750fi
2751fi
2752echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2753echo "${ECHO_T}$ac_cv_header_stdc" >&6
2754if test $ac_cv_header_stdc = yes; then
2755
2756cat >>confdefs.h <<\_ACEOF
2757#define STDC_HEADERS 1
2758_ACEOF
2759
2760fi
2761
2762# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2773 inttypes.h stdint.h unistd.h
2774do
2775as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2776echo "$as_me:$LINENO: checking for $ac_header" >&5
2777echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2778if eval "test \"\${$as_ac_Header+set}\" = set"; then
2779 echo $ECHO_N "(cached) $ECHO_C" >&6
2780else
2781 cat >conftest.$ac_ext <<_ACEOF
2782#line $LINENO "configure"
2783#include "confdefs.h"
2784$ac_includes_default
2785
2786#include <$ac_header>
2787_ACEOF
2788rm -f conftest.$ac_objext
2789if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2790 (eval $ac_compile) 2>&5
2791 ac_status=$?
2792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2793 (exit $ac_status); } &&
2794 { ac_try='test -s conftest.$ac_objext'
2795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2796 (eval $ac_try) 2>&5
2797 ac_status=$?
2798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2799 (exit $ac_status); }; }; then
2800 eval "$as_ac_Header=yes"
2801else
2802 echo "$as_me: failed program was:" >&5
2803cat conftest.$ac_ext >&5
2804eval "$as_ac_Header=no"
2805fi
2806rm -f conftest.$ac_objext conftest.$ac_ext
2807fi
2808echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2809echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2810if test `eval echo '${'$as_ac_Header'}'` = yes; then
2811 cat >>confdefs.h <<_ACEOF
2812#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2813_ACEOF
2814
2815fi
2816
2817done
2818
2819
2820if test "${ac_cv_header_minix_config_h+set}" = set; then
2821 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2822echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2823if test "${ac_cv_header_minix_config_h+set}" = set; then
2824 echo $ECHO_N "(cached) $ECHO_C" >&6
2825fi
2826echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2827echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2828else
2829 # Is the header compilable?
2830echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2831echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2832cat >conftest.$ac_ext <<_ACEOF
2833#line $LINENO "configure"
2834#include "confdefs.h"
2835$ac_includes_default
2836#include <minix/config.h>
2837_ACEOF
2838rm -f conftest.$ac_objext
2839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2840 (eval $ac_compile) 2>&5
2841 ac_status=$?
2842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2843 (exit $ac_status); } &&
2844 { ac_try='test -s conftest.$ac_objext'
2845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2846 (eval $ac_try) 2>&5
2847 ac_status=$?
2848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2849 (exit $ac_status); }; }; then
2850 ac_header_compiler=yes
2851else
2852 echo "$as_me: failed program was:" >&5
2853cat conftest.$ac_ext >&5
2854ac_header_compiler=no
2855fi
2856rm -f conftest.$ac_objext conftest.$ac_ext
2857echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2858echo "${ECHO_T}$ac_header_compiler" >&6
2859
2860# Is the header present?
2861echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2862echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2863cat >conftest.$ac_ext <<_ACEOF
2864#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002865#include "confdefs.h"
2866#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002867_ACEOF
2868if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2869 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2870 ac_status=$?
2871 egrep -v '^ *\+' conftest.er1 >conftest.err
2872 rm -f conftest.er1
2873 cat conftest.err >&5
2874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2875 (exit $ac_status); } >/dev/null; then
2876 if test -s conftest.err; then
2877 ac_cpp_err=$ac_c_preproc_warn_flag
2878 else
2879 ac_cpp_err=
2880 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002881else
Martin v. Löwis11437992002-04-12 09:54:03 +00002882 ac_cpp_err=yes
2883fi
2884if test -z "$ac_cpp_err"; then
2885 ac_header_preproc=yes
2886else
2887 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002888 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002889 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002890fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002891rm -f conftest.err conftest.$ac_ext
2892echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2893echo "${ECHO_T}$ac_header_preproc" >&6
2894
2895# So? What about this header?
2896case $ac_header_compiler:$ac_header_preproc in
2897 yes:no )
2898 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2899echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2900 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2901echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2902 no:yes )
2903 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2904echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2905 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2906echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2907 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2908echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2909esac
2910echo "$as_me:$LINENO: checking for minix/config.h" >&5
2911echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2912if test "${ac_cv_header_minix_config_h+set}" = set; then
2913 echo $ECHO_N "(cached) $ECHO_C" >&6
2914else
2915 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002916fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002917echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2918echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2919
2920fi
2921if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002922 MINIX=yes
2923else
Martin v. Löwis11437992002-04-12 09:54:03 +00002924 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002925fi
2926
Martin v. Löwis11437992002-04-12 09:54:03 +00002927
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002928if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002929
2930cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002931#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002932_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002933
Martin v. Löwis11437992002-04-12 09:54:03 +00002934
2935cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002936#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002937_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002938
Martin v. Löwis11437992002-04-12 09:54:03 +00002939
2940cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002941#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002942_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002943
2944fi
2945
2946
Michael W. Hudson54241132001-12-07 15:38:26 +00002947
Martin v. Löwis11437992002-04-12 09:54:03 +00002948echo "$as_me:$LINENO: checking for --with-suffix" >&5
2949echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002950
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002951# Check whether --with-suffix or --without-suffix was given.
2952if test "${with_suffix+set}" = set; then
2953 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002954
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002955 case $withval in
2956 no) EXEEXT=;;
2957 yes) EXEEXT=.exe;;
2958 *) EXEEXT=$withval;;
2959 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002960fi;
2961echo "$as_me:$LINENO: result: $EXEEXT" >&5
2962echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002963
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002964# Test whether we're running on a non-case-sensitive system, in which
2965# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002966
Martin v. Löwis11437992002-04-12 09:54:03 +00002967echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2968echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen0b06be72002-06-21 14:48:38 +00002969if test -d "${srcdir}/python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002970then
Martin v. Löwis11437992002-04-12 09:54:03 +00002971 echo "$as_me:$LINENO: result: yes" >&5
2972echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002973 BUILDEXEEXT=.exe
2974else
Martin v. Löwis11437992002-04-12 09:54:03 +00002975 echo "$as_me:$LINENO: result: no" >&5
2976echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002977 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002978fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002979
Guido van Rossumdd997f71998-10-07 19:58:26 +00002980case $MACHDEP in
2981bsdos*)
2982 case $CC in
2983 gcc) CC="$CC -D_HAVE_BSDI";;
2984 esac;;
2985esac
2986
Guido van Rossum24b1e751997-08-21 02:29:16 +00002987case $ac_sys_system in
2988hp*|HP*)
2989 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002990 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002991 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002992Monterey*)
2993 case $CC in
2994 cc) CC="$CC -Wl,-Bexport";;
2995 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002996SunOS*)
2997 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002998
2999cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003000#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003001_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003002
3003 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003004esac
3005
Michael W. Hudson54241132001-12-07 15:38:26 +00003006
3007
Martin v. Löwis11437992002-04-12 09:54:03 +00003008echo "$as_me:$LINENO: checking LIBRARY" >&5
3009echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003010if test -z "$LIBRARY"
3011then
3012 LIBRARY='libpython$(VERSION).a'
3013fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003014echo "$as_me:$LINENO: result: $LIBRARY" >&5
3015echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003016
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003017# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003018# name of the library into which to insert object files). BLDLIBRARY is also
3019# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3020# is blank as the main program is not linked directly against LDLIBRARY.
3021# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3022# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3023# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3024# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003025#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003026# RUNSHARED is used to run shared python without installed libraries
3027#
3028# INSTSONAME is the name of the shared library that will be use to install
3029# on the system - some systems like version suffix, others don't
3030
3031
Michael W. Hudson54241132001-12-07 15:38:26 +00003032
3033
3034
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003035
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003036LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003037BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003038INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003039DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003040LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003041RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003042
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003043# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003044# If CXX is set, and if it is needed to link a main function that was
3045# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3046# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003047# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003048# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003049
Martin v. Löwis11437992002-04-12 09:54:03 +00003050echo "$as_me:$LINENO: checking LINKCC" >&5
3051echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003052if test -z "$LINKCC"
3053then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003054 if test -z "$CXX"; then
3055 LINKCC="\$(PURIFY) \$(CC)"
3056 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003057 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003058 $CXX -c conftest.$ac_ext 2>&5
3059 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3060 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3061 then
3062 LINKCC="\$(PURIFY) \$(CC)"
3063 else
3064 LINKCC="\$(PURIFY) \$(CXX)"
3065 fi
3066 rm -fr conftest*
3067 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003068 case $ac_sys_system in
3069 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003070 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003071 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003072 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003073 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003074 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003075 esac
3076fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003077echo "$as_me:$LINENO: result: $LINKCC" >&5
3078echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003079
Martin v. Löwis11437992002-04-12 09:54:03 +00003080echo "$as_me:$LINENO: checking for --enable-shared" >&5
3081echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003082# Check whether --enable-shared or --disable-shared was given.
3083if test "${enable_shared+set}" = set; then
3084 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003085
Martin v. Löwis11437992002-04-12 09:54:03 +00003086fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003087
3088if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003089then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003090 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003091 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003092 enable_shared="yes";;
3093 *)
3094 enable_shared="no";;
3095 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003096fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003097echo "$as_me:$LINENO: result: $enable_shared" >&5
3098echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003099
3100
Martin v. Löwis11437992002-04-12 09:54:03 +00003101echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3102echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003103
Guido van Rossumb8552162001-09-05 14:58:11 +00003104# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3105# library that we build, but we do not want to link against it (we
3106# will find it with a -framework option). For this reason there is an
3107# extra variable BLDLIBRARY against which Python and the extension
3108# modules are linked, BLDLIBRARY. This is normally the same as
3109# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003110if test "$enable_framework"
3111then
3112 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3113 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3114 BLDLIBRARY=''
3115else
3116 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003117fi
Jack Jansene578a632001-08-15 01:27:14 +00003118
Martin v. Löwis1142de32002-03-29 16:28:31 +00003119# Other platforms follow
3120if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003121
3122cat >>confdefs.h <<\_ACEOF
3123#define Py_ENABLE_SHARED 1
3124_ACEOF
3125
Martin v. Löwis1142de32002-03-29 16:28:31 +00003126 case $ac_sys_system in
3127 BeOS*)
3128 LDLIBRARY='libpython$(VERSION).so'
3129 ;;
3130 CYGWIN*)
3131 LDLIBRARY='libpython$(VERSION).dll.a'
3132 DLLLIBRARY='libpython$(VERSION).dll'
3133 ;;
3134 SunOS*)
3135 LDLIBRARY='libpython$(VERSION).so'
3136 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3137 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3138 ;;
3139 Linux*)
3140 LDLIBRARY='libpython$(VERSION).so'
3141 BLDLIBRARY='-L. -lpython$(VERSION)'
3142 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3143 INSTSONAME="$LDLIBRARY".$SOVERSION
3144 ;;
3145 hp*|HP*)
3146 LDLIBRARY='libpython$(VERSION).sl'
3147 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3148 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3149 ;;
3150 OSF*)
3151 LDLIBRARY='libpython$(VERSION).so'
3152 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3153 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3154 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003155 atheos*)
3156 LDLIBRARY='libpython$(VERSION).so'
3157 BLDLIBRARY='-L. -lpython$(VERSION)'
3158 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3159 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003160 esac
3161 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3162 case $MACHDEP in
3163 dguxR4)
3164 LDLIBRARY='libpython$(VERSION).so'
3165 OPT="$OPT -pic"
3166 ;;
3167 esac
3168fi
3169
Martin v. Löwis11437992002-04-12 09:54:03 +00003170echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3171echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003172
Martin v. Löwis11437992002-04-12 09:54:03 +00003173if test -n "$ac_tool_prefix"; then
3174 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3175set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3176echo "$as_me:$LINENO: checking for $ac_word" >&5
3177echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3178if test "${ac_cv_prog_RANLIB+set}" = set; then
3179 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003180else
3181 if test -n "$RANLIB"; then
3182 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3183else
Martin v. Löwis11437992002-04-12 09:54:03 +00003184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3185for as_dir in $PATH
3186do
3187 IFS=$as_save_IFS
3188 test -z "$as_dir" && as_dir=.
3189 for ac_exec_ext in '' $ac_executable_extensions; do
3190 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3191 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3192 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3193 break 2
3194 fi
3195done
3196done
3197
Guido van Rossum627b2d71993-12-24 10:39:16 +00003198fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003199fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003200RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003201if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003202 echo "$as_me:$LINENO: result: $RANLIB" >&5
3203echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003204else
Martin v. Löwis11437992002-04-12 09:54:03 +00003205 echo "$as_me:$LINENO: result: no" >&5
3206echo "${ECHO_T}no" >&6
3207fi
3208
3209fi
3210if test -z "$ac_cv_prog_RANLIB"; then
3211 ac_ct_RANLIB=$RANLIB
3212 # Extract the first word of "ranlib", so it can be a program name with args.
3213set dummy ranlib; ac_word=$2
3214echo "$as_me:$LINENO: checking for $ac_word" >&5
3215echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3216if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3217 echo $ECHO_N "(cached) $ECHO_C" >&6
3218else
3219 if test -n "$ac_ct_RANLIB"; then
3220 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3221else
3222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3223for as_dir in $PATH
3224do
3225 IFS=$as_save_IFS
3226 test -z "$as_dir" && as_dir=.
3227 for ac_exec_ext in '' $ac_executable_extensions; do
3228 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3229 ac_cv_prog_ac_ct_RANLIB="ranlib"
3230 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3231 break 2
3232 fi
3233done
3234done
3235
3236 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3237fi
3238fi
3239ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3240if test -n "$ac_ct_RANLIB"; then
3241 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3242echo "${ECHO_T}$ac_ct_RANLIB" >&6
3243else
3244 echo "$as_me:$LINENO: result: no" >&5
3245echo "${ECHO_T}no" >&6
3246fi
3247
3248 RANLIB=$ac_ct_RANLIB
3249else
3250 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003251fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003252
3253
Guido van Rossum7f43da71994-08-01 12:15:30 +00003254for ac_prog in ar aal
3255do
Martin v. Löwis11437992002-04-12 09:54:03 +00003256 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003257set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003258echo "$as_me:$LINENO: checking for $ac_word" >&5
3259echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3260if test "${ac_cv_prog_AR+set}" = set; then
3261 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003262else
3263 if test -n "$AR"; then
3264 ac_cv_prog_AR="$AR" # Let the user override the test.
3265else
Martin v. Löwis11437992002-04-12 09:54:03 +00003266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3267for as_dir in $PATH
3268do
3269 IFS=$as_save_IFS
3270 test -z "$as_dir" && as_dir=.
3271 for ac_exec_ext in '' $ac_executable_extensions; do
3272 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3273 ac_cv_prog_AR="$ac_prog"
3274 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3275 break 2
3276 fi
3277done
3278done
3279
Guido van Rossum7f43da71994-08-01 12:15:30 +00003280fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003281fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003282AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003283if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003284 echo "$as_me:$LINENO: result: $AR" >&5
3285echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003286else
Martin v. Löwis11437992002-04-12 09:54:03 +00003287 echo "$as_me:$LINENO: result: no" >&5
3288echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003289fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003290
Martin v. Löwis11437992002-04-12 09:54:03 +00003291 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003292done
3293test -n "$AR" || AR="ar"
3294
Michael W. Hudson54241132001-12-07 15:38:26 +00003295
Neil Schemenauera42c8272001-03-31 00:01:55 +00003296case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003297bsdos*|hp*|HP*)
3298 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003299 if test -z "$INSTALL"
3300 then
3301 INSTALL="${srcdir}/install-sh -c"
3302 fi
3303esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003304ac_aux_dir=
3305for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3306 if test -f $ac_dir/install-sh; then
3307 ac_aux_dir=$ac_dir
3308 ac_install_sh="$ac_aux_dir/install-sh -c"
3309 break
3310 elif test -f $ac_dir/install.sh; then
3311 ac_aux_dir=$ac_dir
3312 ac_install_sh="$ac_aux_dir/install.sh -c"
3313 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003314 elif test -f $ac_dir/shtool; then
3315 ac_aux_dir=$ac_dir
3316 ac_install_sh="$ac_aux_dir/shtool install -c"
3317 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003318 fi
3319done
3320if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003321 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3322echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3323 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003324fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003325ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3326ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3327ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003328
3329# Find a good install program. We prefer a C program (faster),
3330# so one script is as good as another. But avoid the broken or
3331# incompatible versions:
3332# SysV /etc/install, /usr/sbin/install
3333# SunOS /usr/etc/install
3334# IRIX /sbin/install
3335# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003336# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003337# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3338# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3339# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3340# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003341echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3342echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003343if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003344if test "${ac_cv_path_install+set}" = set; then
3345 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003346else
Martin v. Löwis11437992002-04-12 09:54:03 +00003347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3348for as_dir in $PATH
3349do
3350 IFS=$as_save_IFS
3351 test -z "$as_dir" && as_dir=.
3352 # Account for people who put trailing slashes in PATH elements.
3353case $as_dir/ in
3354 ./ | .// | /cC/* | \
3355 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3356 /usr/ucb/* ) ;;
3357 *)
3358 # OSF1 and SCO ODT 3.0 have their own names for install.
3359 # Don't use installbsd from OSF since it installs stuff as root
3360 # by default.
3361 for ac_prog in ginstall scoinst install; do
3362 for ac_exec_ext in '' $ac_executable_extensions; do
3363 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3364 if test $ac_prog = install &&
3365 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3366 # AIX install. It has an incompatible calling convention.
3367 :
3368 elif test $ac_prog = install &&
3369 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3370 # program-specific install script used by HP pwplus--don't use.
3371 :
3372 else
3373 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3374 break 3
3375 fi
3376 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003377 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003378 done
3379 ;;
3380esac
3381done
3382
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003383
3384fi
3385 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003386 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003387 else
3388 # As a last resort, use the slow shell script. We don't cache a
3389 # path for INSTALL within a source directory, because that will
3390 # break other packages using the cache if that directory is
3391 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003392 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003393 fi
3394fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003395echo "$as_me:$LINENO: result: $INSTALL" >&5
3396echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003397
3398# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3399# It thinks the first close brace ends the variable substitution.
3400test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3401
Martin v. Löwis11437992002-04-12 09:54:03 +00003402test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003403
3404test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3405
Michael W. Hudson54241132001-12-07 15:38:26 +00003406
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003407# Not every filesystem supports hard links
3408
3409if test -z "$LN" ; then
3410 case $ac_sys_system in
3411 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003412 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003413 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003414 *) LN=ln;;
3415 esac
3416fi
3417
Fred Drake109d9862001-07-11 06:27:56 +00003418# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003419echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3420echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3421
Fred Drake109d9862001-07-11 06:27:56 +00003422# Check whether --with-pydebug or --without-pydebug was given.
3423if test "${with_pydebug+set}" = set; then
3424 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003425
Fred Drake109d9862001-07-11 06:27:56 +00003426if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003427then
3428
3429cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003430#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003431_ACEOF
3432
3433 echo "$as_me:$LINENO: result: yes" >&5
3434echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003435 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003436else echo "$as_me:$LINENO: result: no" >&5
3437echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003438fi
3439else
Martin v. Löwis11437992002-04-12 09:54:03 +00003440 echo "$as_me:$LINENO: result: no" >&5
3441echo "${ECHO_T}no" >&6
3442fi;
Fred Drake109d9862001-07-11 06:27:56 +00003443
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003444# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003445
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003446if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003447then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003448 case $GCC in
3449 yes)
3450 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003451 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003452 if test "$Py_DEBUG" = 'true' ; then
3453 # Optimization messes up debuggers, so turn it off for
3454 # debug builds.
3455 OPT="-g -Wall -Wstrict-prototypes"
3456 else
3457 OPT="-g -O3 -Wall -Wstrict-prototypes"
3458 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003459 *)
Fred Drake109d9862001-07-11 06:27:56 +00003460 OPT="-O3 -Wall -Wstrict-prototypes";;
3461 esac
3462 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003463 *)
3464 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003465 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003466 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3467 *)
3468 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003469 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003470 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003471 case $ac_sys_system in
3472 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003473 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003474 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003475fi
3476
Fred Drakee1ceaa02001-12-04 20:55:47 +00003477if test "$Py_DEBUG" = 'true'; then
3478 :
3479else
3480 OPT="-DNDEBUG $OPT"
3481fi
3482
Trent Mick635f6fb2000-08-23 21:33:05 +00003483# The current (beta) Monterey compiler dies with optimizations
3484case $ac_sys_system in
3485Monterey*) OPT="";;
3486esac
3487
Guido van Rossum563e7081996-09-10 18:20:48 +00003488if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003489then
3490 OPT="$OPT $ac_arch_flags"
3491fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003492
Martin v. Löwis11437992002-04-12 09:54:03 +00003493echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3494echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3495if test "${ac_cv_opt_olimit_ok+set}" = set; then
3496 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003497else
3498 ac_save_cc="$CC"
3499CC="$CC -OPT:Olimit=0"
3500if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003501 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003502else
Martin v. Löwis11437992002-04-12 09:54:03 +00003503 cat >conftest.$ac_ext <<_ACEOF
3504#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003505#include "confdefs.h"
3506int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003507_ACEOF
3508rm -f conftest$ac_exeext
3509if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3510 (eval $ac_link) 2>&5
3511 ac_status=$?
3512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3513 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3515 (eval $ac_try) 2>&5
3516 ac_status=$?
3517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3518 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003519 ac_cv_opt_olimit_ok=yes
3520else
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 echo "$as_me: program exited with status $ac_status" >&5
3522echo "$as_me: failed program was:" >&5
3523cat conftest.$ac_ext >&5
3524( exit $ac_status )
3525ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003526fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003527rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003528fi
Guido van Rossum91922671997-10-09 20:24:13 +00003529CC="$ac_save_cc"
3530fi
3531
Martin v. Löwis11437992002-04-12 09:54:03 +00003532echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3533echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003534if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003535 case $ac_sys_system in
3536 Darwin*) OPT="$OPT" ;;
3537 *) OPT="$OPT -OPT:Olimit=0";;
3538 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003539else
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3541echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3542 if test "${ac_cv_olimit_ok+set}" = set; then
3543 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003544else
3545 ac_save_cc="$CC"
3546 CC="$CC -Olimit 1500"
3547 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003548 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003549else
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 cat >conftest.$ac_ext <<_ACEOF
3551#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003552#include "confdefs.h"
3553int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003554_ACEOF
3555rm -f conftest$ac_exeext
3556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3557 (eval $ac_link) 2>&5
3558 ac_status=$?
3559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3560 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3562 (eval $ac_try) 2>&5
3563 ac_status=$?
3564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3565 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003566 ac_cv_olimit_ok=yes
3567else
Martin v. Löwis11437992002-04-12 09:54:03 +00003568 echo "$as_me: program exited with status $ac_status" >&5
3569echo "$as_me: failed program was:" >&5
3570cat conftest.$ac_ext >&5
3571( exit $ac_status )
3572ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003573fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003574rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003575fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003576 CC="$ac_save_cc"
3577fi
3578
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3580echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003581 if test $ac_cv_olimit_ok = yes; then
3582 OPT="$OPT -Olimit 1500"
3583 fi
3584fi
3585
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003586# On some compilers, pthreads are available without further options
3587# (e.g. MacOS X). On some of these systems, the compiler will not
3588# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3589# So we have to see first whether pthreads are available without
3590# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003591echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3592echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3593if test "${ac_cv_pthread_is_default+set}" = set; then
3594 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003595else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003596 if test "$cross_compiling" = yes; then
3597 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003598else
Martin v. Löwis11437992002-04-12 09:54:03 +00003599 cat >conftest.$ac_ext <<_ACEOF
3600#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003601#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003602
Martin v. Löwis130fb172001-07-19 11:00:41 +00003603#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003604
3605void* routine(void* p){return NULL;}
3606
3607int main(){
3608 pthread_t p;
3609 if(pthread_create(&p,NULL,routine,NULL)!=0)
3610 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003611 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003612 return 0;
3613}
3614
Martin v. Löwis11437992002-04-12 09:54:03 +00003615_ACEOF
3616rm -f conftest$ac_exeext
3617if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3618 (eval $ac_link) 2>&5
3619 ac_status=$?
3620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3621 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3623 (eval $ac_try) 2>&5
3624 ac_status=$?
3625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3626 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003627 ac_cv_pthread_is_default=yes
3628else
Martin v. Löwis11437992002-04-12 09:54:03 +00003629 echo "$as_me: program exited with status $ac_status" >&5
3630echo "$as_me: failed program was:" >&5
3631cat conftest.$ac_ext >&5
3632( exit $ac_status )
3633ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003634fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003635rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003636fi
3637
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003638fi
3639
Martin v. Löwis11437992002-04-12 09:54:03 +00003640echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3641echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003642
Michael W. Hudson54241132001-12-07 15:38:26 +00003643
Martin v. Löwis11437992002-04-12 09:54:03 +00003644if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003645then
3646 ac_cv_kpthread=no
3647else
3648# -Kpthread, if available, provides the right #defines
3649# and linker options to make pthread_create available
3650# Some compilers won't report that they do not support -Kpthread,
3651# so we need to run a program to see whether it really made the
3652# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003653echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3654echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3655if test "${ac_cv_kpthread+set}" = set; then
3656 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003657else
3658 ac_save_cc="$CC"
3659CC="$CC -Kpthread"
3660if test "$cross_compiling" = yes; then
3661 ac_cv_kpthread=no
3662else
Martin v. Löwis11437992002-04-12 09:54:03 +00003663 cat >conftest.$ac_ext <<_ACEOF
3664#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003665#include "confdefs.h"
3666
3667#include <pthread.h>
3668
3669void* routine(void* p){return NULL;}
3670
3671int main(){
3672 pthread_t p;
3673 if(pthread_create(&p,NULL,routine,NULL)!=0)
3674 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003675 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003676 return 0;
3677}
3678
Martin v. Löwis11437992002-04-12 09:54:03 +00003679_ACEOF
3680rm -f conftest$ac_exeext
3681if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3682 (eval $ac_link) 2>&5
3683 ac_status=$?
3684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3685 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3687 (eval $ac_try) 2>&5
3688 ac_status=$?
3689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3690 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003691 ac_cv_kpthread=yes
3692else
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 echo "$as_me: program exited with status $ac_status" >&5
3694echo "$as_me: failed program was:" >&5
3695cat conftest.$ac_ext >&5
3696( exit $ac_status )
3697ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003698fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003699rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003700fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003701CC="$ac_save_cc"
3702fi
3703
Martin v. Löwis11437992002-04-12 09:54:03 +00003704echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3705echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003706fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003707
Michael W. Hudson54241132001-12-07 15:38:26 +00003708
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003709# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003710echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3711echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3712if test "${ac_cv_header_stdc+set}" = set; then
3713 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003714else
Martin v. Löwis11437992002-04-12 09:54:03 +00003715 cat >conftest.$ac_ext <<_ACEOF
3716#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003717#include "confdefs.h"
3718#include <stdlib.h>
3719#include <stdarg.h>
3720#include <string.h>
3721#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003722
3723_ACEOF
3724if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3725 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3726 ac_status=$?
3727 egrep -v '^ *\+' conftest.er1 >conftest.err
3728 rm -f conftest.er1
3729 cat conftest.err >&5
3730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3731 (exit $ac_status); } >/dev/null; then
3732 if test -s conftest.err; then
3733 ac_cpp_err=$ac_c_preproc_warn_flag
3734 else
3735 ac_cpp_err=
3736 fi
3737else
3738 ac_cpp_err=yes
3739fi
3740if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003741 ac_cv_header_stdc=yes
3742else
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003744 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003745 ac_cv_header_stdc=no
3746fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003747rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003748
3749if test $ac_cv_header_stdc = yes; then
3750 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 cat >conftest.$ac_ext <<_ACEOF
3752#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003753#include "confdefs.h"
3754#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003755
3756_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3758 egrep "memchr" >/dev/null 2>&1; then
3759 :
3760else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003761 ac_cv_header_stdc=no
3762fi
3763rm -f conftest*
3764
3765fi
3766
3767if test $ac_cv_header_stdc = yes; then
3768 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 cat >conftest.$ac_ext <<_ACEOF
3770#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003771#include "confdefs.h"
3772#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003773
3774_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003775if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3776 egrep "free" >/dev/null 2>&1; then
3777 :
3778else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003779 ac_cv_header_stdc=no
3780fi
3781rm -f conftest*
3782
3783fi
3784
3785if test $ac_cv_header_stdc = yes; then
3786 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003788 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003789else
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 cat >conftest.$ac_ext <<_ACEOF
3791#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003792#include "confdefs.h"
3793#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003794#if ((' ' & 0x0FF) == 0x020)
3795# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3796# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3797#else
3798# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3799 || ('j' <= (c) && (c) <= 'r') \
3800 || ('s' <= (c) && (c) <= 'z'))
3801# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3802#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003803
Martin v. Löwis11437992002-04-12 09:54:03 +00003804#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3805int
3806main ()
3807{
3808 int i;
3809 for (i = 0; i < 256; i++)
3810 if (XOR (islower (i), ISLOWER (i))
3811 || toupper (i) != TOUPPER (i))
3812 exit(2);
3813 exit (0);
3814}
3815_ACEOF
3816rm -f conftest$ac_exeext
3817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3818 (eval $ac_link) 2>&5
3819 ac_status=$?
3820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3821 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3823 (eval $ac_try) 2>&5
3824 ac_status=$?
3825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3826 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003827 :
3828else
Martin v. Löwis11437992002-04-12 09:54:03 +00003829 echo "$as_me: program exited with status $ac_status" >&5
3830echo "$as_me: failed program was:" >&5
3831cat conftest.$ac_ext >&5
3832( exit $ac_status )
3833ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003834fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003835rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003836fi
3837fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003838fi
3839echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3840echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003841if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003842
3843cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003844#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003845_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003846
3847fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003848
Martin v. Löwis11437992002-04-12 09:54:03 +00003849
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
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
Martin v. Löwis11437992002-04-12 09:54:03 +00003886for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003887libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003888signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003889sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003890sys/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 +00003891sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003892sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003893do
Martin v. Löwis11437992002-04-12 09:54:03 +00003894as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3895if eval "test \"\${$as_ac_Header+set}\" = set"; then
3896 echo "$as_me:$LINENO: checking for $ac_header" >&5
3897echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3898if eval "test \"\${$as_ac_Header+set}\" = set"; then
3899 echo $ECHO_N "(cached) $ECHO_C" >&6
3900fi
3901echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3902echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003903else
Martin v. Löwis11437992002-04-12 09:54:03 +00003904 # Is the header compilable?
3905echo "$as_me:$LINENO: checking $ac_header usability" >&5
3906echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3907cat >conftest.$ac_ext <<_ACEOF
3908#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003909#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003910$ac_includes_default
3911#include <$ac_header>
3912_ACEOF
3913rm -f conftest.$ac_objext
3914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3915 (eval $ac_compile) 2>&5
3916 ac_status=$?
3917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3918 (exit $ac_status); } &&
3919 { ac_try='test -s conftest.$ac_objext'
3920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3921 (eval $ac_try) 2>&5
3922 ac_status=$?
3923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3924 (exit $ac_status); }; }; then
3925 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003926else
Martin v. Löwis11437992002-04-12 09:54:03 +00003927 echo "$as_me: failed program was:" >&5
3928cat conftest.$ac_ext >&5
3929ac_header_compiler=no
3930fi
3931rm -f conftest.$ac_objext conftest.$ac_ext
3932echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3933echo "${ECHO_T}$ac_header_compiler" >&6
3934
3935# Is the header present?
3936echo "$as_me:$LINENO: checking $ac_header presence" >&5
3937echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3938cat >conftest.$ac_ext <<_ACEOF
3939#line $LINENO "configure"
3940#include "confdefs.h"
3941#include <$ac_header>
3942_ACEOF
3943if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3944 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3945 ac_status=$?
3946 egrep -v '^ *\+' conftest.er1 >conftest.err
3947 rm -f conftest.er1
3948 cat conftest.err >&5
3949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3950 (exit $ac_status); } >/dev/null; then
3951 if test -s conftest.err; then
3952 ac_cpp_err=$ac_c_preproc_warn_flag
3953 else
3954 ac_cpp_err=
3955 fi
3956else
3957 ac_cpp_err=yes
3958fi
3959if test -z "$ac_cpp_err"; then
3960 ac_header_preproc=yes
3961else
3962 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003963 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003964 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003965fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003966rm -f conftest.err conftest.$ac_ext
3967echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3968echo "${ECHO_T}$ac_header_preproc" >&6
3969
3970# So? What about this header?
3971case $ac_header_compiler:$ac_header_preproc in
3972 yes:no )
3973 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3974echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3975 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3976echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3977 no:yes )
3978 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3979echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3980 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3981echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3982 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3983echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3984esac
3985echo "$as_me:$LINENO: checking for $ac_header" >&5
3986echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3987if eval "test \"\${$as_ac_Header+set}\" = set"; then
3988 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003989else
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003991fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003992echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3993echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3994
3995fi
3996if test `eval echo '${'$as_ac_Header'}'` = yes; then
3997 cat >>confdefs.h <<_ACEOF
3998#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3999_ACEOF
4000
4001fi
4002
Guido van Rossum627b2d71993-12-24 10:39:16 +00004003done
4004
Martin v. Löwis11437992002-04-12 09:54:03 +00004005
4006
4007
4008
4009
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004010ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004011for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4012 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4013echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4014echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4015if eval "test \"\${$as_ac_Header+set}\" = set"; then
4016 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004017else
Martin v. Löwis11437992002-04-12 09:54:03 +00004018 cat >conftest.$ac_ext <<_ACEOF
4019#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004020#include "confdefs.h"
4021#include <sys/types.h>
4022#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004023
4024#ifdef F77_DUMMY_MAIN
4025# ifdef __cplusplus
4026 extern "C"
4027# endif
4028 int F77_DUMMY_MAIN() { return 1; }
4029#endif
4030int
4031main ()
4032{
4033if ((DIR *) 0)
4034return 0;
4035 ;
4036 return 0;
4037}
4038_ACEOF
4039rm -f conftest.$ac_objext
4040if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4041 (eval $ac_compile) 2>&5
4042 ac_status=$?
4043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4044 (exit $ac_status); } &&
4045 { ac_try='test -s conftest.$ac_objext'
4046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4047 (eval $ac_try) 2>&5
4048 ac_status=$?
4049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4050 (exit $ac_status); }; }; then
4051 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004052else
Martin v. Löwis11437992002-04-12 09:54:03 +00004053 echo "$as_me: failed program was:" >&5
4054cat conftest.$ac_ext >&5
4055eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004056fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004057rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004058fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004059echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4060echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4061if test `eval echo '${'$as_ac_Header'}'` = yes; then
4062 cat >>confdefs.h <<_ACEOF
4063#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4064_ACEOF
4065
4066ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004067fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004068
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004069done
4070# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4071if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004072 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4073echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4074if test "${ac_cv_search_opendir+set}" = set; then
4075 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004076else
Martin v. Löwis11437992002-04-12 09:54:03 +00004077 ac_func_search_save_LIBS=$LIBS
4078ac_cv_search_opendir=no
4079cat >conftest.$ac_ext <<_ACEOF
4080#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004081#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004083/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004084#ifdef __cplusplus
4085extern "C"
4086#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004087/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004088 builtin and then its argument prototype would still apply. */
4089char opendir ();
4090#ifdef F77_DUMMY_MAIN
4091# ifdef __cplusplus
4092 extern "C"
4093# endif
4094 int F77_DUMMY_MAIN() { return 1; }
4095#endif
4096int
4097main ()
4098{
4099opendir ();
4100 ;
4101 return 0;
4102}
4103_ACEOF
4104rm -f conftest.$ac_objext conftest$ac_exeext
4105if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4106 (eval $ac_link) 2>&5
4107 ac_status=$?
4108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4109 (exit $ac_status); } &&
4110 { ac_try='test -s conftest$ac_exeext'
4111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4112 (eval $ac_try) 2>&5
4113 ac_status=$?
4114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4115 (exit $ac_status); }; }; then
4116 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004117else
Martin v. Löwis11437992002-04-12 09:54:03 +00004118 echo "$as_me: failed program was:" >&5
4119cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004120fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004121rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4122if test "$ac_cv_search_opendir" = no; then
4123 for ac_lib in dir; do
4124 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4125 cat >conftest.$ac_ext <<_ACEOF
4126#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004127#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004128
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004129/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004130#ifdef __cplusplus
4131extern "C"
4132#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004133/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004134 builtin and then its argument prototype would still apply. */
4135char opendir ();
4136#ifdef F77_DUMMY_MAIN
4137# ifdef __cplusplus
4138 extern "C"
4139# endif
4140 int F77_DUMMY_MAIN() { return 1; }
4141#endif
4142int
4143main ()
4144{
4145opendir ();
4146 ;
4147 return 0;
4148}
4149_ACEOF
4150rm -f conftest.$ac_objext conftest$ac_exeext
4151if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4152 (eval $ac_link) 2>&5
4153 ac_status=$?
4154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4155 (exit $ac_status); } &&
4156 { ac_try='test -s conftest$ac_exeext'
4157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4158 (eval $ac_try) 2>&5
4159 ac_status=$?
4160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4161 (exit $ac_status); }; }; then
4162 ac_cv_search_opendir="-l$ac_lib"
4163break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004164else
Martin v. Löwis11437992002-04-12 09:54:03 +00004165 echo "$as_me: failed program was:" >&5
4166cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004168rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4169 done
4170fi
4171LIBS=$ac_func_search_save_LIBS
4172fi
4173echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4174echo "${ECHO_T}$ac_cv_search_opendir" >&6
4175if test "$ac_cv_search_opendir" != no; then
4176 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004179
Michael W. Hudson54241132001-12-07 15:38:26 +00004180else
Martin v. Löwis11437992002-04-12 09:54:03 +00004181 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4182echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4183if test "${ac_cv_search_opendir+set}" = set; then
4184 echo $ECHO_N "(cached) $ECHO_C" >&6
4185else
4186 ac_func_search_save_LIBS=$LIBS
4187ac_cv_search_opendir=no
4188cat >conftest.$ac_ext <<_ACEOF
4189#line $LINENO "configure"
4190#include "confdefs.h"
4191
4192/* Override any gcc2 internal prototype to avoid an error. */
4193#ifdef __cplusplus
4194extern "C"
4195#endif
4196/* We use char because int might match the return type of a gcc2
4197 builtin and then its argument prototype would still apply. */
4198char opendir ();
4199#ifdef F77_DUMMY_MAIN
4200# ifdef __cplusplus
4201 extern "C"
4202# endif
4203 int F77_DUMMY_MAIN() { return 1; }
4204#endif
4205int
4206main ()
4207{
4208opendir ();
4209 ;
4210 return 0;
4211}
4212_ACEOF
4213rm -f conftest.$ac_objext conftest$ac_exeext
4214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4215 (eval $ac_link) 2>&5
4216 ac_status=$?
4217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4218 (exit $ac_status); } &&
4219 { ac_try='test -s conftest$ac_exeext'
4220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4221 (eval $ac_try) 2>&5
4222 ac_status=$?
4223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4224 (exit $ac_status); }; }; then
4225 ac_cv_search_opendir="none required"
4226else
4227 echo "$as_me: failed program was:" >&5
4228cat conftest.$ac_ext >&5
4229fi
4230rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4231if test "$ac_cv_search_opendir" = no; then
4232 for ac_lib in x; do
4233 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4234 cat >conftest.$ac_ext <<_ACEOF
4235#line $LINENO "configure"
4236#include "confdefs.h"
4237
4238/* Override any gcc2 internal prototype to avoid an error. */
4239#ifdef __cplusplus
4240extern "C"
4241#endif
4242/* We use char because int might match the return type of a gcc2
4243 builtin and then its argument prototype would still apply. */
4244char opendir ();
4245#ifdef F77_DUMMY_MAIN
4246# ifdef __cplusplus
4247 extern "C"
4248# endif
4249 int F77_DUMMY_MAIN() { return 1; }
4250#endif
4251int
4252main ()
4253{
4254opendir ();
4255 ;
4256 return 0;
4257}
4258_ACEOF
4259rm -f conftest.$ac_objext conftest$ac_exeext
4260if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4261 (eval $ac_link) 2>&5
4262 ac_status=$?
4263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4264 (exit $ac_status); } &&
4265 { ac_try='test -s conftest$ac_exeext'
4266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4267 (eval $ac_try) 2>&5
4268 ac_status=$?
4269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4270 (exit $ac_status); }; }; then
4271 ac_cv_search_opendir="-l$ac_lib"
4272break
4273else
4274 echo "$as_me: failed program was:" >&5
4275cat conftest.$ac_ext >&5
4276fi
4277rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4278 done
4279fi
4280LIBS=$ac_func_search_save_LIBS
4281fi
4282echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4283echo "${ECHO_T}$ac_cv_search_opendir" >&6
4284if test "$ac_cv_search_opendir" != no; then
4285 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4286
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287fi
4288
4289fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004290
Michael W. Hudson54241132001-12-07 15:38:26 +00004291
Guido van Rossum627b2d71993-12-24 10:39:16 +00004292# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004293was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004294echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4295echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4296cat >conftest.$ac_ext <<_ACEOF
4297#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004298#include "confdefs.h"
4299#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004300
4301_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4303 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004304 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004305else
Martin v. Löwis11437992002-04-12 09:54:03 +00004306
4307
4308cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004309#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004310_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004311
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004312
Guido van Rossum627b2d71993-12-24 10:39:16 +00004313fi
4314rm -f conftest*
4315
Martin v. Löwis11437992002-04-12 09:54:03 +00004316echo "$as_me:$LINENO: result: $was_it_defined" >&5
4317echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004318
Guido van Rossum810cc512001-09-09 23:51:39 +00004319# Two defines needed to enable largefile support on various platforms
4320# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004321
Martin v. Löwis11437992002-04-12 09:54:03 +00004322cat >>confdefs.h <<\_ACEOF
4323#define _LARGEFILE_SOURCE 1
4324_ACEOF
4325
4326
4327cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004328#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004329_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004330
Michael W. Hudson54241132001-12-07 15:38:26 +00004331
Guido van Rossum84e7b241996-08-19 21:59:00 +00004332# Add some code to confdefs.h so that the test for off_t works on SCO
4333cat >> confdefs.h <<\EOF
4334#if defined(SCO_DS)
4335#undef _OFF_T
4336#endif
4337EOF
4338
Guido van Rossumef2255b2000-03-10 22:30:29 +00004339# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004340echo "$as_me:$LINENO: checking for mode_t" >&5
4341echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4342if test "${ac_cv_type_mode_t+set}" = set; then
4343 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004344else
Martin v. Löwis11437992002-04-12 09:54:03 +00004345 cat >conftest.$ac_ext <<_ACEOF
4346#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004347#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004348$ac_includes_default
4349#ifdef F77_DUMMY_MAIN
4350# ifdef __cplusplus
4351 extern "C"
4352# endif
4353 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004355int
4356main ()
4357{
4358if ((mode_t *) 0)
4359 return 0;
4360if (sizeof (mode_t))
4361 return 0;
4362 ;
4363 return 0;
4364}
4365_ACEOF
4366rm -f conftest.$ac_objext
4367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4368 (eval $ac_compile) 2>&5
4369 ac_status=$?
4370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4371 (exit $ac_status); } &&
4372 { ac_try='test -s conftest.$ac_objext'
4373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4374 (eval $ac_try) 2>&5
4375 ac_status=$?
4376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4377 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004378 ac_cv_type_mode_t=yes
4379else
Martin v. Löwis11437992002-04-12 09:54:03 +00004380 echo "$as_me: failed program was:" >&5
4381cat conftest.$ac_ext >&5
4382ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004383fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004384rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004385fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004386echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4387echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4388if test $ac_cv_type_mode_t = yes; then
4389 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004390else
Martin v. Löwis11437992002-04-12 09:54:03 +00004391
4392cat >>confdefs.h <<_ACEOF
4393#define mode_t int
4394_ACEOF
4395
4396fi
4397
4398echo "$as_me:$LINENO: checking for off_t" >&5
4399echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4400if test "${ac_cv_type_off_t+set}" = set; then
4401 echo $ECHO_N "(cached) $ECHO_C" >&6
4402else
4403 cat >conftest.$ac_ext <<_ACEOF
4404#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004405#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004406$ac_includes_default
4407#ifdef F77_DUMMY_MAIN
4408# ifdef __cplusplus
4409 extern "C"
4410# endif
4411 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004412#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004413int
4414main ()
4415{
4416if ((off_t *) 0)
4417 return 0;
4418if (sizeof (off_t))
4419 return 0;
4420 ;
4421 return 0;
4422}
4423_ACEOF
4424rm -f conftest.$ac_objext
4425if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4426 (eval $ac_compile) 2>&5
4427 ac_status=$?
4428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4429 (exit $ac_status); } &&
4430 { ac_try='test -s conftest.$ac_objext'
4431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4432 (eval $ac_try) 2>&5
4433 ac_status=$?
4434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4435 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004436 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004437else
Martin v. Löwis11437992002-04-12 09:54:03 +00004438 echo "$as_me: failed program was:" >&5
4439cat conftest.$ac_ext >&5
4440ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004441fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004442rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004443fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004444echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4445echo "${ECHO_T}$ac_cv_type_off_t" >&6
4446if test $ac_cv_type_off_t = yes; then
4447 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004448else
Martin v. Löwis11437992002-04-12 09:54:03 +00004449
4450cat >>confdefs.h <<_ACEOF
4451#define off_t long
4452_ACEOF
4453
4454fi
4455
4456echo "$as_me:$LINENO: checking for pid_t" >&5
4457echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4458if test "${ac_cv_type_pid_t+set}" = set; then
4459 echo $ECHO_N "(cached) $ECHO_C" >&6
4460else
4461 cat >conftest.$ac_ext <<_ACEOF
4462#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004463#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004464$ac_includes_default
4465#ifdef F77_DUMMY_MAIN
4466# ifdef __cplusplus
4467 extern "C"
4468# endif
4469 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004470#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004471int
4472main ()
4473{
4474if ((pid_t *) 0)
4475 return 0;
4476if (sizeof (pid_t))
4477 return 0;
4478 ;
4479 return 0;
4480}
4481_ACEOF
4482rm -f conftest.$ac_objext
4483if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4484 (eval $ac_compile) 2>&5
4485 ac_status=$?
4486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4487 (exit $ac_status); } &&
4488 { ac_try='test -s conftest.$ac_objext'
4489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4490 (eval $ac_try) 2>&5
4491 ac_status=$?
4492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4493 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004494 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004495else
Martin v. Löwis11437992002-04-12 09:54:03 +00004496 echo "$as_me: failed program was:" >&5
4497cat conftest.$ac_ext >&5
4498ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004499fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004500rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004501fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004502echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4503echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4504if test $ac_cv_type_pid_t = yes; then
4505 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004506else
Martin v. Löwis11437992002-04-12 09:54:03 +00004507
4508cat >>confdefs.h <<_ACEOF
4509#define pid_t int
4510_ACEOF
4511
4512fi
4513
4514echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4515echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4516if test "${ac_cv_type_signal+set}" = set; then
4517 echo $ECHO_N "(cached) $ECHO_C" >&6
4518else
4519 cat >conftest.$ac_ext <<_ACEOF
4520#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004521#include "confdefs.h"
4522#include <sys/types.h>
4523#include <signal.h>
4524#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004525# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004526#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004527#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004528extern "C" void (*signal (int, void (*)(int)))(int);
4529#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004530void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004531#endif
4532
Martin v. Löwis11437992002-04-12 09:54:03 +00004533#ifdef F77_DUMMY_MAIN
4534# ifdef __cplusplus
4535 extern "C"
4536# endif
4537 int F77_DUMMY_MAIN() { return 1; }
4538#endif
4539int
4540main ()
4541{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004542int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004543 ;
4544 return 0;
4545}
4546_ACEOF
4547rm -f conftest.$ac_objext
4548if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4549 (eval $ac_compile) 2>&5
4550 ac_status=$?
4551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4552 (exit $ac_status); } &&
4553 { ac_try='test -s conftest.$ac_objext'
4554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4555 (eval $ac_try) 2>&5
4556 ac_status=$?
4557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4558 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004559 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004560else
Martin v. Löwis11437992002-04-12 09:54:03 +00004561 echo "$as_me: failed program was:" >&5
4562cat conftest.$ac_ext >&5
4563ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004564fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004565rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004566fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004567echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4568echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004569
Martin v. Löwis11437992002-04-12 09:54:03 +00004570cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004571#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004572_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004573
Michael W. Hudson54241132001-12-07 15:38:26 +00004574
Martin v. Löwis11437992002-04-12 09:54:03 +00004575echo "$as_me:$LINENO: checking for size_t" >&5
4576echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4577if test "${ac_cv_type_size_t+set}" = set; then
4578 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004579else
Martin v. Löwis11437992002-04-12 09:54:03 +00004580 cat >conftest.$ac_ext <<_ACEOF
4581#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004582#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004583$ac_includes_default
4584#ifdef F77_DUMMY_MAIN
4585# ifdef __cplusplus
4586 extern "C"
4587# endif
4588 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004589#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004590int
4591main ()
4592{
4593if ((size_t *) 0)
4594 return 0;
4595if (sizeof (size_t))
4596 return 0;
4597 ;
4598 return 0;
4599}
4600_ACEOF
4601rm -f conftest.$ac_objext
4602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4603 (eval $ac_compile) 2>&5
4604 ac_status=$?
4605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4606 (exit $ac_status); } &&
4607 { ac_try='test -s conftest.$ac_objext'
4608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4609 (eval $ac_try) 2>&5
4610 ac_status=$?
4611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4612 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004613 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004614else
Martin v. Löwis11437992002-04-12 09:54:03 +00004615 echo "$as_me: failed program was:" >&5
4616cat conftest.$ac_ext >&5
4617ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004618fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004619rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004620fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004621echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4622echo "${ECHO_T}$ac_cv_type_size_t" >&6
4623if test $ac_cv_type_size_t = yes; then
4624 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004625else
Martin v. Löwis11437992002-04-12 09:54:03 +00004626
4627cat >>confdefs.h <<_ACEOF
4628#define size_t unsigned
4629_ACEOF
4630
4631fi
4632
4633echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4634echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4635if test "${ac_cv_type_uid_t+set}" = set; then
4636 echo $ECHO_N "(cached) $ECHO_C" >&6
4637else
4638 cat >conftest.$ac_ext <<_ACEOF
4639#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004640#include "confdefs.h"
4641#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004642
4643_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004644if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4645 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004646 ac_cv_type_uid_t=yes
4647else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004648 ac_cv_type_uid_t=no
4649fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004650rm -f conftest*
4651
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004652fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004653echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4654echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004655if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004656
Martin v. Löwis11437992002-04-12 09:54:03 +00004657cat >>confdefs.h <<\_ACEOF
4658#define uid_t int
4659_ACEOF
4660
4661
4662cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004663#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004664_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004665
4666fi
4667
Jack Jansendd19cf82001-12-06 22:36:17 +00004668
Michael W. Hudson54241132001-12-07 15:38:26 +00004669# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004670echo "$as_me:$LINENO: checking for int" >&5
4671echo $ECHO_N "checking for int... $ECHO_C" >&6
4672if test "${ac_cv_type_int+set}" = set; then
4673 echo $ECHO_N "(cached) $ECHO_C" >&6
4674else
4675 cat >conftest.$ac_ext <<_ACEOF
4676#line $LINENO "configure"
4677#include "confdefs.h"
4678$ac_includes_default
4679#ifdef F77_DUMMY_MAIN
4680# ifdef __cplusplus
4681 extern "C"
4682# endif
4683 int F77_DUMMY_MAIN() { return 1; }
4684#endif
4685int
4686main ()
4687{
4688if ((int *) 0)
4689 return 0;
4690if (sizeof (int))
4691 return 0;
4692 ;
4693 return 0;
4694}
4695_ACEOF
4696rm -f conftest.$ac_objext
4697if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4698 (eval $ac_compile) 2>&5
4699 ac_status=$?
4700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4701 (exit $ac_status); } &&
4702 { ac_try='test -s conftest.$ac_objext'
4703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4704 (eval $ac_try) 2>&5
4705 ac_status=$?
4706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4707 (exit $ac_status); }; }; then
4708 ac_cv_type_int=yes
4709else
4710 echo "$as_me: failed program was:" >&5
4711cat conftest.$ac_ext >&5
4712ac_cv_type_int=no
4713fi
4714rm -f conftest.$ac_objext conftest.$ac_ext
4715fi
4716echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4717echo "${ECHO_T}$ac_cv_type_int" >&6
4718
4719echo "$as_me:$LINENO: checking size of int" >&5
4720echo $ECHO_N "checking size of int... $ECHO_C" >&6
4721if test "${ac_cv_sizeof_int+set}" = set; then
4722 echo $ECHO_N "(cached) $ECHO_C" >&6
4723else
4724 if test "$ac_cv_type_int" = yes; then
4725 # The cast to unsigned long works around a bug in the HP C Compiler
4726 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4727 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4728 # This bug is HP SR number 8606223364.
4729 if test "$cross_compiling" = yes; then
4730 # Depending upon the size, compute the lo and hi bounds.
4731cat >conftest.$ac_ext <<_ACEOF
4732#line $LINENO "configure"
4733#include "confdefs.h"
4734$ac_includes_default
4735#ifdef F77_DUMMY_MAIN
4736# ifdef __cplusplus
4737 extern "C"
4738# endif
4739 int F77_DUMMY_MAIN() { return 1; }
4740#endif
4741int
4742main ()
4743{
4744static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4745test_array [0] = 0
4746
4747 ;
4748 return 0;
4749}
4750_ACEOF
4751rm -f conftest.$ac_objext
4752if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4753 (eval $ac_compile) 2>&5
4754 ac_status=$?
4755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4756 (exit $ac_status); } &&
4757 { ac_try='test -s conftest.$ac_objext'
4758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4759 (eval $ac_try) 2>&5
4760 ac_status=$?
4761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4762 (exit $ac_status); }; }; then
4763 ac_lo=0 ac_mid=0
4764 while :; do
4765 cat >conftest.$ac_ext <<_ACEOF
4766#line $LINENO "configure"
4767#include "confdefs.h"
4768$ac_includes_default
4769#ifdef F77_DUMMY_MAIN
4770# ifdef __cplusplus
4771 extern "C"
4772# endif
4773 int F77_DUMMY_MAIN() { return 1; }
4774#endif
4775int
4776main ()
4777{
4778static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4779test_array [0] = 0
4780
4781 ;
4782 return 0;
4783}
4784_ACEOF
4785rm -f conftest.$ac_objext
4786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4787 (eval $ac_compile) 2>&5
4788 ac_status=$?
4789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4790 (exit $ac_status); } &&
4791 { ac_try='test -s conftest.$ac_objext'
4792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4793 (eval $ac_try) 2>&5
4794 ac_status=$?
4795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4796 (exit $ac_status); }; }; then
4797 ac_hi=$ac_mid; break
4798else
4799 echo "$as_me: failed program was:" >&5
4800cat conftest.$ac_ext >&5
4801ac_lo=`expr $ac_mid + 1`
4802 if test $ac_lo -le $ac_mid; then
4803 ac_lo= ac_hi=
4804 break
4805 fi
4806 ac_mid=`expr 2 '*' $ac_mid + 1`
4807fi
4808rm -f conftest.$ac_objext conftest.$ac_ext
4809 done
4810else
4811 echo "$as_me: failed program was:" >&5
4812cat conftest.$ac_ext >&5
4813cat >conftest.$ac_ext <<_ACEOF
4814#line $LINENO "configure"
4815#include "confdefs.h"
4816$ac_includes_default
4817#ifdef F77_DUMMY_MAIN
4818# ifdef __cplusplus
4819 extern "C"
4820# endif
4821 int F77_DUMMY_MAIN() { return 1; }
4822#endif
4823int
4824main ()
4825{
4826static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4827test_array [0] = 0
4828
4829 ;
4830 return 0;
4831}
4832_ACEOF
4833rm -f conftest.$ac_objext
4834if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4835 (eval $ac_compile) 2>&5
4836 ac_status=$?
4837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4838 (exit $ac_status); } &&
4839 { ac_try='test -s conftest.$ac_objext'
4840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4841 (eval $ac_try) 2>&5
4842 ac_status=$?
4843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4844 (exit $ac_status); }; }; then
4845 ac_hi=-1 ac_mid=-1
4846 while :; do
4847 cat >conftest.$ac_ext <<_ACEOF
4848#line $LINENO "configure"
4849#include "confdefs.h"
4850$ac_includes_default
4851#ifdef F77_DUMMY_MAIN
4852# ifdef __cplusplus
4853 extern "C"
4854# endif
4855 int F77_DUMMY_MAIN() { return 1; }
4856#endif
4857int
4858main ()
4859{
4860static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4861test_array [0] = 0
4862
4863 ;
4864 return 0;
4865}
4866_ACEOF
4867rm -f conftest.$ac_objext
4868if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4869 (eval $ac_compile) 2>&5
4870 ac_status=$?
4871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4872 (exit $ac_status); } &&
4873 { ac_try='test -s conftest.$ac_objext'
4874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4875 (eval $ac_try) 2>&5
4876 ac_status=$?
4877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4878 (exit $ac_status); }; }; then
4879 ac_lo=$ac_mid; break
4880else
4881 echo "$as_me: failed program was:" >&5
4882cat conftest.$ac_ext >&5
4883ac_hi=`expr '(' $ac_mid ')' - 1`
4884 if test $ac_mid -le $ac_hi; then
4885 ac_lo= ac_hi=
4886 break
4887 fi
4888 ac_mid=`expr 2 '*' $ac_mid`
4889fi
4890rm -f conftest.$ac_objext conftest.$ac_ext
4891 done
4892else
4893 echo "$as_me: failed program was:" >&5
4894cat conftest.$ac_ext >&5
4895ac_lo= ac_hi=
4896fi
4897rm -f conftest.$ac_objext conftest.$ac_ext
4898fi
4899rm -f conftest.$ac_objext conftest.$ac_ext
4900# Binary search between lo and hi bounds.
4901while test "x$ac_lo" != "x$ac_hi"; do
4902 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4903 cat >conftest.$ac_ext <<_ACEOF
4904#line $LINENO "configure"
4905#include "confdefs.h"
4906$ac_includes_default
4907#ifdef F77_DUMMY_MAIN
4908# ifdef __cplusplus
4909 extern "C"
4910# endif
4911 int F77_DUMMY_MAIN() { return 1; }
4912#endif
4913int
4914main ()
4915{
4916static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4917test_array [0] = 0
4918
4919 ;
4920 return 0;
4921}
4922_ACEOF
4923rm -f conftest.$ac_objext
4924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4925 (eval $ac_compile) 2>&5
4926 ac_status=$?
4927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4928 (exit $ac_status); } &&
4929 { ac_try='test -s conftest.$ac_objext'
4930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4931 (eval $ac_try) 2>&5
4932 ac_status=$?
4933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4934 (exit $ac_status); }; }; then
4935 ac_hi=$ac_mid
4936else
4937 echo "$as_me: failed program was:" >&5
4938cat conftest.$ac_ext >&5
4939ac_lo=`expr '(' $ac_mid ')' + 1`
4940fi
4941rm -f conftest.$ac_objext conftest.$ac_ext
4942done
4943case $ac_lo in
4944?*) ac_cv_sizeof_int=$ac_lo;;
4945'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4946echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4947 { (exit 1); exit 1; }; } ;;
4948esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004949else
4950 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004951 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4952echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4953 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004954else
Martin v. Löwis11437992002-04-12 09:54:03 +00004955 cat >conftest.$ac_ext <<_ACEOF
4956#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004957#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004958$ac_includes_default
4959long longval () { return (long) (sizeof (int)); }
4960unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004961#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004962#include <stdlib.h>
4963#ifdef F77_DUMMY_MAIN
4964# ifdef __cplusplus
4965 extern "C"
4966# endif
4967 int F77_DUMMY_MAIN() { return 1; }
4968#endif
4969int
4970main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004971{
Martin v. Löwis11437992002-04-12 09:54:03 +00004972
4973 FILE *f = fopen ("conftest.val", "w");
4974 if (! f)
4975 exit (1);
4976 if (((long) (sizeof (int))) < 0)
4977 {
4978 long i = longval ();
4979 if (i != ((long) (sizeof (int))))
4980 exit (1);
4981 fprintf (f, "%ld\n", i);
4982 }
4983 else
4984 {
4985 unsigned long i = ulongval ();
4986 if (i != ((long) (sizeof (int))))
4987 exit (1);
4988 fprintf (f, "%lu\n", i);
4989 }
4990 exit (ferror (f) || fclose (f) != 0);
4991
4992 ;
4993 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004994}
Martin v. Löwis11437992002-04-12 09:54:03 +00004995_ACEOF
4996rm -f conftest$ac_exeext
4997if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4998 (eval $ac_link) 2>&5
4999 ac_status=$?
5000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5001 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5003 (eval $ac_try) 2>&5
5004 ac_status=$?
5005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5006 (exit $ac_status); }; }; then
5007 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005008else
Martin v. Löwis11437992002-04-12 09:54:03 +00005009 echo "$as_me: program exited with status $ac_status" >&5
5010echo "$as_me: failed program was:" >&5
5011cat conftest.$ac_ext >&5
5012( exit $ac_status )
5013{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5014echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5015 { (exit 1); exit 1; }; }
5016fi
5017rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5018fi
5019fi
5020rm -f conftest.val
5021else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005022 ac_cv_sizeof_int=0
5023fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005024fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005025echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5026echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5027cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005028#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005029_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005030
5031
Martin v. Löwis11437992002-04-12 09:54:03 +00005032echo "$as_me:$LINENO: checking for long" >&5
5033echo $ECHO_N "checking for long... $ECHO_C" >&6
5034if test "${ac_cv_type_long+set}" = set; then
5035 echo $ECHO_N "(cached) $ECHO_C" >&6
5036else
5037 cat >conftest.$ac_ext <<_ACEOF
5038#line $LINENO "configure"
5039#include "confdefs.h"
5040$ac_includes_default
5041#ifdef F77_DUMMY_MAIN
5042# ifdef __cplusplus
5043 extern "C"
5044# endif
5045 int F77_DUMMY_MAIN() { return 1; }
5046#endif
5047int
5048main ()
5049{
5050if ((long *) 0)
5051 return 0;
5052if (sizeof (long))
5053 return 0;
5054 ;
5055 return 0;
5056}
5057_ACEOF
5058rm -f conftest.$ac_objext
5059if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5060 (eval $ac_compile) 2>&5
5061 ac_status=$?
5062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5063 (exit $ac_status); } &&
5064 { ac_try='test -s conftest.$ac_objext'
5065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5066 (eval $ac_try) 2>&5
5067 ac_status=$?
5068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5069 (exit $ac_status); }; }; then
5070 ac_cv_type_long=yes
5071else
5072 echo "$as_me: failed program was:" >&5
5073cat conftest.$ac_ext >&5
5074ac_cv_type_long=no
5075fi
5076rm -f conftest.$ac_objext conftest.$ac_ext
5077fi
5078echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5079echo "${ECHO_T}$ac_cv_type_long" >&6
5080
5081echo "$as_me:$LINENO: checking size of long" >&5
5082echo $ECHO_N "checking size of long... $ECHO_C" >&6
5083if test "${ac_cv_sizeof_long+set}" = set; then
5084 echo $ECHO_N "(cached) $ECHO_C" >&6
5085else
5086 if test "$ac_cv_type_long" = yes; then
5087 # The cast to unsigned long works around a bug in the HP C Compiler
5088 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5089 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5090 # This bug is HP SR number 8606223364.
5091 if test "$cross_compiling" = yes; then
5092 # Depending upon the size, compute the lo and hi bounds.
5093cat >conftest.$ac_ext <<_ACEOF
5094#line $LINENO "configure"
5095#include "confdefs.h"
5096$ac_includes_default
5097#ifdef F77_DUMMY_MAIN
5098# ifdef __cplusplus
5099 extern "C"
5100# endif
5101 int F77_DUMMY_MAIN() { return 1; }
5102#endif
5103int
5104main ()
5105{
5106static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5107test_array [0] = 0
5108
5109 ;
5110 return 0;
5111}
5112_ACEOF
5113rm -f conftest.$ac_objext
5114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5115 (eval $ac_compile) 2>&5
5116 ac_status=$?
5117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5118 (exit $ac_status); } &&
5119 { ac_try='test -s conftest.$ac_objext'
5120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5121 (eval $ac_try) 2>&5
5122 ac_status=$?
5123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5124 (exit $ac_status); }; }; then
5125 ac_lo=0 ac_mid=0
5126 while :; do
5127 cat >conftest.$ac_ext <<_ACEOF
5128#line $LINENO "configure"
5129#include "confdefs.h"
5130$ac_includes_default
5131#ifdef F77_DUMMY_MAIN
5132# ifdef __cplusplus
5133 extern "C"
5134# endif
5135 int F77_DUMMY_MAIN() { return 1; }
5136#endif
5137int
5138main ()
5139{
5140static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5141test_array [0] = 0
5142
5143 ;
5144 return 0;
5145}
5146_ACEOF
5147rm -f conftest.$ac_objext
5148if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5149 (eval $ac_compile) 2>&5
5150 ac_status=$?
5151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5152 (exit $ac_status); } &&
5153 { ac_try='test -s conftest.$ac_objext'
5154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5155 (eval $ac_try) 2>&5
5156 ac_status=$?
5157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5158 (exit $ac_status); }; }; then
5159 ac_hi=$ac_mid; break
5160else
5161 echo "$as_me: failed program was:" >&5
5162cat conftest.$ac_ext >&5
5163ac_lo=`expr $ac_mid + 1`
5164 if test $ac_lo -le $ac_mid; then
5165 ac_lo= ac_hi=
5166 break
5167 fi
5168 ac_mid=`expr 2 '*' $ac_mid + 1`
5169fi
5170rm -f conftest.$ac_objext conftest.$ac_ext
5171 done
5172else
5173 echo "$as_me: failed program was:" >&5
5174cat conftest.$ac_ext >&5
5175cat >conftest.$ac_ext <<_ACEOF
5176#line $LINENO "configure"
5177#include "confdefs.h"
5178$ac_includes_default
5179#ifdef F77_DUMMY_MAIN
5180# ifdef __cplusplus
5181 extern "C"
5182# endif
5183 int F77_DUMMY_MAIN() { return 1; }
5184#endif
5185int
5186main ()
5187{
5188static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5189test_array [0] = 0
5190
5191 ;
5192 return 0;
5193}
5194_ACEOF
5195rm -f conftest.$ac_objext
5196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5197 (eval $ac_compile) 2>&5
5198 ac_status=$?
5199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5200 (exit $ac_status); } &&
5201 { ac_try='test -s conftest.$ac_objext'
5202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5203 (eval $ac_try) 2>&5
5204 ac_status=$?
5205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5206 (exit $ac_status); }; }; then
5207 ac_hi=-1 ac_mid=-1
5208 while :; do
5209 cat >conftest.$ac_ext <<_ACEOF
5210#line $LINENO "configure"
5211#include "confdefs.h"
5212$ac_includes_default
5213#ifdef F77_DUMMY_MAIN
5214# ifdef __cplusplus
5215 extern "C"
5216# endif
5217 int F77_DUMMY_MAIN() { return 1; }
5218#endif
5219int
5220main ()
5221{
5222static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5223test_array [0] = 0
5224
5225 ;
5226 return 0;
5227}
5228_ACEOF
5229rm -f conftest.$ac_objext
5230if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5231 (eval $ac_compile) 2>&5
5232 ac_status=$?
5233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5234 (exit $ac_status); } &&
5235 { ac_try='test -s conftest.$ac_objext'
5236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5237 (eval $ac_try) 2>&5
5238 ac_status=$?
5239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5240 (exit $ac_status); }; }; then
5241 ac_lo=$ac_mid; break
5242else
5243 echo "$as_me: failed program was:" >&5
5244cat conftest.$ac_ext >&5
5245ac_hi=`expr '(' $ac_mid ')' - 1`
5246 if test $ac_mid -le $ac_hi; then
5247 ac_lo= ac_hi=
5248 break
5249 fi
5250 ac_mid=`expr 2 '*' $ac_mid`
5251fi
5252rm -f conftest.$ac_objext conftest.$ac_ext
5253 done
5254else
5255 echo "$as_me: failed program was:" >&5
5256cat conftest.$ac_ext >&5
5257ac_lo= ac_hi=
5258fi
5259rm -f conftest.$ac_objext conftest.$ac_ext
5260fi
5261rm -f conftest.$ac_objext conftest.$ac_ext
5262# Binary search between lo and hi bounds.
5263while test "x$ac_lo" != "x$ac_hi"; do
5264 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5265 cat >conftest.$ac_ext <<_ACEOF
5266#line $LINENO "configure"
5267#include "confdefs.h"
5268$ac_includes_default
5269#ifdef F77_DUMMY_MAIN
5270# ifdef __cplusplus
5271 extern "C"
5272# endif
5273 int F77_DUMMY_MAIN() { return 1; }
5274#endif
5275int
5276main ()
5277{
5278static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5279test_array [0] = 0
5280
5281 ;
5282 return 0;
5283}
5284_ACEOF
5285rm -f conftest.$ac_objext
5286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5287 (eval $ac_compile) 2>&5
5288 ac_status=$?
5289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5290 (exit $ac_status); } &&
5291 { ac_try='test -s conftest.$ac_objext'
5292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5293 (eval $ac_try) 2>&5
5294 ac_status=$?
5295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5296 (exit $ac_status); }; }; then
5297 ac_hi=$ac_mid
5298else
5299 echo "$as_me: failed program was:" >&5
5300cat conftest.$ac_ext >&5
5301ac_lo=`expr '(' $ac_mid ')' + 1`
5302fi
5303rm -f conftest.$ac_objext conftest.$ac_ext
5304done
5305case $ac_lo in
5306?*) ac_cv_sizeof_long=$ac_lo;;
5307'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5308echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5309 { (exit 1); exit 1; }; } ;;
5310esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005311else
5312 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005313 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5314echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5315 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005316else
Martin v. Löwis11437992002-04-12 09:54:03 +00005317 cat >conftest.$ac_ext <<_ACEOF
5318#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005319#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005320$ac_includes_default
5321long longval () { return (long) (sizeof (long)); }
5322unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005323#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005324#include <stdlib.h>
5325#ifdef F77_DUMMY_MAIN
5326# ifdef __cplusplus
5327 extern "C"
5328# endif
5329 int F77_DUMMY_MAIN() { return 1; }
5330#endif
5331int
5332main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005333{
Martin v. Löwis11437992002-04-12 09:54:03 +00005334
5335 FILE *f = fopen ("conftest.val", "w");
5336 if (! f)
5337 exit (1);
5338 if (((long) (sizeof (long))) < 0)
5339 {
5340 long i = longval ();
5341 if (i != ((long) (sizeof (long))))
5342 exit (1);
5343 fprintf (f, "%ld\n", i);
5344 }
5345 else
5346 {
5347 unsigned long i = ulongval ();
5348 if (i != ((long) (sizeof (long))))
5349 exit (1);
5350 fprintf (f, "%lu\n", i);
5351 }
5352 exit (ferror (f) || fclose (f) != 0);
5353
5354 ;
5355 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005356}
Martin v. Löwis11437992002-04-12 09:54:03 +00005357_ACEOF
5358rm -f conftest$ac_exeext
5359if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5360 (eval $ac_link) 2>&5
5361 ac_status=$?
5362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5363 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5365 (eval $ac_try) 2>&5
5366 ac_status=$?
5367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5368 (exit $ac_status); }; }; then
5369 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005370else
Martin v. Löwis11437992002-04-12 09:54:03 +00005371 echo "$as_me: program exited with status $ac_status" >&5
5372echo "$as_me: failed program was:" >&5
5373cat conftest.$ac_ext >&5
5374( exit $ac_status )
5375{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5376echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5377 { (exit 1); exit 1; }; }
5378fi
5379rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5380fi
5381fi
5382rm -f conftest.val
5383else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005384 ac_cv_sizeof_long=0
5385fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005386fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005387echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5388echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5389cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005390#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005391_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005392
5393
Martin v. Löwis11437992002-04-12 09:54:03 +00005394echo "$as_me:$LINENO: checking for void *" >&5
5395echo $ECHO_N "checking for void *... $ECHO_C" >&6
5396if test "${ac_cv_type_void_p+set}" = set; then
5397 echo $ECHO_N "(cached) $ECHO_C" >&6
5398else
5399 cat >conftest.$ac_ext <<_ACEOF
5400#line $LINENO "configure"
5401#include "confdefs.h"
5402$ac_includes_default
5403#ifdef F77_DUMMY_MAIN
5404# ifdef __cplusplus
5405 extern "C"
5406# endif
5407 int F77_DUMMY_MAIN() { return 1; }
5408#endif
5409int
5410main ()
5411{
5412if ((void * *) 0)
5413 return 0;
5414if (sizeof (void *))
5415 return 0;
5416 ;
5417 return 0;
5418}
5419_ACEOF
5420rm -f conftest.$ac_objext
5421if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5422 (eval $ac_compile) 2>&5
5423 ac_status=$?
5424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5425 (exit $ac_status); } &&
5426 { ac_try='test -s conftest.$ac_objext'
5427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5428 (eval $ac_try) 2>&5
5429 ac_status=$?
5430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5431 (exit $ac_status); }; }; then
5432 ac_cv_type_void_p=yes
5433else
5434 echo "$as_me: failed program was:" >&5
5435cat conftest.$ac_ext >&5
5436ac_cv_type_void_p=no
5437fi
5438rm -f conftest.$ac_objext conftest.$ac_ext
5439fi
5440echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5441echo "${ECHO_T}$ac_cv_type_void_p" >&6
5442
5443echo "$as_me:$LINENO: checking size of void *" >&5
5444echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5445if test "${ac_cv_sizeof_void_p+set}" = set; then
5446 echo $ECHO_N "(cached) $ECHO_C" >&6
5447else
5448 if test "$ac_cv_type_void_p" = yes; then
5449 # The cast to unsigned long works around a bug in the HP C Compiler
5450 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5451 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5452 # This bug is HP SR number 8606223364.
5453 if test "$cross_compiling" = yes; then
5454 # Depending upon the size, compute the lo and hi bounds.
5455cat >conftest.$ac_ext <<_ACEOF
5456#line $LINENO "configure"
5457#include "confdefs.h"
5458$ac_includes_default
5459#ifdef F77_DUMMY_MAIN
5460# ifdef __cplusplus
5461 extern "C"
5462# endif
5463 int F77_DUMMY_MAIN() { return 1; }
5464#endif
5465int
5466main ()
5467{
5468static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5469test_array [0] = 0
5470
5471 ;
5472 return 0;
5473}
5474_ACEOF
5475rm -f conftest.$ac_objext
5476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5477 (eval $ac_compile) 2>&5
5478 ac_status=$?
5479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5480 (exit $ac_status); } &&
5481 { ac_try='test -s conftest.$ac_objext'
5482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5483 (eval $ac_try) 2>&5
5484 ac_status=$?
5485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5486 (exit $ac_status); }; }; then
5487 ac_lo=0 ac_mid=0
5488 while :; do
5489 cat >conftest.$ac_ext <<_ACEOF
5490#line $LINENO "configure"
5491#include "confdefs.h"
5492$ac_includes_default
5493#ifdef F77_DUMMY_MAIN
5494# ifdef __cplusplus
5495 extern "C"
5496# endif
5497 int F77_DUMMY_MAIN() { return 1; }
5498#endif
5499int
5500main ()
5501{
5502static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5503test_array [0] = 0
5504
5505 ;
5506 return 0;
5507}
5508_ACEOF
5509rm -f conftest.$ac_objext
5510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5511 (eval $ac_compile) 2>&5
5512 ac_status=$?
5513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5514 (exit $ac_status); } &&
5515 { ac_try='test -s conftest.$ac_objext'
5516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5517 (eval $ac_try) 2>&5
5518 ac_status=$?
5519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5520 (exit $ac_status); }; }; then
5521 ac_hi=$ac_mid; break
5522else
5523 echo "$as_me: failed program was:" >&5
5524cat conftest.$ac_ext >&5
5525ac_lo=`expr $ac_mid + 1`
5526 if test $ac_lo -le $ac_mid; then
5527 ac_lo= ac_hi=
5528 break
5529 fi
5530 ac_mid=`expr 2 '*' $ac_mid + 1`
5531fi
5532rm -f conftest.$ac_objext conftest.$ac_ext
5533 done
5534else
5535 echo "$as_me: failed program was:" >&5
5536cat conftest.$ac_ext >&5
5537cat >conftest.$ac_ext <<_ACEOF
5538#line $LINENO "configure"
5539#include "confdefs.h"
5540$ac_includes_default
5541#ifdef F77_DUMMY_MAIN
5542# ifdef __cplusplus
5543 extern "C"
5544# endif
5545 int F77_DUMMY_MAIN() { return 1; }
5546#endif
5547int
5548main ()
5549{
5550static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5551test_array [0] = 0
5552
5553 ;
5554 return 0;
5555}
5556_ACEOF
5557rm -f conftest.$ac_objext
5558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5559 (eval $ac_compile) 2>&5
5560 ac_status=$?
5561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5562 (exit $ac_status); } &&
5563 { ac_try='test -s conftest.$ac_objext'
5564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5565 (eval $ac_try) 2>&5
5566 ac_status=$?
5567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5568 (exit $ac_status); }; }; then
5569 ac_hi=-1 ac_mid=-1
5570 while :; do
5571 cat >conftest.$ac_ext <<_ACEOF
5572#line $LINENO "configure"
5573#include "confdefs.h"
5574$ac_includes_default
5575#ifdef F77_DUMMY_MAIN
5576# ifdef __cplusplus
5577 extern "C"
5578# endif
5579 int F77_DUMMY_MAIN() { return 1; }
5580#endif
5581int
5582main ()
5583{
5584static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5585test_array [0] = 0
5586
5587 ;
5588 return 0;
5589}
5590_ACEOF
5591rm -f conftest.$ac_objext
5592if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5593 (eval $ac_compile) 2>&5
5594 ac_status=$?
5595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5596 (exit $ac_status); } &&
5597 { ac_try='test -s conftest.$ac_objext'
5598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5599 (eval $ac_try) 2>&5
5600 ac_status=$?
5601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5602 (exit $ac_status); }; }; then
5603 ac_lo=$ac_mid; break
5604else
5605 echo "$as_me: failed program was:" >&5
5606cat conftest.$ac_ext >&5
5607ac_hi=`expr '(' $ac_mid ')' - 1`
5608 if test $ac_mid -le $ac_hi; then
5609 ac_lo= ac_hi=
5610 break
5611 fi
5612 ac_mid=`expr 2 '*' $ac_mid`
5613fi
5614rm -f conftest.$ac_objext conftest.$ac_ext
5615 done
5616else
5617 echo "$as_me: failed program was:" >&5
5618cat conftest.$ac_ext >&5
5619ac_lo= ac_hi=
5620fi
5621rm -f conftest.$ac_objext conftest.$ac_ext
5622fi
5623rm -f conftest.$ac_objext conftest.$ac_ext
5624# Binary search between lo and hi bounds.
5625while test "x$ac_lo" != "x$ac_hi"; do
5626 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5627 cat >conftest.$ac_ext <<_ACEOF
5628#line $LINENO "configure"
5629#include "confdefs.h"
5630$ac_includes_default
5631#ifdef F77_DUMMY_MAIN
5632# ifdef __cplusplus
5633 extern "C"
5634# endif
5635 int F77_DUMMY_MAIN() { return 1; }
5636#endif
5637int
5638main ()
5639{
5640static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5641test_array [0] = 0
5642
5643 ;
5644 return 0;
5645}
5646_ACEOF
5647rm -f conftest.$ac_objext
5648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5649 (eval $ac_compile) 2>&5
5650 ac_status=$?
5651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5652 (exit $ac_status); } &&
5653 { ac_try='test -s conftest.$ac_objext'
5654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5655 (eval $ac_try) 2>&5
5656 ac_status=$?
5657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5658 (exit $ac_status); }; }; then
5659 ac_hi=$ac_mid
5660else
5661 echo "$as_me: failed program was:" >&5
5662cat conftest.$ac_ext >&5
5663ac_lo=`expr '(' $ac_mid ')' + 1`
5664fi
5665rm -f conftest.$ac_objext conftest.$ac_ext
5666done
5667case $ac_lo in
5668?*) ac_cv_sizeof_void_p=$ac_lo;;
5669'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5670echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5671 { (exit 1); exit 1; }; } ;;
5672esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005673else
5674 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005675 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5676echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5677 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005678else
Martin v. Löwis11437992002-04-12 09:54:03 +00005679 cat >conftest.$ac_ext <<_ACEOF
5680#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005681#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005682$ac_includes_default
5683long longval () { return (long) (sizeof (void *)); }
5684unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005685#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005686#include <stdlib.h>
5687#ifdef F77_DUMMY_MAIN
5688# ifdef __cplusplus
5689 extern "C"
5690# endif
5691 int F77_DUMMY_MAIN() { return 1; }
5692#endif
5693int
5694main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005695{
Martin v. Löwis11437992002-04-12 09:54:03 +00005696
5697 FILE *f = fopen ("conftest.val", "w");
5698 if (! f)
5699 exit (1);
5700 if (((long) (sizeof (void *))) < 0)
5701 {
5702 long i = longval ();
5703 if (i != ((long) (sizeof (void *))))
5704 exit (1);
5705 fprintf (f, "%ld\n", i);
5706 }
5707 else
5708 {
5709 unsigned long i = ulongval ();
5710 if (i != ((long) (sizeof (void *))))
5711 exit (1);
5712 fprintf (f, "%lu\n", i);
5713 }
5714 exit (ferror (f) || fclose (f) != 0);
5715
5716 ;
5717 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005718}
Martin v. Löwis11437992002-04-12 09:54:03 +00005719_ACEOF
5720rm -f conftest$ac_exeext
5721if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5722 (eval $ac_link) 2>&5
5723 ac_status=$?
5724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5725 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5727 (eval $ac_try) 2>&5
5728 ac_status=$?
5729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5730 (exit $ac_status); }; }; then
5731 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005732else
Martin v. Löwis11437992002-04-12 09:54:03 +00005733 echo "$as_me: program exited with status $ac_status" >&5
5734echo "$as_me: failed program was:" >&5
5735cat conftest.$ac_ext >&5
5736( exit $ac_status )
5737{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5738echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5739 { (exit 1); exit 1; }; }
5740fi
5741rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5742fi
5743fi
5744rm -f conftest.val
5745else
Guido van Rossumad678af1998-10-02 14:42:15 +00005746 ac_cv_sizeof_void_p=0
5747fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005748fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005749echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5750echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5751cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005752#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005753_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005754
5755
Martin v. Löwis11437992002-04-12 09:54:03 +00005756echo "$as_me:$LINENO: checking for char" >&5
5757echo $ECHO_N "checking for char... $ECHO_C" >&6
5758if test "${ac_cv_type_char+set}" = set; then
5759 echo $ECHO_N "(cached) $ECHO_C" >&6
5760else
5761 cat >conftest.$ac_ext <<_ACEOF
5762#line $LINENO "configure"
5763#include "confdefs.h"
5764$ac_includes_default
5765#ifdef F77_DUMMY_MAIN
5766# ifdef __cplusplus
5767 extern "C"
5768# endif
5769 int F77_DUMMY_MAIN() { return 1; }
5770#endif
5771int
5772main ()
5773{
5774if ((char *) 0)
5775 return 0;
5776if (sizeof (char))
5777 return 0;
5778 ;
5779 return 0;
5780}
5781_ACEOF
5782rm -f conftest.$ac_objext
5783if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5784 (eval $ac_compile) 2>&5
5785 ac_status=$?
5786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5787 (exit $ac_status); } &&
5788 { ac_try='test -s conftest.$ac_objext'
5789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5790 (eval $ac_try) 2>&5
5791 ac_status=$?
5792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5793 (exit $ac_status); }; }; then
5794 ac_cv_type_char=yes
5795else
5796 echo "$as_me: failed program was:" >&5
5797cat conftest.$ac_ext >&5
5798ac_cv_type_char=no
5799fi
5800rm -f conftest.$ac_objext conftest.$ac_ext
5801fi
5802echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5803echo "${ECHO_T}$ac_cv_type_char" >&6
5804
5805echo "$as_me:$LINENO: checking size of char" >&5
5806echo $ECHO_N "checking size of char... $ECHO_C" >&6
5807if test "${ac_cv_sizeof_char+set}" = set; then
5808 echo $ECHO_N "(cached) $ECHO_C" >&6
5809else
5810 if test "$ac_cv_type_char" = yes; then
5811 # The cast to unsigned long works around a bug in the HP C Compiler
5812 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5813 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5814 # This bug is HP SR number 8606223364.
5815 if test "$cross_compiling" = yes; then
5816 # Depending upon the size, compute the lo and hi bounds.
5817cat >conftest.$ac_ext <<_ACEOF
5818#line $LINENO "configure"
5819#include "confdefs.h"
5820$ac_includes_default
5821#ifdef F77_DUMMY_MAIN
5822# ifdef __cplusplus
5823 extern "C"
5824# endif
5825 int F77_DUMMY_MAIN() { return 1; }
5826#endif
5827int
5828main ()
5829{
5830static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5831test_array [0] = 0
5832
5833 ;
5834 return 0;
5835}
5836_ACEOF
5837rm -f conftest.$ac_objext
5838if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5839 (eval $ac_compile) 2>&5
5840 ac_status=$?
5841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5842 (exit $ac_status); } &&
5843 { ac_try='test -s conftest.$ac_objext'
5844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5845 (eval $ac_try) 2>&5
5846 ac_status=$?
5847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5848 (exit $ac_status); }; }; then
5849 ac_lo=0 ac_mid=0
5850 while :; do
5851 cat >conftest.$ac_ext <<_ACEOF
5852#line $LINENO "configure"
5853#include "confdefs.h"
5854$ac_includes_default
5855#ifdef F77_DUMMY_MAIN
5856# ifdef __cplusplus
5857 extern "C"
5858# endif
5859 int F77_DUMMY_MAIN() { return 1; }
5860#endif
5861int
5862main ()
5863{
5864static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5865test_array [0] = 0
5866
5867 ;
5868 return 0;
5869}
5870_ACEOF
5871rm -f conftest.$ac_objext
5872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5873 (eval $ac_compile) 2>&5
5874 ac_status=$?
5875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5876 (exit $ac_status); } &&
5877 { ac_try='test -s conftest.$ac_objext'
5878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5879 (eval $ac_try) 2>&5
5880 ac_status=$?
5881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5882 (exit $ac_status); }; }; then
5883 ac_hi=$ac_mid; break
5884else
5885 echo "$as_me: failed program was:" >&5
5886cat conftest.$ac_ext >&5
5887ac_lo=`expr $ac_mid + 1`
5888 if test $ac_lo -le $ac_mid; then
5889 ac_lo= ac_hi=
5890 break
5891 fi
5892 ac_mid=`expr 2 '*' $ac_mid + 1`
5893fi
5894rm -f conftest.$ac_objext conftest.$ac_ext
5895 done
5896else
5897 echo "$as_me: failed program was:" >&5
5898cat conftest.$ac_ext >&5
5899cat >conftest.$ac_ext <<_ACEOF
5900#line $LINENO "configure"
5901#include "confdefs.h"
5902$ac_includes_default
5903#ifdef F77_DUMMY_MAIN
5904# ifdef __cplusplus
5905 extern "C"
5906# endif
5907 int F77_DUMMY_MAIN() { return 1; }
5908#endif
5909int
5910main ()
5911{
5912static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5913test_array [0] = 0
5914
5915 ;
5916 return 0;
5917}
5918_ACEOF
5919rm -f conftest.$ac_objext
5920if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5921 (eval $ac_compile) 2>&5
5922 ac_status=$?
5923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5924 (exit $ac_status); } &&
5925 { ac_try='test -s conftest.$ac_objext'
5926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5927 (eval $ac_try) 2>&5
5928 ac_status=$?
5929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5930 (exit $ac_status); }; }; then
5931 ac_hi=-1 ac_mid=-1
5932 while :; do
5933 cat >conftest.$ac_ext <<_ACEOF
5934#line $LINENO "configure"
5935#include "confdefs.h"
5936$ac_includes_default
5937#ifdef F77_DUMMY_MAIN
5938# ifdef __cplusplus
5939 extern "C"
5940# endif
5941 int F77_DUMMY_MAIN() { return 1; }
5942#endif
5943int
5944main ()
5945{
5946static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5947test_array [0] = 0
5948
5949 ;
5950 return 0;
5951}
5952_ACEOF
5953rm -f conftest.$ac_objext
5954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5955 (eval $ac_compile) 2>&5
5956 ac_status=$?
5957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5958 (exit $ac_status); } &&
5959 { ac_try='test -s conftest.$ac_objext'
5960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5961 (eval $ac_try) 2>&5
5962 ac_status=$?
5963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5964 (exit $ac_status); }; }; then
5965 ac_lo=$ac_mid; break
5966else
5967 echo "$as_me: failed program was:" >&5
5968cat conftest.$ac_ext >&5
5969ac_hi=`expr '(' $ac_mid ')' - 1`
5970 if test $ac_mid -le $ac_hi; then
5971 ac_lo= ac_hi=
5972 break
5973 fi
5974 ac_mid=`expr 2 '*' $ac_mid`
5975fi
5976rm -f conftest.$ac_objext conftest.$ac_ext
5977 done
5978else
5979 echo "$as_me: failed program was:" >&5
5980cat conftest.$ac_ext >&5
5981ac_lo= ac_hi=
5982fi
5983rm -f conftest.$ac_objext conftest.$ac_ext
5984fi
5985rm -f conftest.$ac_objext conftest.$ac_ext
5986# Binary search between lo and hi bounds.
5987while test "x$ac_lo" != "x$ac_hi"; do
5988 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5989 cat >conftest.$ac_ext <<_ACEOF
5990#line $LINENO "configure"
5991#include "confdefs.h"
5992$ac_includes_default
5993#ifdef F77_DUMMY_MAIN
5994# ifdef __cplusplus
5995 extern "C"
5996# endif
5997 int F77_DUMMY_MAIN() { return 1; }
5998#endif
5999int
6000main ()
6001{
6002static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6003test_array [0] = 0
6004
6005 ;
6006 return 0;
6007}
6008_ACEOF
6009rm -f conftest.$ac_objext
6010if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6011 (eval $ac_compile) 2>&5
6012 ac_status=$?
6013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6014 (exit $ac_status); } &&
6015 { ac_try='test -s conftest.$ac_objext'
6016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6017 (eval $ac_try) 2>&5
6018 ac_status=$?
6019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6020 (exit $ac_status); }; }; then
6021 ac_hi=$ac_mid
6022else
6023 echo "$as_me: failed program was:" >&5
6024cat conftest.$ac_ext >&5
6025ac_lo=`expr '(' $ac_mid ')' + 1`
6026fi
6027rm -f conftest.$ac_objext conftest.$ac_ext
6028done
6029case $ac_lo in
6030?*) ac_cv_sizeof_char=$ac_lo;;
6031'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6032echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6033 { (exit 1); exit 1; }; } ;;
6034esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006035else
6036 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006037 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6038echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6039 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006040else
Martin v. Löwis11437992002-04-12 09:54:03 +00006041 cat >conftest.$ac_ext <<_ACEOF
6042#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006043#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006044$ac_includes_default
6045long longval () { return (long) (sizeof (char)); }
6046unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006047#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006048#include <stdlib.h>
6049#ifdef F77_DUMMY_MAIN
6050# ifdef __cplusplus
6051 extern "C"
6052# endif
6053 int F77_DUMMY_MAIN() { return 1; }
6054#endif
6055int
6056main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006057{
Martin v. Löwis11437992002-04-12 09:54:03 +00006058
6059 FILE *f = fopen ("conftest.val", "w");
6060 if (! f)
6061 exit (1);
6062 if (((long) (sizeof (char))) < 0)
6063 {
6064 long i = longval ();
6065 if (i != ((long) (sizeof (char))))
6066 exit (1);
6067 fprintf (f, "%ld\n", i);
6068 }
6069 else
6070 {
6071 unsigned long i = ulongval ();
6072 if (i != ((long) (sizeof (char))))
6073 exit (1);
6074 fprintf (f, "%lu\n", i);
6075 }
6076 exit (ferror (f) || fclose (f) != 0);
6077
6078 ;
6079 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006080}
Martin v. Löwis11437992002-04-12 09:54:03 +00006081_ACEOF
6082rm -f conftest$ac_exeext
6083if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6084 (eval $ac_link) 2>&5
6085 ac_status=$?
6086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6087 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6089 (eval $ac_try) 2>&5
6090 ac_status=$?
6091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6092 (exit $ac_status); }; }; then
6093 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006094else
Martin v. Löwis11437992002-04-12 09:54:03 +00006095 echo "$as_me: program exited with status $ac_status" >&5
6096echo "$as_me: failed program was:" >&5
6097cat conftest.$ac_ext >&5
6098( exit $ac_status )
6099{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6100echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6101 { (exit 1); exit 1; }; }
6102fi
6103rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6104fi
6105fi
6106rm -f conftest.val
6107else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006108 ac_cv_sizeof_char=0
6109fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006110fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006111echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6112echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6113cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006114#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006115_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006116
6117
Martin v. Löwis11437992002-04-12 09:54:03 +00006118echo "$as_me:$LINENO: checking for short" >&5
6119echo $ECHO_N "checking for short... $ECHO_C" >&6
6120if test "${ac_cv_type_short+set}" = set; then
6121 echo $ECHO_N "(cached) $ECHO_C" >&6
6122else
6123 cat >conftest.$ac_ext <<_ACEOF
6124#line $LINENO "configure"
6125#include "confdefs.h"
6126$ac_includes_default
6127#ifdef F77_DUMMY_MAIN
6128# ifdef __cplusplus
6129 extern "C"
6130# endif
6131 int F77_DUMMY_MAIN() { return 1; }
6132#endif
6133int
6134main ()
6135{
6136if ((short *) 0)
6137 return 0;
6138if (sizeof (short))
6139 return 0;
6140 ;
6141 return 0;
6142}
6143_ACEOF
6144rm -f conftest.$ac_objext
6145if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6146 (eval $ac_compile) 2>&5
6147 ac_status=$?
6148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6149 (exit $ac_status); } &&
6150 { ac_try='test -s conftest.$ac_objext'
6151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6152 (eval $ac_try) 2>&5
6153 ac_status=$?
6154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6155 (exit $ac_status); }; }; then
6156 ac_cv_type_short=yes
6157else
6158 echo "$as_me: failed program was:" >&5
6159cat conftest.$ac_ext >&5
6160ac_cv_type_short=no
6161fi
6162rm -f conftest.$ac_objext conftest.$ac_ext
6163fi
6164echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6165echo "${ECHO_T}$ac_cv_type_short" >&6
6166
6167echo "$as_me:$LINENO: checking size of short" >&5
6168echo $ECHO_N "checking size of short... $ECHO_C" >&6
6169if test "${ac_cv_sizeof_short+set}" = set; then
6170 echo $ECHO_N "(cached) $ECHO_C" >&6
6171else
6172 if test "$ac_cv_type_short" = yes; then
6173 # The cast to unsigned long works around a bug in the HP C Compiler
6174 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6175 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6176 # This bug is HP SR number 8606223364.
6177 if test "$cross_compiling" = yes; then
6178 # Depending upon the size, compute the lo and hi bounds.
6179cat >conftest.$ac_ext <<_ACEOF
6180#line $LINENO "configure"
6181#include "confdefs.h"
6182$ac_includes_default
6183#ifdef F77_DUMMY_MAIN
6184# ifdef __cplusplus
6185 extern "C"
6186# endif
6187 int F77_DUMMY_MAIN() { return 1; }
6188#endif
6189int
6190main ()
6191{
6192static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6193test_array [0] = 0
6194
6195 ;
6196 return 0;
6197}
6198_ACEOF
6199rm -f conftest.$ac_objext
6200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6201 (eval $ac_compile) 2>&5
6202 ac_status=$?
6203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6204 (exit $ac_status); } &&
6205 { ac_try='test -s conftest.$ac_objext'
6206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6207 (eval $ac_try) 2>&5
6208 ac_status=$?
6209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6210 (exit $ac_status); }; }; then
6211 ac_lo=0 ac_mid=0
6212 while :; do
6213 cat >conftest.$ac_ext <<_ACEOF
6214#line $LINENO "configure"
6215#include "confdefs.h"
6216$ac_includes_default
6217#ifdef F77_DUMMY_MAIN
6218# ifdef __cplusplus
6219 extern "C"
6220# endif
6221 int F77_DUMMY_MAIN() { return 1; }
6222#endif
6223int
6224main ()
6225{
6226static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6227test_array [0] = 0
6228
6229 ;
6230 return 0;
6231}
6232_ACEOF
6233rm -f conftest.$ac_objext
6234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6235 (eval $ac_compile) 2>&5
6236 ac_status=$?
6237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6238 (exit $ac_status); } &&
6239 { ac_try='test -s conftest.$ac_objext'
6240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6241 (eval $ac_try) 2>&5
6242 ac_status=$?
6243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6244 (exit $ac_status); }; }; then
6245 ac_hi=$ac_mid; break
6246else
6247 echo "$as_me: failed program was:" >&5
6248cat conftest.$ac_ext >&5
6249ac_lo=`expr $ac_mid + 1`
6250 if test $ac_lo -le $ac_mid; then
6251 ac_lo= ac_hi=
6252 break
6253 fi
6254 ac_mid=`expr 2 '*' $ac_mid + 1`
6255fi
6256rm -f conftest.$ac_objext conftest.$ac_ext
6257 done
6258else
6259 echo "$as_me: failed program was:" >&5
6260cat conftest.$ac_ext >&5
6261cat >conftest.$ac_ext <<_ACEOF
6262#line $LINENO "configure"
6263#include "confdefs.h"
6264$ac_includes_default
6265#ifdef F77_DUMMY_MAIN
6266# ifdef __cplusplus
6267 extern "C"
6268# endif
6269 int F77_DUMMY_MAIN() { return 1; }
6270#endif
6271int
6272main ()
6273{
6274static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6275test_array [0] = 0
6276
6277 ;
6278 return 0;
6279}
6280_ACEOF
6281rm -f conftest.$ac_objext
6282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6283 (eval $ac_compile) 2>&5
6284 ac_status=$?
6285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6286 (exit $ac_status); } &&
6287 { ac_try='test -s conftest.$ac_objext'
6288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6289 (eval $ac_try) 2>&5
6290 ac_status=$?
6291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6292 (exit $ac_status); }; }; then
6293 ac_hi=-1 ac_mid=-1
6294 while :; do
6295 cat >conftest.$ac_ext <<_ACEOF
6296#line $LINENO "configure"
6297#include "confdefs.h"
6298$ac_includes_default
6299#ifdef F77_DUMMY_MAIN
6300# ifdef __cplusplus
6301 extern "C"
6302# endif
6303 int F77_DUMMY_MAIN() { return 1; }
6304#endif
6305int
6306main ()
6307{
6308static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6309test_array [0] = 0
6310
6311 ;
6312 return 0;
6313}
6314_ACEOF
6315rm -f conftest.$ac_objext
6316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6317 (eval $ac_compile) 2>&5
6318 ac_status=$?
6319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6320 (exit $ac_status); } &&
6321 { ac_try='test -s conftest.$ac_objext'
6322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6323 (eval $ac_try) 2>&5
6324 ac_status=$?
6325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6326 (exit $ac_status); }; }; then
6327 ac_lo=$ac_mid; break
6328else
6329 echo "$as_me: failed program was:" >&5
6330cat conftest.$ac_ext >&5
6331ac_hi=`expr '(' $ac_mid ')' - 1`
6332 if test $ac_mid -le $ac_hi; then
6333 ac_lo= ac_hi=
6334 break
6335 fi
6336 ac_mid=`expr 2 '*' $ac_mid`
6337fi
6338rm -f conftest.$ac_objext conftest.$ac_ext
6339 done
6340else
6341 echo "$as_me: failed program was:" >&5
6342cat conftest.$ac_ext >&5
6343ac_lo= ac_hi=
6344fi
6345rm -f conftest.$ac_objext conftest.$ac_ext
6346fi
6347rm -f conftest.$ac_objext conftest.$ac_ext
6348# Binary search between lo and hi bounds.
6349while test "x$ac_lo" != "x$ac_hi"; do
6350 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6351 cat >conftest.$ac_ext <<_ACEOF
6352#line $LINENO "configure"
6353#include "confdefs.h"
6354$ac_includes_default
6355#ifdef F77_DUMMY_MAIN
6356# ifdef __cplusplus
6357 extern "C"
6358# endif
6359 int F77_DUMMY_MAIN() { return 1; }
6360#endif
6361int
6362main ()
6363{
6364static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6365test_array [0] = 0
6366
6367 ;
6368 return 0;
6369}
6370_ACEOF
6371rm -f conftest.$ac_objext
6372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6373 (eval $ac_compile) 2>&5
6374 ac_status=$?
6375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6376 (exit $ac_status); } &&
6377 { ac_try='test -s conftest.$ac_objext'
6378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6379 (eval $ac_try) 2>&5
6380 ac_status=$?
6381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6382 (exit $ac_status); }; }; then
6383 ac_hi=$ac_mid
6384else
6385 echo "$as_me: failed program was:" >&5
6386cat conftest.$ac_ext >&5
6387ac_lo=`expr '(' $ac_mid ')' + 1`
6388fi
6389rm -f conftest.$ac_objext conftest.$ac_ext
6390done
6391case $ac_lo in
6392?*) ac_cv_sizeof_short=$ac_lo;;
6393'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6394echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6395 { (exit 1); exit 1; }; } ;;
6396esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006397else
6398 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006399 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6400echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6401 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006402else
Martin v. Löwis11437992002-04-12 09:54:03 +00006403 cat >conftest.$ac_ext <<_ACEOF
6404#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006405#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006406$ac_includes_default
6407long longval () { return (long) (sizeof (short)); }
6408unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006409#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006410#include <stdlib.h>
6411#ifdef F77_DUMMY_MAIN
6412# ifdef __cplusplus
6413 extern "C"
6414# endif
6415 int F77_DUMMY_MAIN() { return 1; }
6416#endif
6417int
6418main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006419{
Martin v. Löwis11437992002-04-12 09:54:03 +00006420
6421 FILE *f = fopen ("conftest.val", "w");
6422 if (! f)
6423 exit (1);
6424 if (((long) (sizeof (short))) < 0)
6425 {
6426 long i = longval ();
6427 if (i != ((long) (sizeof (short))))
6428 exit (1);
6429 fprintf (f, "%ld\n", i);
6430 }
6431 else
6432 {
6433 unsigned long i = ulongval ();
6434 if (i != ((long) (sizeof (short))))
6435 exit (1);
6436 fprintf (f, "%lu\n", i);
6437 }
6438 exit (ferror (f) || fclose (f) != 0);
6439
6440 ;
6441 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006442}
Martin v. Löwis11437992002-04-12 09:54:03 +00006443_ACEOF
6444rm -f conftest$ac_exeext
6445if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6446 (eval $ac_link) 2>&5
6447 ac_status=$?
6448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6449 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6451 (eval $ac_try) 2>&5
6452 ac_status=$?
6453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6454 (exit $ac_status); }; }; then
6455 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006456else
Martin v. Löwis11437992002-04-12 09:54:03 +00006457 echo "$as_me: program exited with status $ac_status" >&5
6458echo "$as_me: failed program was:" >&5
6459cat conftest.$ac_ext >&5
6460( exit $ac_status )
6461{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6462echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6463 { (exit 1); exit 1; }; }
6464fi
6465rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6466fi
6467fi
6468rm -f conftest.val
6469else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006470 ac_cv_sizeof_short=0
6471fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006472fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006473echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6474echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6475cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006476#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006477_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006478
6479
Martin v. Löwis11437992002-04-12 09:54:03 +00006480echo "$as_me:$LINENO: checking for float" >&5
6481echo $ECHO_N "checking for float... $ECHO_C" >&6
6482if test "${ac_cv_type_float+set}" = set; then
6483 echo $ECHO_N "(cached) $ECHO_C" >&6
6484else
6485 cat >conftest.$ac_ext <<_ACEOF
6486#line $LINENO "configure"
6487#include "confdefs.h"
6488$ac_includes_default
6489#ifdef F77_DUMMY_MAIN
6490# ifdef __cplusplus
6491 extern "C"
6492# endif
6493 int F77_DUMMY_MAIN() { return 1; }
6494#endif
6495int
6496main ()
6497{
6498if ((float *) 0)
6499 return 0;
6500if (sizeof (float))
6501 return 0;
6502 ;
6503 return 0;
6504}
6505_ACEOF
6506rm -f conftest.$ac_objext
6507if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6508 (eval $ac_compile) 2>&5
6509 ac_status=$?
6510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6511 (exit $ac_status); } &&
6512 { ac_try='test -s conftest.$ac_objext'
6513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6514 (eval $ac_try) 2>&5
6515 ac_status=$?
6516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6517 (exit $ac_status); }; }; then
6518 ac_cv_type_float=yes
6519else
6520 echo "$as_me: failed program was:" >&5
6521cat conftest.$ac_ext >&5
6522ac_cv_type_float=no
6523fi
6524rm -f conftest.$ac_objext conftest.$ac_ext
6525fi
6526echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6527echo "${ECHO_T}$ac_cv_type_float" >&6
6528
6529echo "$as_me:$LINENO: checking size of float" >&5
6530echo $ECHO_N "checking size of float... $ECHO_C" >&6
6531if test "${ac_cv_sizeof_float+set}" = set; then
6532 echo $ECHO_N "(cached) $ECHO_C" >&6
6533else
6534 if test "$ac_cv_type_float" = yes; then
6535 # The cast to unsigned long works around a bug in the HP C Compiler
6536 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6537 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6538 # This bug is HP SR number 8606223364.
6539 if test "$cross_compiling" = yes; then
6540 # Depending upon the size, compute the lo and hi bounds.
6541cat >conftest.$ac_ext <<_ACEOF
6542#line $LINENO "configure"
6543#include "confdefs.h"
6544$ac_includes_default
6545#ifdef F77_DUMMY_MAIN
6546# ifdef __cplusplus
6547 extern "C"
6548# endif
6549 int F77_DUMMY_MAIN() { return 1; }
6550#endif
6551int
6552main ()
6553{
6554static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6555test_array [0] = 0
6556
6557 ;
6558 return 0;
6559}
6560_ACEOF
6561rm -f conftest.$ac_objext
6562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6563 (eval $ac_compile) 2>&5
6564 ac_status=$?
6565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6566 (exit $ac_status); } &&
6567 { ac_try='test -s conftest.$ac_objext'
6568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6569 (eval $ac_try) 2>&5
6570 ac_status=$?
6571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6572 (exit $ac_status); }; }; then
6573 ac_lo=0 ac_mid=0
6574 while :; do
6575 cat >conftest.$ac_ext <<_ACEOF
6576#line $LINENO "configure"
6577#include "confdefs.h"
6578$ac_includes_default
6579#ifdef F77_DUMMY_MAIN
6580# ifdef __cplusplus
6581 extern "C"
6582# endif
6583 int F77_DUMMY_MAIN() { return 1; }
6584#endif
6585int
6586main ()
6587{
6588static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6589test_array [0] = 0
6590
6591 ;
6592 return 0;
6593}
6594_ACEOF
6595rm -f conftest.$ac_objext
6596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6597 (eval $ac_compile) 2>&5
6598 ac_status=$?
6599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6600 (exit $ac_status); } &&
6601 { ac_try='test -s conftest.$ac_objext'
6602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6603 (eval $ac_try) 2>&5
6604 ac_status=$?
6605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6606 (exit $ac_status); }; }; then
6607 ac_hi=$ac_mid; break
6608else
6609 echo "$as_me: failed program was:" >&5
6610cat conftest.$ac_ext >&5
6611ac_lo=`expr $ac_mid + 1`
6612 if test $ac_lo -le $ac_mid; then
6613 ac_lo= ac_hi=
6614 break
6615 fi
6616 ac_mid=`expr 2 '*' $ac_mid + 1`
6617fi
6618rm -f conftest.$ac_objext conftest.$ac_ext
6619 done
6620else
6621 echo "$as_me: failed program was:" >&5
6622cat conftest.$ac_ext >&5
6623cat >conftest.$ac_ext <<_ACEOF
6624#line $LINENO "configure"
6625#include "confdefs.h"
6626$ac_includes_default
6627#ifdef F77_DUMMY_MAIN
6628# ifdef __cplusplus
6629 extern "C"
6630# endif
6631 int F77_DUMMY_MAIN() { return 1; }
6632#endif
6633int
6634main ()
6635{
6636static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6637test_array [0] = 0
6638
6639 ;
6640 return 0;
6641}
6642_ACEOF
6643rm -f conftest.$ac_objext
6644if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6645 (eval $ac_compile) 2>&5
6646 ac_status=$?
6647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6648 (exit $ac_status); } &&
6649 { ac_try='test -s conftest.$ac_objext'
6650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6651 (eval $ac_try) 2>&5
6652 ac_status=$?
6653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6654 (exit $ac_status); }; }; then
6655 ac_hi=-1 ac_mid=-1
6656 while :; do
6657 cat >conftest.$ac_ext <<_ACEOF
6658#line $LINENO "configure"
6659#include "confdefs.h"
6660$ac_includes_default
6661#ifdef F77_DUMMY_MAIN
6662# ifdef __cplusplus
6663 extern "C"
6664# endif
6665 int F77_DUMMY_MAIN() { return 1; }
6666#endif
6667int
6668main ()
6669{
6670static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6671test_array [0] = 0
6672
6673 ;
6674 return 0;
6675}
6676_ACEOF
6677rm -f conftest.$ac_objext
6678if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6679 (eval $ac_compile) 2>&5
6680 ac_status=$?
6681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6682 (exit $ac_status); } &&
6683 { ac_try='test -s conftest.$ac_objext'
6684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6685 (eval $ac_try) 2>&5
6686 ac_status=$?
6687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6688 (exit $ac_status); }; }; then
6689 ac_lo=$ac_mid; break
6690else
6691 echo "$as_me: failed program was:" >&5
6692cat conftest.$ac_ext >&5
6693ac_hi=`expr '(' $ac_mid ')' - 1`
6694 if test $ac_mid -le $ac_hi; then
6695 ac_lo= ac_hi=
6696 break
6697 fi
6698 ac_mid=`expr 2 '*' $ac_mid`
6699fi
6700rm -f conftest.$ac_objext conftest.$ac_ext
6701 done
6702else
6703 echo "$as_me: failed program was:" >&5
6704cat conftest.$ac_ext >&5
6705ac_lo= ac_hi=
6706fi
6707rm -f conftest.$ac_objext conftest.$ac_ext
6708fi
6709rm -f conftest.$ac_objext conftest.$ac_ext
6710# Binary search between lo and hi bounds.
6711while test "x$ac_lo" != "x$ac_hi"; do
6712 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6713 cat >conftest.$ac_ext <<_ACEOF
6714#line $LINENO "configure"
6715#include "confdefs.h"
6716$ac_includes_default
6717#ifdef F77_DUMMY_MAIN
6718# ifdef __cplusplus
6719 extern "C"
6720# endif
6721 int F77_DUMMY_MAIN() { return 1; }
6722#endif
6723int
6724main ()
6725{
6726static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6727test_array [0] = 0
6728
6729 ;
6730 return 0;
6731}
6732_ACEOF
6733rm -f conftest.$ac_objext
6734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6735 (eval $ac_compile) 2>&5
6736 ac_status=$?
6737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6738 (exit $ac_status); } &&
6739 { ac_try='test -s conftest.$ac_objext'
6740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6741 (eval $ac_try) 2>&5
6742 ac_status=$?
6743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6744 (exit $ac_status); }; }; then
6745 ac_hi=$ac_mid
6746else
6747 echo "$as_me: failed program was:" >&5
6748cat conftest.$ac_ext >&5
6749ac_lo=`expr '(' $ac_mid ')' + 1`
6750fi
6751rm -f conftest.$ac_objext conftest.$ac_ext
6752done
6753case $ac_lo in
6754?*) ac_cv_sizeof_float=$ac_lo;;
6755'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6756echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6757 { (exit 1); exit 1; }; } ;;
6758esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006759else
6760 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006761 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6762echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6763 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006764else
Martin v. Löwis11437992002-04-12 09:54:03 +00006765 cat >conftest.$ac_ext <<_ACEOF
6766#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006767#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006768$ac_includes_default
6769long longval () { return (long) (sizeof (float)); }
6770unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006771#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006772#include <stdlib.h>
6773#ifdef F77_DUMMY_MAIN
6774# ifdef __cplusplus
6775 extern "C"
6776# endif
6777 int F77_DUMMY_MAIN() { return 1; }
6778#endif
6779int
6780main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006781{
Martin v. Löwis11437992002-04-12 09:54:03 +00006782
6783 FILE *f = fopen ("conftest.val", "w");
6784 if (! f)
6785 exit (1);
6786 if (((long) (sizeof (float))) < 0)
6787 {
6788 long i = longval ();
6789 if (i != ((long) (sizeof (float))))
6790 exit (1);
6791 fprintf (f, "%ld\n", i);
6792 }
6793 else
6794 {
6795 unsigned long i = ulongval ();
6796 if (i != ((long) (sizeof (float))))
6797 exit (1);
6798 fprintf (f, "%lu\n", i);
6799 }
6800 exit (ferror (f) || fclose (f) != 0);
6801
6802 ;
6803 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006804}
Martin v. Löwis11437992002-04-12 09:54:03 +00006805_ACEOF
6806rm -f conftest$ac_exeext
6807if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6808 (eval $ac_link) 2>&5
6809 ac_status=$?
6810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6811 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6813 (eval $ac_try) 2>&5
6814 ac_status=$?
6815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6816 (exit $ac_status); }; }; then
6817 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006818else
Martin v. Löwis11437992002-04-12 09:54:03 +00006819 echo "$as_me: program exited with status $ac_status" >&5
6820echo "$as_me: failed program was:" >&5
6821cat conftest.$ac_ext >&5
6822( exit $ac_status )
6823{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6824echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6825 { (exit 1); exit 1; }; }
6826fi
6827rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6828fi
6829fi
6830rm -f conftest.val
6831else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006832 ac_cv_sizeof_float=0
6833fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006834fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006835echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6836echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6837cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006838#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006839_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006840
6841
Martin v. Löwis11437992002-04-12 09:54:03 +00006842echo "$as_me:$LINENO: checking for double" >&5
6843echo $ECHO_N "checking for double... $ECHO_C" >&6
6844if test "${ac_cv_type_double+set}" = set; then
6845 echo $ECHO_N "(cached) $ECHO_C" >&6
6846else
6847 cat >conftest.$ac_ext <<_ACEOF
6848#line $LINENO "configure"
6849#include "confdefs.h"
6850$ac_includes_default
6851#ifdef F77_DUMMY_MAIN
6852# ifdef __cplusplus
6853 extern "C"
6854# endif
6855 int F77_DUMMY_MAIN() { return 1; }
6856#endif
6857int
6858main ()
6859{
6860if ((double *) 0)
6861 return 0;
6862if (sizeof (double))
6863 return 0;
6864 ;
6865 return 0;
6866}
6867_ACEOF
6868rm -f conftest.$ac_objext
6869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6870 (eval $ac_compile) 2>&5
6871 ac_status=$?
6872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6873 (exit $ac_status); } &&
6874 { ac_try='test -s conftest.$ac_objext'
6875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6876 (eval $ac_try) 2>&5
6877 ac_status=$?
6878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6879 (exit $ac_status); }; }; then
6880 ac_cv_type_double=yes
6881else
6882 echo "$as_me: failed program was:" >&5
6883cat conftest.$ac_ext >&5
6884ac_cv_type_double=no
6885fi
6886rm -f conftest.$ac_objext conftest.$ac_ext
6887fi
6888echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6889echo "${ECHO_T}$ac_cv_type_double" >&6
6890
6891echo "$as_me:$LINENO: checking size of double" >&5
6892echo $ECHO_N "checking size of double... $ECHO_C" >&6
6893if test "${ac_cv_sizeof_double+set}" = set; then
6894 echo $ECHO_N "(cached) $ECHO_C" >&6
6895else
6896 if test "$ac_cv_type_double" = yes; then
6897 # The cast to unsigned long works around a bug in the HP C Compiler
6898 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6899 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6900 # This bug is HP SR number 8606223364.
6901 if test "$cross_compiling" = yes; then
6902 # Depending upon the size, compute the lo and hi bounds.
6903cat >conftest.$ac_ext <<_ACEOF
6904#line $LINENO "configure"
6905#include "confdefs.h"
6906$ac_includes_default
6907#ifdef F77_DUMMY_MAIN
6908# ifdef __cplusplus
6909 extern "C"
6910# endif
6911 int F77_DUMMY_MAIN() { return 1; }
6912#endif
6913int
6914main ()
6915{
6916static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6917test_array [0] = 0
6918
6919 ;
6920 return 0;
6921}
6922_ACEOF
6923rm -f conftest.$ac_objext
6924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6925 (eval $ac_compile) 2>&5
6926 ac_status=$?
6927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6928 (exit $ac_status); } &&
6929 { ac_try='test -s conftest.$ac_objext'
6930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6931 (eval $ac_try) 2>&5
6932 ac_status=$?
6933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6934 (exit $ac_status); }; }; then
6935 ac_lo=0 ac_mid=0
6936 while :; do
6937 cat >conftest.$ac_ext <<_ACEOF
6938#line $LINENO "configure"
6939#include "confdefs.h"
6940$ac_includes_default
6941#ifdef F77_DUMMY_MAIN
6942# ifdef __cplusplus
6943 extern "C"
6944# endif
6945 int F77_DUMMY_MAIN() { return 1; }
6946#endif
6947int
6948main ()
6949{
6950static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6951test_array [0] = 0
6952
6953 ;
6954 return 0;
6955}
6956_ACEOF
6957rm -f conftest.$ac_objext
6958if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6959 (eval $ac_compile) 2>&5
6960 ac_status=$?
6961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6962 (exit $ac_status); } &&
6963 { ac_try='test -s conftest.$ac_objext'
6964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6965 (eval $ac_try) 2>&5
6966 ac_status=$?
6967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6968 (exit $ac_status); }; }; then
6969 ac_hi=$ac_mid; break
6970else
6971 echo "$as_me: failed program was:" >&5
6972cat conftest.$ac_ext >&5
6973ac_lo=`expr $ac_mid + 1`
6974 if test $ac_lo -le $ac_mid; then
6975 ac_lo= ac_hi=
6976 break
6977 fi
6978 ac_mid=`expr 2 '*' $ac_mid + 1`
6979fi
6980rm -f conftest.$ac_objext conftest.$ac_ext
6981 done
6982else
6983 echo "$as_me: failed program was:" >&5
6984cat conftest.$ac_ext >&5
6985cat >conftest.$ac_ext <<_ACEOF
6986#line $LINENO "configure"
6987#include "confdefs.h"
6988$ac_includes_default
6989#ifdef F77_DUMMY_MAIN
6990# ifdef __cplusplus
6991 extern "C"
6992# endif
6993 int F77_DUMMY_MAIN() { return 1; }
6994#endif
6995int
6996main ()
6997{
6998static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6999test_array [0] = 0
7000
7001 ;
7002 return 0;
7003}
7004_ACEOF
7005rm -f conftest.$ac_objext
7006if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7007 (eval $ac_compile) 2>&5
7008 ac_status=$?
7009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7010 (exit $ac_status); } &&
7011 { ac_try='test -s conftest.$ac_objext'
7012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7013 (eval $ac_try) 2>&5
7014 ac_status=$?
7015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7016 (exit $ac_status); }; }; then
7017 ac_hi=-1 ac_mid=-1
7018 while :; do
7019 cat >conftest.$ac_ext <<_ACEOF
7020#line $LINENO "configure"
7021#include "confdefs.h"
7022$ac_includes_default
7023#ifdef F77_DUMMY_MAIN
7024# ifdef __cplusplus
7025 extern "C"
7026# endif
7027 int F77_DUMMY_MAIN() { return 1; }
7028#endif
7029int
7030main ()
7031{
7032static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7033test_array [0] = 0
7034
7035 ;
7036 return 0;
7037}
7038_ACEOF
7039rm -f conftest.$ac_objext
7040if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7041 (eval $ac_compile) 2>&5
7042 ac_status=$?
7043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7044 (exit $ac_status); } &&
7045 { ac_try='test -s conftest.$ac_objext'
7046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7047 (eval $ac_try) 2>&5
7048 ac_status=$?
7049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7050 (exit $ac_status); }; }; then
7051 ac_lo=$ac_mid; break
7052else
7053 echo "$as_me: failed program was:" >&5
7054cat conftest.$ac_ext >&5
7055ac_hi=`expr '(' $ac_mid ')' - 1`
7056 if test $ac_mid -le $ac_hi; then
7057 ac_lo= ac_hi=
7058 break
7059 fi
7060 ac_mid=`expr 2 '*' $ac_mid`
7061fi
7062rm -f conftest.$ac_objext conftest.$ac_ext
7063 done
7064else
7065 echo "$as_me: failed program was:" >&5
7066cat conftest.$ac_ext >&5
7067ac_lo= ac_hi=
7068fi
7069rm -f conftest.$ac_objext conftest.$ac_ext
7070fi
7071rm -f conftest.$ac_objext conftest.$ac_ext
7072# Binary search between lo and hi bounds.
7073while test "x$ac_lo" != "x$ac_hi"; do
7074 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7075 cat >conftest.$ac_ext <<_ACEOF
7076#line $LINENO "configure"
7077#include "confdefs.h"
7078$ac_includes_default
7079#ifdef F77_DUMMY_MAIN
7080# ifdef __cplusplus
7081 extern "C"
7082# endif
7083 int F77_DUMMY_MAIN() { return 1; }
7084#endif
7085int
7086main ()
7087{
7088static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7089test_array [0] = 0
7090
7091 ;
7092 return 0;
7093}
7094_ACEOF
7095rm -f conftest.$ac_objext
7096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7097 (eval $ac_compile) 2>&5
7098 ac_status=$?
7099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7100 (exit $ac_status); } &&
7101 { ac_try='test -s conftest.$ac_objext'
7102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7103 (eval $ac_try) 2>&5
7104 ac_status=$?
7105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7106 (exit $ac_status); }; }; then
7107 ac_hi=$ac_mid
7108else
7109 echo "$as_me: failed program was:" >&5
7110cat conftest.$ac_ext >&5
7111ac_lo=`expr '(' $ac_mid ')' + 1`
7112fi
7113rm -f conftest.$ac_objext conftest.$ac_ext
7114done
7115case $ac_lo in
7116?*) ac_cv_sizeof_double=$ac_lo;;
7117'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7118echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7119 { (exit 1); exit 1; }; } ;;
7120esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007121else
7122 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007123 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7124echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7125 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007126else
Martin v. Löwis11437992002-04-12 09:54:03 +00007127 cat >conftest.$ac_ext <<_ACEOF
7128#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007129#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007130$ac_includes_default
7131long longval () { return (long) (sizeof (double)); }
7132unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007133#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007134#include <stdlib.h>
7135#ifdef F77_DUMMY_MAIN
7136# ifdef __cplusplus
7137 extern "C"
7138# endif
7139 int F77_DUMMY_MAIN() { return 1; }
7140#endif
7141int
7142main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007143{
Martin v. Löwis11437992002-04-12 09:54:03 +00007144
7145 FILE *f = fopen ("conftest.val", "w");
7146 if (! f)
7147 exit (1);
7148 if (((long) (sizeof (double))) < 0)
7149 {
7150 long i = longval ();
7151 if (i != ((long) (sizeof (double))))
7152 exit (1);
7153 fprintf (f, "%ld\n", i);
7154 }
7155 else
7156 {
7157 unsigned long i = ulongval ();
7158 if (i != ((long) (sizeof (double))))
7159 exit (1);
7160 fprintf (f, "%lu\n", i);
7161 }
7162 exit (ferror (f) || fclose (f) != 0);
7163
7164 ;
7165 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007166}
Martin v. Löwis11437992002-04-12 09:54:03 +00007167_ACEOF
7168rm -f conftest$ac_exeext
7169if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7170 (eval $ac_link) 2>&5
7171 ac_status=$?
7172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7173 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7175 (eval $ac_try) 2>&5
7176 ac_status=$?
7177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7178 (exit $ac_status); }; }; then
7179 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007180else
Martin v. Löwis11437992002-04-12 09:54:03 +00007181 echo "$as_me: program exited with status $ac_status" >&5
7182echo "$as_me: failed program was:" >&5
7183cat conftest.$ac_ext >&5
7184( exit $ac_status )
7185{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7186echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7187 { (exit 1); exit 1; }; }
7188fi
7189rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7190fi
7191fi
7192rm -f conftest.val
7193else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007194 ac_cv_sizeof_double=0
7195fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007196fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007197echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7198echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7199cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007200#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007201_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007202
7203
Martin v. Löwis11437992002-04-12 09:54:03 +00007204echo "$as_me:$LINENO: checking for fpos_t" >&5
7205echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7206if test "${ac_cv_type_fpos_t+set}" = set; then
7207 echo $ECHO_N "(cached) $ECHO_C" >&6
7208else
7209 cat >conftest.$ac_ext <<_ACEOF
7210#line $LINENO "configure"
7211#include "confdefs.h"
7212$ac_includes_default
7213#ifdef F77_DUMMY_MAIN
7214# ifdef __cplusplus
7215 extern "C"
7216# endif
7217 int F77_DUMMY_MAIN() { return 1; }
7218#endif
7219int
7220main ()
7221{
7222if ((fpos_t *) 0)
7223 return 0;
7224if (sizeof (fpos_t))
7225 return 0;
7226 ;
7227 return 0;
7228}
7229_ACEOF
7230rm -f conftest.$ac_objext
7231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7232 (eval $ac_compile) 2>&5
7233 ac_status=$?
7234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7235 (exit $ac_status); } &&
7236 { ac_try='test -s conftest.$ac_objext'
7237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7238 (eval $ac_try) 2>&5
7239 ac_status=$?
7240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7241 (exit $ac_status); }; }; then
7242 ac_cv_type_fpos_t=yes
7243else
7244 echo "$as_me: failed program was:" >&5
7245cat conftest.$ac_ext >&5
7246ac_cv_type_fpos_t=no
7247fi
7248rm -f conftest.$ac_objext conftest.$ac_ext
7249fi
7250echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7251echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7252
7253echo "$as_me:$LINENO: checking size of fpos_t" >&5
7254echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7255if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7256 echo $ECHO_N "(cached) $ECHO_C" >&6
7257else
7258 if test "$ac_cv_type_fpos_t" = yes; then
7259 # The cast to unsigned long works around a bug in the HP C Compiler
7260 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7261 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7262 # This bug is HP SR number 8606223364.
7263 if test "$cross_compiling" = yes; then
7264 # Depending upon the size, compute the lo and hi bounds.
7265cat >conftest.$ac_ext <<_ACEOF
7266#line $LINENO "configure"
7267#include "confdefs.h"
7268$ac_includes_default
7269#ifdef F77_DUMMY_MAIN
7270# ifdef __cplusplus
7271 extern "C"
7272# endif
7273 int F77_DUMMY_MAIN() { return 1; }
7274#endif
7275int
7276main ()
7277{
7278static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7279test_array [0] = 0
7280
7281 ;
7282 return 0;
7283}
7284_ACEOF
7285rm -f conftest.$ac_objext
7286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7287 (eval $ac_compile) 2>&5
7288 ac_status=$?
7289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7290 (exit $ac_status); } &&
7291 { ac_try='test -s conftest.$ac_objext'
7292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7293 (eval $ac_try) 2>&5
7294 ac_status=$?
7295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7296 (exit $ac_status); }; }; then
7297 ac_lo=0 ac_mid=0
7298 while :; do
7299 cat >conftest.$ac_ext <<_ACEOF
7300#line $LINENO "configure"
7301#include "confdefs.h"
7302$ac_includes_default
7303#ifdef F77_DUMMY_MAIN
7304# ifdef __cplusplus
7305 extern "C"
7306# endif
7307 int F77_DUMMY_MAIN() { return 1; }
7308#endif
7309int
7310main ()
7311{
7312static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7313test_array [0] = 0
7314
7315 ;
7316 return 0;
7317}
7318_ACEOF
7319rm -f conftest.$ac_objext
7320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7321 (eval $ac_compile) 2>&5
7322 ac_status=$?
7323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7324 (exit $ac_status); } &&
7325 { ac_try='test -s conftest.$ac_objext'
7326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7327 (eval $ac_try) 2>&5
7328 ac_status=$?
7329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7330 (exit $ac_status); }; }; then
7331 ac_hi=$ac_mid; break
7332else
7333 echo "$as_me: failed program was:" >&5
7334cat conftest.$ac_ext >&5
7335ac_lo=`expr $ac_mid + 1`
7336 if test $ac_lo -le $ac_mid; then
7337 ac_lo= ac_hi=
7338 break
7339 fi
7340 ac_mid=`expr 2 '*' $ac_mid + 1`
7341fi
7342rm -f conftest.$ac_objext conftest.$ac_ext
7343 done
7344else
7345 echo "$as_me: failed program was:" >&5
7346cat conftest.$ac_ext >&5
7347cat >conftest.$ac_ext <<_ACEOF
7348#line $LINENO "configure"
7349#include "confdefs.h"
7350$ac_includes_default
7351#ifdef F77_DUMMY_MAIN
7352# ifdef __cplusplus
7353 extern "C"
7354# endif
7355 int F77_DUMMY_MAIN() { return 1; }
7356#endif
7357int
7358main ()
7359{
7360static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7361test_array [0] = 0
7362
7363 ;
7364 return 0;
7365}
7366_ACEOF
7367rm -f conftest.$ac_objext
7368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7369 (eval $ac_compile) 2>&5
7370 ac_status=$?
7371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7372 (exit $ac_status); } &&
7373 { ac_try='test -s conftest.$ac_objext'
7374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7375 (eval $ac_try) 2>&5
7376 ac_status=$?
7377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7378 (exit $ac_status); }; }; then
7379 ac_hi=-1 ac_mid=-1
7380 while :; do
7381 cat >conftest.$ac_ext <<_ACEOF
7382#line $LINENO "configure"
7383#include "confdefs.h"
7384$ac_includes_default
7385#ifdef F77_DUMMY_MAIN
7386# ifdef __cplusplus
7387 extern "C"
7388# endif
7389 int F77_DUMMY_MAIN() { return 1; }
7390#endif
7391int
7392main ()
7393{
7394static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7395test_array [0] = 0
7396
7397 ;
7398 return 0;
7399}
7400_ACEOF
7401rm -f conftest.$ac_objext
7402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7403 (eval $ac_compile) 2>&5
7404 ac_status=$?
7405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7406 (exit $ac_status); } &&
7407 { ac_try='test -s conftest.$ac_objext'
7408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7409 (eval $ac_try) 2>&5
7410 ac_status=$?
7411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7412 (exit $ac_status); }; }; then
7413 ac_lo=$ac_mid; break
7414else
7415 echo "$as_me: failed program was:" >&5
7416cat conftest.$ac_ext >&5
7417ac_hi=`expr '(' $ac_mid ')' - 1`
7418 if test $ac_mid -le $ac_hi; then
7419 ac_lo= ac_hi=
7420 break
7421 fi
7422 ac_mid=`expr 2 '*' $ac_mid`
7423fi
7424rm -f conftest.$ac_objext conftest.$ac_ext
7425 done
7426else
7427 echo "$as_me: failed program was:" >&5
7428cat conftest.$ac_ext >&5
7429ac_lo= ac_hi=
7430fi
7431rm -f conftest.$ac_objext conftest.$ac_ext
7432fi
7433rm -f conftest.$ac_objext conftest.$ac_ext
7434# Binary search between lo and hi bounds.
7435while test "x$ac_lo" != "x$ac_hi"; do
7436 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7437 cat >conftest.$ac_ext <<_ACEOF
7438#line $LINENO "configure"
7439#include "confdefs.h"
7440$ac_includes_default
7441#ifdef F77_DUMMY_MAIN
7442# ifdef __cplusplus
7443 extern "C"
7444# endif
7445 int F77_DUMMY_MAIN() { return 1; }
7446#endif
7447int
7448main ()
7449{
7450static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7451test_array [0] = 0
7452
7453 ;
7454 return 0;
7455}
7456_ACEOF
7457rm -f conftest.$ac_objext
7458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7459 (eval $ac_compile) 2>&5
7460 ac_status=$?
7461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7462 (exit $ac_status); } &&
7463 { ac_try='test -s conftest.$ac_objext'
7464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7465 (eval $ac_try) 2>&5
7466 ac_status=$?
7467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7468 (exit $ac_status); }; }; then
7469 ac_hi=$ac_mid
7470else
7471 echo "$as_me: failed program was:" >&5
7472cat conftest.$ac_ext >&5
7473ac_lo=`expr '(' $ac_mid ')' + 1`
7474fi
7475rm -f conftest.$ac_objext conftest.$ac_ext
7476done
7477case $ac_lo in
7478?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7479'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7480echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7481 { (exit 1); exit 1; }; } ;;
7482esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007483else
7484 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007485 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7486echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7487 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007488else
Martin v. Löwis11437992002-04-12 09:54:03 +00007489 cat >conftest.$ac_ext <<_ACEOF
7490#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007491#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007492$ac_includes_default
7493long longval () { return (long) (sizeof (fpos_t)); }
7494unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007495#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007496#include <stdlib.h>
7497#ifdef F77_DUMMY_MAIN
7498# ifdef __cplusplus
7499 extern "C"
7500# endif
7501 int F77_DUMMY_MAIN() { return 1; }
7502#endif
7503int
7504main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007505{
Martin v. Löwis11437992002-04-12 09:54:03 +00007506
7507 FILE *f = fopen ("conftest.val", "w");
7508 if (! f)
7509 exit (1);
7510 if (((long) (sizeof (fpos_t))) < 0)
7511 {
7512 long i = longval ();
7513 if (i != ((long) (sizeof (fpos_t))))
7514 exit (1);
7515 fprintf (f, "%ld\n", i);
7516 }
7517 else
7518 {
7519 unsigned long i = ulongval ();
7520 if (i != ((long) (sizeof (fpos_t))))
7521 exit (1);
7522 fprintf (f, "%lu\n", i);
7523 }
7524 exit (ferror (f) || fclose (f) != 0);
7525
7526 ;
7527 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007528}
Martin v. Löwis11437992002-04-12 09:54:03 +00007529_ACEOF
7530rm -f conftest$ac_exeext
7531if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7532 (eval $ac_link) 2>&5
7533 ac_status=$?
7534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7535 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7537 (eval $ac_try) 2>&5
7538 ac_status=$?
7539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7540 (exit $ac_status); }; }; then
7541 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007542else
Martin v. Löwis11437992002-04-12 09:54:03 +00007543 echo "$as_me: program exited with status $ac_status" >&5
7544echo "$as_me: failed program was:" >&5
7545cat conftest.$ac_ext >&5
7546( exit $ac_status )
7547{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7548echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7549 { (exit 1); exit 1; }; }
7550fi
7551rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7552fi
7553fi
7554rm -f conftest.val
7555else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007556 ac_cv_sizeof_fpos_t=0
7557fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007558fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007559echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7560echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7561cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007562#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007563_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007564
Michael W. Hudson54241132001-12-07 15:38:26 +00007565
7566
Martin v. Löwis11437992002-04-12 09:54:03 +00007567echo "$as_me:$LINENO: checking for long long support" >&5
7568echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007569have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007570cat >conftest.$ac_ext <<_ACEOF
7571#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007572#include "confdefs.h"
7573
Martin v. Löwis11437992002-04-12 09:54:03 +00007574#ifdef F77_DUMMY_MAIN
7575# ifdef __cplusplus
7576 extern "C"
7577# endif
7578 int F77_DUMMY_MAIN() { return 1; }
7579#endif
7580int
7581main ()
7582{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007583long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007584 ;
7585 return 0;
7586}
7587_ACEOF
7588rm -f conftest.$ac_objext
7589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7590 (eval $ac_compile) 2>&5
7591 ac_status=$?
7592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7593 (exit $ac_status); } &&
7594 { ac_try='test -s conftest.$ac_objext'
7595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7596 (eval $ac_try) 2>&5
7597 ac_status=$?
7598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7599 (exit $ac_status); }; }; then
7600
7601
7602cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007603#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007604_ACEOF
7605
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007606 have_long_long=yes
7607
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007608else
Martin v. Löwis11437992002-04-12 09:54:03 +00007609 echo "$as_me: failed program was:" >&5
7610cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007611fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007612rm -f conftest.$ac_objext conftest.$ac_ext
7613echo "$as_me:$LINENO: result: $have_long_long" >&5
7614echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007615if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007616echo "$as_me:$LINENO: checking for long long" >&5
7617echo $ECHO_N "checking for long long... $ECHO_C" >&6
7618if test "${ac_cv_type_long_long+set}" = set; then
7619 echo $ECHO_N "(cached) $ECHO_C" >&6
7620else
7621 cat >conftest.$ac_ext <<_ACEOF
7622#line $LINENO "configure"
7623#include "confdefs.h"
7624$ac_includes_default
7625#ifdef F77_DUMMY_MAIN
7626# ifdef __cplusplus
7627 extern "C"
7628# endif
7629 int F77_DUMMY_MAIN() { return 1; }
7630#endif
7631int
7632main ()
7633{
7634if ((long long *) 0)
7635 return 0;
7636if (sizeof (long long))
7637 return 0;
7638 ;
7639 return 0;
7640}
7641_ACEOF
7642rm -f conftest.$ac_objext
7643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7644 (eval $ac_compile) 2>&5
7645 ac_status=$?
7646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7647 (exit $ac_status); } &&
7648 { ac_try='test -s conftest.$ac_objext'
7649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7650 (eval $ac_try) 2>&5
7651 ac_status=$?
7652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7653 (exit $ac_status); }; }; then
7654 ac_cv_type_long_long=yes
7655else
7656 echo "$as_me: failed program was:" >&5
7657cat conftest.$ac_ext >&5
7658ac_cv_type_long_long=no
7659fi
7660rm -f conftest.$ac_objext conftest.$ac_ext
7661fi
7662echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7663echo "${ECHO_T}$ac_cv_type_long_long" >&6
7664
7665echo "$as_me:$LINENO: checking size of long long" >&5
7666echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7667if test "${ac_cv_sizeof_long_long+set}" = set; then
7668 echo $ECHO_N "(cached) $ECHO_C" >&6
7669else
7670 if test "$ac_cv_type_long_long" = yes; then
7671 # The cast to unsigned long works around a bug in the HP C Compiler
7672 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7673 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7674 # This bug is HP SR number 8606223364.
7675 if test "$cross_compiling" = yes; then
7676 # Depending upon the size, compute the lo and hi bounds.
7677cat >conftest.$ac_ext <<_ACEOF
7678#line $LINENO "configure"
7679#include "confdefs.h"
7680$ac_includes_default
7681#ifdef F77_DUMMY_MAIN
7682# ifdef __cplusplus
7683 extern "C"
7684# endif
7685 int F77_DUMMY_MAIN() { return 1; }
7686#endif
7687int
7688main ()
7689{
7690static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7691test_array [0] = 0
7692
7693 ;
7694 return 0;
7695}
7696_ACEOF
7697rm -f conftest.$ac_objext
7698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7699 (eval $ac_compile) 2>&5
7700 ac_status=$?
7701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7702 (exit $ac_status); } &&
7703 { ac_try='test -s conftest.$ac_objext'
7704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7705 (eval $ac_try) 2>&5
7706 ac_status=$?
7707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7708 (exit $ac_status); }; }; then
7709 ac_lo=0 ac_mid=0
7710 while :; do
7711 cat >conftest.$ac_ext <<_ACEOF
7712#line $LINENO "configure"
7713#include "confdefs.h"
7714$ac_includes_default
7715#ifdef F77_DUMMY_MAIN
7716# ifdef __cplusplus
7717 extern "C"
7718# endif
7719 int F77_DUMMY_MAIN() { return 1; }
7720#endif
7721int
7722main ()
7723{
7724static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7725test_array [0] = 0
7726
7727 ;
7728 return 0;
7729}
7730_ACEOF
7731rm -f conftest.$ac_objext
7732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7733 (eval $ac_compile) 2>&5
7734 ac_status=$?
7735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7736 (exit $ac_status); } &&
7737 { ac_try='test -s conftest.$ac_objext'
7738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7739 (eval $ac_try) 2>&5
7740 ac_status=$?
7741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7742 (exit $ac_status); }; }; then
7743 ac_hi=$ac_mid; break
7744else
7745 echo "$as_me: failed program was:" >&5
7746cat conftest.$ac_ext >&5
7747ac_lo=`expr $ac_mid + 1`
7748 if test $ac_lo -le $ac_mid; then
7749 ac_lo= ac_hi=
7750 break
7751 fi
7752 ac_mid=`expr 2 '*' $ac_mid + 1`
7753fi
7754rm -f conftest.$ac_objext conftest.$ac_ext
7755 done
7756else
7757 echo "$as_me: failed program was:" >&5
7758cat conftest.$ac_ext >&5
7759cat >conftest.$ac_ext <<_ACEOF
7760#line $LINENO "configure"
7761#include "confdefs.h"
7762$ac_includes_default
7763#ifdef F77_DUMMY_MAIN
7764# ifdef __cplusplus
7765 extern "C"
7766# endif
7767 int F77_DUMMY_MAIN() { return 1; }
7768#endif
7769int
7770main ()
7771{
7772static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7773test_array [0] = 0
7774
7775 ;
7776 return 0;
7777}
7778_ACEOF
7779rm -f conftest.$ac_objext
7780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7781 (eval $ac_compile) 2>&5
7782 ac_status=$?
7783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7784 (exit $ac_status); } &&
7785 { ac_try='test -s conftest.$ac_objext'
7786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7787 (eval $ac_try) 2>&5
7788 ac_status=$?
7789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7790 (exit $ac_status); }; }; then
7791 ac_hi=-1 ac_mid=-1
7792 while :; do
7793 cat >conftest.$ac_ext <<_ACEOF
7794#line $LINENO "configure"
7795#include "confdefs.h"
7796$ac_includes_default
7797#ifdef F77_DUMMY_MAIN
7798# ifdef __cplusplus
7799 extern "C"
7800# endif
7801 int F77_DUMMY_MAIN() { return 1; }
7802#endif
7803int
7804main ()
7805{
7806static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7807test_array [0] = 0
7808
7809 ;
7810 return 0;
7811}
7812_ACEOF
7813rm -f conftest.$ac_objext
7814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7815 (eval $ac_compile) 2>&5
7816 ac_status=$?
7817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7818 (exit $ac_status); } &&
7819 { ac_try='test -s conftest.$ac_objext'
7820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7821 (eval $ac_try) 2>&5
7822 ac_status=$?
7823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7824 (exit $ac_status); }; }; then
7825 ac_lo=$ac_mid; break
7826else
7827 echo "$as_me: failed program was:" >&5
7828cat conftest.$ac_ext >&5
7829ac_hi=`expr '(' $ac_mid ')' - 1`
7830 if test $ac_mid -le $ac_hi; then
7831 ac_lo= ac_hi=
7832 break
7833 fi
7834 ac_mid=`expr 2 '*' $ac_mid`
7835fi
7836rm -f conftest.$ac_objext conftest.$ac_ext
7837 done
7838else
7839 echo "$as_me: failed program was:" >&5
7840cat conftest.$ac_ext >&5
7841ac_lo= ac_hi=
7842fi
7843rm -f conftest.$ac_objext conftest.$ac_ext
7844fi
7845rm -f conftest.$ac_objext conftest.$ac_ext
7846# Binary search between lo and hi bounds.
7847while test "x$ac_lo" != "x$ac_hi"; do
7848 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7849 cat >conftest.$ac_ext <<_ACEOF
7850#line $LINENO "configure"
7851#include "confdefs.h"
7852$ac_includes_default
7853#ifdef F77_DUMMY_MAIN
7854# ifdef __cplusplus
7855 extern "C"
7856# endif
7857 int F77_DUMMY_MAIN() { return 1; }
7858#endif
7859int
7860main ()
7861{
7862static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7863test_array [0] = 0
7864
7865 ;
7866 return 0;
7867}
7868_ACEOF
7869rm -f conftest.$ac_objext
7870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7871 (eval $ac_compile) 2>&5
7872 ac_status=$?
7873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7874 (exit $ac_status); } &&
7875 { ac_try='test -s conftest.$ac_objext'
7876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7877 (eval $ac_try) 2>&5
7878 ac_status=$?
7879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7880 (exit $ac_status); }; }; then
7881 ac_hi=$ac_mid
7882else
7883 echo "$as_me: failed program was:" >&5
7884cat conftest.$ac_ext >&5
7885ac_lo=`expr '(' $ac_mid ')' + 1`
7886fi
7887rm -f conftest.$ac_objext conftest.$ac_ext
7888done
7889case $ac_lo in
7890?*) ac_cv_sizeof_long_long=$ac_lo;;
7891'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7892echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7893 { (exit 1); exit 1; }; } ;;
7894esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007895else
7896 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7898echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7899 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007900else
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 cat >conftest.$ac_ext <<_ACEOF
7902#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007903#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007904$ac_includes_default
7905long longval () { return (long) (sizeof (long long)); }
7906unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007907#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007908#include <stdlib.h>
7909#ifdef F77_DUMMY_MAIN
7910# ifdef __cplusplus
7911 extern "C"
7912# endif
7913 int F77_DUMMY_MAIN() { return 1; }
7914#endif
7915int
7916main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007917{
Martin v. Löwis11437992002-04-12 09:54:03 +00007918
7919 FILE *f = fopen ("conftest.val", "w");
7920 if (! f)
7921 exit (1);
7922 if (((long) (sizeof (long long))) < 0)
7923 {
7924 long i = longval ();
7925 if (i != ((long) (sizeof (long long))))
7926 exit (1);
7927 fprintf (f, "%ld\n", i);
7928 }
7929 else
7930 {
7931 unsigned long i = ulongval ();
7932 if (i != ((long) (sizeof (long long))))
7933 exit (1);
7934 fprintf (f, "%lu\n", i);
7935 }
7936 exit (ferror (f) || fclose (f) != 0);
7937
7938 ;
7939 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007940}
Martin v. Löwis11437992002-04-12 09:54:03 +00007941_ACEOF
7942rm -f conftest$ac_exeext
7943if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7944 (eval $ac_link) 2>&5
7945 ac_status=$?
7946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7947 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7949 (eval $ac_try) 2>&5
7950 ac_status=$?
7951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7952 (exit $ac_status); }; }; then
7953 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007954else
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 echo "$as_me: program exited with status $ac_status" >&5
7956echo "$as_me: failed program was:" >&5
7957cat conftest.$ac_ext >&5
7958( exit $ac_status )
7959{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7960echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7961 { (exit 1); exit 1; }; }
7962fi
7963rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7964fi
7965fi
7966rm -f conftest.val
7967else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007968 ac_cv_sizeof_long_long=0
7969fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007970fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007971echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7972echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7973cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007974#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007975_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007976
Michael W. Hudson54241132001-12-07 15:38:26 +00007977
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007978fi
7979
Martin v. Löwis11437992002-04-12 09:54:03 +00007980echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7981echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007982have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007983cat >conftest.$ac_ext <<_ACEOF
7984#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007985#include "confdefs.h"
7986
Martin v. Löwis11437992002-04-12 09:54:03 +00007987#ifdef F77_DUMMY_MAIN
7988# ifdef __cplusplus
7989 extern "C"
7990# endif
7991 int F77_DUMMY_MAIN() { return 1; }
7992#endif
7993int
7994main ()
7995{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007996uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 ;
7998 return 0;
7999}
8000_ACEOF
8001rm -f conftest.$ac_objext
8002if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8003 (eval $ac_compile) 2>&5
8004 ac_status=$?
8005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8006 (exit $ac_status); } &&
8007 { ac_try='test -s conftest.$ac_objext'
8008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8009 (eval $ac_try) 2>&5
8010 ac_status=$?
8011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8012 (exit $ac_status); }; }; then
8013
8014
8015cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008016#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008017_ACEOF
8018
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008019 have_uintptr_t=yes
8020
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008021else
Martin v. Löwis11437992002-04-12 09:54:03 +00008022 echo "$as_me: failed program was:" >&5
8023cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008024fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008025rm -f conftest.$ac_objext conftest.$ac_ext
8026echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8027echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008028if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008029echo "$as_me:$LINENO: checking for uintptr_t" >&5
8030echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8031if test "${ac_cv_type_uintptr_t+set}" = set; then
8032 echo $ECHO_N "(cached) $ECHO_C" >&6
8033else
8034 cat >conftest.$ac_ext <<_ACEOF
8035#line $LINENO "configure"
8036#include "confdefs.h"
8037$ac_includes_default
8038#ifdef F77_DUMMY_MAIN
8039# ifdef __cplusplus
8040 extern "C"
8041# endif
8042 int F77_DUMMY_MAIN() { return 1; }
8043#endif
8044int
8045main ()
8046{
8047if ((uintptr_t *) 0)
8048 return 0;
8049if (sizeof (uintptr_t))
8050 return 0;
8051 ;
8052 return 0;
8053}
8054_ACEOF
8055rm -f conftest.$ac_objext
8056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8057 (eval $ac_compile) 2>&5
8058 ac_status=$?
8059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8060 (exit $ac_status); } &&
8061 { ac_try='test -s conftest.$ac_objext'
8062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8063 (eval $ac_try) 2>&5
8064 ac_status=$?
8065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8066 (exit $ac_status); }; }; then
8067 ac_cv_type_uintptr_t=yes
8068else
8069 echo "$as_me: failed program was:" >&5
8070cat conftest.$ac_ext >&5
8071ac_cv_type_uintptr_t=no
8072fi
8073rm -f conftest.$ac_objext conftest.$ac_ext
8074fi
8075echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8076echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8077
8078echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8079echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8080if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8081 echo $ECHO_N "(cached) $ECHO_C" >&6
8082else
8083 if test "$ac_cv_type_uintptr_t" = yes; then
8084 # The cast to unsigned long works around a bug in the HP C Compiler
8085 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8086 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8087 # This bug is HP SR number 8606223364.
8088 if test "$cross_compiling" = yes; then
8089 # Depending upon the size, compute the lo and hi bounds.
8090cat >conftest.$ac_ext <<_ACEOF
8091#line $LINENO "configure"
8092#include "confdefs.h"
8093$ac_includes_default
8094#ifdef F77_DUMMY_MAIN
8095# ifdef __cplusplus
8096 extern "C"
8097# endif
8098 int F77_DUMMY_MAIN() { return 1; }
8099#endif
8100int
8101main ()
8102{
8103static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8104test_array [0] = 0
8105
8106 ;
8107 return 0;
8108}
8109_ACEOF
8110rm -f conftest.$ac_objext
8111if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8112 (eval $ac_compile) 2>&5
8113 ac_status=$?
8114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8115 (exit $ac_status); } &&
8116 { ac_try='test -s conftest.$ac_objext'
8117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8118 (eval $ac_try) 2>&5
8119 ac_status=$?
8120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8121 (exit $ac_status); }; }; then
8122 ac_lo=0 ac_mid=0
8123 while :; do
8124 cat >conftest.$ac_ext <<_ACEOF
8125#line $LINENO "configure"
8126#include "confdefs.h"
8127$ac_includes_default
8128#ifdef F77_DUMMY_MAIN
8129# ifdef __cplusplus
8130 extern "C"
8131# endif
8132 int F77_DUMMY_MAIN() { return 1; }
8133#endif
8134int
8135main ()
8136{
8137static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8138test_array [0] = 0
8139
8140 ;
8141 return 0;
8142}
8143_ACEOF
8144rm -f conftest.$ac_objext
8145if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8146 (eval $ac_compile) 2>&5
8147 ac_status=$?
8148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149 (exit $ac_status); } &&
8150 { ac_try='test -s conftest.$ac_objext'
8151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8152 (eval $ac_try) 2>&5
8153 ac_status=$?
8154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8155 (exit $ac_status); }; }; then
8156 ac_hi=$ac_mid; break
8157else
8158 echo "$as_me: failed program was:" >&5
8159cat conftest.$ac_ext >&5
8160ac_lo=`expr $ac_mid + 1`
8161 if test $ac_lo -le $ac_mid; then
8162 ac_lo= ac_hi=
8163 break
8164 fi
8165 ac_mid=`expr 2 '*' $ac_mid + 1`
8166fi
8167rm -f conftest.$ac_objext conftest.$ac_ext
8168 done
8169else
8170 echo "$as_me: failed program was:" >&5
8171cat conftest.$ac_ext >&5
8172cat >conftest.$ac_ext <<_ACEOF
8173#line $LINENO "configure"
8174#include "confdefs.h"
8175$ac_includes_default
8176#ifdef F77_DUMMY_MAIN
8177# ifdef __cplusplus
8178 extern "C"
8179# endif
8180 int F77_DUMMY_MAIN() { return 1; }
8181#endif
8182int
8183main ()
8184{
8185static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8186test_array [0] = 0
8187
8188 ;
8189 return 0;
8190}
8191_ACEOF
8192rm -f conftest.$ac_objext
8193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8194 (eval $ac_compile) 2>&5
8195 ac_status=$?
8196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8197 (exit $ac_status); } &&
8198 { ac_try='test -s conftest.$ac_objext'
8199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8200 (eval $ac_try) 2>&5
8201 ac_status=$?
8202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8203 (exit $ac_status); }; }; then
8204 ac_hi=-1 ac_mid=-1
8205 while :; do
8206 cat >conftest.$ac_ext <<_ACEOF
8207#line $LINENO "configure"
8208#include "confdefs.h"
8209$ac_includes_default
8210#ifdef F77_DUMMY_MAIN
8211# ifdef __cplusplus
8212 extern "C"
8213# endif
8214 int F77_DUMMY_MAIN() { return 1; }
8215#endif
8216int
8217main ()
8218{
8219static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8220test_array [0] = 0
8221
8222 ;
8223 return 0;
8224}
8225_ACEOF
8226rm -f conftest.$ac_objext
8227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8228 (eval $ac_compile) 2>&5
8229 ac_status=$?
8230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8231 (exit $ac_status); } &&
8232 { ac_try='test -s conftest.$ac_objext'
8233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8234 (eval $ac_try) 2>&5
8235 ac_status=$?
8236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8237 (exit $ac_status); }; }; then
8238 ac_lo=$ac_mid; break
8239else
8240 echo "$as_me: failed program was:" >&5
8241cat conftest.$ac_ext >&5
8242ac_hi=`expr '(' $ac_mid ')' - 1`
8243 if test $ac_mid -le $ac_hi; then
8244 ac_lo= ac_hi=
8245 break
8246 fi
8247 ac_mid=`expr 2 '*' $ac_mid`
8248fi
8249rm -f conftest.$ac_objext conftest.$ac_ext
8250 done
8251else
8252 echo "$as_me: failed program was:" >&5
8253cat conftest.$ac_ext >&5
8254ac_lo= ac_hi=
8255fi
8256rm -f conftest.$ac_objext conftest.$ac_ext
8257fi
8258rm -f conftest.$ac_objext conftest.$ac_ext
8259# Binary search between lo and hi bounds.
8260while test "x$ac_lo" != "x$ac_hi"; do
8261 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8262 cat >conftest.$ac_ext <<_ACEOF
8263#line $LINENO "configure"
8264#include "confdefs.h"
8265$ac_includes_default
8266#ifdef F77_DUMMY_MAIN
8267# ifdef __cplusplus
8268 extern "C"
8269# endif
8270 int F77_DUMMY_MAIN() { return 1; }
8271#endif
8272int
8273main ()
8274{
8275static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8276test_array [0] = 0
8277
8278 ;
8279 return 0;
8280}
8281_ACEOF
8282rm -f conftest.$ac_objext
8283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8284 (eval $ac_compile) 2>&5
8285 ac_status=$?
8286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8287 (exit $ac_status); } &&
8288 { ac_try='test -s conftest.$ac_objext'
8289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8290 (eval $ac_try) 2>&5
8291 ac_status=$?
8292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8293 (exit $ac_status); }; }; then
8294 ac_hi=$ac_mid
8295else
8296 echo "$as_me: failed program was:" >&5
8297cat conftest.$ac_ext >&5
8298ac_lo=`expr '(' $ac_mid ')' + 1`
8299fi
8300rm -f conftest.$ac_objext conftest.$ac_ext
8301done
8302case $ac_lo in
8303?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8304'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8305echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8306 { (exit 1); exit 1; }; } ;;
8307esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008308else
8309 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008310 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8311echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8312 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008313else
Martin v. Löwis11437992002-04-12 09:54:03 +00008314 cat >conftest.$ac_ext <<_ACEOF
8315#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008316#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008317$ac_includes_default
8318long longval () { return (long) (sizeof (uintptr_t)); }
8319unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008320#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008321#include <stdlib.h>
8322#ifdef F77_DUMMY_MAIN
8323# ifdef __cplusplus
8324 extern "C"
8325# endif
8326 int F77_DUMMY_MAIN() { return 1; }
8327#endif
8328int
8329main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008330{
Martin v. Löwis11437992002-04-12 09:54:03 +00008331
8332 FILE *f = fopen ("conftest.val", "w");
8333 if (! f)
8334 exit (1);
8335 if (((long) (sizeof (uintptr_t))) < 0)
8336 {
8337 long i = longval ();
8338 if (i != ((long) (sizeof (uintptr_t))))
8339 exit (1);
8340 fprintf (f, "%ld\n", i);
8341 }
8342 else
8343 {
8344 unsigned long i = ulongval ();
8345 if (i != ((long) (sizeof (uintptr_t))))
8346 exit (1);
8347 fprintf (f, "%lu\n", i);
8348 }
8349 exit (ferror (f) || fclose (f) != 0);
8350
8351 ;
8352 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008353}
Martin v. Löwis11437992002-04-12 09:54:03 +00008354_ACEOF
8355rm -f conftest$ac_exeext
8356if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8357 (eval $ac_link) 2>&5
8358 ac_status=$?
8359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8360 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8362 (eval $ac_try) 2>&5
8363 ac_status=$?
8364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8365 (exit $ac_status); }; }; then
8366 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008367else
Martin v. Löwis11437992002-04-12 09:54:03 +00008368 echo "$as_me: program exited with status $ac_status" >&5
8369echo "$as_me: failed program was:" >&5
8370cat conftest.$ac_ext >&5
8371( exit $ac_status )
8372{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8373echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8374 { (exit 1); exit 1; }; }
8375fi
8376rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8377fi
8378fi
8379rm -f conftest.val
8380else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008381 ac_cv_sizeof_uintptr_t=0
8382fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008383fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008384echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8385echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8386cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008387#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008388_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008389
Michael W. Hudson54241132001-12-07 15:38:26 +00008390
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008391fi
8392
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008393# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008394echo "$as_me:$LINENO: checking size of off_t" >&5
8395echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8396if test "${ac_cv_sizeof_off_t+set}" = set; then
8397 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008398else
8399 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008400 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008401else
Martin v. Löwis11437992002-04-12 09:54:03 +00008402 cat >conftest.$ac_ext <<_ACEOF
8403#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008404#include "confdefs.h"
8405#include <stdio.h>
8406#include <sys/types.h>
8407main()
8408{
8409 FILE *f=fopen("conftestval", "w");
8410 if (!f) exit(1);
8411 fprintf(f, "%d\n", sizeof(off_t));
8412 exit(0);
8413}
Martin v. Löwis11437992002-04-12 09:54:03 +00008414_ACEOF
8415rm -f conftest$ac_exeext
8416if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8417 (eval $ac_link) 2>&5
8418 ac_status=$?
8419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8420 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8422 (eval $ac_try) 2>&5
8423 ac_status=$?
8424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8425 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008426 ac_cv_sizeof_off_t=`cat conftestval`
8427else
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 echo "$as_me: program exited with status $ac_status" >&5
8429echo "$as_me: failed program was:" >&5
8430cat conftest.$ac_ext >&5
8431( exit $ac_status )
8432ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008433fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008434rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008435fi
8436
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008437fi
8438
Martin v. Löwis11437992002-04-12 09:54:03 +00008439echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8440echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8441
8442cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008443#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008444_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008445
Michael W. Hudson54241132001-12-07 15:38:26 +00008446
Martin v. Löwis11437992002-04-12 09:54:03 +00008447echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8448echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008449if test "$have_long_long" = yes -a \
8450 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8451 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008452
Martin v. Löwis11437992002-04-12 09:54:03 +00008453cat >>confdefs.h <<\_ACEOF
8454#define HAVE_LARGEFILE_SUPPORT 1
8455_ACEOF
8456
8457 echo "$as_me:$LINENO: result: yes" >&5
8458echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008459else
Martin v. Löwis11437992002-04-12 09:54:03 +00008460 echo "$as_me:$LINENO: result: no" >&5
8461echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008462fi
8463
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008464# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008465echo "$as_me:$LINENO: checking size of time_t" >&5
8466echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8467if test "${ac_cv_sizeof_time_t+set}" = set; then
8468 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008469else
8470 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008471 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008472else
Martin v. Löwis11437992002-04-12 09:54:03 +00008473 cat >conftest.$ac_ext <<_ACEOF
8474#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008475#include "confdefs.h"
8476#include <stdio.h>
8477#include <time.h>
8478main()
8479{
8480 FILE *f=fopen("conftestval", "w");
8481 if (!f) exit(1);
8482 fprintf(f, "%d\n", sizeof(time_t));
8483 exit(0);
8484}
Martin v. Löwis11437992002-04-12 09:54:03 +00008485_ACEOF
8486rm -f conftest$ac_exeext
8487if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8488 (eval $ac_link) 2>&5
8489 ac_status=$?
8490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8491 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8493 (eval $ac_try) 2>&5
8494 ac_status=$?
8495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8496 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008497 ac_cv_sizeof_time_t=`cat conftestval`
8498else
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 echo "$as_me: program exited with status $ac_status" >&5
8500echo "$as_me: failed program was:" >&5
8501cat conftest.$ac_ext >&5
8502( exit $ac_status )
8503ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008504fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008505rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008506fi
8507
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008508fi
8509
Martin v. Löwis11437992002-04-12 09:54:03 +00008510echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8511echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8512
8513cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008514#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008515_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008516
Michael W. Hudson54241132001-12-07 15:38:26 +00008517
8518
Trent Mick635f6fb2000-08-23 21:33:05 +00008519# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008520ac_save_cc="$CC"
8521if test "$ac_cv_kpthread" = "yes"
8522then CC="$CC -Kpthread"
8523fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008524echo "$as_me:$LINENO: checking for pthread_t" >&5
8525echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008526have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008527cat >conftest.$ac_ext <<_ACEOF
8528#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008529#include "confdefs.h"
8530#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008531#ifdef F77_DUMMY_MAIN
8532# ifdef __cplusplus
8533 extern "C"
8534# endif
8535 int F77_DUMMY_MAIN() { return 1; }
8536#endif
8537int
8538main ()
8539{
Guido van Rossum12580492000-09-24 16:47:19 +00008540pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008541 ;
8542 return 0;
8543}
8544_ACEOF
8545rm -f conftest.$ac_objext
8546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8547 (eval $ac_compile) 2>&5
8548 ac_status=$?
8549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8550 (exit $ac_status); } &&
8551 { ac_try='test -s conftest.$ac_objext'
8552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8553 (eval $ac_try) 2>&5
8554 ac_status=$?
8555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8556 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008557 have_pthread_t=yes
8558else
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 echo "$as_me: failed program was:" >&5
8560cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008561fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008562rm -f conftest.$ac_objext conftest.$ac_ext
8563echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8564echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008565if test "$have_pthread_t" = yes ; then
8566 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8568echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8569 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8570 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008571else
8572 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008573 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008574else
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 cat >conftest.$ac_ext <<_ACEOF
8576#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008577#include "confdefs.h"
8578#include <stdio.h>
8579 #include <pthread.h>
8580 main()
8581 {
8582 FILE *f=fopen("conftestval", "w");
8583 if (!f) exit(1);
8584 fprintf(f, "%d\n", sizeof(pthread_t));
8585 exit(0);
8586 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008587_ACEOF
8588rm -f conftest$ac_exeext
8589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8590 (eval $ac_link) 2>&5
8591 ac_status=$?
8592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8593 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8595 (eval $ac_try) 2>&5
8596 ac_status=$?
8597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8598 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008599 ac_cv_sizeof_pthread_t=`cat conftestval`
8600else
Martin v. Löwis11437992002-04-12 09:54:03 +00008601 echo "$as_me: program exited with status $ac_status" >&5
8602echo "$as_me: failed program was:" >&5
8603cat conftest.$ac_ext >&5
8604( exit $ac_status )
8605ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008607rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008608fi
8609
Trent Mick635f6fb2000-08-23 21:33:05 +00008610fi
8611
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8613echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8614
8615cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008616#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008617_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008618
8619fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008620CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008621
Martin v. Löwis11437992002-04-12 09:54:03 +00008622echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8623echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008624# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8625if test "${enable_toolbox_glue+set}" = set; then
8626 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008627
Martin v. Löwis11437992002-04-12 09:54:03 +00008628fi;
Jack Jansene578a632001-08-15 01:27:14 +00008629
8630if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008631then
Jack Jansene578a632001-08-15 01:27:14 +00008632 case $ac_sys_system/$ac_sys_release in
8633 Darwin/*)
8634 enable_toolbox_glue="yes";;
8635 *)
8636 enable_toolbox_glue="no";;
8637 esac
8638fi
8639case "$enable_toolbox_glue" in
8640yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008641 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008642 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008643 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008644
8645cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008646#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008647_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008648
8649 ;;
8650*)
8651 extra_frameworks=""
8652 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008653 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008654 ;;
8655esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008656echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8657echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008658
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008659
8660case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008661 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008662 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008663 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8664 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008665 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8666 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008667 Darwin/*)
8668 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008669 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8670 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008671 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8672 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008673esac
8674
Martin v. Löwis11437992002-04-12 09:54:03 +00008675echo "$as_me:$LINENO: checking for --enable-framework" >&5
8676echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008677if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008678then
Jack Jansenca06bc62001-08-03 15:32:23 +00008679 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008680 # -U __environ is needed since bundles don't have access
8681 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008683 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008684
Jack Jansena3891ea2001-09-07 14:25:12 +00008685 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008686 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8687 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008688 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008689
Martin v. Löwis11437992002-04-12 09:54:03 +00008690cat >>confdefs.h <<\_ACEOF
8691#define WITH_NEXT_FRAMEWORK 1
8692_ACEOF
8693
8694 echo "$as_me:$LINENO: result: yes" >&5
8695echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008696else
Martin v. Löwis11437992002-04-12 09:54:03 +00008697 echo "$as_me:$LINENO: result: no" >&5
8698echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008699fi
8700
Martin v. Löwis11437992002-04-12 09:54:03 +00008701echo "$as_me:$LINENO: checking for dyld" >&5
8702echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008703case $ac_sys_system/$ac_sys_release in
8704 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008705
Martin v. Löwis11437992002-04-12 09:54:03 +00008706cat >>confdefs.h <<\_ACEOF
8707#define WITH_DYLD 1
8708_ACEOF
8709
8710 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8711echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008712 ;;
8713 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 echo "$as_me:$LINENO: result: no" >&5
8715echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008716 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008717esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008718
Guido van Rossum0a516c91994-09-12 10:58:40 +00008719# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008720
Michael W. Hudson54241132001-12-07 15:38:26 +00008721
8722
8723
8724
Guido van Rossum0a516c91994-09-12 10:58:40 +00008725# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008726# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008727echo "$as_me:$LINENO: checking SO" >&5
8728echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008729if test -z "$SO"
8730then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008731 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008732 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008733 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008734 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008735 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008736fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008737echo "$as_me:$LINENO: result: $SO" >&5
8738echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008739# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008740# -- "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 +00008741# (Shared libraries in this instance are shared modules to be loaded into
8742# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008743echo "$as_me:$LINENO: checking LDSHARED" >&5
8744echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008745if test -z "$LDSHARED"
8746then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008747 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008748 AIX*)
8749 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008750 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008751 ;;
8752 BeOS*)
8753 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008754 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008755 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008756 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008757 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008758 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008759 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00008760 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008761 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008762 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00008763 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008764 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008765 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8766 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008767 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008768 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8769 if test "$enable_framework" ; then
8770 # Link against the framework. All externals should be defined.
8771 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8772 else
8773 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008774 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008775 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008776 Darwin/*)
8777 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8778 if test "$enable_framework" ; then
8779 # Link against the framework. All externals should be defined.
8780 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8781 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008782 # No framework, use the Python app as bundle-loader
8783 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8784 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008785 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008786 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008787 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008788 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008789 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008790 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008791 then
8792 LDSHARED="cc -shared ${LDFLAGS}"
8793 else
8794 LDSHARED="ld -Bshareable ${LDFLAGS}"
8795 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008796 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008797 if test "$GCC" = "yes"
8798 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008799 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008800 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008801 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008802 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008803 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008804 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008805 *) LDSHARED="ld";;
8806 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008808echo "$as_me:$LINENO: result: $LDSHARED" >&5
8809echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008810BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008811# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008812# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008813echo "$as_me:$LINENO: checking CCSHARED" >&5
8814echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008815if test -z "$CCSHARED"
8816then
Guido van Rossum07397971997-04-29 21:49:50 +00008817 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008818 SunOS*) if test "$GCC" = yes;
8819 then CCSHARED="-fPIC";
8820 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008821 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008822 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008823 else CCSHARED="+z";
8824 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008825 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008826 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008827 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008828 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008829 if test "$GCC" = "yes"
8830 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008831 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008832 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008833 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008834 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008835 IRIX*/6*) case $CC in
8836 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008837 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008838 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008839 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008840 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008841fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008842echo "$as_me:$LINENO: result: $CCSHARED" >&5
8843echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008844# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008845# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008846echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8847echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008848if test -z "$LINKFORSHARED"
8849then
Guido van Rossum07397971997-04-29 21:49:50 +00008850 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008851 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008852 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008853 LINKFORSHARED="-Wl,-E -Wl,+s";;
8854# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008855 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008856 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008857 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008859 # -u __dummy makes the linker aware of the objc runtime
8860 # in System.framework; otherwise, __objcInit (referenced in
8861 # crt1.o) gets erroneously defined as common, which breaks dynamic
8862 # loading of any modules which reference it in System.framework.
8863 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8864 # not used by the core itself but which needs to be in the core so
8865 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008866 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008867 if test "$enable_framework"
8868 then
8869 LINKFORSHARED="$LINKFORSHARED -framework Python"
8870 fi
8871 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008872 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008873 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008874 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008875 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008876 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8877 then
8878 LINKFORSHARED="-Wl,--export-dynamic"
8879 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008880 SunOS/5*) case $CC in
8881 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008882 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008883 then
8884 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008885 fi;;
8886 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008887 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008888fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008889echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8890echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008891
Michael W. Hudson54241132001-12-07 15:38:26 +00008892
Martin v. Löwis11437992002-04-12 09:54:03 +00008893echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8894echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008895if test ! "$LIBRARY" = "$LDLIBRARY"
8896then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008897 case $ac_sys_system in
8898 CYGWIN*)
8899 # Cygwin needs CCSHARED when building extension DLLs
8900 # but not when building the interpreter DLL.
8901 CFLAGSFORSHARED='';;
8902 *)
8903 CFLAGSFORSHARED='$(CCSHARED)'
8904 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008905fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008906echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8907echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008908
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008909# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8910# library (with --enable-shared).
8911# For platforms on which shared libraries are not allowed to have unresolved
8912# symbols, this must be set to $(LIBS) (expanded by make).
8913
8914echo "$as_me:$LINENO: checking SHLIBS" >&5
8915echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
8916case "$ac_sys_system" in
8917 atheos*)
8918 SHLIBS='$(LIBS)';;
8919 *)
8920 SHLIBS='';;
8921esac
8922echo "$as_me:$LINENO: result: $SHLIBS" >&5
8923echo "${ECHO_T}$SHLIBS" >&6
8924
8925
Guido van Rossum627b2d71993-12-24 10:39:16 +00008926# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008927
8928echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8929echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8930if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8931 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008932else
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008934LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008935cat >conftest.$ac_ext <<_ACEOF
8936#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008937#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008938
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008939/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008940#ifdef __cplusplus
8941extern "C"
8942#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008943/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008944 builtin and then its argument prototype would still apply. */
8945char dlopen ();
8946#ifdef F77_DUMMY_MAIN
8947# ifdef __cplusplus
8948 extern "C"
8949# endif
8950 int F77_DUMMY_MAIN() { return 1; }
8951#endif
8952int
8953main ()
8954{
8955dlopen ();
8956 ;
8957 return 0;
8958}
8959_ACEOF
8960rm -f conftest.$ac_objext conftest$ac_exeext
8961if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8962 (eval $ac_link) 2>&5
8963 ac_status=$?
8964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8965 (exit $ac_status); } &&
8966 { ac_try='test -s conftest$ac_exeext'
8967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8968 (eval $ac_try) 2>&5
8969 ac_status=$?
8970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8971 (exit $ac_status); }; }; then
8972 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008973else
Martin v. Löwis11437992002-04-12 09:54:03 +00008974 echo "$as_me: failed program was:" >&5
8975cat conftest.$ac_ext >&5
8976ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008977fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008978rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8979LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008980fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008981echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8982echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8983if test $ac_cv_lib_dl_dlopen = yes; then
8984 cat >>confdefs.h <<_ACEOF
8985#define HAVE_LIBDL 1
8986_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008987
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008988 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008989
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008990fi
8991 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008992
8993echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8994echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8995if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8996 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008997else
Martin v. Löwis11437992002-04-12 09:54:03 +00008998 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008999LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009000cat >conftest.$ac_ext <<_ACEOF
9001#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009002#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009003
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009004/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009005#ifdef __cplusplus
9006extern "C"
9007#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009008/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 builtin and then its argument prototype would still apply. */
9010char shl_load ();
9011#ifdef F77_DUMMY_MAIN
9012# ifdef __cplusplus
9013 extern "C"
9014# endif
9015 int F77_DUMMY_MAIN() { return 1; }
9016#endif
9017int
9018main ()
9019{
9020shl_load ();
9021 ;
9022 return 0;
9023}
9024_ACEOF
9025rm -f conftest.$ac_objext conftest$ac_exeext
9026if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9027 (eval $ac_link) 2>&5
9028 ac_status=$?
9029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9030 (exit $ac_status); } &&
9031 { ac_try='test -s conftest$ac_exeext'
9032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9033 (eval $ac_try) 2>&5
9034 ac_status=$?
9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9036 (exit $ac_status); }; }; then
9037 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009038else
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 echo "$as_me: failed program was:" >&5
9040cat conftest.$ac_ext >&5
9041ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009042fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009043rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9044LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009045fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009046echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9047echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9048if test $ac_cv_lib_dld_shl_load = yes; then
9049 cat >>confdefs.h <<_ACEOF
9050#define HAVE_LIBDLD 1
9051_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009052
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009053 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009054
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009055fi
9056 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009057
9058echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9059echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9060if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9061 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009062else
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009064LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009065cat >conftest.$ac_ext <<_ACEOF
9066#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009067#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009068
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009069/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009070#ifdef __cplusplus
9071extern "C"
9072#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009073/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009074 builtin and then its argument prototype would still apply. */
9075char sem_init ();
9076#ifdef F77_DUMMY_MAIN
9077# ifdef __cplusplus
9078 extern "C"
9079# endif
9080 int F77_DUMMY_MAIN() { return 1; }
9081#endif
9082int
9083main ()
9084{
9085sem_init ();
9086 ;
9087 return 0;
9088}
9089_ACEOF
9090rm -f conftest.$ac_objext conftest$ac_exeext
9091if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9092 (eval $ac_link) 2>&5
9093 ac_status=$?
9094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9095 (exit $ac_status); } &&
9096 { ac_try='test -s conftest$ac_exeext'
9097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9098 (eval $ac_try) 2>&5
9099 ac_status=$?
9100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9101 (exit $ac_status); }; }; then
9102 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009103else
Martin v. Löwis11437992002-04-12 09:54:03 +00009104 echo "$as_me: failed program was:" >&5
9105cat conftest.$ac_ext >&5
9106ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009107fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009108rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9109LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009110fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009111echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9112echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9113if test $ac_cv_lib_rt_sem_init = yes; then
9114 cat >>confdefs.h <<_ACEOF
9115#define HAVE_LIBRT 1
9116_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009117
9118 LIBS="-lrt $LIBS"
9119
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009120fi
9121 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009122
9123# checks for system dependent C++ extensions support
9124case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009125 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9126echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9127 cat >conftest.$ac_ext <<_ACEOF
9128#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009129#include "confdefs.h"
9130#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009131#ifdef F77_DUMMY_MAIN
9132# ifdef __cplusplus
9133 extern "C"
9134# endif
9135 int F77_DUMMY_MAIN() { return 1; }
9136#endif
9137int
9138main ()
9139{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009140loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009141 ;
9142 return 0;
9143}
9144_ACEOF
9145rm -f conftest.$ac_objext conftest$ac_exeext
9146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9147 (eval $ac_link) 2>&5
9148 ac_status=$?
9149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9150 (exit $ac_status); } &&
9151 { ac_try='test -s conftest$ac_exeext'
9152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9153 (eval $ac_try) 2>&5
9154 ac_status=$?
9155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9156 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009157
Martin v. Löwis11437992002-04-12 09:54:03 +00009158cat >>confdefs.h <<\_ACEOF
9159#define AIX_GENUINE_CPLUSPLUS 1
9160_ACEOF
9161
9162 echo "$as_me:$LINENO: result: yes" >&5
9163echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009164else
Martin v. Löwis11437992002-04-12 09:54:03 +00009165 echo "$as_me: failed program was:" >&5
9166cat conftest.$ac_ext >&5
9167echo "$as_me:$LINENO: result: no" >&5
9168echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009169fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009170rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009171 *) ;;
9172esac
9173
Guido van Rossum70c7f481998-03-26 18:44:10 +00009174# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9175# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009176# BeOS' sockets are stashed in libnet.
9177case "$ac_sys_system" in
9178IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009179*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009180echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9181echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9182if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9183 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009184else
Martin v. Löwis11437992002-04-12 09:54:03 +00009185 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009186LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009187cat >conftest.$ac_ext <<_ACEOF
9188#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009189#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009190
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009191/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009192#ifdef __cplusplus
9193extern "C"
9194#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009195/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 builtin and then its argument prototype would still apply. */
9197char t_open ();
9198#ifdef F77_DUMMY_MAIN
9199# ifdef __cplusplus
9200 extern "C"
9201# endif
9202 int F77_DUMMY_MAIN() { return 1; }
9203#endif
9204int
9205main ()
9206{
9207t_open ();
9208 ;
9209 return 0;
9210}
9211_ACEOF
9212rm -f conftest.$ac_objext conftest$ac_exeext
9213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9214 (eval $ac_link) 2>&5
9215 ac_status=$?
9216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9217 (exit $ac_status); } &&
9218 { ac_try='test -s conftest$ac_exeext'
9219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9220 (eval $ac_try) 2>&5
9221 ac_status=$?
9222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9223 (exit $ac_status); }; }; then
9224 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009225else
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 echo "$as_me: failed program was:" >&5
9227cat conftest.$ac_ext >&5
9228ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009229fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009230rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9231LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009232fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009233echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9234echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9235if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009236 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009237fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009238 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009239echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9240echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9241if test "${ac_cv_lib_socket_socket+set}" = set; then
9242 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009243else
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009245LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009246cat >conftest.$ac_ext <<_ACEOF
9247#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009248#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009249
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009250/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009251#ifdef __cplusplus
9252extern "C"
9253#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009254/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009255 builtin and then its argument prototype would still apply. */
9256char socket ();
9257#ifdef F77_DUMMY_MAIN
9258# ifdef __cplusplus
9259 extern "C"
9260# endif
9261 int F77_DUMMY_MAIN() { return 1; }
9262#endif
9263int
9264main ()
9265{
9266socket ();
9267 ;
9268 return 0;
9269}
9270_ACEOF
9271rm -f conftest.$ac_objext conftest$ac_exeext
9272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9273 (eval $ac_link) 2>&5
9274 ac_status=$?
9275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9276 (exit $ac_status); } &&
9277 { ac_try='test -s conftest$ac_exeext'
9278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9279 (eval $ac_try) 2>&5
9280 ac_status=$?
9281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9282 (exit $ac_status); }; }; then
9283 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009284else
Martin v. Löwis11437992002-04-12 09:54:03 +00009285 echo "$as_me: failed program was:" >&5
9286cat conftest.$ac_ext >&5
9287ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009288fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009289rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9290LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009291fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009292echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9293echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9294if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009295 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009296fi
9297 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009298;;
9299esac
9300case "$ac_sys_system" in
9301BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009302echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9303echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9304if test "${ac_cv_lib_net_socket+set}" = set; then
9305 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009306else
Martin v. Löwis11437992002-04-12 09:54:03 +00009307 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009308LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009309cat >conftest.$ac_ext <<_ACEOF
9310#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009311#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009312
Guido van Rossumad678af1998-10-02 14:42:15 +00009313/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009314#ifdef __cplusplus
9315extern "C"
9316#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009317/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009318 builtin and then its argument prototype would still apply. */
9319char socket ();
9320#ifdef F77_DUMMY_MAIN
9321# ifdef __cplusplus
9322 extern "C"
9323# endif
9324 int F77_DUMMY_MAIN() { return 1; }
9325#endif
9326int
9327main ()
9328{
9329socket ();
9330 ;
9331 return 0;
9332}
9333_ACEOF
9334rm -f conftest.$ac_objext conftest$ac_exeext
9335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9336 (eval $ac_link) 2>&5
9337 ac_status=$?
9338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9339 (exit $ac_status); } &&
9340 { ac_try='test -s conftest$ac_exeext'
9341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9342 (eval $ac_try) 2>&5
9343 ac_status=$?
9344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9345 (exit $ac_status); }; }; then
9346 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009347else
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 echo "$as_me: failed program was:" >&5
9349cat conftest.$ac_ext >&5
9350ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009351fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009352rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9353LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009354fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009355echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9356echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9357if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009358 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009359fi
9360 # BeOS
9361;;
9362esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009363
Martin v. Löwis11437992002-04-12 09:54:03 +00009364echo "$as_me:$LINENO: checking for --with-libs" >&5
9365echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9366
Guido van Rossuma68acba1996-07-31 17:36:39 +00009367# Check whether --with-libs or --without-libs was given.
9368if test "${with_libs+set}" = set; then
9369 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009370
9371echo "$as_me:$LINENO: result: $withval" >&5
9372echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009373LIBS="$withval $LIBS"
9374
9375else
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 echo "$as_me:$LINENO: result: no" >&5
9377echo "${ECHO_T}no" >&6
9378fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009379
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009380# Determine if signalmodule should be used.
9381
9382
Martin v. Löwis11437992002-04-12 09:54:03 +00009383echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9384echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9385
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009386# Check whether --with-signal-module or --without-signal-module was given.
9387if test "${with_signal_module+set}" = set; then
9388 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009389
Martin v. Löwis11437992002-04-12 09:54:03 +00009390fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009391
9392if test -z "$with_signal_module"
9393then with_signal_module="yes"
9394fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009395echo "$as_me:$LINENO: result: $with_signal_module" >&5
9396echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009397
9398if test "${with_signal_module}" = "yes"; then
9399 USE_SIGNAL_MODULE=""
9400 SIGNAL_OBJS=""
9401else
9402 USE_SIGNAL_MODULE="#"
9403 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9404fi
9405
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009406# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009407
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009408USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009409
Martin v. Löwis11437992002-04-12 09:54:03 +00009410echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9411echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9412
Guido van Rossumec2f0731997-01-22 20:54:01 +00009413
9414# Check whether --with-dec-threads or --without-dec-threads was given.
9415if test "${with_dec_threads+set}" = set; then
9416 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009417
9418echo "$as_me:$LINENO: result: $withval" >&5
9419echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009420LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009421if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009422 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009423fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009424else
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 echo "$as_me:$LINENO: result: no" >&5
9426echo "${ECHO_T}no" >&6
9427fi;
9428
9429# Templates for things AC_DEFINEd more than once.
9430# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009431
9432
Martin v. Löwis11437992002-04-12 09:54:03 +00009433
9434
9435
9436
9437
9438echo "$as_me:$LINENO: checking for --with-threads" >&5
9439echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9440
Guido van Rossumec2f0731997-01-22 20:54:01 +00009441# Check whether --with-threads or --without-threads was given.
9442if test "${with_threads+set}" = set; then
9443 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009444
Martin v. Löwis11437992002-04-12 09:54:03 +00009445fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009446
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009447# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009448
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009449# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009450if test "${with_thread+set}" = set; then
9451 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009452
Martin v. Löwis11437992002-04-12 09:54:03 +00009453with_threads=$with_thread
9454fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009455
9456if test -z "$with_threads"
9457then with_threads="yes"
9458fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009459echo "$as_me:$LINENO: result: $with_threads" >&5
9460echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009461
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009462
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009463if test "$with_threads" = "no"
9464then
9465 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009466elif test "$ac_cv_pthread_is_default" = yes
9467then
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009469#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009470_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009471
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009472 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009474#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009475_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009476
9477 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009479elif test "$ac_cv_kpthread" = "yes"
9480then
9481 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009483#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009484_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009485
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009486 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009487 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009488else
9489 if test ! -z "$with_threads" -a -d "$with_threads"
9490 then LDFLAGS="$LDFLAGS -L$with_threads"
9491 fi
9492 if test ! -z "$withval" -a -d "$withval"
9493 then LDFLAGS="$LDFLAGS -L$withval"
9494 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009495
9496 # According to the POSIX spec, a pthreads implementation must
9497 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9499echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9500 cat >conftest.$ac_ext <<_ACEOF
9501#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009502#include "confdefs.h"
9503#include <unistd.h>
9504 #ifdef _POSIX_THREADS
9505 yes
9506 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009507
9508_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9510 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009511 unistd_defines_pthreads=yes
9512else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009513 unistd_defines_pthreads=no
9514fi
9515rm -f conftest*
9516
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9518echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009519
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009521#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009522_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009523
Martin v. Löwis11437992002-04-12 09:54:03 +00009524 if test "${ac_cv_header_cthreads_h+set}" = set; then
9525 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9526echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9527if test "${ac_cv_header_cthreads_h+set}" = set; then
9528 echo $ECHO_N "(cached) $ECHO_C" >&6
9529fi
9530echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9531echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009532else
Martin v. Löwis11437992002-04-12 09:54:03 +00009533 # Is the header compilable?
9534echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9535echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9536cat >conftest.$ac_ext <<_ACEOF
9537#line $LINENO "configure"
9538#include "confdefs.h"
9539$ac_includes_default
9540#include <cthreads.h>
9541_ACEOF
9542rm -f conftest.$ac_objext
9543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9544 (eval $ac_compile) 2>&5
9545 ac_status=$?
9546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9547 (exit $ac_status); } &&
9548 { ac_try='test -s conftest.$ac_objext'
9549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9550 (eval $ac_try) 2>&5
9551 ac_status=$?
9552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9553 (exit $ac_status); }; }; then
9554 ac_header_compiler=yes
9555else
9556 echo "$as_me: failed program was:" >&5
9557cat conftest.$ac_ext >&5
9558ac_header_compiler=no
9559fi
9560rm -f conftest.$ac_objext conftest.$ac_ext
9561echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9562echo "${ECHO_T}$ac_header_compiler" >&6
9563
9564# Is the header present?
9565echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9566echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9567cat >conftest.$ac_ext <<_ACEOF
9568#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009569#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009570#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009571_ACEOF
9572if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9573 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9574 ac_status=$?
9575 egrep -v '^ *\+' conftest.er1 >conftest.err
9576 rm -f conftest.er1
9577 cat conftest.err >&5
9578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9579 (exit $ac_status); } >/dev/null; then
9580 if test -s conftest.err; then
9581 ac_cpp_err=$ac_c_preproc_warn_flag
9582 else
9583 ac_cpp_err=
9584 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009585else
Martin v. Löwis11437992002-04-12 09:54:03 +00009586 ac_cpp_err=yes
9587fi
9588if test -z "$ac_cpp_err"; then
9589 ac_header_preproc=yes
9590else
9591 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009592 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009593 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009595rm -f conftest.err conftest.$ac_ext
9596echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9597echo "${ECHO_T}$ac_header_preproc" >&6
9598
9599# So? What about this header?
9600case $ac_header_compiler:$ac_header_preproc in
9601 yes:no )
9602 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9603echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9604 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9605echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9606 no:yes )
9607 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9608echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9609 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9610echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9611 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9612echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9613esac
9614echo "$as_me:$LINENO: checking for cthreads.h" >&5
9615echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9616if test "${ac_cv_header_cthreads_h+set}" = set; then
9617 echo $ECHO_N "(cached) $ECHO_C" >&6
9618else
9619 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009620fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009621echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9622echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9623
9624fi
9625if test $ac_cv_header_cthreads_h = yes; then
9626 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009627#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009628_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009629
Martin v. Löwis11437992002-04-12 09:54:03 +00009630 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009631#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009632_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009633
Martin v. Löwis11437992002-04-12 09:54:03 +00009634
9635cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009636#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009637_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009638
9639 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009640 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009641else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009642
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9644 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9645echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9646if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9647 echo $ECHO_N "(cached) $ECHO_C" >&6
9648fi
9649echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9650echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009651else
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 # Is the header compilable?
9653echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9654echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9655cat >conftest.$ac_ext <<_ACEOF
9656#line $LINENO "configure"
9657#include "confdefs.h"
9658$ac_includes_default
9659#include <mach/cthreads.h>
9660_ACEOF
9661rm -f conftest.$ac_objext
9662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9663 (eval $ac_compile) 2>&5
9664 ac_status=$?
9665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9666 (exit $ac_status); } &&
9667 { ac_try='test -s conftest.$ac_objext'
9668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9669 (eval $ac_try) 2>&5
9670 ac_status=$?
9671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9672 (exit $ac_status); }; }; then
9673 ac_header_compiler=yes
9674else
9675 echo "$as_me: failed program was:" >&5
9676cat conftest.$ac_ext >&5
9677ac_header_compiler=no
9678fi
9679rm -f conftest.$ac_objext conftest.$ac_ext
9680echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9681echo "${ECHO_T}$ac_header_compiler" >&6
9682
9683# Is the header present?
9684echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9685echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9686cat >conftest.$ac_ext <<_ACEOF
9687#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009688#include "confdefs.h"
9689#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009690_ACEOF
9691if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9692 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9693 ac_status=$?
9694 egrep -v '^ *\+' conftest.er1 >conftest.err
9695 rm -f conftest.er1
9696 cat conftest.err >&5
9697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9698 (exit $ac_status); } >/dev/null; then
9699 if test -s conftest.err; then
9700 ac_cpp_err=$ac_c_preproc_warn_flag
9701 else
9702 ac_cpp_err=
9703 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009704else
Martin v. Löwis11437992002-04-12 09:54:03 +00009705 ac_cpp_err=yes
9706fi
9707if test -z "$ac_cpp_err"; then
9708 ac_header_preproc=yes
9709else
9710 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009711 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009713fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009714rm -f conftest.err conftest.$ac_ext
9715echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9716echo "${ECHO_T}$ac_header_preproc" >&6
9717
9718# So? What about this header?
9719case $ac_header_compiler:$ac_header_preproc in
9720 yes:no )
9721 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9722echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9723 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9724echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9725 no:yes )
9726 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9727echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9728 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9729echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9730 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9731echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9732esac
9733echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9734echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9735if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9736 echo $ECHO_N "(cached) $ECHO_C" >&6
9737else
9738 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009739fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009740echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9741echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9742
9743fi
9744if test $ac_cv_header_mach_cthreads_h = yes; then
9745 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009746#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009747_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009748
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009750#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009751_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009752
Martin v. Löwis11437992002-04-12 09:54:03 +00009753
9754cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009755#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009756_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009757
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009758 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009759else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009760
Martin v. Löwis11437992002-04-12 09:54:03 +00009761 echo "$as_me:$LINENO: checking for --with-pth" >&5
9762echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9763
9764# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009765if test "${with_pth+set}" = set; then
9766 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009767
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 echo "$as_me:$LINENO: result: $withval" >&5
9769echo "${ECHO_T}$withval" >&6
9770 cat >>confdefs.h <<\_ACEOF
9771#define WITH_THREAD 1
9772_ACEOF
9773
9774
9775cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009776#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009777_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009778
Martin v. Löwis130fb172001-07-19 11:00:41 +00009779 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009780 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009781else
Martin v. Löwis11437992002-04-12 09:54:03 +00009782
9783 echo "$as_me:$LINENO: result: no" >&5
9784echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009785
9786 # Just looking for pthread_create in libpthread is not enough:
9787 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9788 # So we really have to include pthread.h, and then link.
9789 _libs=$LIBS
9790 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9792echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9793 cat >conftest.$ac_ext <<_ACEOF
9794#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009795#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009796#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009797
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009798void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009799#ifdef F77_DUMMY_MAIN
9800# ifdef __cplusplus
9801 extern "C"
9802# endif
9803 int F77_DUMMY_MAIN() { return 1; }
9804#endif
9805int
9806main ()
9807{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009808
9809pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 ;
9811 return 0;
9812}
9813_ACEOF
9814rm -f conftest.$ac_objext conftest$ac_exeext
9815if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9816 (eval $ac_link) 2>&5
9817 ac_status=$?
9818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9819 (exit $ac_status); } &&
9820 { ac_try='test -s conftest$ac_exeext'
9821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9822 (eval $ac_try) 2>&5
9823 ac_status=$?
9824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9825 (exit $ac_status); }; }; then
9826
9827 echo "$as_me:$LINENO: result: yes" >&5
9828echo "${ECHO_T}yes" >&6
9829 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009830#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009831_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009832
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009833 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009834 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009835else
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 echo "$as_me: failed program was:" >&5
9837cat conftest.$ac_ext >&5
9838
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009839 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9841echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9842if test "${ac_cv_func_pthread_detach+set}" = set; then
9843 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009844else
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 cat >conftest.$ac_ext <<_ACEOF
9846#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009847#include "confdefs.h"
9848/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009850#include <assert.h>
9851/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009852#ifdef __cplusplus
9853extern "C"
9854#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009855/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009856 builtin and then its argument prototype would still apply. */
9857char pthread_detach ();
9858char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009859
Martin v. Löwis11437992002-04-12 09:54:03 +00009860#ifdef F77_DUMMY_MAIN
9861# ifdef __cplusplus
9862 extern "C"
9863# endif
9864 int F77_DUMMY_MAIN() { return 1; }
9865#endif
9866int
9867main ()
9868{
Guido van Rossumad678af1998-10-02 14:42:15 +00009869/* The GNU C library defines this for functions which it implements
9870 to always fail with ENOSYS. Some functions are actually named
9871 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009872#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009873choke me
9874#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009875f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009876#endif
9877
Martin v. Löwis11437992002-04-12 09:54:03 +00009878 ;
9879 return 0;
9880}
9881_ACEOF
9882rm -f conftest.$ac_objext conftest$ac_exeext
9883if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9884 (eval $ac_link) 2>&5
9885 ac_status=$?
9886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9887 (exit $ac_status); } &&
9888 { ac_try='test -s conftest$ac_exeext'
9889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9890 (eval $ac_try) 2>&5
9891 ac_status=$?
9892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9893 (exit $ac_status); }; }; then
9894 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009895else
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 echo "$as_me: failed program was:" >&5
9897cat conftest.$ac_ext >&5
9898ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009899fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009900rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009901fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009902echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9903echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9904if test $ac_cv_func_pthread_detach = yes; then
9905 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009906#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009907_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009908
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009909 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009910 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009911else
Guido van Rossumad678af1998-10-02 14:42:15 +00009912
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009913 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9914 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9915echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9916if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9917 echo $ECHO_N "(cached) $ECHO_C" >&6
9918fi
9919echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9920echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9921else
9922 # Is the header compilable?
9923echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
9924echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
9925cat >conftest.$ac_ext <<_ACEOF
9926#line $LINENO "configure"
9927#include "confdefs.h"
9928$ac_includes_default
9929#include <atheos/threads.h>
9930_ACEOF
9931rm -f conftest.$ac_objext
9932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9933 (eval $ac_compile) 2>&5
9934 ac_status=$?
9935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9936 (exit $ac_status); } &&
9937 { ac_try='test -s conftest.$ac_objext'
9938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9939 (eval $ac_try) 2>&5
9940 ac_status=$?
9941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9942 (exit $ac_status); }; }; then
9943 ac_header_compiler=yes
9944else
9945 echo "$as_me: failed program was:" >&5
9946cat conftest.$ac_ext >&5
9947ac_header_compiler=no
9948fi
9949rm -f conftest.$ac_objext conftest.$ac_ext
9950echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9951echo "${ECHO_T}$ac_header_compiler" >&6
9952
9953# Is the header present?
9954echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
9955echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
9956cat >conftest.$ac_ext <<_ACEOF
9957#line $LINENO "configure"
9958#include "confdefs.h"
9959#include <atheos/threads.h>
9960_ACEOF
9961if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9962 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9963 ac_status=$?
9964 egrep -v '^ *\+' conftest.er1 >conftest.err
9965 rm -f conftest.er1
9966 cat conftest.err >&5
9967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9968 (exit $ac_status); } >/dev/null; then
9969 if test -s conftest.err; then
9970 ac_cpp_err=$ac_c_preproc_warn_flag
9971 else
9972 ac_cpp_err=
9973 fi
9974else
9975 ac_cpp_err=yes
9976fi
9977if test -z "$ac_cpp_err"; then
9978 ac_header_preproc=yes
9979else
9980 echo "$as_me: failed program was:" >&5
9981 cat conftest.$ac_ext >&5
9982 ac_header_preproc=no
9983fi
9984rm -f conftest.err conftest.$ac_ext
9985echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9986echo "${ECHO_T}$ac_header_preproc" >&6
9987
9988# So? What about this header?
9989case $ac_header_compiler:$ac_header_preproc in
9990 yes:no )
9991 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9992echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9993 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9994echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9995 no:yes )
9996 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
9997echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
9998 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
9999echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10000 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10001echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10002esac
10003echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10004echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10005if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10006 echo $ECHO_N "(cached) $ECHO_C" >&6
10007else
10008 ac_cv_header_atheos_threads_h=$ac_header_preproc
10009fi
10010echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10011echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10012
10013fi
10014if test $ac_cv_header_atheos_threads_h = yes; then
10015 cat >>confdefs.h <<\_ACEOF
10016#define WITH_THREAD 1
10017_ACEOF
10018
10019
10020cat >>confdefs.h <<\_ACEOF
10021#define ATHEOS_THREADS 1
10022_ACEOF
10023
10024 THREADOBJ="Python/thread.o"
10025else
10026
Martin v. Löwis11437992002-04-12 09:54:03 +000010027 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10028 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10029echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10030if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10031 echo $ECHO_N "(cached) $ECHO_C" >&6
10032fi
10033echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10034echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010035else
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 # Is the header compilable?
10037echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10038echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10039cat >conftest.$ac_ext <<_ACEOF
10040#line $LINENO "configure"
10041#include "confdefs.h"
10042$ac_includes_default
10043#include <kernel/OS.h>
10044_ACEOF
10045rm -f conftest.$ac_objext
10046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10047 (eval $ac_compile) 2>&5
10048 ac_status=$?
10049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10050 (exit $ac_status); } &&
10051 { ac_try='test -s conftest.$ac_objext'
10052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10053 (eval $ac_try) 2>&5
10054 ac_status=$?
10055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10056 (exit $ac_status); }; }; then
10057 ac_header_compiler=yes
10058else
10059 echo "$as_me: failed program was:" >&5
10060cat conftest.$ac_ext >&5
10061ac_header_compiler=no
10062fi
10063rm -f conftest.$ac_objext conftest.$ac_ext
10064echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10065echo "${ECHO_T}$ac_header_compiler" >&6
10066
10067# Is the header present?
10068echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10069echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10070cat >conftest.$ac_ext <<_ACEOF
10071#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010072#include "confdefs.h"
10073#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010074_ACEOF
10075if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10076 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10077 ac_status=$?
10078 egrep -v '^ *\+' conftest.er1 >conftest.err
10079 rm -f conftest.er1
10080 cat conftest.err >&5
10081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082 (exit $ac_status); } >/dev/null; then
10083 if test -s conftest.err; then
10084 ac_cpp_err=$ac_c_preproc_warn_flag
10085 else
10086 ac_cpp_err=
10087 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010088else
Martin v. Löwis11437992002-04-12 09:54:03 +000010089 ac_cpp_err=yes
10090fi
10091if test -z "$ac_cpp_err"; then
10092 ac_header_preproc=yes
10093else
10094 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010095 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010096 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010097fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010098rm -f conftest.err conftest.$ac_ext
10099echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10100echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010101
Martin v. Löwis11437992002-04-12 09:54:03 +000010102# So? What about this header?
10103case $ac_header_compiler:$ac_header_preproc in
10104 yes:no )
10105 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10106echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10107 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10108echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10109 no:yes )
10110 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10111echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10112 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10113echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10114 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10115echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10116esac
10117echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10118echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10119if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10120 echo $ECHO_N "(cached) $ECHO_C" >&6
10121else
10122 ac_cv_header_kernel_OS_h=$ac_header_preproc
10123fi
10124echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10125echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10126
10127fi
10128if test $ac_cv_header_kernel_OS_h = yes; then
10129 cat >>confdefs.h <<\_ACEOF
10130#define WITH_THREAD 1
10131_ACEOF
10132
10133
10134cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010135#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010136_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010137
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010138 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010139else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010140
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10142echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10143if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10144 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010145else
Martin v. Löwis11437992002-04-12 09:54:03 +000010146 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010147LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010148cat >conftest.$ac_ext <<_ACEOF
10149#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010150#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010151
Greg Steinadf63d62000-07-05 10:38:09 +000010152/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010153#ifdef __cplusplus
10154extern "C"
10155#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010156/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010157 builtin and then its argument prototype would still apply. */
10158char pthread_create ();
10159#ifdef F77_DUMMY_MAIN
10160# ifdef __cplusplus
10161 extern "C"
10162# endif
10163 int F77_DUMMY_MAIN() { return 1; }
10164#endif
10165int
10166main ()
10167{
10168pthread_create ();
10169 ;
10170 return 0;
10171}
10172_ACEOF
10173rm -f conftest.$ac_objext conftest$ac_exeext
10174if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10175 (eval $ac_link) 2>&5
10176 ac_status=$?
10177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10178 (exit $ac_status); } &&
10179 { ac_try='test -s conftest$ac_exeext'
10180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10181 (eval $ac_try) 2>&5
10182 ac_status=$?
10183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10184 (exit $ac_status); }; }; then
10185 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010186else
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 echo "$as_me: failed program was:" >&5
10188cat conftest.$ac_ext >&5
10189ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010190fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010191rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10192LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010193fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010194echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10195echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10196if test $ac_cv_lib_pthreads_pthread_create = yes; then
10197 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010198#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010199_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010200
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010201 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010202 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010203 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010204else
Greg Steinadf63d62000-07-05 10:38:09 +000010205
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10207echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10208if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10209 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010210else
Martin v. Löwis11437992002-04-12 09:54:03 +000010211 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010212LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010213cat >conftest.$ac_ext <<_ACEOF
10214#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010215#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010216
Guido van Rossum49545951997-12-02 19:28:29 +000010217/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010218#ifdef __cplusplus
10219extern "C"
10220#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010221/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 builtin and then its argument prototype would still apply. */
10223char pthread_create ();
10224#ifdef F77_DUMMY_MAIN
10225# ifdef __cplusplus
10226 extern "C"
10227# endif
10228 int F77_DUMMY_MAIN() { return 1; }
10229#endif
10230int
10231main ()
10232{
10233pthread_create ();
10234 ;
10235 return 0;
10236}
10237_ACEOF
10238rm -f conftest.$ac_objext conftest$ac_exeext
10239if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10240 (eval $ac_link) 2>&5
10241 ac_status=$?
10242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10243 (exit $ac_status); } &&
10244 { ac_try='test -s conftest$ac_exeext'
10245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10246 (eval $ac_try) 2>&5
10247 ac_status=$?
10248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10249 (exit $ac_status); }; }; then
10250 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010251else
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 echo "$as_me: failed program was:" >&5
10253cat conftest.$ac_ext >&5
10254ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010255fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010256rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10257LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010258fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010259echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10260echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10261if test $ac_cv_lib_c_r_pthread_create = yes; then
10262 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010263#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010264_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010265
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010266 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010267 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010268 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010269else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010270
Martin v. Löwis11437992002-04-12 09:54:03 +000010271 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10272echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10273if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10274 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010275else
Martin v. Löwis11437992002-04-12 09:54:03 +000010276 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010277LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010278cat >conftest.$ac_ext <<_ACEOF
10279#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010280#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010281
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010282/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010283#ifdef __cplusplus
10284extern "C"
10285#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010286/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 builtin and then its argument prototype would still apply. */
10288char __d6_pthread_create ();
10289#ifdef F77_DUMMY_MAIN
10290# ifdef __cplusplus
10291 extern "C"
10292# endif
10293 int F77_DUMMY_MAIN() { return 1; }
10294#endif
10295int
10296main ()
10297{
10298__d6_pthread_create ();
10299 ;
10300 return 0;
10301}
10302_ACEOF
10303rm -f conftest.$ac_objext conftest$ac_exeext
10304if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10305 (eval $ac_link) 2>&5
10306 ac_status=$?
10307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10308 (exit $ac_status); } &&
10309 { ac_try='test -s conftest$ac_exeext'
10310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10311 (eval $ac_try) 2>&5
10312 ac_status=$?
10313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10314 (exit $ac_status); }; }; then
10315 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010316else
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 echo "$as_me: failed program was:" >&5
10318cat conftest.$ac_ext >&5
10319ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010320fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010321rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10322LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010324echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10325echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10326if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10327 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010328#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010329_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010330
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010331 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010332 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010333 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010334else
Guido van Rossum49545951997-12-02 19:28:29 +000010335
Martin v. Löwis11437992002-04-12 09:54:03 +000010336 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10337echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10338if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10339 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010340else
Martin v. Löwis11437992002-04-12 09:54:03 +000010341 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010342LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010343cat >conftest.$ac_ext <<_ACEOF
10344#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010345#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010346
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010347/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010348#ifdef __cplusplus
10349extern "C"
10350#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010351/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 builtin and then its argument prototype would still apply. */
10353char __pthread_create_system ();
10354#ifdef F77_DUMMY_MAIN
10355# ifdef __cplusplus
10356 extern "C"
10357# endif
10358 int F77_DUMMY_MAIN() { return 1; }
10359#endif
10360int
10361main ()
10362{
10363__pthread_create_system ();
10364 ;
10365 return 0;
10366}
10367_ACEOF
10368rm -f conftest.$ac_objext conftest$ac_exeext
10369if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10370 (eval $ac_link) 2>&5
10371 ac_status=$?
10372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10373 (exit $ac_status); } &&
10374 { ac_try='test -s conftest$ac_exeext'
10375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10376 (eval $ac_try) 2>&5
10377 ac_status=$?
10378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10379 (exit $ac_status); }; }; then
10380 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010381else
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 echo "$as_me: failed program was:" >&5
10383cat conftest.$ac_ext >&5
10384ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010385fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010386rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10387LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010388fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010389echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10390echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10391if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10392 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010393#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010394_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010395
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010396 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010397 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010398 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010399else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010400
Martin v. Löwis11437992002-04-12 09:54:03 +000010401 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10402echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10403if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10404 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010405else
Martin v. Löwis11437992002-04-12 09:54:03 +000010406 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010407LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010408cat >conftest.$ac_ext <<_ACEOF
10409#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010410#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010411
Guido van Rossumb93a8621998-05-07 13:27:32 +000010412/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010413#ifdef __cplusplus
10414extern "C"
10415#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010416/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 builtin and then its argument prototype would still apply. */
10418char pthread_create ();
10419#ifdef F77_DUMMY_MAIN
10420# ifdef __cplusplus
10421 extern "C"
10422# endif
10423 int F77_DUMMY_MAIN() { return 1; }
10424#endif
10425int
10426main ()
10427{
10428pthread_create ();
10429 ;
10430 return 0;
10431}
10432_ACEOF
10433rm -f conftest.$ac_objext conftest$ac_exeext
10434if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10435 (eval $ac_link) 2>&5
10436 ac_status=$?
10437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10438 (exit $ac_status); } &&
10439 { ac_try='test -s conftest$ac_exeext'
10440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10441 (eval $ac_try) 2>&5
10442 ac_status=$?
10443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10444 (exit $ac_status); }; }; then
10445 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010446else
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 echo "$as_me: failed program was:" >&5
10448cat conftest.$ac_ext >&5
10449ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010450fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010451rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10452LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010453fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010454echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10455echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10456if test $ac_cv_lib_cma_pthread_create = yes; then
10457 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010458#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010459_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010460
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010461 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010462 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010463 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010464else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010465
Martin v. Löwis130fb172001-07-19 11:00:41 +000010466 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010467fi
10468
Guido van Rossum627b2d71993-12-24 10:39:16 +000010469
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010470fi
10471
Guido van Rossum0be3e491997-05-22 20:33:33 +000010472fi
10473
Guido van Rossum49545951997-12-02 19:28:29 +000010474fi
10475
Guido van Rossumb93a8621998-05-07 13:27:32 +000010476fi
10477
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010478fi
10479
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010480
Michael W. Hudson54241132001-12-07 15:38:26 +000010481fi
10482
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010483
10484fi
10485
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010486fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010487rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10488fi;
10489fi
10490
10491
10492fi
10493
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010494
Michael W. Hudson54241132001-12-07 15:38:26 +000010495
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010496 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010497 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010498
10499cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010500#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010501_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010502
10503 fi
10504
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10506echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10507 if test "${ac_cv_pthread_system_supported+set}" = set; then
10508 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010509else
10510 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010511 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010512else
Martin v. Löwis11437992002-04-12 09:54:03 +000010513 cat >conftest.$ac_ext <<_ACEOF
10514#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010515#include "confdefs.h"
10516#include <pthread.h>
10517 void *foo(void *parm) {
10518 return NULL;
10519 }
10520 main() {
10521 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010522 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010523 if (pthread_attr_init(&attr)) exit(-1);
10524 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010525 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010526 exit(0);
10527 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010528_ACEOF
10529rm -f conftest$ac_exeext
10530if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10531 (eval $ac_link) 2>&5
10532 ac_status=$?
10533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10534 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10536 (eval $ac_try) 2>&5
10537 ac_status=$?
10538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10539 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010540 ac_cv_pthread_system_supported=yes
10541else
Martin v. Löwis11437992002-04-12 09:54:03 +000010542 echo "$as_me: program exited with status $ac_status" >&5
10543echo "$as_me: failed program was:" >&5
10544cat conftest.$ac_ext >&5
10545( exit $ac_status )
10546ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010547fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010548rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010549fi
10550
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010551fi
10552
Martin v. Löwis11437992002-04-12 09:54:03 +000010553 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10554echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010555 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010556
10557cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010558#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010559_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010560
10561 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010562
10563for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010564do
Martin v. Löwis11437992002-04-12 09:54:03 +000010565as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10566echo "$as_me:$LINENO: checking for $ac_func" >&5
10567echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10568if eval "test \"\${$as_ac_var+set}\" = set"; then
10569 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010570else
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 cat >conftest.$ac_ext <<_ACEOF
10572#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010573#include "confdefs.h"
10574/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010576#include <assert.h>
10577/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010578#ifdef __cplusplus
10579extern "C"
10580#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010581/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010582 builtin and then its argument prototype would still apply. */
10583char $ac_func ();
10584char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010585
Martin v. Löwis11437992002-04-12 09:54:03 +000010586#ifdef F77_DUMMY_MAIN
10587# ifdef __cplusplus
10588 extern "C"
10589# endif
10590 int F77_DUMMY_MAIN() { return 1; }
10591#endif
10592int
10593main ()
10594{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010595/* The GNU C library defines this for functions which it implements
10596 to always fail with ENOSYS. Some functions are actually named
10597 something starting with __ and the normal name is an alias. */
10598#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10599choke me
10600#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010601f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010602#endif
10603
Martin v. Löwis11437992002-04-12 09:54:03 +000010604 ;
10605 return 0;
10606}
10607_ACEOF
10608rm -f conftest.$ac_objext conftest$ac_exeext
10609if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10610 (eval $ac_link) 2>&5
10611 ac_status=$?
10612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10613 (exit $ac_status); } &&
10614 { ac_try='test -s conftest$ac_exeext'
10615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10616 (eval $ac_try) 2>&5
10617 ac_status=$?
10618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10619 (exit $ac_status); }; }; then
10620 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010621else
Martin v. Löwis11437992002-04-12 09:54:03 +000010622 echo "$as_me: failed program was:" >&5
10623cat conftest.$ac_ext >&5
10624eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010625fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010626rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010627fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010628echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10629echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10630if test `eval echo '${'$as_ac_var'}'` = yes; then
10631 cat >>confdefs.h <<_ACEOF
10632#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10633_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010634
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010635fi
10636done
10637
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010638 fi
10639
Martin v. Löwis11437992002-04-12 09:54:03 +000010640 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10641echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10642if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10643 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010644else
Martin v. Löwis11437992002-04-12 09:54:03 +000010645 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010646LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010647cat >conftest.$ac_ext <<_ACEOF
10648#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010649#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010650
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010651/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010652#ifdef __cplusplus
10653extern "C"
10654#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010655/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010656 builtin and then its argument prototype would still apply. */
10657char usconfig ();
10658#ifdef F77_DUMMY_MAIN
10659# ifdef __cplusplus
10660 extern "C"
10661# endif
10662 int F77_DUMMY_MAIN() { return 1; }
10663#endif
10664int
10665main ()
10666{
10667usconfig ();
10668 ;
10669 return 0;
10670}
10671_ACEOF
10672rm -f conftest.$ac_objext conftest$ac_exeext
10673if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10674 (eval $ac_link) 2>&5
10675 ac_status=$?
10676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10677 (exit $ac_status); } &&
10678 { ac_try='test -s conftest$ac_exeext'
10679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10680 (eval $ac_try) 2>&5
10681 ac_status=$?
10682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10683 (exit $ac_status); }; }; then
10684 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010685else
Martin v. Löwis11437992002-04-12 09:54:03 +000010686 echo "$as_me: failed program was:" >&5
10687cat conftest.$ac_ext >&5
10688ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010689fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010690rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10691LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010692fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010693echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10694echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10695if test $ac_cv_lib_mpc_usconfig = yes; then
10696 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010697#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010698_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010699
Martin v. Löwis130fb172001-07-19 11:00:41 +000010700 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010701 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010702 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010703fi
10704
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010705
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 if test $posix_threads != "yes"; then
10707 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10708echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10709if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10710 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010711else
Martin v. Löwis11437992002-04-12 09:54:03 +000010712 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010713LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010714cat >conftest.$ac_ext <<_ACEOF
10715#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010716#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010717
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010718/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010719#ifdef __cplusplus
10720extern "C"
10721#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010722/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 builtin and then its argument prototype would still apply. */
10724char thr_create ();
10725#ifdef F77_DUMMY_MAIN
10726# ifdef __cplusplus
10727 extern "C"
10728# endif
10729 int F77_DUMMY_MAIN() { return 1; }
10730#endif
10731int
10732main ()
10733{
10734thr_create ();
10735 ;
10736 return 0;
10737}
10738_ACEOF
10739rm -f conftest.$ac_objext conftest$ac_exeext
10740if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10741 (eval $ac_link) 2>&5
10742 ac_status=$?
10743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10744 (exit $ac_status); } &&
10745 { ac_try='test -s conftest$ac_exeext'
10746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10747 (eval $ac_try) 2>&5
10748 ac_status=$?
10749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10750 (exit $ac_status); }; }; then
10751 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010752else
Martin v. Löwis11437992002-04-12 09:54:03 +000010753 echo "$as_me: failed program was:" >&5
10754cat conftest.$ac_ext >&5
10755ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010756fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010757rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10758LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010759fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010760echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10761echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10762if test $ac_cv_lib_thread_thr_create = yes; then
10763 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010764#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010765_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010766
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010767 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010768 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010769 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010770fi
10771
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010772 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010773
Martin v. Löwis130fb172001-07-19 11:00:41 +000010774 if test "$USE_THREAD_MODULE" != "#"
10775 then
10776 # If the above checks didn't disable threads, (at least) OSF1
10777 # needs this '-threads' argument during linking.
10778 case $ac_sys_system in
10779 OSF1) LDLAST=-threads;;
10780 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010781 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010782fi
10783
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010784# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010785
10786
10787echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10788echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789# Check whether --enable-ipv6 or --disable-ipv6 was given.
10790if test "${enable_ipv6+set}" = set; then
10791 enableval="$enable_ipv6"
10792 case "$enableval" in
10793 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010794 echo "$as_me:$LINENO: result: no" >&5
10795echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796 ipv6=no
10797 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 *) echo "$as_me:$LINENO: result: yes" >&5
10799echo "${ECHO_T}yes" >&6
10800 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010802_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010803
10804 ipv6=yes
10805 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010806 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807else
Martin v. Löwis11437992002-04-12 09:54:03 +000010808
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010810 echo "$as_me:$LINENO: result: no" >&5
10811echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812 ipv6=no
10813
10814else
Martin v. Löwis11437992002-04-12 09:54:03 +000010815 cat >conftest.$ac_ext <<_ACEOF
10816#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010817#include "confdefs.h"
10818 /* AF_INET6 available check */
10819#include <sys/types.h>
10820#include <sys/socket.h>
10821main()
10822{
10823 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10824 exit(1);
10825 else
10826 exit(0);
10827}
10828
Martin v. Löwis11437992002-04-12 09:54:03 +000010829_ACEOF
10830rm -f conftest$ac_exeext
10831if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10832 (eval $ac_link) 2>&5
10833 ac_status=$?
10834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10835 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10837 (eval $ac_try) 2>&5
10838 ac_status=$?
10839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10840 (exit $ac_status); }; }; then
10841 echo "$as_me:$LINENO: result: yes" >&5
10842echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843 ipv6=yes
10844else
Martin v. Löwis11437992002-04-12 09:54:03 +000010845 echo "$as_me: program exited with status $ac_status" >&5
10846echo "$as_me: failed program was:" >&5
10847cat conftest.$ac_ext >&5
10848( exit $ac_status )
10849echo "$as_me:$LINENO: result: no" >&5
10850echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851 ipv6=no
10852fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010853rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854fi
10855
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010856if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10858echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10859 cat >conftest.$ac_ext <<_ACEOF
10860#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010861#include "confdefs.h"
10862#include <sys/types.h>
10863#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010864#ifdef F77_DUMMY_MAIN
10865# ifdef __cplusplus
10866 extern "C"
10867# endif
10868 int F77_DUMMY_MAIN() { return 1; }
10869#endif
10870int
10871main ()
10872{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010873struct sockaddr_in6 x;
10874x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010875 ;
10876 return 0;
10877}
10878_ACEOF
10879rm -f conftest.$ac_objext
10880if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10881 (eval $ac_compile) 2>&5
10882 ac_status=$?
10883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10884 (exit $ac_status); } &&
10885 { ac_try='test -s conftest.$ac_objext'
10886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10887 (eval $ac_try) 2>&5
10888 ac_status=$?
10889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10890 (exit $ac_status); }; }; then
10891 echo "$as_me:$LINENO: result: yes" >&5
10892echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010893 ipv6=yes
10894else
Martin v. Löwis11437992002-04-12 09:54:03 +000010895 echo "$as_me: failed program was:" >&5
10896cat conftest.$ac_ext >&5
10897echo "$as_me:$LINENO: result: no" >&5
10898echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010899 ipv6=no
10900fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010901rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010902fi
10903
10904if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010906#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010907_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010908
10909fi
10910
Martin v. Löwis11437992002-04-12 09:54:03 +000010911fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912
10913ipv6type=unknown
10914ipv6lib=none
10915ipv6trylibc=no
10916
10917if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010918 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10919echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010920 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10921 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010922 case $i in
10923 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010924 cat >conftest.$ac_ext <<_ACEOF
10925#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010927
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928#include <netinet/in.h>
10929#ifdef IPV6_INRIA_VERSION
10930yes
10931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010932_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10934 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010935 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010936fi
10937rm -f conftest*
10938
10939 ;;
10940 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010941 cat >conftest.$ac_ext <<_ACEOF
10942#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010943#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010944
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010945#include <netinet/in.h>
10946#ifdef __KAME__
10947yes
10948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010949_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10951 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010952 ipv6type=$i;
10953 ipv6lib=inet6
10954 ipv6libdir=/usr/local/v6/lib
10955 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010956fi
10957rm -f conftest*
10958
10959 ;;
10960 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010961 cat >conftest.$ac_ext <<_ACEOF
10962#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010963#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010964
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010965#include <features.h>
10966#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10967yes
10968#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010969_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010970if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10971 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010972 ipv6type=$i;
10973 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010974fi
10975rm -f conftest*
10976
10977 ;;
10978 linux-inet6)
10979 if test -d /usr/inet6; then
10980 ipv6type=$i
10981 ipv6lib=inet6
10982 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010983 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010984 fi
10985 ;;
10986 solaris)
10987 if test -f /etc/netconfig; then
10988 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10989 ipv6type=$i
10990 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010991 fi
10992 fi
10993 ;;
10994 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010995 cat >conftest.$ac_ext <<_ACEOF
10996#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010997#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010998
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010999#include <sys/param.h>
11000#ifdef _TOSHIBA_INET6
11001yes
11002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011003_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11005 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011006 ipv6type=$i;
11007 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011008 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011009fi
11010rm -f conftest*
11011
11012 ;;
11013 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 cat >conftest.$ac_ext <<_ACEOF
11015#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011016#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011017
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011018#include </usr/local/v6/include/sys/v6config.h>
11019#ifdef __V6D__
11020yes
11021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011022_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11024 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011025 ipv6type=$i;
11026 ipv6lib=v6;
11027 ipv6libdir=/usr/local/v6/lib;
11028 OPT="-I/usr/local/v6/include $OPT"
11029fi
11030rm -f conftest*
11031
11032 ;;
11033 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011034 cat >conftest.$ac_ext <<_ACEOF
11035#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011036#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011037
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011038#include <sys/param.h>
11039#ifdef _ZETA_MINAMI_INET6
11040yes
11041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011042_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11044 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011045 ipv6type=$i;
11046 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011047 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011048fi
11049rm -f conftest*
11050
11051 ;;
11052 esac
11053 if test "$ipv6type" != "unknown"; then
11054 break
11055 fi
11056 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 echo "$as_me:$LINENO: result: $ipv6type" >&5
11058echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011059fi
11060
11061if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11062 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11063 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11064 echo "using lib$ipv6lib"
11065 else
11066 if test $ipv6trylibc = "yes"; then
11067 echo "using libc"
11068 else
11069 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11070 echo "You need to fetch lib$ipv6lib.a from appropriate"
11071 echo 'ipv6 kit and compile beforehand.'
11072 exit 1
11073 fi
11074 fi
11075fi
11076
Jack Jansen7b8c7542002-04-14 20:12:41 +000011077# Check for universal newline support
11078echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
11079echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
11080
11081# Check whether --with-universal-newlines or --without-universal-newlines was given.
11082if test "${with_universal_newlines+set}" = set; then
11083 withval="$with_universal_newlines"
11084
11085fi;
11086
11087if test -z "$with_universal_newlines"
11088then with_universal_newlines="yes"
11089fi
11090if test "$with_universal_newlines" != "no"
11091then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011092
11093cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011094#define WITH_UNIVERSAL_NEWLINES 1
11095_ACEOF
11096
11097fi
11098echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11099echo "${ECHO_T}$with_universal_newlines" >&6
11100
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011101# Check for --with-doc-strings
11102echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11103echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11104
11105# Check whether --with-doc-strings or --without-doc-strings was given.
11106if test "${with_doc_strings+set}" = set; then
11107 withval="$with_doc_strings"
11108
11109fi;
11110
11111if test -z "$with_doc_strings"
11112then with_doc_strings="yes"
11113fi
11114if test "$with_doc_strings" != "no"
11115then
11116
11117cat >>confdefs.h <<\_ACEOF
11118#define WITH_DOC_STRINGS 1
11119_ACEOF
11120
11121fi
11122echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11123echo "${ECHO_T}$with_doc_strings" >&6
11124
Neil Schemenauera35c6882001-02-27 04:45:05 +000011125# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011126echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11127echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11128
Neil Schemenauera35c6882001-02-27 04:45:05 +000011129# Check whether --with-pymalloc or --without-pymalloc was given.
11130if test "${with_pymalloc+set}" = set; then
11131 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011132
Martin v. Löwis11437992002-04-12 09:54:03 +000011133fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011134
Neil Schemenauer16c22972002-03-22 15:34:49 +000011135if test -z "$with_pymalloc"
11136then with_pymalloc="yes"
11137fi
11138if test "$with_pymalloc" != "no"
11139then
Martin v. Löwis11437992002-04-12 09:54:03 +000011140
11141cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011142#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011143_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011144
11145fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011146echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11147echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011148
Barry Warsawef82cd72000-06-30 16:21:01 +000011149# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011150echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11151echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11152
Barry Warsawef82cd72000-06-30 16:21:01 +000011153# Check whether --with-wctype-functions or --without-wctype-functions was given.
11154if test "${with_wctype_functions+set}" = set; then
11155 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011156
Barry Warsawef82cd72000-06-30 16:21:01 +000011157if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011158then
11159
11160cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011161#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011162_ACEOF
11163
11164 echo "$as_me:$LINENO: result: yes" >&5
11165echo "${ECHO_T}yes" >&6
11166else echo "$as_me:$LINENO: result: no" >&5
11167echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011168fi
11169else
Martin v. Löwis11437992002-04-12 09:54:03 +000011170 echo "$as_me:$LINENO: result: no" >&5
11171echo "${ECHO_T}no" >&6
11172fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011173
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011174# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011175
Guido van Rossum98935bf2001-09-05 19:13:16 +000011176DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011177
Martin v. Löwis11437992002-04-12 09:54:03 +000011178echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11179echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11180
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011181# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011182if test "${with_sgi_dl+set}" = set; then
11183 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011184
11185echo "$as_me:$LINENO: result: $withval" >&5
11186echo "${ECHO_T}$withval" >&6
11187
11188cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011189#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011190_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011191
Guido van Rossume97ee181999-12-20 21:27:22 +000011192DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011193dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011194if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011195then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011196else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11197echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11198 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011199fi
11200DLINCLDIR=${dldir}
11201LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011202else
Martin v. Löwis11437992002-04-12 09:54:03 +000011203 echo "$as_me:$LINENO: result: no" >&5
11204echo "${ECHO_T}no" >&6
11205fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011206
Martin v. Löwis11437992002-04-12 09:54:03 +000011207echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11208echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011209
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011210# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011211if test "${with_dl_dld+set}" = set; then
11212 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011213
11214echo "$as_me:$LINENO: result: $withval" >&5
11215echo "${ECHO_T}$withval" >&6
11216
11217cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011218#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011219_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011220
Guido van Rossume97ee181999-12-20 21:27:22 +000011221DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011222dldir=`echo "$withval" | sed 's/,.*//'`
11223dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011224if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011225then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011226else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11227echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11228 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011229fi
11230DLINCLDIR=${dldir}
11231LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011232else
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 echo "$as_me:$LINENO: result: no" >&5
11234echo "${ECHO_T}no" >&6
11235fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011236
Guido van Rossume97ee181999-12-20 21:27:22 +000011237# the dlopen() function means we might want to use dynload_shlib.o. some
11238# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011239
Thomas Wouters3a584202000-08-05 23:28:51 +000011240for ac_func in dlopen
11241do
Martin v. Löwis11437992002-04-12 09:54:03 +000011242as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11243echo "$as_me:$LINENO: checking for $ac_func" >&5
11244echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11245if eval "test \"\${$as_ac_var+set}\" = set"; then
11246 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011247else
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 cat >conftest.$ac_ext <<_ACEOF
11249#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011250#include "confdefs.h"
11251/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011253#include <assert.h>
11254/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011255#ifdef __cplusplus
11256extern "C"
11257#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011258/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 builtin and then its argument prototype would still apply. */
11260char $ac_func ();
11261char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011262
Martin v. Löwis11437992002-04-12 09:54:03 +000011263#ifdef F77_DUMMY_MAIN
11264# ifdef __cplusplus
11265 extern "C"
11266# endif
11267 int F77_DUMMY_MAIN() { return 1; }
11268#endif
11269int
11270main ()
11271{
Guido van Rossume97ee181999-12-20 21:27:22 +000011272/* The GNU C library defines this for functions which it implements
11273 to always fail with ENOSYS. Some functions are actually named
11274 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011275#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011276choke me
11277#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011278f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011279#endif
11280
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 ;
11282 return 0;
11283}
11284_ACEOF
11285rm -f conftest.$ac_objext conftest$ac_exeext
11286if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11287 (eval $ac_link) 2>&5
11288 ac_status=$?
11289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11290 (exit $ac_status); } &&
11291 { ac_try='test -s conftest$ac_exeext'
11292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11293 (eval $ac_try) 2>&5
11294 ac_status=$?
11295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11296 (exit $ac_status); }; }; then
11297 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011298else
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 echo "$as_me: failed program was:" >&5
11300cat conftest.$ac_ext >&5
11301eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011302fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011303rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011304fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011305echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11306echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11307if test `eval echo '${'$as_ac_var'}'` = yes; then
11308 cat >>confdefs.h <<_ACEOF
11309#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11310_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011311
Guido van Rossume97ee181999-12-20 21:27:22 +000011312fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011313done
Guido van Rossume97ee181999-12-20 21:27:22 +000011314
Michael W. Hudson54241132001-12-07 15:38:26 +000011315
Guido van Rossume97ee181999-12-20 21:27:22 +000011316# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11317# loading of modules.
11318
Martin v. Löwis11437992002-04-12 09:54:03 +000011319echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11320echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011321if test -z "$DYNLOADFILE"
11322then
11323 case $ac_sys_system/$ac_sys_release in
11324 AIX*) DYNLOADFILE="dynload_aix.o";;
11325 BeOS*) DYNLOADFILE="dynload_beos.o";;
11326 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011327 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011328 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011329 *)
11330 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11331 # out any dynamic loading
11332 if test "$ac_cv_func_dlopen" = yes
11333 then DYNLOADFILE="dynload_shlib.o"
11334 else DYNLOADFILE="dynload_stub.o"
11335 fi
11336 ;;
11337 esac
11338fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011339echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11340echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011341if test "$DYNLOADFILE" != "dynload_stub.o"
11342then
Martin v. Löwis11437992002-04-12 09:54:03 +000011343
11344cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011345#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011346_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011347
11348fi
11349
Neil Schemenauer4e425612001-06-19 15:44:15 +000011350# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11351
Michael W. Hudson54241132001-12-07 15:38:26 +000011352
Martin v. Löwis11437992002-04-12 09:54:03 +000011353echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11354echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011355if test -z "$MACHDEP_OBJS"
11356then
Jack Jansene578a632001-08-15 01:27:14 +000011357 MACHDEP_OBJS=$extra_machdep_objs
11358else
11359 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011360fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011361echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11362echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011363
Guido van Rossum627b2d71993-12-24 10:39:16 +000011364# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011365
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
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011438
Fred Drake6b3cc522002-04-15 19:20:27 +000011439
Jack Jansen0b06be72002-06-21 14:48:38 +000011440
Martin v. Löwis244edc82001-10-04 22:44:26 +000011441for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011442 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011443 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011444 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011445 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011446 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011447 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011448 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011449 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011450 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011451 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011452do
Martin v. Löwis11437992002-04-12 09:54:03 +000011453as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11454echo "$as_me:$LINENO: checking for $ac_func" >&5
11455echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11456if eval "test \"\${$as_ac_var+set}\" = set"; then
11457 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011458else
Martin v. Löwis11437992002-04-12 09:54:03 +000011459 cat >conftest.$ac_ext <<_ACEOF
11460#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011461#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011462/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011463 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011464#include <assert.h>
11465/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011466#ifdef __cplusplus
11467extern "C"
11468#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011469/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 builtin and then its argument prototype would still apply. */
11471char $ac_func ();
11472char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011473
Martin v. Löwis11437992002-04-12 09:54:03 +000011474#ifdef F77_DUMMY_MAIN
11475# ifdef __cplusplus
11476 extern "C"
11477# endif
11478 int F77_DUMMY_MAIN() { return 1; }
11479#endif
11480int
11481main ()
11482{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011483/* The GNU C library defines this for functions which it implements
11484 to always fail with ENOSYS. Some functions are actually named
11485 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011486#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011487choke me
11488#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011489f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011490#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011491
Martin v. Löwis11437992002-04-12 09:54:03 +000011492 ;
11493 return 0;
11494}
11495_ACEOF
11496rm -f conftest.$ac_objext conftest$ac_exeext
11497if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11498 (eval $ac_link) 2>&5
11499 ac_status=$?
11500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11501 (exit $ac_status); } &&
11502 { ac_try='test -s conftest$ac_exeext'
11503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11504 (eval $ac_try) 2>&5
11505 ac_status=$?
11506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11507 (exit $ac_status); }; }; then
11508 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011509else
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 echo "$as_me: failed program was:" >&5
11511cat conftest.$ac_ext >&5
11512eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011513fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011514rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011515fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011516echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11517echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11518if test `eval echo '${'$as_ac_var'}'` = yes; then
11519 cat >>confdefs.h <<_ACEOF
11520#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11521_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011522
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011523fi
11524done
11525
Michael W. Hudson54241132001-12-07 15:38:26 +000011526
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011527# check for openpty and forkpty
11528
Martin v. Löwis11437992002-04-12 09:54:03 +000011529
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011530for ac_func in openpty
11531do
Martin v. Löwis11437992002-04-12 09:54:03 +000011532as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11533echo "$as_me:$LINENO: checking for $ac_func" >&5
11534echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11535if eval "test \"\${$as_ac_var+set}\" = set"; then
11536 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011537else
Martin v. Löwis11437992002-04-12 09:54:03 +000011538 cat >conftest.$ac_ext <<_ACEOF
11539#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011540#include "confdefs.h"
11541/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011542 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011543#include <assert.h>
11544/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011545#ifdef __cplusplus
11546extern "C"
11547#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011548/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011549 builtin and then its argument prototype would still apply. */
11550char $ac_func ();
11551char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011552
Martin v. Löwis11437992002-04-12 09:54:03 +000011553#ifdef F77_DUMMY_MAIN
11554# ifdef __cplusplus
11555 extern "C"
11556# endif
11557 int F77_DUMMY_MAIN() { return 1; }
11558#endif
11559int
11560main ()
11561{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011562/* The GNU C library defines this for functions which it implements
11563 to always fail with ENOSYS. Some functions are actually named
11564 something starting with __ and the normal name is an alias. */
11565#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11566choke me
11567#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011568f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011569#endif
11570
Martin v. Löwis11437992002-04-12 09:54:03 +000011571 ;
11572 return 0;
11573}
11574_ACEOF
11575rm -f conftest.$ac_objext conftest$ac_exeext
11576if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11577 (eval $ac_link) 2>&5
11578 ac_status=$?
11579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11580 (exit $ac_status); } &&
11581 { ac_try='test -s conftest$ac_exeext'
11582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11583 (eval $ac_try) 2>&5
11584 ac_status=$?
11585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11586 (exit $ac_status); }; }; then
11587 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011588else
Martin v. Löwis11437992002-04-12 09:54:03 +000011589 echo "$as_me: failed program was:" >&5
11590cat conftest.$ac_ext >&5
11591eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011593rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011594fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011595echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11596echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11597if test `eval echo '${'$as_ac_var'}'` = yes; then
11598 cat >>confdefs.h <<_ACEOF
11599#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11600_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011601
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011602else
Martin v. Löwis11437992002-04-12 09:54:03 +000011603 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11604echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11605if test "${ac_cv_lib_util_openpty+set}" = set; then
11606 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011607else
Martin v. Löwis11437992002-04-12 09:54:03 +000011608 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011609LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011610cat >conftest.$ac_ext <<_ACEOF
11611#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011612#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011613
Fred Drake8cef4cf2000-06-28 16:40:38 +000011614/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011615#ifdef __cplusplus
11616extern "C"
11617#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011618/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011619 builtin and then its argument prototype would still apply. */
11620char openpty ();
11621#ifdef F77_DUMMY_MAIN
11622# ifdef __cplusplus
11623 extern "C"
11624# endif
11625 int F77_DUMMY_MAIN() { return 1; }
11626#endif
11627int
11628main ()
11629{
11630openpty ();
11631 ;
11632 return 0;
11633}
11634_ACEOF
11635rm -f conftest.$ac_objext conftest$ac_exeext
11636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11637 (eval $ac_link) 2>&5
11638 ac_status=$?
11639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11640 (exit $ac_status); } &&
11641 { ac_try='test -s conftest$ac_exeext'
11642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11643 (eval $ac_try) 2>&5
11644 ac_status=$?
11645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11646 (exit $ac_status); }; }; then
11647 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011648else
Martin v. Löwis11437992002-04-12 09:54:03 +000011649 echo "$as_me: failed program was:" >&5
11650cat conftest.$ac_ext >&5
11651ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011652fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011653rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11654LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011655fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011656echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11657echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11658if test $ac_cv_lib_util_openpty = yes; then
11659 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011660#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011661_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011662 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011663fi
11664
11665fi
11666done
11667
Martin v. Löwis11437992002-04-12 09:54:03 +000011668
Fred Drake8cef4cf2000-06-28 16:40:38 +000011669for ac_func in forkpty
11670do
Martin v. Löwis11437992002-04-12 09:54:03 +000011671as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11672echo "$as_me:$LINENO: checking for $ac_func" >&5
11673echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11674if eval "test \"\${$as_ac_var+set}\" = set"; then
11675 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011676else
Martin v. Löwis11437992002-04-12 09:54:03 +000011677 cat >conftest.$ac_ext <<_ACEOF
11678#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011679#include "confdefs.h"
11680/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011681 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011682#include <assert.h>
11683/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011684#ifdef __cplusplus
11685extern "C"
11686#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011687/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011688 builtin and then its argument prototype would still apply. */
11689char $ac_func ();
11690char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011691
Martin v. Löwis11437992002-04-12 09:54:03 +000011692#ifdef F77_DUMMY_MAIN
11693# ifdef __cplusplus
11694 extern "C"
11695# endif
11696 int F77_DUMMY_MAIN() { return 1; }
11697#endif
11698int
11699main ()
11700{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011701/* The GNU C library defines this for functions which it implements
11702 to always fail with ENOSYS. Some functions are actually named
11703 something starting with __ and the normal name is an alias. */
11704#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11705choke me
11706#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011707f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011708#endif
11709
Martin v. Löwis11437992002-04-12 09:54:03 +000011710 ;
11711 return 0;
11712}
11713_ACEOF
11714rm -f conftest.$ac_objext conftest$ac_exeext
11715if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11716 (eval $ac_link) 2>&5
11717 ac_status=$?
11718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11719 (exit $ac_status); } &&
11720 { ac_try='test -s conftest$ac_exeext'
11721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11722 (eval $ac_try) 2>&5
11723 ac_status=$?
11724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11725 (exit $ac_status); }; }; then
11726 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011727else
Martin v. Löwis11437992002-04-12 09:54:03 +000011728 echo "$as_me: failed program was:" >&5
11729cat conftest.$ac_ext >&5
11730eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011731fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011732rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011733fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011734echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11735echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11736if test `eval echo '${'$as_ac_var'}'` = yes; then
11737 cat >>confdefs.h <<_ACEOF
11738#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11739_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011740
Fred Drake8cef4cf2000-06-28 16:40:38 +000011741else
Martin v. Löwis11437992002-04-12 09:54:03 +000011742 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11743echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11744if test "${ac_cv_lib_util_forkpty+set}" = set; then
11745 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011746else
Martin v. Löwis11437992002-04-12 09:54:03 +000011747 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011748LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011749cat >conftest.$ac_ext <<_ACEOF
11750#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011751#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011752
Fred Drake8cef4cf2000-06-28 16:40:38 +000011753/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011754#ifdef __cplusplus
11755extern "C"
11756#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011757/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011758 builtin and then its argument prototype would still apply. */
11759char forkpty ();
11760#ifdef F77_DUMMY_MAIN
11761# ifdef __cplusplus
11762 extern "C"
11763# endif
11764 int F77_DUMMY_MAIN() { return 1; }
11765#endif
11766int
11767main ()
11768{
11769forkpty ();
11770 ;
11771 return 0;
11772}
11773_ACEOF
11774rm -f conftest.$ac_objext conftest$ac_exeext
11775if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11776 (eval $ac_link) 2>&5
11777 ac_status=$?
11778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11779 (exit $ac_status); } &&
11780 { ac_try='test -s conftest$ac_exeext'
11781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11782 (eval $ac_try) 2>&5
11783 ac_status=$?
11784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11785 (exit $ac_status); }; }; then
11786 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011787else
Martin v. Löwis11437992002-04-12 09:54:03 +000011788 echo "$as_me: failed program was:" >&5
11789cat conftest.$ac_ext >&5
11790ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011791fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011792rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11793LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011794fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011795echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11796echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11797if test $ac_cv_lib_util_forkpty = yes; then
11798 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011799#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011800_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011801 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011802fi
11803
11804fi
11805done
11806
Jack Jansendd19cf82001-12-06 22:36:17 +000011807
Michael W. Hudson54241132001-12-07 15:38:26 +000011808# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011809
11810
11811
11812
11813
11814
Fred Drake8cef4cf2000-06-28 16:40:38 +000011815for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11816do
Martin v. Löwis11437992002-04-12 09:54:03 +000011817as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11818echo "$as_me:$LINENO: checking for $ac_func" >&5
11819echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11820if eval "test \"\${$as_ac_var+set}\" = set"; then
11821 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011822else
Martin v. Löwis11437992002-04-12 09:54:03 +000011823 cat >conftest.$ac_ext <<_ACEOF
11824#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011825#include "confdefs.h"
11826/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011827 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011828#include <assert.h>
11829/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011830#ifdef __cplusplus
11831extern "C"
11832#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011833/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011834 builtin and then its argument prototype would still apply. */
11835char $ac_func ();
11836char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011837
Martin v. Löwis11437992002-04-12 09:54:03 +000011838#ifdef F77_DUMMY_MAIN
11839# ifdef __cplusplus
11840 extern "C"
11841# endif
11842 int F77_DUMMY_MAIN() { return 1; }
11843#endif
11844int
11845main ()
11846{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011847/* The GNU C library defines this for functions which it implements
11848 to always fail with ENOSYS. Some functions are actually named
11849 something starting with __ and the normal name is an alias. */
11850#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11851choke me
11852#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011853f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011854#endif
11855
Martin v. Löwis11437992002-04-12 09:54:03 +000011856 ;
11857 return 0;
11858}
11859_ACEOF
11860rm -f conftest.$ac_objext conftest$ac_exeext
11861if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11862 (eval $ac_link) 2>&5
11863 ac_status=$?
11864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11865 (exit $ac_status); } &&
11866 { ac_try='test -s conftest$ac_exeext'
11867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11868 (eval $ac_try) 2>&5
11869 ac_status=$?
11870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11871 (exit $ac_status); }; }; then
11872 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011873else
Martin v. Löwis11437992002-04-12 09:54:03 +000011874 echo "$as_me: failed program was:" >&5
11875cat conftest.$ac_ext >&5
11876eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011877fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011878rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011879fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011880echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11881echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11882if test `eval echo '${'$as_ac_var'}'` = yes; then
11883 cat >>confdefs.h <<_ACEOF
11884#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11885_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011886
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011887fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011888done
11889
Michael W. Hudson54241132001-12-07 15:38:26 +000011890
Martin v. Löwis11437992002-04-12 09:54:03 +000011891
11892
11893
11894
11895
Martin v. Löwis1142de32002-03-29 16:28:31 +000011896for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011897do
Martin v. Löwis11437992002-04-12 09:54:03 +000011898as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11899echo "$as_me:$LINENO: checking for $ac_func" >&5
11900echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11901if eval "test \"\${$as_ac_var+set}\" = set"; then
11902 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011903else
Martin v. Löwis11437992002-04-12 09:54:03 +000011904 cat >conftest.$ac_ext <<_ACEOF
11905#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011906#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011907/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011908 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011909#include <assert.h>
11910/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011911#ifdef __cplusplus
11912extern "C"
11913#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011914/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011915 builtin and then its argument prototype would still apply. */
11916char $ac_func ();
11917char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011918
Martin v. Löwis11437992002-04-12 09:54:03 +000011919#ifdef F77_DUMMY_MAIN
11920# ifdef __cplusplus
11921 extern "C"
11922# endif
11923 int F77_DUMMY_MAIN() { return 1; }
11924#endif
11925int
11926main ()
11927{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011928/* The GNU C library defines this for functions which it implements
11929 to always fail with ENOSYS. Some functions are actually named
11930 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011931#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011932choke me
11933#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011934f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011935#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011936
Martin v. Löwis11437992002-04-12 09:54:03 +000011937 ;
11938 return 0;
11939}
11940_ACEOF
11941rm -f conftest.$ac_objext conftest$ac_exeext
11942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11943 (eval $ac_link) 2>&5
11944 ac_status=$?
11945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11946 (exit $ac_status); } &&
11947 { ac_try='test -s conftest$ac_exeext'
11948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11949 (eval $ac_try) 2>&5
11950 ac_status=$?
11951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11952 (exit $ac_status); }; }; then
11953 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011954else
Martin v. Löwis11437992002-04-12 09:54:03 +000011955 echo "$as_me: failed program was:" >&5
11956cat conftest.$ac_ext >&5
11957eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011958fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011959rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011960fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011961echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11962echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11963if test `eval echo '${'$as_ac_var'}'` = yes; then
11964 cat >>confdefs.h <<_ACEOF
11965#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11966_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011967
Martin v. Löwis1142de32002-03-29 16:28:31 +000011968else
Martin v. Löwis11437992002-04-12 09:54:03 +000011969 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011970fi
11971done
11972
11973
Martin v. Löwis11437992002-04-12 09:54:03 +000011974
Martin v. Löwis1142de32002-03-29 16:28:31 +000011975for ac_func in getpgrp
11976do
Martin v. Löwis11437992002-04-12 09:54:03 +000011977as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11978echo "$as_me:$LINENO: checking for $ac_func" >&5
11979echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11980if eval "test \"\${$as_ac_var+set}\" = set"; then
11981 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011982else
Martin v. Löwis11437992002-04-12 09:54:03 +000011983 cat >conftest.$ac_ext <<_ACEOF
11984#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011985#include "confdefs.h"
11986/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011987 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011988#include <assert.h>
11989/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011990#ifdef __cplusplus
11991extern "C"
11992#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011993/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011994 builtin and then its argument prototype would still apply. */
11995char $ac_func ();
11996char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011997
Martin v. Löwis11437992002-04-12 09:54:03 +000011998#ifdef F77_DUMMY_MAIN
11999# ifdef __cplusplus
12000 extern "C"
12001# endif
12002 int F77_DUMMY_MAIN() { return 1; }
12003#endif
12004int
12005main ()
12006{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012007/* The GNU C library defines this for functions which it implements
12008 to always fail with ENOSYS. Some functions are actually named
12009 something starting with __ and the normal name is an alias. */
12010#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12011choke me
12012#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012013f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012014#endif
12015
Martin v. Löwis11437992002-04-12 09:54:03 +000012016 ;
12017 return 0;
12018}
12019_ACEOF
12020rm -f conftest.$ac_objext conftest$ac_exeext
12021if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12022 (eval $ac_link) 2>&5
12023 ac_status=$?
12024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12025 (exit $ac_status); } &&
12026 { ac_try='test -s conftest$ac_exeext'
12027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12028 (eval $ac_try) 2>&5
12029 ac_status=$?
12030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12031 (exit $ac_status); }; }; then
12032 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012033else
Martin v. Löwis11437992002-04-12 09:54:03 +000012034 echo "$as_me: failed program was:" >&5
12035cat conftest.$ac_ext >&5
12036eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012037fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012038rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012039fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012040echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12041echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12042if test `eval echo '${'$as_ac_var'}'` = yes; then
12043 cat >>confdefs.h <<_ACEOF
12044#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12045_ACEOF
12046 cat >conftest.$ac_ext <<_ACEOF
12047#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012048#include "confdefs.h"
12049#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012050#ifdef F77_DUMMY_MAIN
12051# ifdef __cplusplus
12052 extern "C"
12053# endif
12054 int F77_DUMMY_MAIN() { return 1; }
12055#endif
12056int
12057main ()
12058{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012059getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012060 ;
12061 return 0;
12062}
12063_ACEOF
12064rm -f conftest.$ac_objext
12065if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12066 (eval $ac_compile) 2>&5
12067 ac_status=$?
12068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12069 (exit $ac_status); } &&
12070 { ac_try='test -s conftest.$ac_objext'
12071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12072 (eval $ac_try) 2>&5
12073 ac_status=$?
12074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12075 (exit $ac_status); }; }; then
12076
12077cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012078#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012079_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012080
Martin v. Löwis11437992002-04-12 09:54:03 +000012081
Guido van Rossumf78abae1997-01-21 22:02:36 +000012082else
Martin v. Löwis11437992002-04-12 09:54:03 +000012083 echo "$as_me: failed program was:" >&5
12084cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012085fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012086rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012087
Guido van Rossum627b2d71993-12-24 10:39:16 +000012088fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012089done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012090
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012091echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12092echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12093if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012094 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012095else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012096 if test "$cross_compiling" = yes; then
12097 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12098echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12099 { (exit 1); exit 1; }; }
12100else
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 cat >conftest.$ac_ext <<_ACEOF
12102#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012103#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012104#if HAVE_UNISTD_H
12105# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012106#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012107
Martin v. Löwis11437992002-04-12 09:54:03 +000012108#ifdef F77_DUMMY_MAIN
12109# ifdef __cplusplus
12110 extern "C"
12111# endif
12112 int F77_DUMMY_MAIN() { return 1; }
12113#endif
12114int
12115main ()
12116{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012117/* If this system has a BSD-style setpgrp which takes arguments,
12118 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12119 exit successfully. */
12120 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012121 ;
12122 return 0;
12123}
12124_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012125rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12127 (eval $ac_link) 2>&5
12128 ac_status=$?
12129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012130 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12132 (eval $ac_try) 2>&5
12133 ac_status=$?
12134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12135 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012136 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012137else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012138 echo "$as_me: program exited with status $ac_status" >&5
12139echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012140cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012141( exit $ac_status )
12142ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012143fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012144rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012145fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012146fi
12147echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12148echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12149if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012150
12151cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012152#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012153_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012154
12155fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012156
Martin v. Löwis11437992002-04-12 09:54:03 +000012157
Thomas Wouters3a584202000-08-05 23:28:51 +000012158for ac_func in gettimeofday
12159do
Martin v. Löwis11437992002-04-12 09:54:03 +000012160as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12161echo "$as_me:$LINENO: checking for $ac_func" >&5
12162echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12163if eval "test \"\${$as_ac_var+set}\" = set"; then
12164 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012165else
Martin v. Löwis11437992002-04-12 09:54:03 +000012166 cat >conftest.$ac_ext <<_ACEOF
12167#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012168#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012169/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012170 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012171#include <assert.h>
12172/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012173#ifdef __cplusplus
12174extern "C"
12175#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012176/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012177 builtin and then its argument prototype would still apply. */
12178char $ac_func ();
12179char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012180
Martin v. Löwis11437992002-04-12 09:54:03 +000012181#ifdef F77_DUMMY_MAIN
12182# ifdef __cplusplus
12183 extern "C"
12184# endif
12185 int F77_DUMMY_MAIN() { return 1; }
12186#endif
12187int
12188main ()
12189{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012190/* The GNU C library defines this for functions which it implements
12191 to always fail with ENOSYS. Some functions are actually named
12192 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012193#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012194choke me
12195#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012196f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012197#endif
12198
Martin v. Löwis11437992002-04-12 09:54:03 +000012199 ;
12200 return 0;
12201}
12202_ACEOF
12203rm -f conftest.$ac_objext conftest$ac_exeext
12204if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12205 (eval $ac_link) 2>&5
12206 ac_status=$?
12207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12208 (exit $ac_status); } &&
12209 { ac_try='test -s conftest$ac_exeext'
12210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12211 (eval $ac_try) 2>&5
12212 ac_status=$?
12213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12214 (exit $ac_status); }; }; then
12215 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012216else
Martin v. Löwis11437992002-04-12 09:54:03 +000012217 echo "$as_me: failed program was:" >&5
12218cat conftest.$ac_ext >&5
12219eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012220fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012221rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012223echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12224echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12225if test `eval echo '${'$as_ac_var'}'` = yes; then
12226 cat >>confdefs.h <<_ACEOF
12227#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12228_ACEOF
12229 cat >conftest.$ac_ext <<_ACEOF
12230#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012231#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012232#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012233#ifdef F77_DUMMY_MAIN
12234# ifdef __cplusplus
12235 extern "C"
12236# endif
12237 int F77_DUMMY_MAIN() { return 1; }
12238#endif
12239int
12240main ()
12241{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012242gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012243 ;
12244 return 0;
12245}
12246_ACEOF
12247rm -f conftest.$ac_objext
12248if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12249 (eval $ac_compile) 2>&5
12250 ac_status=$?
12251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12252 (exit $ac_status); } &&
12253 { ac_try='test -s conftest.$ac_objext'
12254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12255 (eval $ac_try) 2>&5
12256 ac_status=$?
12257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12258 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012259 :
12260else
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 echo "$as_me: failed program was:" >&5
12262cat conftest.$ac_ext >&5
12263
12264cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012265#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012266_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012267
Martin v. Löwis11437992002-04-12 09:54:03 +000012268
Guido van Rossum627b2d71993-12-24 10:39:16 +000012269fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012270rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012271
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012272fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012273done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012274
Michael W. Hudson54241132001-12-07 15:38:26 +000012275
12276
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012277# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012278# for [no]getaddrinfo in netdb.h.
12279echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12280echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12281cat >conftest.$ac_ext <<_ACEOF
12282#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012283#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012284
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012285#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012286#include <sys/socket.h>
12287#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012288#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012289
Martin v. Löwis11437992002-04-12 09:54:03 +000012290#ifdef F77_DUMMY_MAIN
12291# ifdef __cplusplus
12292 extern "C"
12293# endif
12294 int F77_DUMMY_MAIN() { return 1; }
12295#endif
12296int
12297main ()
12298{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012299
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012300getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012301
Martin v. Löwis11437992002-04-12 09:54:03 +000012302 ;
12303 return 0;
12304}
12305_ACEOF
12306rm -f conftest.$ac_objext conftest$ac_exeext
12307if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12308 (eval $ac_link) 2>&5
12309 ac_status=$?
12310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12311 (exit $ac_status); } &&
12312 { ac_try='test -s conftest$ac_exeext'
12313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12314 (eval $ac_try) 2>&5
12315 ac_status=$?
12316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12317 (exit $ac_status); }; }; then
12318
12319echo "$as_me:$LINENO: result: yes" >&5
12320echo "${ECHO_T}yes" >&6
12321echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12322echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012323if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012324 echo "$as_me:$LINENO: result: buggy" >&5
12325echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012326buggygetaddrinfo=yes
12327else
Martin v. Löwis11437992002-04-12 09:54:03 +000012328 cat >conftest.$ac_ext <<_ACEOF
12329#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012330#include "confdefs.h"
12331
12332#include <sys/types.h>
12333#include <netdb.h>
12334#include <string.h>
12335#include <sys/socket.h>
12336#include <netinet/in.h>
12337
12338main()
12339{
12340 int passive, gaierr, inet4 = 0, inet6 = 0;
12341 struct addrinfo hints, *ai, *aitop;
12342 char straddr[INET6_ADDRSTRLEN], strport[16];
12343
12344 for (passive = 0; passive <= 1; passive++) {
12345 memset(&hints, 0, sizeof(hints));
12346 hints.ai_family = AF_UNSPEC;
12347 hints.ai_flags = passive ? AI_PASSIVE : 0;
12348 hints.ai_socktype = SOCK_STREAM;
12349 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12350 (void)gai_strerror(gaierr);
12351 goto bad;
12352 }
12353 for (ai = aitop; ai; ai = ai->ai_next) {
12354 if (ai->ai_addr == NULL ||
12355 ai->ai_addrlen == 0 ||
12356 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12357 straddr, sizeof(straddr), strport, sizeof(strport),
12358 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12359 goto bad;
12360 }
12361 switch (ai->ai_family) {
12362 case AF_INET:
12363 if (strcmp(strport, "54321") != 0) {
12364 goto bad;
12365 }
12366 if (passive) {
12367 if (strcmp(straddr, "0.0.0.0") != 0) {
12368 goto bad;
12369 }
12370 } else {
12371 if (strcmp(straddr, "127.0.0.1") != 0) {
12372 goto bad;
12373 }
12374 }
12375 inet4++;
12376 break;
12377 case AF_INET6:
12378 if (strcmp(strport, "54321") != 0) {
12379 goto bad;
12380 }
12381 if (passive) {
12382 if (strcmp(straddr, "::") != 0) {
12383 goto bad;
12384 }
12385 } else {
12386 if (strcmp(straddr, "::1") != 0) {
12387 goto bad;
12388 }
12389 }
12390 inet6++;
12391 break;
12392 case AF_UNSPEC:
12393 goto bad;
12394 break;
12395 default:
12396 /* another family support? */
12397 break;
12398 }
12399 }
12400 }
12401
12402 if (!(inet4 == 0 || inet4 == 2))
12403 goto bad;
12404 if (!(inet6 == 0 || inet6 == 2))
12405 goto bad;
12406
12407 if (aitop)
12408 freeaddrinfo(aitop);
12409 exit(0);
12410
12411 bad:
12412 if (aitop)
12413 freeaddrinfo(aitop);
12414 exit(1);
12415}
12416
Martin v. Löwis11437992002-04-12 09:54:03 +000012417_ACEOF
12418rm -f conftest$ac_exeext
12419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12420 (eval $ac_link) 2>&5
12421 ac_status=$?
12422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12423 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12425 (eval $ac_try) 2>&5
12426 ac_status=$?
12427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12428 (exit $ac_status); }; }; then
12429 echo "$as_me:$LINENO: result: good" >&5
12430echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012431buggygetaddrinfo=no
12432else
Martin v. Löwis11437992002-04-12 09:54:03 +000012433 echo "$as_me: program exited with status $ac_status" >&5
12434echo "$as_me: failed program was:" >&5
12435cat conftest.$ac_ext >&5
12436( exit $ac_status )
12437echo "$as_me:$LINENO: result: buggy" >&5
12438echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012439buggygetaddrinfo=yes
12440fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012441rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012442fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012443else
Martin v. Löwis11437992002-04-12 09:54:03 +000012444 echo "$as_me: failed program was:" >&5
12445cat conftest.$ac_ext >&5
12446
12447echo "$as_me:$LINENO: result: no" >&5
12448echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012449buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012450
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012451fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012452rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012453
12454if test "$buggygetaddrinfo" = "yes"; then
12455 if test "$ipv6" = "yes"; then
12456 echo 'Fatal: You must get working getaddrinfo() function.'
12457 echo ' or you can specify "--disable-ipv6"'.
12458 exit 1
12459 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012460else
Martin v. Löwis11437992002-04-12 09:54:03 +000012461
12462cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012463#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012464_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012465
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012466fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012467
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012468for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012469do
Martin v. Löwis11437992002-04-12 09:54:03 +000012470as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12471echo "$as_me:$LINENO: checking for $ac_func" >&5
12472echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12473if eval "test \"\${$as_ac_var+set}\" = set"; then
12474 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012475else
Martin v. Löwis11437992002-04-12 09:54:03 +000012476 cat >conftest.$ac_ext <<_ACEOF
12477#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012478#include "confdefs.h"
12479/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012480 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012481#include <assert.h>
12482/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012483#ifdef __cplusplus
12484extern "C"
12485#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012486/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012487 builtin and then its argument prototype would still apply. */
12488char $ac_func ();
12489char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012490
Martin v. Löwis11437992002-04-12 09:54:03 +000012491#ifdef F77_DUMMY_MAIN
12492# ifdef __cplusplus
12493 extern "C"
12494# endif
12495 int F77_DUMMY_MAIN() { return 1; }
12496#endif
12497int
12498main ()
12499{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012500/* The GNU C library defines this for functions which it implements
12501 to always fail with ENOSYS. Some functions are actually named
12502 something starting with __ and the normal name is an alias. */
12503#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12504choke me
12505#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012506f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012507#endif
12508
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 ;
12510 return 0;
12511}
12512_ACEOF
12513rm -f conftest.$ac_objext conftest$ac_exeext
12514if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12515 (eval $ac_link) 2>&5
12516 ac_status=$?
12517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12518 (exit $ac_status); } &&
12519 { ac_try='test -s conftest$ac_exeext'
12520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12521 (eval $ac_try) 2>&5
12522 ac_status=$?
12523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12524 (exit $ac_status); }; }; then
12525 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012526else
Martin v. Löwis11437992002-04-12 09:54:03 +000012527 echo "$as_me: failed program was:" >&5
12528cat conftest.$ac_ext >&5
12529eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012530fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012531rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012532fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012533echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12534echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12535if test `eval echo '${'$as_ac_var'}'` = yes; then
12536 cat >>confdefs.h <<_ACEOF
12537#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12538_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012539
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012540fi
12541done
12542
Michael W. Hudson54241132001-12-07 15:38:26 +000012543
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012544# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012545echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12546echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12547if test "${ac_cv_header_time+set}" = set; then
12548 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012549else
Martin v. Löwis11437992002-04-12 09:54:03 +000012550 cat >conftest.$ac_ext <<_ACEOF
12551#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012552#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012553#include <sys/types.h>
12554#include <sys/time.h>
12555#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012556
12557#ifdef F77_DUMMY_MAIN
12558# ifdef __cplusplus
12559 extern "C"
12560# endif
12561 int F77_DUMMY_MAIN() { return 1; }
12562#endif
12563int
12564main ()
12565{
12566if ((struct tm *) 0)
12567return 0;
12568 ;
12569 return 0;
12570}
12571_ACEOF
12572rm -f conftest.$ac_objext
12573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12574 (eval $ac_compile) 2>&5
12575 ac_status=$?
12576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12577 (exit $ac_status); } &&
12578 { ac_try='test -s conftest.$ac_objext'
12579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12580 (eval $ac_try) 2>&5
12581 ac_status=$?
12582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12583 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012584 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012585else
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 echo "$as_me: failed program was:" >&5
12587cat conftest.$ac_ext >&5
12588ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012590rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012591fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012592echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12593echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012594if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012595
12596cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012597#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012598_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012599
12600fi
12601
Martin v. Löwis11437992002-04-12 09:54:03 +000012602echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12603echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12604if test "${ac_cv_struct_tm+set}" = set; then
12605 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012606else
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 cat >conftest.$ac_ext <<_ACEOF
12608#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012609#include "confdefs.h"
12610#include <sys/types.h>
12611#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012612
12613#ifdef F77_DUMMY_MAIN
12614# ifdef __cplusplus
12615 extern "C"
12616# endif
12617 int F77_DUMMY_MAIN() { return 1; }
12618#endif
12619int
12620main ()
12621{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012622struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 ;
12624 return 0;
12625}
12626_ACEOF
12627rm -f conftest.$ac_objext
12628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12629 (eval $ac_compile) 2>&5
12630 ac_status=$?
12631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12632 (exit $ac_status); } &&
12633 { ac_try='test -s conftest.$ac_objext'
12634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12635 (eval $ac_try) 2>&5
12636 ac_status=$?
12637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12638 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012639 ac_cv_struct_tm=time.h
12640else
Martin v. Löwis11437992002-04-12 09:54:03 +000012641 echo "$as_me: failed program was:" >&5
12642cat conftest.$ac_ext >&5
12643ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012644fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012645rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012646fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012647echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12648echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012649if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012650
12651cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012652#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012653_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012654
12655fi
12656
Martin v. Löwis11437992002-04-12 09:54:03 +000012657echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12658echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12659if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12660 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012661else
Martin v. Löwis11437992002-04-12 09:54:03 +000012662 cat >conftest.$ac_ext <<_ACEOF
12663#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012664#include "confdefs.h"
12665#include <sys/types.h>
12666#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012667
12668
12669#ifdef F77_DUMMY_MAIN
12670# ifdef __cplusplus
12671 extern "C"
12672# endif
12673 int F77_DUMMY_MAIN() { return 1; }
12674#endif
12675int
12676main ()
12677{
12678static struct tm ac_aggr;
12679if (ac_aggr.tm_zone)
12680return 0;
12681 ;
12682 return 0;
12683}
12684_ACEOF
12685rm -f conftest.$ac_objext
12686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12687 (eval $ac_compile) 2>&5
12688 ac_status=$?
12689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12690 (exit $ac_status); } &&
12691 { ac_try='test -s conftest.$ac_objext'
12692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12693 (eval $ac_try) 2>&5
12694 ac_status=$?
12695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12696 (exit $ac_status); }; }; then
12697 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012698else
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 echo "$as_me: failed program was:" >&5
12700cat conftest.$ac_ext >&5
12701ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012702fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012703rm -f conftest.$ac_objext conftest.$ac_ext
12704fi
12705echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12706echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12707if test $ac_cv_member_struct_tm_tm_zone = yes; then
12708
12709cat >>confdefs.h <<_ACEOF
12710#define HAVE_STRUCT_TM_TM_ZONE 1
12711_ACEOF
12712
12713
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012714fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012715
Martin v. Löwis11437992002-04-12 09:54:03 +000012716if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12717
12718cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012719#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012720_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012721
12722else
Martin v. Löwis11437992002-04-12 09:54:03 +000012723 echo "$as_me:$LINENO: checking for tzname" >&5
12724echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12725if test "${ac_cv_var_tzname+set}" = set; then
12726 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012727else
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 cat >conftest.$ac_ext <<_ACEOF
12729#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012730#include "confdefs.h"
12731#include <time.h>
12732#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012733extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012735
12736#ifdef F77_DUMMY_MAIN
12737# ifdef __cplusplus
12738 extern "C"
12739# endif
12740 int F77_DUMMY_MAIN() { return 1; }
12741#endif
12742int
12743main ()
12744{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012745atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 ;
12747 return 0;
12748}
12749_ACEOF
12750rm -f conftest.$ac_objext conftest$ac_exeext
12751if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12752 (eval $ac_link) 2>&5
12753 ac_status=$?
12754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12755 (exit $ac_status); } &&
12756 { ac_try='test -s conftest$ac_exeext'
12757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12758 (eval $ac_try) 2>&5
12759 ac_status=$?
12760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12761 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012762 ac_cv_var_tzname=yes
12763else
Martin v. Löwis11437992002-04-12 09:54:03 +000012764 echo "$as_me: failed program was:" >&5
12765cat conftest.$ac_ext >&5
12766ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012767fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012768rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012769fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012770echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12771echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012772 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012773
12774cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012775#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012776_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012777
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012778 fi
12779fi
12780
Jack Jansendd19cf82001-12-06 22:36:17 +000012781
Martin v. Löwis11437992002-04-12 09:54:03 +000012782echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12783echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12784if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12785 echo $ECHO_N "(cached) $ECHO_C" >&6
12786else
12787 cat >conftest.$ac_ext <<_ACEOF
12788#line $LINENO "configure"
12789#include "confdefs.h"
12790$ac_includes_default
12791#ifdef F77_DUMMY_MAIN
12792# ifdef __cplusplus
12793 extern "C"
12794# endif
12795 int F77_DUMMY_MAIN() { return 1; }
12796#endif
12797int
12798main ()
12799{
12800static struct stat ac_aggr;
12801if (ac_aggr.st_rdev)
12802return 0;
12803 ;
12804 return 0;
12805}
12806_ACEOF
12807rm -f conftest.$ac_objext
12808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12809 (eval $ac_compile) 2>&5
12810 ac_status=$?
12811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12812 (exit $ac_status); } &&
12813 { ac_try='test -s conftest.$ac_objext'
12814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12815 (eval $ac_try) 2>&5
12816 ac_status=$?
12817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12818 (exit $ac_status); }; }; then
12819 ac_cv_member_struct_stat_st_rdev=yes
12820else
12821 echo "$as_me: failed program was:" >&5
12822cat conftest.$ac_ext >&5
12823ac_cv_member_struct_stat_st_rdev=no
12824fi
12825rm -f conftest.$ac_objext conftest.$ac_ext
12826fi
12827echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12828echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12829if test $ac_cv_member_struct_stat_st_rdev = yes; then
12830
12831cat >>confdefs.h <<_ACEOF
12832#define HAVE_STRUCT_STAT_ST_RDEV 1
12833_ACEOF
12834
12835
12836cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012837#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012838_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012839
12840fi
12841
Martin v. Löwis11437992002-04-12 09:54:03 +000012842
12843
12844echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12845echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12846if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12847 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012848else
Martin v. Löwis11437992002-04-12 09:54:03 +000012849 cat >conftest.$ac_ext <<_ACEOF
12850#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012851#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012852$ac_includes_default
12853#ifdef F77_DUMMY_MAIN
12854# ifdef __cplusplus
12855 extern "C"
12856# endif
12857 int F77_DUMMY_MAIN() { return 1; }
12858#endif
12859int
12860main ()
12861{
12862static struct stat ac_aggr;
12863if (ac_aggr.st_blksize)
12864return 0;
12865 ;
12866 return 0;
12867}
12868_ACEOF
12869rm -f conftest.$ac_objext
12870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12871 (eval $ac_compile) 2>&5
12872 ac_status=$?
12873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12874 (exit $ac_status); } &&
12875 { ac_try='test -s conftest.$ac_objext'
12876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12877 (eval $ac_try) 2>&5
12878 ac_status=$?
12879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12880 (exit $ac_status); }; }; then
12881 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012882else
Martin v. Löwis11437992002-04-12 09:54:03 +000012883 echo "$as_me: failed program was:" >&5
12884cat conftest.$ac_ext >&5
12885ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012886fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012887rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012888fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012889echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12890echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12891if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012892
Martin v. Löwis11437992002-04-12 09:54:03 +000012893cat >>confdefs.h <<_ACEOF
12894#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12895_ACEOF
12896
12897
12898cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012899#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012900_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012901
12902fi
12903
Martin v. Löwis11437992002-04-12 09:54:03 +000012904
12905echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12906echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12907if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12908 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012909else
Martin v. Löwis11437992002-04-12 09:54:03 +000012910 cat >conftest.$ac_ext <<_ACEOF
12911#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012912#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012913$ac_includes_default
12914#ifdef F77_DUMMY_MAIN
12915# ifdef __cplusplus
12916 extern "C"
12917# endif
12918 int F77_DUMMY_MAIN() { return 1; }
12919#endif
12920int
12921main ()
12922{
12923static struct stat ac_aggr;
12924if (ac_aggr.st_blocks)
12925return 0;
12926 ;
12927 return 0;
12928}
12929_ACEOF
12930rm -f conftest.$ac_objext
12931if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12932 (eval $ac_compile) 2>&5
12933 ac_status=$?
12934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12935 (exit $ac_status); } &&
12936 { ac_try='test -s conftest.$ac_objext'
12937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12938 (eval $ac_try) 2>&5
12939 ac_status=$?
12940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12941 (exit $ac_status); }; }; then
12942 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012943else
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 echo "$as_me: failed program was:" >&5
12945cat conftest.$ac_ext >&5
12946ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012947fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012948rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012949fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012950echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12951echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12952if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012953
Martin v. Löwis11437992002-04-12 09:54:03 +000012954cat >>confdefs.h <<_ACEOF
12955#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12956_ACEOF
12957
12958
12959cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012960#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012961_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012962
12963else
Martin v. Löwis11437992002-04-12 09:54:03 +000012964 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012965fi
12966
Michael W. Hudson54241132001-12-07 15:38:26 +000012967
Martin v. Löwis11437992002-04-12 09:54:03 +000012968
12969echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
12970echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
12971if test "${ac_cv_header_time_altzone+set}" = set; then
12972 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012973else
Martin v. Löwis11437992002-04-12 09:54:03 +000012974 cat >conftest.$ac_ext <<_ACEOF
12975#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012976#include "confdefs.h"
12977#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012978#ifdef F77_DUMMY_MAIN
12979# ifdef __cplusplus
12980 extern "C"
12981# endif
12982 int F77_DUMMY_MAIN() { return 1; }
12983#endif
12984int
12985main ()
12986{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012987return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 ;
12989 return 0;
12990}
12991_ACEOF
12992rm -f conftest.$ac_objext
12993if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12994 (eval $ac_compile) 2>&5
12995 ac_status=$?
12996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12997 (exit $ac_status); } &&
12998 { ac_try='test -s conftest.$ac_objext'
12999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13000 (eval $ac_try) 2>&5
13001 ac_status=$?
13002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13003 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013004 ac_cv_header_time_altzone=yes
13005else
Martin v. Löwis11437992002-04-12 09:54:03 +000013006 echo "$as_me: failed program was:" >&5
13007cat conftest.$ac_ext >&5
13008ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013009fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013010rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013011fi
13012
Martin v. Löwis11437992002-04-12 09:54:03 +000013013echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13014echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013015if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013016
13017cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013018#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013019_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013020
13021fi
13022
Guido van Rossumda88dad1995-01-26 00:46:29 +000013023was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013024echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13025echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13026cat >conftest.$ac_ext <<_ACEOF
13027#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013028#include "confdefs.h"
13029
13030#include <sys/types.h>
13031#include <sys/select.h>
13032#include <sys/time.h>
13033
Martin v. Löwis11437992002-04-12 09:54:03 +000013034#ifdef F77_DUMMY_MAIN
13035# ifdef __cplusplus
13036 extern "C"
13037# endif
13038 int F77_DUMMY_MAIN() { return 1; }
13039#endif
13040int
13041main ()
13042{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013043;
Martin v. Löwis11437992002-04-12 09:54:03 +000013044 ;
13045 return 0;
13046}
13047_ACEOF
13048rm -f conftest.$ac_objext
13049if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13050 (eval $ac_compile) 2>&5
13051 ac_status=$?
13052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13053 (exit $ac_status); } &&
13054 { ac_try='test -s conftest.$ac_objext'
13055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13056 (eval $ac_try) 2>&5
13057 ac_status=$?
13058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13059 (exit $ac_status); }; }; then
13060
13061
13062cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013063#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013064_ACEOF
13065
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013066 was_it_defined=yes
13067
Guido van Rossumf78abae1997-01-21 22:02:36 +000013068else
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 echo "$as_me: failed program was:" >&5
13070cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013071fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013072rm -f conftest.$ac_objext conftest.$ac_ext
13073echo "$as_me:$LINENO: result: $was_it_defined" >&5
13074echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013075
Martin v. Löwis11437992002-04-12 09:54:03 +000013076echo "$as_me:$LINENO: checking for addrinfo" >&5
13077echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13078if test "${ac_cv_struct_addrinfo+set}" = set; then
13079 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013080else
Martin v. Löwis11437992002-04-12 09:54:03 +000013081 cat >conftest.$ac_ext <<_ACEOF
13082#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013083#include "confdefs.h"
13084
13085# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013086#ifdef F77_DUMMY_MAIN
13087# ifdef __cplusplus
13088 extern "C"
13089# endif
13090 int F77_DUMMY_MAIN() { return 1; }
13091#endif
13092int
13093main ()
13094{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013095struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013096 ;
13097 return 0;
13098}
13099_ACEOF
13100rm -f conftest.$ac_objext
13101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13102 (eval $ac_compile) 2>&5
13103 ac_status=$?
13104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13105 (exit $ac_status); } &&
13106 { ac_try='test -s conftest.$ac_objext'
13107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13108 (eval $ac_try) 2>&5
13109 ac_status=$?
13110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13111 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013112 ac_cv_struct_addrinfo=yes
13113else
Martin v. Löwis11437992002-04-12 09:54:03 +000013114 echo "$as_me: failed program was:" >&5
13115cat conftest.$ac_ext >&5
13116ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013117fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013118rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013119fi
13120
Martin v. Löwis11437992002-04-12 09:54:03 +000013121echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13122echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013123if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013124
13125cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013126#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013127_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013128
13129fi
13130
Martin v. Löwis11437992002-04-12 09:54:03 +000013131echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13132echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13133if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13134 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013135else
Martin v. Löwis11437992002-04-12 09:54:03 +000013136 cat >conftest.$ac_ext <<_ACEOF
13137#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013138#include "confdefs.h"
13139
13140# include <sys/types.h>
13141# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013142#ifdef F77_DUMMY_MAIN
13143# ifdef __cplusplus
13144 extern "C"
13145# endif
13146 int F77_DUMMY_MAIN() { return 1; }
13147#endif
13148int
13149main ()
13150{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013151struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013152 ;
13153 return 0;
13154}
13155_ACEOF
13156rm -f conftest.$ac_objext
13157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13158 (eval $ac_compile) 2>&5
13159 ac_status=$?
13160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13161 (exit $ac_status); } &&
13162 { ac_try='test -s conftest.$ac_objext'
13163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13164 (eval $ac_try) 2>&5
13165 ac_status=$?
13166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13167 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013168 ac_cv_struct_sockaddr_storage=yes
13169else
Martin v. Löwis11437992002-04-12 09:54:03 +000013170 echo "$as_me: failed program was:" >&5
13171cat conftest.$ac_ext >&5
13172ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013173fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013174rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013175fi
13176
Martin v. Löwis11437992002-04-12 09:54:03 +000013177echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13178echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013179if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013180
13181cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013182#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013183_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013184
13185fi
13186
Guido van Rossum627b2d71993-12-24 10:39:16 +000013187# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013188
Michael W. Hudson54241132001-12-07 15:38:26 +000013189
Martin v. Löwis11437992002-04-12 09:54:03 +000013190echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13191echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13192if test "${ac_cv_c_char_unsigned+set}" = set; then
13193 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013194else
Martin v. Löwis11437992002-04-12 09:54:03 +000013195 cat >conftest.$ac_ext <<_ACEOF
13196#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013197#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013198$ac_includes_default
13199#ifdef F77_DUMMY_MAIN
13200# ifdef __cplusplus
13201 extern "C"
13202# endif
13203 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013205int
13206main ()
13207{
13208static int test_array [1 - 2 * !(((char) -1) < 0)];
13209test_array [0] = 0
13210
13211 ;
13212 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013213}
Martin v. Löwis11437992002-04-12 09:54:03 +000013214_ACEOF
13215rm -f conftest.$ac_objext
13216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13217 (eval $ac_compile) 2>&5
13218 ac_status=$?
13219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13220 (exit $ac_status); } &&
13221 { ac_try='test -s conftest.$ac_objext'
13222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13223 (eval $ac_try) 2>&5
13224 ac_status=$?
13225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13226 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013227 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013228else
13229 echo "$as_me: failed program was:" >&5
13230cat conftest.$ac_ext >&5
13231ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013232fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013233rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013234fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013235echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13236echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013237if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013238 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013239#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013240_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013241
13242fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013243
Martin v. Löwis11437992002-04-12 09:54:03 +000013244echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13245echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13246if test "${ac_cv_prog_cc_stdc+set}" = set; then
13247 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013248else
Martin v. Löwis11437992002-04-12 09:54:03 +000013249 ac_cv_prog_cc_stdc=no
13250ac_save_CC=$CC
13251cat >conftest.$ac_ext <<_ACEOF
13252#line $LINENO "configure"
13253#include "confdefs.h"
13254#include <stdarg.h>
13255#include <stdio.h>
13256#include <sys/types.h>
13257#include <sys/stat.h>
13258/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13259struct buf { int x; };
13260FILE * (*rcsopen) (struct buf *, struct stat *, int);
13261static char *e (p, i)
13262 char **p;
13263 int i;
13264{
13265 return p[i];
13266}
13267static char *f (char * (*g) (char **, int), char **p, ...)
13268{
13269 char *s;
13270 va_list v;
13271 va_start (v,p);
13272 s = g (p, va_arg (v,int));
13273 va_end (v);
13274 return s;
13275}
13276int test (int i, double x);
13277struct s1 {int (*f) (int a);};
13278struct s2 {int (*f) (double a);};
13279int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13280int argc;
13281char **argv;
13282#ifdef F77_DUMMY_MAIN
13283# ifdef __cplusplus
13284 extern "C"
13285# endif
13286 int F77_DUMMY_MAIN() { return 1; }
13287#endif
13288int
13289main ()
13290{
13291return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13292 ;
13293 return 0;
13294}
13295_ACEOF
13296# Don't try gcc -ansi; that turns off useful extensions and
13297# breaks some systems' header files.
13298# AIX -qlanglvl=ansi
13299# Ultrix and OSF/1 -std1
13300# HP-UX 10.20 and later -Ae
13301# HP-UX older versions -Aa -D_HPUX_SOURCE
13302# SVR4 -Xc -D__EXTENSIONS__
13303for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13304do
13305 CC="$ac_save_CC $ac_arg"
13306 rm -f conftest.$ac_objext
13307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13308 (eval $ac_compile) 2>&5
13309 ac_status=$?
13310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13311 (exit $ac_status); } &&
13312 { ac_try='test -s conftest.$ac_objext'
13313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13314 (eval $ac_try) 2>&5
13315 ac_status=$?
13316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13317 (exit $ac_status); }; }; then
13318 ac_cv_prog_cc_stdc=$ac_arg
13319break
13320else
13321 echo "$as_me: failed program was:" >&5
13322cat conftest.$ac_ext >&5
13323fi
13324rm -f conftest.$ac_objext
13325done
13326rm -f conftest.$ac_ext conftest.$ac_objext
13327CC=$ac_save_CC
13328
13329fi
13330
13331case "x$ac_cv_prog_cc_stdc" in
13332 x|xno)
13333 echo "$as_me:$LINENO: result: none needed" >&5
13334echo "${ECHO_T}none needed" >&6 ;;
13335 *)
13336 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13337echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13338 CC="$CC $ac_cv_prog_cc_stdc" ;;
13339esac
13340
13341echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13342echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13343if test "${ac_cv_c_const+set}" = set; then
13344 echo $ECHO_N "(cached) $ECHO_C" >&6
13345else
13346 cat >conftest.$ac_ext <<_ACEOF
13347#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013348#include "confdefs.h"
13349
Martin v. Löwis11437992002-04-12 09:54:03 +000013350#ifdef F77_DUMMY_MAIN
13351# ifdef __cplusplus
13352 extern "C"
13353# endif
13354 int F77_DUMMY_MAIN() { return 1; }
13355#endif
13356int
13357main ()
13358{
13359/* FIXME: Include the comments suggested by Paul. */
13360#ifndef __cplusplus
13361 /* Ultrix mips cc rejects this. */
13362 typedef int charset[2];
13363 const charset x;
13364 /* SunOS 4.1.1 cc rejects this. */
13365 char const *const *ccp;
13366 char **p;
13367 /* NEC SVR4.0.2 mips cc rejects this. */
13368 struct point {int x, y;};
13369 static struct point const zero = {0,0};
13370 /* AIX XL C 1.02.0.0 rejects this.
13371 It does not let you subtract one const X* pointer from another in
13372 an arm of an if-expression whose if-part is not a constant
13373 expression */
13374 const char *g = "string";
13375 ccp = &g + (g ? g-g : 0);
13376 /* HPUX 7.0 cc rejects these. */
13377 ++ccp;
13378 p = (char**) ccp;
13379 ccp = (char const *const *) p;
13380 { /* SCO 3.2v4 cc rejects this. */
13381 char *t;
13382 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013383
Martin v. Löwis11437992002-04-12 09:54:03 +000013384 *t++ = 0;
13385 }
13386 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13387 int x[] = {25, 17};
13388 const int *foo = &x[0];
13389 ++foo;
13390 }
13391 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13392 typedef const int *iptr;
13393 iptr p = 0;
13394 ++p;
13395 }
13396 { /* AIX XL C 1.02.0.0 rejects this saying
13397 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13398 struct s { int j; const int *ap[3]; };
13399 struct s *b; b->j = 5;
13400 }
13401 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13402 const int foo = 10;
13403 }
13404#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013405
Martin v. Löwis11437992002-04-12 09:54:03 +000013406 ;
13407 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013408}
Martin v. Löwis11437992002-04-12 09:54:03 +000013409_ACEOF
13410rm -f conftest.$ac_objext
13411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13412 (eval $ac_compile) 2>&5
13413 ac_status=$?
13414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13415 (exit $ac_status); } &&
13416 { ac_try='test -s conftest.$ac_objext'
13417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13418 (eval $ac_try) 2>&5
13419 ac_status=$?
13420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13421 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013422 ac_cv_c_const=yes
13423else
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 echo "$as_me: failed program was:" >&5
13425cat conftest.$ac_ext >&5
13426ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013428rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013429fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013430echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13431echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013432if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013433
13434cat >>confdefs.h <<\_ACEOF
13435#define const
13436_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013437
13438fi
13439
Michael W. Hudson54241132001-12-07 15:38:26 +000013440
Guido van Rossumda88dad1995-01-26 00:46:29 +000013441works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013442echo "$as_me:$LINENO: checking for working volatile" >&5
13443echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13444cat >conftest.$ac_ext <<_ACEOF
13445#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013446#include "confdefs.h"
13447
Martin v. Löwis11437992002-04-12 09:54:03 +000013448#ifdef F77_DUMMY_MAIN
13449# ifdef __cplusplus
13450 extern "C"
13451# endif
13452 int F77_DUMMY_MAIN() { return 1; }
13453#endif
13454int
13455main ()
13456{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013457volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013458 ;
13459 return 0;
13460}
13461_ACEOF
13462rm -f conftest.$ac_objext
13463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13464 (eval $ac_compile) 2>&5
13465 ac_status=$?
13466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13467 (exit $ac_status); } &&
13468 { ac_try='test -s conftest.$ac_objext'
13469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13470 (eval $ac_try) 2>&5
13471 ac_status=$?
13472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13473 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013474 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013475else
Martin v. Löwis11437992002-04-12 09:54:03 +000013476 echo "$as_me: failed program was:" >&5
13477cat conftest.$ac_ext >&5
13478
13479cat >>confdefs.h <<\_ACEOF
13480#define volatile
13481_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013482
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013483
Guido van Rossum627b2d71993-12-24 10:39:16 +000013484fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013485rm -f conftest.$ac_objext conftest.$ac_ext
13486echo "$as_me:$LINENO: result: $works" >&5
13487echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013488
Guido van Rossumda88dad1995-01-26 00:46:29 +000013489works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013490echo "$as_me:$LINENO: checking for working signed char" >&5
13491echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13492cat >conftest.$ac_ext <<_ACEOF
13493#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013494#include "confdefs.h"
13495
Martin v. Löwis11437992002-04-12 09:54:03 +000013496#ifdef F77_DUMMY_MAIN
13497# ifdef __cplusplus
13498 extern "C"
13499# endif
13500 int F77_DUMMY_MAIN() { return 1; }
13501#endif
13502int
13503main ()
13504{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013505signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013506 ;
13507 return 0;
13508}
13509_ACEOF
13510rm -f conftest.$ac_objext
13511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13512 (eval $ac_compile) 2>&5
13513 ac_status=$?
13514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13515 (exit $ac_status); } &&
13516 { ac_try='test -s conftest.$ac_objext'
13517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13518 (eval $ac_try) 2>&5
13519 ac_status=$?
13520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13521 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013522 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013523else
Martin v. Löwis11437992002-04-12 09:54:03 +000013524 echo "$as_me: failed program was:" >&5
13525cat conftest.$ac_ext >&5
13526
13527cat >>confdefs.h <<\_ACEOF
13528#define signed
13529_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013530
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013531
Guido van Rossum7f43da71994-08-01 12:15:30 +000013532fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013533rm -f conftest.$ac_objext conftest.$ac_ext
13534echo "$as_me:$LINENO: result: $works" >&5
13535echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013536
Guido van Rossumda88dad1995-01-26 00:46:29 +000013537have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013538echo "$as_me:$LINENO: checking for prototypes" >&5
13539echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13540cat >conftest.$ac_ext <<_ACEOF
13541#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013542#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013543int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013544#ifdef F77_DUMMY_MAIN
13545# ifdef __cplusplus
13546 extern "C"
13547# endif
13548 int F77_DUMMY_MAIN() { return 1; }
13549#endif
13550int
13551main ()
13552{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013553return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013554 ;
13555 return 0;
13556}
13557_ACEOF
13558rm -f conftest.$ac_objext
13559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13560 (eval $ac_compile) 2>&5
13561 ac_status=$?
13562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13563 (exit $ac_status); } &&
13564 { ac_try='test -s conftest.$ac_objext'
13565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13566 (eval $ac_try) 2>&5
13567 ac_status=$?
13568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13569 (exit $ac_status); }; }; then
13570
13571
13572cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013573#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013574_ACEOF
13575
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013576 have_prototypes=yes
13577
Guido van Rossumf78abae1997-01-21 22:02:36 +000013578else
Martin v. Löwis11437992002-04-12 09:54:03 +000013579 echo "$as_me: failed program was:" >&5
13580cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013581fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013582rm -f conftest.$ac_objext conftest.$ac_ext
13583echo "$as_me:$LINENO: result: $have_prototypes" >&5
13584echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013585
Guido van Rossumda88dad1995-01-26 00:46:29 +000013586works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013587echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13588echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13589cat >conftest.$ac_ext <<_ACEOF
13590#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013591#include "confdefs.h"
13592
13593#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013594int foo(int x, ...) {
13595 va_list va;
13596 va_start(va, x);
13597 va_arg(va, int);
13598 va_arg(va, char *);
13599 va_arg(va, double);
13600 return 0;
13601}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013602
Martin v. Löwis11437992002-04-12 09:54:03 +000013603#ifdef F77_DUMMY_MAIN
13604# ifdef __cplusplus
13605 extern "C"
13606# endif
13607 int F77_DUMMY_MAIN() { return 1; }
13608#endif
13609int
13610main ()
13611{
Guido van Rossum90eea071996-08-30 20:58:57 +000013612return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013613 ;
13614 return 0;
13615}
13616_ACEOF
13617rm -f conftest.$ac_objext
13618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13619 (eval $ac_compile) 2>&5
13620 ac_status=$?
13621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13622 (exit $ac_status); } &&
13623 { ac_try='test -s conftest.$ac_objext'
13624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13625 (eval $ac_try) 2>&5
13626 ac_status=$?
13627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13628 (exit $ac_status); }; }; then
13629
13630
13631cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013632#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013633_ACEOF
13634
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013635 works=yes
13636
Guido van Rossumf78abae1997-01-21 22:02:36 +000013637else
Martin v. Löwis11437992002-04-12 09:54:03 +000013638 echo "$as_me: failed program was:" >&5
13639cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013640fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013641rm -f conftest.$ac_objext conftest.$ac_ext
13642echo "$as_me:$LINENO: result: $works" >&5
13643echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013644
Guido van Rossumda88dad1995-01-26 00:46:29 +000013645if test "$have_prototypes" = yes; then
13646bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013647echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13648echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13649cat >conftest.$ac_ext <<_ACEOF
13650#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013651#include "confdefs.h"
13652#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013653#ifdef F77_DUMMY_MAIN
13654# ifdef __cplusplus
13655 extern "C"
13656# endif
13657 int F77_DUMMY_MAIN() { return 1; }
13658#endif
13659int
13660main ()
13661{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013662char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013663 ;
13664 return 0;
13665}
13666_ACEOF
13667rm -f conftest.$ac_objext
13668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13669 (eval $ac_compile) 2>&5
13670 ac_status=$?
13671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13672 (exit $ac_status); } &&
13673 { ac_try='test -s conftest.$ac_objext'
13674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13675 (eval $ac_try) 2>&5
13676 ac_status=$?
13677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13678 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013679 :
13680else
Martin v. Löwis11437992002-04-12 09:54:03 +000013681 echo "$as_me: failed program was:" >&5
13682cat conftest.$ac_ext >&5
13683
13684cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013685#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013686_ACEOF
13687
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013688 bad_prototypes=yes
13689
Guido van Rossum627b2d71993-12-24 10:39:16 +000013690fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013691rm -f conftest.$ac_objext conftest.$ac_ext
13692echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13693echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013694fi
13695
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013696# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013697echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13698echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13699cat >conftest.$ac_ext <<_ACEOF
13700#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013701#include "confdefs.h"
13702#include <sys/types.h>
13703#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013704#ifdef F77_DUMMY_MAIN
13705# ifdef __cplusplus
13706 extern "C"
13707# endif
13708 int F77_DUMMY_MAIN() { return 1; }
13709#endif
13710int
13711main ()
13712{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013713struct sockaddr x;
13714x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013715 ;
13716 return 0;
13717}
13718_ACEOF
13719rm -f conftest.$ac_objext
13720if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13721 (eval $ac_compile) 2>&5
13722 ac_status=$?
13723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13724 (exit $ac_status); } &&
13725 { ac_try='test -s conftest.$ac_objext'
13726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13727 (eval $ac_try) 2>&5
13728 ac_status=$?
13729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13730 (exit $ac_status); }; }; then
13731 echo "$as_me:$LINENO: result: yes" >&5
13732echo "${ECHO_T}yes" >&6
13733
13734cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013735#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013736_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013737
13738else
Martin v. Löwis11437992002-04-12 09:54:03 +000013739 echo "$as_me: failed program was:" >&5
13740cat conftest.$ac_ext >&5
13741echo "$as_me:$LINENO: result: no" >&5
13742echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013743fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013744rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013745
Guido van Rossumda88dad1995-01-26 00:46:29 +000013746va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013747echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13748echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13749cat >conftest.$ac_ext <<_ACEOF
13750#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013751#include "confdefs.h"
13752
13753#ifdef HAVE_STDARG_PROTOTYPES
13754#include <stdarg.h>
13755#else
13756#include <varargs.h>
13757#endif
13758
Martin v. Löwis11437992002-04-12 09:54:03 +000013759#ifdef F77_DUMMY_MAIN
13760# ifdef __cplusplus
13761 extern "C"
13762# endif
13763 int F77_DUMMY_MAIN() { return 1; }
13764#endif
13765int
13766main ()
13767{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013768va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013769 ;
13770 return 0;
13771}
13772_ACEOF
13773rm -f conftest.$ac_objext
13774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13775 (eval $ac_compile) 2>&5
13776 ac_status=$?
13777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13778 (exit $ac_status); } &&
13779 { ac_try='test -s conftest.$ac_objext'
13780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13781 (eval $ac_try) 2>&5
13782 ac_status=$?
13783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13784 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013785 :
13786else
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 echo "$as_me: failed program was:" >&5
13788cat conftest.$ac_ext >&5
13789
13790
13791cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013792#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013793_ACEOF
13794
Guido van Rossumda88dad1995-01-26 00:46:29 +000013795 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013796
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013797fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013798rm -f conftest.$ac_objext conftest.$ac_ext
13799echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13800echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013801
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013802# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013803
13804
13805
13806echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13807echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13808if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13809 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013810else
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 cat >conftest.$ac_ext <<_ACEOF
13812#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013813#include "confdefs.h"
13814/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013815 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013816#include <assert.h>
13817/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013818#ifdef __cplusplus
13819extern "C"
13820#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013821/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013822 builtin and then its argument prototype would still apply. */
13823char gethostbyname_r ();
13824char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013825
Martin v. Löwis11437992002-04-12 09:54:03 +000013826#ifdef F77_DUMMY_MAIN
13827# ifdef __cplusplus
13828 extern "C"
13829# endif
13830 int F77_DUMMY_MAIN() { return 1; }
13831#endif
13832int
13833main ()
13834{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013835/* The GNU C library defines this for functions which it implements
13836 to always fail with ENOSYS. Some functions are actually named
13837 something starting with __ and the normal name is an alias. */
13838#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13839choke me
13840#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013841f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013842#endif
13843
Martin v. Löwis11437992002-04-12 09:54:03 +000013844 ;
13845 return 0;
13846}
13847_ACEOF
13848rm -f conftest.$ac_objext conftest$ac_exeext
13849if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13850 (eval $ac_link) 2>&5
13851 ac_status=$?
13852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13853 (exit $ac_status); } &&
13854 { ac_try='test -s conftest$ac_exeext'
13855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13856 (eval $ac_try) 2>&5
13857 ac_status=$?
13858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13859 (exit $ac_status); }; }; then
13860 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013861else
Martin v. Löwis11437992002-04-12 09:54:03 +000013862 echo "$as_me: failed program was:" >&5
13863cat conftest.$ac_ext >&5
13864ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013865fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013866rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013867fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013868echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13869echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13870if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013871
Martin v. Löwis11437992002-04-12 09:54:03 +000013872 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013873#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013874_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013875
Martin v. Löwis11437992002-04-12 09:54:03 +000013876 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13877echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013878 OLD_CFLAGS=$CFLAGS
13879 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013880 cat >conftest.$ac_ext <<_ACEOF
13881#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013882#include "confdefs.h"
13883
13884# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013885
13886#ifdef F77_DUMMY_MAIN
13887# ifdef __cplusplus
13888 extern "C"
13889# endif
13890 int F77_DUMMY_MAIN() { return 1; }
13891#endif
13892int
13893main ()
13894{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013895
13896 char *name;
13897 struct hostent *he, *res;
13898 char buffer[2048];
13899 int buflen = 2048;
13900 int h_errnop;
13901
13902 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013903
13904 ;
13905 return 0;
13906}
13907_ACEOF
13908rm -f conftest.$ac_objext
13909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13910 (eval $ac_compile) 2>&5
13911 ac_status=$?
13912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13913 (exit $ac_status); } &&
13914 { ac_try='test -s conftest.$ac_objext'
13915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13916 (eval $ac_try) 2>&5
13917 ac_status=$?
13918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13919 (exit $ac_status); }; }; then
13920
13921 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013922#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013923_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013924
Martin v. Löwis11437992002-04-12 09:54:03 +000013925
13926cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013927#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013928_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013929
Martin v. Löwis11437992002-04-12 09:54:03 +000013930 echo "$as_me:$LINENO: result: yes" >&5
13931echo "${ECHO_T}yes" >&6
13932
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013933else
Martin v. Löwis11437992002-04-12 09:54:03 +000013934 echo "$as_me: failed program was:" >&5
13935cat conftest.$ac_ext >&5
13936
13937 echo "$as_me:$LINENO: result: no" >&5
13938echo "${ECHO_T}no" >&6
13939 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
13940echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
13941 cat >conftest.$ac_ext <<_ACEOF
13942#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013943#include "confdefs.h"
13944
13945# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013946
13947#ifdef F77_DUMMY_MAIN
13948# ifdef __cplusplus
13949 extern "C"
13950# endif
13951 int F77_DUMMY_MAIN() { return 1; }
13952#endif
13953int
13954main ()
13955{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013956
13957 char *name;
13958 struct hostent *he;
13959 char buffer[2048];
13960 int buflen = 2048;
13961 int h_errnop;
13962
13963 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013964
13965 ;
13966 return 0;
13967}
13968_ACEOF
13969rm -f conftest.$ac_objext
13970if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13971 (eval $ac_compile) 2>&5
13972 ac_status=$?
13973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13974 (exit $ac_status); } &&
13975 { ac_try='test -s conftest.$ac_objext'
13976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13977 (eval $ac_try) 2>&5
13978 ac_status=$?
13979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13980 (exit $ac_status); }; }; then
13981
13982 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013983#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013984_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013985
Martin v. Löwis11437992002-04-12 09:54:03 +000013986
13987cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013988#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013989_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013990
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 echo "$as_me:$LINENO: result: yes" >&5
13992echo "${ECHO_T}yes" >&6
13993
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013994else
Martin v. Löwis11437992002-04-12 09:54:03 +000013995 echo "$as_me: failed program was:" >&5
13996cat conftest.$ac_ext >&5
13997
13998 echo "$as_me:$LINENO: result: no" >&5
13999echo "${ECHO_T}no" >&6
14000 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14001echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14002 cat >conftest.$ac_ext <<_ACEOF
14003#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014004#include "confdefs.h"
14005
14006# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014007
14008#ifdef F77_DUMMY_MAIN
14009# ifdef __cplusplus
14010 extern "C"
14011# endif
14012 int F77_DUMMY_MAIN() { return 1; }
14013#endif
14014int
14015main ()
14016{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014017
14018 char *name;
14019 struct hostent *he;
14020 struct hostent_data data;
14021
14022 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014023
14024 ;
14025 return 0;
14026}
14027_ACEOF
14028rm -f conftest.$ac_objext
14029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14030 (eval $ac_compile) 2>&5
14031 ac_status=$?
14032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14033 (exit $ac_status); } &&
14034 { ac_try='test -s conftest.$ac_objext'
14035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14036 (eval $ac_try) 2>&5
14037 ac_status=$?
14038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14039 (exit $ac_status); }; }; then
14040
14041 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014042#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014043_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014044
Martin v. Löwis11437992002-04-12 09:54:03 +000014045
14046cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014047#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014048_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014049
Martin v. Löwis11437992002-04-12 09:54:03 +000014050 echo "$as_me:$LINENO: result: yes" >&5
14051echo "${ECHO_T}yes" >&6
14052
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014053else
Martin v. Löwis11437992002-04-12 09:54:03 +000014054 echo "$as_me: failed program was:" >&5
14055cat conftest.$ac_ext >&5
14056
14057 echo "$as_me:$LINENO: result: no" >&5
14058echo "${ECHO_T}no" >&6
14059
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014060fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014061rm -f conftest.$ac_objext conftest.$ac_ext
14062
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014063fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014064rm -f conftest.$ac_objext conftest.$ac_ext
14065
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014066fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014067rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014068 CFLAGS=$OLD_CFLAGS
14069
14070else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014071
Martin v. Löwis11437992002-04-12 09:54:03 +000014072
14073for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014074do
Martin v. Löwis11437992002-04-12 09:54:03 +000014075as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14076echo "$as_me:$LINENO: checking for $ac_func" >&5
14077echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14078if eval "test \"\${$as_ac_var+set}\" = set"; then
14079 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014080else
Martin v. Löwis11437992002-04-12 09:54:03 +000014081 cat >conftest.$ac_ext <<_ACEOF
14082#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014083#include "confdefs.h"
14084/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014085 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014086#include <assert.h>
14087/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014088#ifdef __cplusplus
14089extern "C"
14090#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014091/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014092 builtin and then its argument prototype would still apply. */
14093char $ac_func ();
14094char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014095
Martin v. Löwis11437992002-04-12 09:54:03 +000014096#ifdef F77_DUMMY_MAIN
14097# ifdef __cplusplus
14098 extern "C"
14099# endif
14100 int F77_DUMMY_MAIN() { return 1; }
14101#endif
14102int
14103main ()
14104{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014105/* The GNU C library defines this for functions which it implements
14106 to always fail with ENOSYS. Some functions are actually named
14107 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014108#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014109choke me
14110#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014111f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014112#endif
14113
Martin v. Löwis11437992002-04-12 09:54:03 +000014114 ;
14115 return 0;
14116}
14117_ACEOF
14118rm -f conftest.$ac_objext conftest$ac_exeext
14119if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14120 (eval $ac_link) 2>&5
14121 ac_status=$?
14122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14123 (exit $ac_status); } &&
14124 { ac_try='test -s conftest$ac_exeext'
14125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14126 (eval $ac_try) 2>&5
14127 ac_status=$?
14128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14129 (exit $ac_status); }; }; then
14130 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014131else
Martin v. Löwis11437992002-04-12 09:54:03 +000014132 echo "$as_me: failed program was:" >&5
14133cat conftest.$ac_ext >&5
14134eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014135fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014136rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014137fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014138echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14139echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14140if test `eval echo '${'$as_ac_var'}'` = yes; then
14141 cat >>confdefs.h <<_ACEOF
14142#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14143_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014144
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014145fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014146done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014147
Michael W. Hudson54241132001-12-07 15:38:26 +000014148
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014149fi
14150
Michael W. Hudson54241132001-12-07 15:38:26 +000014151
14152
14153
14154
14155
14156
Guido van Rossum627b2d71993-12-24 10:39:16 +000014157# checks for system services
14158# (none yet)
14159
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014160# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014161echo "$as_me:$LINENO: checking for __fpu_control" >&5
14162echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14163if test "${ac_cv_func___fpu_control+set}" = set; then
14164 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014165else
Martin v. Löwis11437992002-04-12 09:54:03 +000014166 cat >conftest.$ac_ext <<_ACEOF
14167#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014168#include "confdefs.h"
14169/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014170 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014171#include <assert.h>
14172/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014173#ifdef __cplusplus
14174extern "C"
14175#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014176/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014177 builtin and then its argument prototype would still apply. */
14178char __fpu_control ();
14179char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014180
Martin v. Löwis11437992002-04-12 09:54:03 +000014181#ifdef F77_DUMMY_MAIN
14182# ifdef __cplusplus
14183 extern "C"
14184# endif
14185 int F77_DUMMY_MAIN() { return 1; }
14186#endif
14187int
14188main ()
14189{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014190/* The GNU C library defines this for functions which it implements
14191 to always fail with ENOSYS. Some functions are actually named
14192 something starting with __ and the normal name is an alias. */
14193#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14194choke me
14195#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014196f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014197#endif
14198
Martin v. Löwis11437992002-04-12 09:54:03 +000014199 ;
14200 return 0;
14201}
14202_ACEOF
14203rm -f conftest.$ac_objext conftest$ac_exeext
14204if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14205 (eval $ac_link) 2>&5
14206 ac_status=$?
14207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14208 (exit $ac_status); } &&
14209 { ac_try='test -s conftest$ac_exeext'
14210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14211 (eval $ac_try) 2>&5
14212 ac_status=$?
14213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14214 (exit $ac_status); }; }; then
14215 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014216else
Martin v. Löwis11437992002-04-12 09:54:03 +000014217 echo "$as_me: failed program was:" >&5
14218cat conftest.$ac_ext >&5
14219ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014220fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014221rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014223echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14224echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14225if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014226 :
14227else
Martin v. Löwis11437992002-04-12 09:54:03 +000014228
14229echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14230echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14231if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14232 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014233else
Martin v. Löwis11437992002-04-12 09:54:03 +000014234 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014235LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014236cat >conftest.$ac_ext <<_ACEOF
14237#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014238#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014239
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014240/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014241#ifdef __cplusplus
14242extern "C"
14243#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014244/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014245 builtin and then its argument prototype would still apply. */
14246char __fpu_control ();
14247#ifdef F77_DUMMY_MAIN
14248# ifdef __cplusplus
14249 extern "C"
14250# endif
14251 int F77_DUMMY_MAIN() { return 1; }
14252#endif
14253int
14254main ()
14255{
14256__fpu_control ();
14257 ;
14258 return 0;
14259}
14260_ACEOF
14261rm -f conftest.$ac_objext conftest$ac_exeext
14262if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14263 (eval $ac_link) 2>&5
14264 ac_status=$?
14265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14266 (exit $ac_status); } &&
14267 { ac_try='test -s conftest$ac_exeext'
14268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14269 (eval $ac_try) 2>&5
14270 ac_status=$?
14271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14272 (exit $ac_status); }; }; then
14273 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014274else
Martin v. Löwis11437992002-04-12 09:54:03 +000014275 echo "$as_me: failed program was:" >&5
14276cat conftest.$ac_ext >&5
14277ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014279rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14280LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014281fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014282echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14283echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14284if test $ac_cv_lib_ieee___fpu_control = yes; then
14285 cat >>confdefs.h <<_ACEOF
14286#define HAVE_LIBIEEE 1
14287_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014288
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014289 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014290
Guido van Rossum627b2d71993-12-24 10:39:16 +000014291fi
14292
Michael W. Hudson54241132001-12-07 15:38:26 +000014293
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014294fi
14295
Michael W. Hudson54241132001-12-07 15:38:26 +000014296
Guido van Rossum7f253911997-05-09 02:42:48 +000014297# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014298echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14299echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14300
Guido van Rossum7f253911997-05-09 02:42:48 +000014301# Check whether --with-fpectl or --without-fpectl was given.
14302if test "${with_fpectl+set}" = set; then
14303 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014304
Guido van Rossum7f253911997-05-09 02:42:48 +000014305if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014306then
14307
14308cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014309#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014310_ACEOF
14311
14312 echo "$as_me:$LINENO: result: yes" >&5
14313echo "${ECHO_T}yes" >&6
14314else echo "$as_me:$LINENO: result: no" >&5
14315echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014316fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014317else
Martin v. Löwis11437992002-04-12 09:54:03 +000014318 echo "$as_me:$LINENO: result: no" >&5
14319echo "${ECHO_T}no" >&6
14320fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014321
Guido van Rossum7f43da71994-08-01 12:15:30 +000014322# check for --with-libm=...
14323
Guido van Rossum563e7081996-09-10 18:20:48 +000014324case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014325Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014326BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014327*) LIBM=-lm
14328esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014329echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14330echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14331
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014332# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014333if test "${with_libm+set}" = set; then
14334 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014335
Guido van Rossum7f253911997-05-09 02:42:48 +000014336if test "$withval" = no
14337then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14339echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014340elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014341then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014342 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14343echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14344else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14345echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14346 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014347fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014348else
Martin v. Löwis11437992002-04-12 09:54:03 +000014349 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14350echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14351fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014352
14353# check for --with-libc=...
14354
Martin v. Löwis11437992002-04-12 09:54:03 +000014355echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14356echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14357
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014358# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014359if test "${with_libc+set}" = set; then
14360 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014361
Guido van Rossum7f253911997-05-09 02:42:48 +000014362if test "$withval" = no
14363then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014364 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14365echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014366elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014367then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014368 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14369echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14370else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14371echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14372 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014373fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014374else
Martin v. Löwis11437992002-04-12 09:54:03 +000014375 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14376echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14377fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014378
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014379# check for hypot() in math library
14380LIBS_SAVE=$LIBS
14381LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014382
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014383for ac_func in hypot
14384do
Martin v. Löwis11437992002-04-12 09:54:03 +000014385as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14386echo "$as_me:$LINENO: checking for $ac_func" >&5
14387echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14388if eval "test \"\${$as_ac_var+set}\" = set"; then
14389 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014390else
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 cat >conftest.$ac_ext <<_ACEOF
14392#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014393#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014394/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014395 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014396#include <assert.h>
14397/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014398#ifdef __cplusplus
14399extern "C"
14400#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014401/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 builtin and then its argument prototype would still apply. */
14403char $ac_func ();
14404char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014405
Martin v. Löwis11437992002-04-12 09:54:03 +000014406#ifdef F77_DUMMY_MAIN
14407# ifdef __cplusplus
14408 extern "C"
14409# endif
14410 int F77_DUMMY_MAIN() { return 1; }
14411#endif
14412int
14413main ()
14414{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014415/* The GNU C library defines this for functions which it implements
14416 to always fail with ENOSYS. Some functions are actually named
14417 something starting with __ and the normal name is an alias. */
14418#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14419choke me
14420#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014421f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014422#endif
14423
Martin v. Löwis11437992002-04-12 09:54:03 +000014424 ;
14425 return 0;
14426}
14427_ACEOF
14428rm -f conftest.$ac_objext conftest$ac_exeext
14429if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14430 (eval $ac_link) 2>&5
14431 ac_status=$?
14432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14433 (exit $ac_status); } &&
14434 { ac_try='test -s conftest$ac_exeext'
14435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14436 (eval $ac_try) 2>&5
14437 ac_status=$?
14438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14439 (exit $ac_status); }; }; then
14440 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014441else
Martin v. Löwis11437992002-04-12 09:54:03 +000014442 echo "$as_me: failed program was:" >&5
14443cat conftest.$ac_ext >&5
14444eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014445fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014446rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014447fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014448echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14449echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14450if test `eval echo '${'$as_ac_var'}'` = yes; then
14451 cat >>confdefs.h <<_ACEOF
14452#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14453_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014454
Michael W. Hudson54241132001-12-07 15:38:26 +000014455else
Martin v. Löwis11437992002-04-12 09:54:03 +000014456 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014457fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014458done
14459
Michael W. Hudson54241132001-12-07 15:38:26 +000014460
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014461LIBS=$LIBS_SAVE
14462
Guido van Rossumad713701997-07-10 22:42:38 +000014463# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014464echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14465echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14466if test "${ac_cv_malloc_zero+set}" = set; then
14467 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014468else
14469 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014470 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014471else
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 cat >conftest.$ac_ext <<_ACEOF
14473#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014474#include "confdefs.h"
14475#include <stdio.h>
14476#ifdef HAVE_STDLIB
14477#include <stdlib.h>
14478#else
14479char *malloc(), *realloc();
14480int *free();
14481#endif
14482main() {
14483 char *p;
14484 p = malloc(0);
14485 if (p == NULL) exit(1);
14486 p = realloc(p, 0);
14487 if (p == NULL) exit(1);
14488 free(p);
14489 exit(0);
14490}
Martin v. Löwis11437992002-04-12 09:54:03 +000014491_ACEOF
14492rm -f conftest$ac_exeext
14493if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14494 (eval $ac_link) 2>&5
14495 ac_status=$?
14496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14497 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14499 (eval $ac_try) 2>&5
14500 ac_status=$?
14501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14502 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014503 ac_cv_malloc_zero=nonnull
14504else
Martin v. Löwis11437992002-04-12 09:54:03 +000014505 echo "$as_me: program exited with status $ac_status" >&5
14506echo "$as_me: failed program was:" >&5
14507cat conftest.$ac_ext >&5
14508( exit $ac_status )
14509ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014510fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014511rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014512fi
Guido van Rossumad713701997-07-10 22:42:38 +000014513fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014514 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014515echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14516echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014517if test "$ac_cv_malloc_zero" = null
14518then
Martin v. Löwis11437992002-04-12 09:54:03 +000014519
14520cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014521#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014522_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014523
14524fi
14525
Guido van Rossumef2255b2000-03-10 22:30:29 +000014526# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014527if test "${ac_cv_header_wchar_h+set}" = set; then
14528 echo "$as_me:$LINENO: checking for wchar.h" >&5
14529echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14530if test "${ac_cv_header_wchar_h+set}" = set; then
14531 echo $ECHO_N "(cached) $ECHO_C" >&6
14532fi
14533echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14534echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014535else
Martin v. Löwis11437992002-04-12 09:54:03 +000014536 # Is the header compilable?
14537echo "$as_me:$LINENO: checking wchar.h usability" >&5
14538echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14539cat >conftest.$ac_ext <<_ACEOF
14540#line $LINENO "configure"
14541#include "confdefs.h"
14542$ac_includes_default
14543#include <wchar.h>
14544_ACEOF
14545rm -f conftest.$ac_objext
14546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14547 (eval $ac_compile) 2>&5
14548 ac_status=$?
14549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14550 (exit $ac_status); } &&
14551 { ac_try='test -s conftest.$ac_objext'
14552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14553 (eval $ac_try) 2>&5
14554 ac_status=$?
14555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14556 (exit $ac_status); }; }; then
14557 ac_header_compiler=yes
14558else
14559 echo "$as_me: failed program was:" >&5
14560cat conftest.$ac_ext >&5
14561ac_header_compiler=no
14562fi
14563rm -f conftest.$ac_objext conftest.$ac_ext
14564echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14565echo "${ECHO_T}$ac_header_compiler" >&6
14566
14567# Is the header present?
14568echo "$as_me:$LINENO: checking wchar.h presence" >&5
14569echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14570cat >conftest.$ac_ext <<_ACEOF
14571#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014572#include "confdefs.h"
14573#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014574_ACEOF
14575if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14576 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14577 ac_status=$?
14578 egrep -v '^ *\+' conftest.er1 >conftest.err
14579 rm -f conftest.er1
14580 cat conftest.err >&5
14581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14582 (exit $ac_status); } >/dev/null; then
14583 if test -s conftest.err; then
14584 ac_cpp_err=$ac_c_preproc_warn_flag
14585 else
14586 ac_cpp_err=
14587 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014588else
Martin v. Löwis11437992002-04-12 09:54:03 +000014589 ac_cpp_err=yes
14590fi
14591if test -z "$ac_cpp_err"; then
14592 ac_header_preproc=yes
14593else
14594 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014595 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014596 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014597fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014598rm -f conftest.err conftest.$ac_ext
14599echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14600echo "${ECHO_T}$ac_header_preproc" >&6
14601
14602# So? What about this header?
14603case $ac_header_compiler:$ac_header_preproc in
14604 yes:no )
14605 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14606echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14607 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14608echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14609 no:yes )
14610 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14611echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14612 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14613echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14614 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14615echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14616esac
14617echo "$as_me:$LINENO: checking for wchar.h" >&5
14618echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14619if test "${ac_cv_header_wchar_h+set}" = set; then
14620 echo $ECHO_N "(cached) $ECHO_C" >&6
14621else
14622 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014623fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014624echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14625echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14626
14627fi
14628if test $ac_cv_header_wchar_h = yes; then
14629
14630
14631cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014632#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014633_ACEOF
14634
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014635 wchar_h="yes"
14636
Guido van Rossumef2255b2000-03-10 22:30:29 +000014637else
Martin v. Löwis11437992002-04-12 09:54:03 +000014638 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014639
14640fi
14641
Michael W. Hudson54241132001-12-07 15:38:26 +000014642
Martin v. Löwis11437992002-04-12 09:54:03 +000014643
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014644# determine wchar_t size
14645if test "$wchar_h" = yes
14646then
Martin v. Löwis11437992002-04-12 09:54:03 +000014647 echo "$as_me:$LINENO: checking for wchar_t" >&5
14648echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14649if test "${ac_cv_type_wchar_t+set}" = set; then
14650 echo $ECHO_N "(cached) $ECHO_C" >&6
14651else
14652 cat >conftest.$ac_ext <<_ACEOF
14653#line $LINENO "configure"
14654#include "confdefs.h"
14655#include <wchar.h>
14656
14657#ifdef F77_DUMMY_MAIN
14658# ifdef __cplusplus
14659 extern "C"
14660# endif
14661 int F77_DUMMY_MAIN() { return 1; }
14662#endif
14663int
14664main ()
14665{
14666if ((wchar_t *) 0)
14667 return 0;
14668if (sizeof (wchar_t))
14669 return 0;
14670 ;
14671 return 0;
14672}
14673_ACEOF
14674rm -f conftest.$ac_objext
14675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14676 (eval $ac_compile) 2>&5
14677 ac_status=$?
14678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14679 (exit $ac_status); } &&
14680 { ac_try='test -s conftest.$ac_objext'
14681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14682 (eval $ac_try) 2>&5
14683 ac_status=$?
14684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14685 (exit $ac_status); }; }; then
14686 ac_cv_type_wchar_t=yes
14687else
14688 echo "$as_me: failed program was:" >&5
14689cat conftest.$ac_ext >&5
14690ac_cv_type_wchar_t=no
14691fi
14692rm -f conftest.$ac_objext conftest.$ac_ext
14693fi
14694echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14695echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14696
14697echo "$as_me:$LINENO: checking size of wchar_t" >&5
14698echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14699if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14700 echo $ECHO_N "(cached) $ECHO_C" >&6
14701else
14702 if test "$ac_cv_type_wchar_t" = yes; then
14703 # The cast to unsigned long works around a bug in the HP C Compiler
14704 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14705 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14706 # This bug is HP SR number 8606223364.
14707 if test "$cross_compiling" = yes; then
14708 # Depending upon the size, compute the lo and hi bounds.
14709cat >conftest.$ac_ext <<_ACEOF
14710#line $LINENO "configure"
14711#include "confdefs.h"
14712#include <wchar.h>
14713
14714#ifdef F77_DUMMY_MAIN
14715# ifdef __cplusplus
14716 extern "C"
14717# endif
14718 int F77_DUMMY_MAIN() { return 1; }
14719#endif
14720int
14721main ()
14722{
14723static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14724test_array [0] = 0
14725
14726 ;
14727 return 0;
14728}
14729_ACEOF
14730rm -f conftest.$ac_objext
14731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14732 (eval $ac_compile) 2>&5
14733 ac_status=$?
14734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14735 (exit $ac_status); } &&
14736 { ac_try='test -s conftest.$ac_objext'
14737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14738 (eval $ac_try) 2>&5
14739 ac_status=$?
14740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14741 (exit $ac_status); }; }; then
14742 ac_lo=0 ac_mid=0
14743 while :; do
14744 cat >conftest.$ac_ext <<_ACEOF
14745#line $LINENO "configure"
14746#include "confdefs.h"
14747#include <wchar.h>
14748
14749#ifdef F77_DUMMY_MAIN
14750# ifdef __cplusplus
14751 extern "C"
14752# endif
14753 int F77_DUMMY_MAIN() { return 1; }
14754#endif
14755int
14756main ()
14757{
14758static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14759test_array [0] = 0
14760
14761 ;
14762 return 0;
14763}
14764_ACEOF
14765rm -f conftest.$ac_objext
14766if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14767 (eval $ac_compile) 2>&5
14768 ac_status=$?
14769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14770 (exit $ac_status); } &&
14771 { ac_try='test -s conftest.$ac_objext'
14772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14773 (eval $ac_try) 2>&5
14774 ac_status=$?
14775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14776 (exit $ac_status); }; }; then
14777 ac_hi=$ac_mid; break
14778else
14779 echo "$as_me: failed program was:" >&5
14780cat conftest.$ac_ext >&5
14781ac_lo=`expr $ac_mid + 1`
14782 if test $ac_lo -le $ac_mid; then
14783 ac_lo= ac_hi=
14784 break
14785 fi
14786 ac_mid=`expr 2 '*' $ac_mid + 1`
14787fi
14788rm -f conftest.$ac_objext conftest.$ac_ext
14789 done
14790else
14791 echo "$as_me: failed program was:" >&5
14792cat conftest.$ac_ext >&5
14793cat >conftest.$ac_ext <<_ACEOF
14794#line $LINENO "configure"
14795#include "confdefs.h"
14796#include <wchar.h>
14797
14798#ifdef F77_DUMMY_MAIN
14799# ifdef __cplusplus
14800 extern "C"
14801# endif
14802 int F77_DUMMY_MAIN() { return 1; }
14803#endif
14804int
14805main ()
14806{
14807static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14808test_array [0] = 0
14809
14810 ;
14811 return 0;
14812}
14813_ACEOF
14814rm -f conftest.$ac_objext
14815if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14816 (eval $ac_compile) 2>&5
14817 ac_status=$?
14818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14819 (exit $ac_status); } &&
14820 { ac_try='test -s conftest.$ac_objext'
14821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14822 (eval $ac_try) 2>&5
14823 ac_status=$?
14824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14825 (exit $ac_status); }; }; then
14826 ac_hi=-1 ac_mid=-1
14827 while :; do
14828 cat >conftest.$ac_ext <<_ACEOF
14829#line $LINENO "configure"
14830#include "confdefs.h"
14831#include <wchar.h>
14832
14833#ifdef F77_DUMMY_MAIN
14834# ifdef __cplusplus
14835 extern "C"
14836# endif
14837 int F77_DUMMY_MAIN() { return 1; }
14838#endif
14839int
14840main ()
14841{
14842static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14843test_array [0] = 0
14844
14845 ;
14846 return 0;
14847}
14848_ACEOF
14849rm -f conftest.$ac_objext
14850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14851 (eval $ac_compile) 2>&5
14852 ac_status=$?
14853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14854 (exit $ac_status); } &&
14855 { ac_try='test -s conftest.$ac_objext'
14856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14857 (eval $ac_try) 2>&5
14858 ac_status=$?
14859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14860 (exit $ac_status); }; }; then
14861 ac_lo=$ac_mid; break
14862else
14863 echo "$as_me: failed program was:" >&5
14864cat conftest.$ac_ext >&5
14865ac_hi=`expr '(' $ac_mid ')' - 1`
14866 if test $ac_mid -le $ac_hi; then
14867 ac_lo= ac_hi=
14868 break
14869 fi
14870 ac_mid=`expr 2 '*' $ac_mid`
14871fi
14872rm -f conftest.$ac_objext conftest.$ac_ext
14873 done
14874else
14875 echo "$as_me: failed program was:" >&5
14876cat conftest.$ac_ext >&5
14877ac_lo= ac_hi=
14878fi
14879rm -f conftest.$ac_objext conftest.$ac_ext
14880fi
14881rm -f conftest.$ac_objext conftest.$ac_ext
14882# Binary search between lo and hi bounds.
14883while test "x$ac_lo" != "x$ac_hi"; do
14884 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14885 cat >conftest.$ac_ext <<_ACEOF
14886#line $LINENO "configure"
14887#include "confdefs.h"
14888#include <wchar.h>
14889
14890#ifdef F77_DUMMY_MAIN
14891# ifdef __cplusplus
14892 extern "C"
14893# endif
14894 int F77_DUMMY_MAIN() { return 1; }
14895#endif
14896int
14897main ()
14898{
14899static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14900test_array [0] = 0
14901
14902 ;
14903 return 0;
14904}
14905_ACEOF
14906rm -f conftest.$ac_objext
14907if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14908 (eval $ac_compile) 2>&5
14909 ac_status=$?
14910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14911 (exit $ac_status); } &&
14912 { ac_try='test -s conftest.$ac_objext'
14913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14914 (eval $ac_try) 2>&5
14915 ac_status=$?
14916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14917 (exit $ac_status); }; }; then
14918 ac_hi=$ac_mid
14919else
14920 echo "$as_me: failed program was:" >&5
14921cat conftest.$ac_ext >&5
14922ac_lo=`expr '(' $ac_mid ')' + 1`
14923fi
14924rm -f conftest.$ac_objext conftest.$ac_ext
14925done
14926case $ac_lo in
14927?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14928'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14929echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14930 { (exit 1); exit 1; }; } ;;
14931esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014932else
14933 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014934 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14935echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14936 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014937else
Martin v. Löwis11437992002-04-12 09:54:03 +000014938 cat >conftest.$ac_ext <<_ACEOF
14939#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014940#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014941#include <wchar.h>
14942
14943long longval () { return (long) (sizeof (wchar_t)); }
14944unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000014945#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014946#include <stdlib.h>
14947#ifdef F77_DUMMY_MAIN
14948# ifdef __cplusplus
14949 extern "C"
14950# endif
14951 int F77_DUMMY_MAIN() { return 1; }
14952#endif
14953int
14954main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014955{
Martin v. Löwis11437992002-04-12 09:54:03 +000014956
14957 FILE *f = fopen ("conftest.val", "w");
14958 if (! f)
14959 exit (1);
14960 if (((long) (sizeof (wchar_t))) < 0)
14961 {
14962 long i = longval ();
14963 if (i != ((long) (sizeof (wchar_t))))
14964 exit (1);
14965 fprintf (f, "%ld\n", i);
14966 }
14967 else
14968 {
14969 unsigned long i = ulongval ();
14970 if (i != ((long) (sizeof (wchar_t))))
14971 exit (1);
14972 fprintf (f, "%lu\n", i);
14973 }
14974 exit (ferror (f) || fclose (f) != 0);
14975
14976 ;
14977 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014978}
Martin v. Löwis11437992002-04-12 09:54:03 +000014979_ACEOF
14980rm -f conftest$ac_exeext
14981if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14982 (eval $ac_link) 2>&5
14983 ac_status=$?
14984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14985 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14987 (eval $ac_try) 2>&5
14988 ac_status=$?
14989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14990 (exit $ac_status); }; }; then
14991 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000014992else
Martin v. Löwis11437992002-04-12 09:54:03 +000014993 echo "$as_me: program exited with status $ac_status" >&5
14994echo "$as_me: failed program was:" >&5
14995cat conftest.$ac_ext >&5
14996( exit $ac_status )
14997{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14998echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14999 { (exit 1); exit 1; }; }
15000fi
15001rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15002fi
15003fi
15004rm -f conftest.val
15005else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015006 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015007fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015008fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015009echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15010echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15011cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015012#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015013_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015014
Michael W. Hudson54241132001-12-07 15:38:26 +000015015
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015016fi
15017
Martin v. Löwis11437992002-04-12 09:54:03 +000015018echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15019echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015020# Check whether --enable-unicode or --disable-unicode was given.
15021if test "${enable_unicode+set}" = set; then
15022 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015023
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015024else
15025 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015026fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015027
15028if test $enable_unicode = yes
15029then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015030 # Without any arguments, Py_UNICODE defaults to two-byte mode
15031 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015032fi
15033
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015034
15035
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015036case "$enable_unicode" in
15037ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015038 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015039#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015040_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015041
15042 ;;
15043ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015044 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015045#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015046_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015047
15048 ;;
15049esac
15050
Michael W. Hudson54241132001-12-07 15:38:26 +000015051
Martin v. Löwis11437992002-04-12 09:54:03 +000015052
15053
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015054
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015055if test "$enable_unicode" = "no"
15056then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015057 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015058 echo "$as_me:$LINENO: result: not used" >&5
15059echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015060else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015061 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015062
15063cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015064#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015065_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015066
15067 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15068 then
15069 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015070
Martin v. Löwis11437992002-04-12 09:54:03 +000015071cat >>confdefs.h <<\_ACEOF
15072#define HAVE_USABLE_WCHAR_T 1
15073_ACEOF
15074
15075 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015076#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015077_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015078
15079 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15080 then
15081 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015083#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015084_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015085
15086 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15087 then
15088 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015089 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015090#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015091_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015092
15093 else
15094 PY_UNICODE_TYPE="no type found"
15095 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015096 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15097echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015098fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015099
15100# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015101echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15102echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15103if test "${ac_cv_c_bigendian+set}" = set; then
15104 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015105else
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 # See if sys/param.h defines the BYTE_ORDER macro.
15107cat >conftest.$ac_ext <<_ACEOF
15108#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015109#include "confdefs.h"
15110#include <sys/types.h>
15111#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015112
Martin v. Löwis11437992002-04-12 09:54:03 +000015113#ifdef F77_DUMMY_MAIN
15114# ifdef __cplusplus
15115 extern "C"
15116# endif
15117 int F77_DUMMY_MAIN() { return 1; }
15118#endif
15119int
15120main ()
15121{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015122#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15123 bogus endian macros
15124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015125
15126 ;
15127 return 0;
15128}
15129_ACEOF
15130rm -f conftest.$ac_objext
15131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15132 (eval $ac_compile) 2>&5
15133 ac_status=$?
15134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15135 (exit $ac_status); } &&
15136 { ac_try='test -s conftest.$ac_objext'
15137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15138 (eval $ac_try) 2>&5
15139 ac_status=$?
15140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15141 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015142 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015143cat >conftest.$ac_ext <<_ACEOF
15144#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015145#include "confdefs.h"
15146#include <sys/types.h>
15147#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015148
Martin v. Löwis11437992002-04-12 09:54:03 +000015149#ifdef F77_DUMMY_MAIN
15150# ifdef __cplusplus
15151 extern "C"
15152# endif
15153 int F77_DUMMY_MAIN() { return 1; }
15154#endif
15155int
15156main ()
15157{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015158#if BYTE_ORDER != BIG_ENDIAN
15159 not big endian
15160#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015161
15162 ;
15163 return 0;
15164}
15165_ACEOF
15166rm -f conftest.$ac_objext
15167if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15168 (eval $ac_compile) 2>&5
15169 ac_status=$?
15170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15171 (exit $ac_status); } &&
15172 { ac_try='test -s conftest.$ac_objext'
15173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15174 (eval $ac_try) 2>&5
15175 ac_status=$?
15176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15177 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015178 ac_cv_c_bigendian=yes
15179else
Martin v. Löwis11437992002-04-12 09:54:03 +000015180 echo "$as_me: failed program was:" >&5
15181cat conftest.$ac_ext >&5
15182ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015183fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015184rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015185else
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 echo "$as_me: failed program was:" >&5
15187cat conftest.$ac_ext >&5
15188# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015189if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 # try to guess the endianess by grep'ing values into an object file
15191 ac_cv_c_bigendian=unknown
15192 cat >conftest.$ac_ext <<_ACEOF
15193#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015194#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015195short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15196short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15197void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15198short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15199short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15200void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15201#ifdef F77_DUMMY_MAIN
15202# ifdef __cplusplus
15203 extern "C"
15204# endif
15205 int F77_DUMMY_MAIN() { return 1; }
15206#endif
15207int
15208main ()
15209{
15210 _ascii (); _ebcdic ();
15211 ;
15212 return 0;
15213}
15214_ACEOF
15215rm -f conftest.$ac_objext
15216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15217 (eval $ac_compile) 2>&5
15218 ac_status=$?
15219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15220 (exit $ac_status); } &&
15221 { ac_try='test -s conftest.$ac_objext'
15222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15223 (eval $ac_try) 2>&5
15224 ac_status=$?
15225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15226 (exit $ac_status); }; }; then
15227 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15228 ac_cv_c_bigendian=yes
15229fi
15230if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15231 if test "$ac_cv_c_bigendian" = unknown; then
15232 ac_cv_c_bigendian=no
15233 else
15234 # finding both strings is unlikely to happen, but who knows?
15235 ac_cv_c_bigendian=unknown
15236 fi
15237fi
15238else
15239 echo "$as_me: failed program was:" >&5
15240cat conftest.$ac_ext >&5
15241fi
15242rm -f conftest.$ac_objext conftest.$ac_ext
15243else
15244 cat >conftest.$ac_ext <<_ACEOF
15245#line $LINENO "configure"
15246#include "confdefs.h"
15247int
15248main ()
15249{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015250 /* Are we little or big endian? From Harbison&Steele. */
15251 union
15252 {
15253 long l;
15254 char c[sizeof (long)];
15255 } u;
15256 u.l = 1;
15257 exit (u.c[sizeof (long) - 1] == 1);
15258}
Martin v. Löwis11437992002-04-12 09:54:03 +000015259_ACEOF
15260rm -f conftest$ac_exeext
15261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15262 (eval $ac_link) 2>&5
15263 ac_status=$?
15264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15265 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15267 (eval $ac_try) 2>&5
15268 ac_status=$?
15269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15270 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015271 ac_cv_c_bigendian=no
15272else
Martin v. Löwis11437992002-04-12 09:54:03 +000015273 echo "$as_me: program exited with status $ac_status" >&5
15274echo "$as_me: failed program was:" >&5
15275cat conftest.$ac_ext >&5
15276( exit $ac_status )
15277ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015279rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015280fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015281fi
15282rm -f conftest.$ac_objext conftest.$ac_ext
15283fi
15284echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15285echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15286case $ac_cv_c_bigendian in
15287 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015288
Martin v. Löwis11437992002-04-12 09:54:03 +000015289cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015290#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015291_ACEOF
15292 ;;
15293 no)
15294 ;;
15295 *)
15296 { { echo "$as_me:$LINENO: error: unknown endianess
15297presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15298echo "$as_me: error: unknown endianess
15299presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15300 { (exit 1); exit 1; }; } ;;
15301esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015302
Michael W. Hudson54241132001-12-07 15:38:26 +000015303
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015304# Check whether right shifting a negative integer extends the sign bit
15305# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015306echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15307echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15308if test "${ac_cv_rshift_extends_sign+set}" = set; then
15309 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015310else
Martin v. Löwis11437992002-04-12 09:54:03 +000015311
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015312if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015313 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015314else
Martin v. Löwis11437992002-04-12 09:54:03 +000015315 cat >conftest.$ac_ext <<_ACEOF
15316#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015317#include "confdefs.h"
15318
15319int main()
15320{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015321 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015322}
15323
Martin v. Löwis11437992002-04-12 09:54:03 +000015324_ACEOF
15325rm -f conftest$ac_exeext
15326if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15327 (eval $ac_link) 2>&5
15328 ac_status=$?
15329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15330 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15332 (eval $ac_try) 2>&5
15333 ac_status=$?
15334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15335 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015336 ac_cv_rshift_extends_sign=yes
15337else
Martin v. Löwis11437992002-04-12 09:54:03 +000015338 echo "$as_me: program exited with status $ac_status" >&5
15339echo "$as_me: failed program was:" >&5
15340cat conftest.$ac_ext >&5
15341( exit $ac_status )
15342ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015344rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15345fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015346fi
15347
Martin v. Löwis11437992002-04-12 09:54:03 +000015348echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15349echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015350if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015351then
Martin v. Löwis11437992002-04-12 09:54:03 +000015352
15353cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015354#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015355_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015356
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015357fi
15358
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015359# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015360echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15361echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15362if test "${ac_cv_have_getc_unlocked+set}" = set; then
15363 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015364else
Martin v. Löwis11437992002-04-12 09:54:03 +000015365
15366cat >conftest.$ac_ext <<_ACEOF
15367#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015368#include "confdefs.h"
15369#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015370#ifdef F77_DUMMY_MAIN
15371# ifdef __cplusplus
15372 extern "C"
15373# endif
15374 int F77_DUMMY_MAIN() { return 1; }
15375#endif
15376int
15377main ()
15378{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015379
15380 FILE *f = fopen("/dev/null", "r");
15381 flockfile(f);
15382 getc_unlocked(f);
15383 funlockfile(f);
15384
Martin v. Löwis11437992002-04-12 09:54:03 +000015385 ;
15386 return 0;
15387}
15388_ACEOF
15389rm -f conftest.$ac_objext conftest$ac_exeext
15390if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15391 (eval $ac_link) 2>&5
15392 ac_status=$?
15393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15394 (exit $ac_status); } &&
15395 { ac_try='test -s conftest$ac_exeext'
15396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15397 (eval $ac_try) 2>&5
15398 ac_status=$?
15399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15400 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015401 ac_cv_have_getc_unlocked=yes
15402else
Martin v. Löwis11437992002-04-12 09:54:03 +000015403 echo "$as_me: failed program was:" >&5
15404cat conftest.$ac_ext >&5
15405ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015406fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015407rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015408fi
15409
Martin v. Löwis11437992002-04-12 09:54:03 +000015410echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15411echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015412if test "$ac_cv_have_getc_unlocked" = yes
15413then
Martin v. Löwis11437992002-04-12 09:54:03 +000015414
15415cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015416#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015417_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015418
15419fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015420
Martin v. Löwis0daad592001-09-30 21:09:59 +000015421# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015422echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15423echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15424if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15425 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015426else
Martin v. Löwis11437992002-04-12 09:54:03 +000015427 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015428LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015429cat >conftest.$ac_ext <<_ACEOF
15430#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015431#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015432
Guido van Rossum353ae582001-07-10 16:45:32 +000015433/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015434#ifdef __cplusplus
15435extern "C"
15436#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015437/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015438 builtin and then its argument prototype would still apply. */
15439char rl_pre_input_hook ();
15440#ifdef F77_DUMMY_MAIN
15441# ifdef __cplusplus
15442 extern "C"
15443# endif
15444 int F77_DUMMY_MAIN() { return 1; }
15445#endif
15446int
15447main ()
15448{
15449rl_pre_input_hook ();
15450 ;
15451 return 0;
15452}
15453_ACEOF
15454rm -f conftest.$ac_objext conftest$ac_exeext
15455if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15456 (eval $ac_link) 2>&5
15457 ac_status=$?
15458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15459 (exit $ac_status); } &&
15460 { ac_try='test -s conftest$ac_exeext'
15461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15462 (eval $ac_try) 2>&5
15463 ac_status=$?
15464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15465 (exit $ac_status); }; }; then
15466 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015467else
Martin v. Löwis11437992002-04-12 09:54:03 +000015468 echo "$as_me: failed program was:" >&5
15469cat conftest.$ac_ext >&5
15470ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015471fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015472rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15473LIBS=$ac_check_lib_save_LIBS
15474fi
15475echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15476echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15477if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015478
Martin v. Löwis11437992002-04-12 09:54:03 +000015479cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015480#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015481_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015482
Martin v. Löwis0daad592001-09-30 21:09:59 +000015483fi
15484
Michael W. Hudson54241132001-12-07 15:38:26 +000015485
Martin v. Löwis0daad592001-09-30 21:09:59 +000015486# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015487echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15488echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15489if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15490 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015491else
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015493LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015494cat >conftest.$ac_ext <<_ACEOF
15495#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015496#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015497
Martin v. Löwis0daad592001-09-30 21:09:59 +000015498/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015499#ifdef __cplusplus
15500extern "C"
15501#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015502/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015503 builtin and then its argument prototype would still apply. */
15504char rl_completion_matches ();
15505#ifdef F77_DUMMY_MAIN
15506# ifdef __cplusplus
15507 extern "C"
15508# endif
15509 int F77_DUMMY_MAIN() { return 1; }
15510#endif
15511int
15512main ()
15513{
15514rl_completion_matches ();
15515 ;
15516 return 0;
15517}
15518_ACEOF
15519rm -f conftest.$ac_objext conftest$ac_exeext
15520if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15521 (eval $ac_link) 2>&5
15522 ac_status=$?
15523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15524 (exit $ac_status); } &&
15525 { ac_try='test -s conftest$ac_exeext'
15526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15527 (eval $ac_try) 2>&5
15528 ac_status=$?
15529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15530 (exit $ac_status); }; }; then
15531 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015532else
Martin v. Löwis11437992002-04-12 09:54:03 +000015533 echo "$as_me: failed program was:" >&5
15534cat conftest.$ac_ext >&5
15535ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015536fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015537rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15538LIBS=$ac_check_lib_save_LIBS
15539fi
15540echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15541echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15542if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015543
Martin v. Löwis11437992002-04-12 09:54:03 +000015544cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015545#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015546_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015547
Guido van Rossum353ae582001-07-10 16:45:32 +000015548fi
15549
Jack Jansendd19cf82001-12-06 22:36:17 +000015550
Martin v. Löwis11437992002-04-12 09:54:03 +000015551echo "$as_me:$LINENO: checking for broken nice()" >&5
15552echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15553if test "${ac_cv_broken_nice+set}" = set; then
15554 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015555else
Martin v. Löwis11437992002-04-12 09:54:03 +000015556
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015557if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015558 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015559else
Martin v. Löwis11437992002-04-12 09:54:03 +000015560 cat >conftest.$ac_ext <<_ACEOF
15561#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015562#include "confdefs.h"
15563
15564int main()
15565{
15566 int val1 = nice(1);
15567 if (val1 != -1 && val1 == nice(2))
15568 exit(0);
15569 exit(1);
15570}
15571
Martin v. Löwis11437992002-04-12 09:54:03 +000015572_ACEOF
15573rm -f conftest$ac_exeext
15574if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15575 (eval $ac_link) 2>&5
15576 ac_status=$?
15577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15578 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15580 (eval $ac_try) 2>&5
15581 ac_status=$?
15582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15583 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015584 ac_cv_broken_nice=yes
15585else
Martin v. Löwis11437992002-04-12 09:54:03 +000015586 echo "$as_me: program exited with status $ac_status" >&5
15587echo "$as_me: failed program was:" >&5
15588cat conftest.$ac_ext >&5
15589( exit $ac_status )
15590ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015591fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015592rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15593fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015594fi
15595
Martin v. Löwis11437992002-04-12 09:54:03 +000015596echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15597echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015598if test "$ac_cv_broken_nice" = yes
15599then
Martin v. Löwis11437992002-04-12 09:54:03 +000015600
15601cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015602#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015603_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015604
15605fi
15606
Jack Jansen666b1e72001-10-31 12:11:48 +000015607# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015608echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15609echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15610if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15611 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015612else
Martin v. Löwis11437992002-04-12 09:54:03 +000015613 cat >conftest.$ac_ext <<_ACEOF
15614#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015615#include "confdefs.h"
15616#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015617#ifdef F77_DUMMY_MAIN
15618# ifdef __cplusplus
15619 extern "C"
15620# endif
15621 int F77_DUMMY_MAIN() { return 1; }
15622#endif
15623int
15624main ()
15625{
Jack Jansen666b1e72001-10-31 12:11:48 +000015626
15627 int rtn;
15628 rtn = mvwdelch(0,0,0);
15629
Martin v. Löwis11437992002-04-12 09:54:03 +000015630 ;
15631 return 0;
15632}
15633_ACEOF
15634rm -f conftest.$ac_objext
15635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15636 (eval $ac_compile) 2>&5
15637 ac_status=$?
15638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15639 (exit $ac_status); } &&
15640 { ac_try='test -s conftest.$ac_objext'
15641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15642 (eval $ac_try) 2>&5
15643 ac_status=$?
15644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15645 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015646 ac_cv_mvwdelch_is_expression=yes
15647else
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 echo "$as_me: failed program was:" >&5
15649cat conftest.$ac_ext >&5
15650ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015652rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015653fi
15654
Martin v. Löwis11437992002-04-12 09:54:03 +000015655echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15656echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015657
15658if test "$ac_cv_mvwdelch_is_expression" = yes
15659then
Martin v. Löwis11437992002-04-12 09:54:03 +000015660
15661cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015662#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015663_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015664
15665fi
15666
Martin v. Löwis11437992002-04-12 09:54:03 +000015667echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15668echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15669if test "${ac_cv_window_has_flags+set}" = set; then
15670 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015671else
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 cat >conftest.$ac_ext <<_ACEOF
15673#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015674#include "confdefs.h"
15675#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015676#ifdef F77_DUMMY_MAIN
15677# ifdef __cplusplus
15678 extern "C"
15679# endif
15680 int F77_DUMMY_MAIN() { return 1; }
15681#endif
15682int
15683main ()
15684{
Jack Jansen666b1e72001-10-31 12:11:48 +000015685
15686 WINDOW *w;
15687 w->_flags = 0;
15688
Martin v. Löwis11437992002-04-12 09:54:03 +000015689 ;
15690 return 0;
15691}
15692_ACEOF
15693rm -f conftest.$ac_objext
15694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15695 (eval $ac_compile) 2>&5
15696 ac_status=$?
15697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15698 (exit $ac_status); } &&
15699 { ac_try='test -s conftest.$ac_objext'
15700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15701 (eval $ac_try) 2>&5
15702 ac_status=$?
15703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15704 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015705 ac_cv_window_has_flags=yes
15706else
Martin v. Löwis11437992002-04-12 09:54:03 +000015707 echo "$as_me: failed program was:" >&5
15708cat conftest.$ac_ext >&5
15709ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015710fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015711rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015712fi
15713
Martin v. Löwis11437992002-04-12 09:54:03 +000015714echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15715echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015716
Jack Jansen666b1e72001-10-31 12:11:48 +000015717
15718if test "$ac_cv_window_has_flags" = yes
15719then
Martin v. Löwis11437992002-04-12 09:54:03 +000015720
15721cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015722#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015723_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015724
15725fi
15726
Guido van Rossum95713eb2000-05-18 20:53:31 +000015727# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15728# Add sys/socket.h to confdefs.h
15729cat >> confdefs.h <<\EOF
15730#ifdef HAVE_SYS_SOCKET_H
15731#include <sys/socket.h>
15732#endif
15733EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015734echo "$as_me:$LINENO: checking for socklen_t" >&5
15735echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15736if test "${ac_cv_type_socklen_t+set}" = set; then
15737 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015738else
Martin v. Löwis11437992002-04-12 09:54:03 +000015739 cat >conftest.$ac_ext <<_ACEOF
15740#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015741#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015742$ac_includes_default
15743#ifdef F77_DUMMY_MAIN
15744# ifdef __cplusplus
15745 extern "C"
15746# endif
15747 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015748#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015749int
15750main ()
15751{
15752if ((socklen_t *) 0)
15753 return 0;
15754if (sizeof (socklen_t))
15755 return 0;
15756 ;
15757 return 0;
15758}
15759_ACEOF
15760rm -f conftest.$ac_objext
15761if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15762 (eval $ac_compile) 2>&5
15763 ac_status=$?
15764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15765 (exit $ac_status); } &&
15766 { ac_try='test -s conftest.$ac_objext'
15767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15768 (eval $ac_try) 2>&5
15769 ac_status=$?
15770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15771 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015772 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015773else
Martin v. Löwis11437992002-04-12 09:54:03 +000015774 echo "$as_me: failed program was:" >&5
15775cat conftest.$ac_ext >&5
15776ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015777fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015778rm -f conftest.$ac_objext conftest.$ac_ext
15779fi
15780echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15781echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15782if test $ac_cv_type_socklen_t = yes; then
15783 :
15784else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015785
Martin v. Löwis11437992002-04-12 09:54:03 +000015786cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015787#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015788_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015789
15790fi
15791
Michael W. Hudson54241132001-12-07 15:38:26 +000015792
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015793#AC_MSG_CHECKING(for Modules/Setup)
15794#if test ! -f Modules/Setup ; then
15795# if test ! -d Modules ; then
15796# mkdir Modules
15797# fi
15798# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15799# AC_MSG_RESULT(creating)
15800#else
15801# AC_MSG_RESULT(already exists)
15802#fi
15803
Michael W. Hudson54241132001-12-07 15:38:26 +000015804
15805
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015806for h in `(cd $srcdir;echo Python/thread_*.h)`
15807do
15808 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15809done
15810
Michael W. Hudson54241132001-12-07 15:38:26 +000015811
Jack Jansen0b06be72002-06-21 14:48:38 +000015812SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000015813echo "$as_me:$LINENO: checking for build directories" >&5
15814echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015815for dir in $SRCDIRS; do
15816 if test ! -d $dir; then
15817 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015818 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015819done
Martin v. Löwis11437992002-04-12 09:54:03 +000015820echo "$as_me:$LINENO: result: done" >&5
15821echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015822
Guido van Rossum627b2d71993-12-24 10:39:16 +000015823# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015824ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15825cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015826# This file is a shell script that caches the results of configure
15827# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015828# scripts and configure runs, see configure's option --config-cache.
15829# It is not useful on other systems. If it contains results you don't
15830# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015831#
Martin v. Löwis11437992002-04-12 09:54:03 +000015832# config.status only pays attention to the cache file if you give it
15833# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015834#
Martin v. Löwis11437992002-04-12 09:54:03 +000015835# `ac_cv_env_foo' variables (set or unset) will be overriden when
15836# loading this file, other *unset* `ac_cv_foo' will be assigned the
15837# following values.
15838
15839_ACEOF
15840
Guido van Rossumf78abae1997-01-21 22:02:36 +000015841# The following way of writing the cache mishandles newlines in values,
15842# but we know of no workaround that is simple, portable, and efficient.
15843# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015844# Ultrix sh set writes to stderr and can't be redirected directly,
15845# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015846{
15847 (set) 2>&1 |
15848 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15849 *ac_space=\ *)
15850 # `set' does not quote correctly, so add quotes (double-quote
15851 # substitution turns \\\\ into \\, and sed turns \\ into \).
15852 sed -n \
15853 "s/'/'\\\\''/g;
15854 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15855 ;;
15856 *)
15857 # `set' quotes correctly as required by POSIX, so do not add quotes.
15858 sed -n \
15859 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15860 ;;
15861 esac;
15862} |
15863 sed '
15864 t clear
15865 : clear
15866 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15867 t end
15868 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15869 : end' >>confcache
15870if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015871 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015872 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15873 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015874 else
15875 echo "not updating unwritable cache $cache_file"
15876 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015877fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015878rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015879
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015880test "x$prefix" = xNONE && prefix=$ac_default_prefix
15881# Let make expand exec_prefix.
15882test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015883
Martin v. Löwis11437992002-04-12 09:54:03 +000015884# VPATH may cause trouble with some makes, so we remove $(srcdir),
15885# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15886# trailing colons and then remove the whole line if VPATH becomes empty
15887# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015888if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015889 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15890s/:*\$(srcdir):*/:/;
15891s/:*\${srcdir}:*/:/;
15892s/:*@srcdir@:*/:/;
15893s/^\([^=]*=[ ]*\):*/\1/;
15894s/:*$//;
15895s/^[^=]*=[ ]*$//;
15896}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015897fi
15898
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015899DEFS=-DHAVE_CONFIG_H
15900
Martin v. Löwis11437992002-04-12 09:54:03 +000015901
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015902: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015903ac_clean_files_save=$ac_clean_files
15904ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15905{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15906echo "$as_me: creating $CONFIG_STATUS" >&6;}
15907cat >$CONFIG_STATUS <<_ACEOF
15908#! $SHELL
15909# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015910# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015911# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015912# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015913
Martin v. Löwis11437992002-04-12 09:54:03 +000015914debug=false
15915SHELL=\${CONFIG_SHELL-$SHELL}
15916_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015917
Martin v. Löwis11437992002-04-12 09:54:03 +000015918cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015919
Martin v. Löwis11437992002-04-12 09:54:03 +000015920## --------------------- ##
15921## M4sh Initialization. ##
15922## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015923
Martin v. Löwis11437992002-04-12 09:54:03 +000015924# Be Bourne compatible
15925if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15926 emulate sh
15927 NULLCMD=:
15928elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15929 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000015930fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015931
Martin v. Löwis11437992002-04-12 09:54:03 +000015932# NLS nuisances.
15933# Support unset when possible.
15934if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15935 as_unset=unset
15936else
15937 as_unset=false
15938fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015939
Martin v. Löwis11437992002-04-12 09:54:03 +000015940(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
15941 { $as_unset LANG || test "${LANG+set}" != set; } ||
15942 { LANG=C; export LANG; }
15943(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
15944 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
15945 { LC_ALL=C; export LC_ALL; }
15946(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
15947 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
15948 { LC_TIME=C; export LC_TIME; }
15949(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
15950 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
15951 { LC_CTYPE=C; export LC_CTYPE; }
15952(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
15953 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
15954 { LANGUAGE=C; export LANGUAGE; }
15955(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
15956 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
15957 { LC_COLLATE=C; export LC_COLLATE; }
15958(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
15959 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
15960 { LC_NUMERIC=C; export LC_NUMERIC; }
15961(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
15962 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
15963 { LC_MESSAGES=C; export LC_MESSAGES; }
15964
15965
15966# Name of the executable.
15967as_me=`(basename "$0") 2>/dev/null ||
15968$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15969 X"$0" : 'X\(//\)$' \| \
15970 X"$0" : 'X\(/\)$' \| \
15971 . : '\(.\)' 2>/dev/null ||
15972echo X/"$0" |
15973 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15974 /^X\/\(\/\/\)$/{ s//\1/; q; }
15975 /^X\/\(\/\).*/{ s//\1/; q; }
15976 s/.*/./; q'`
15977
15978# PATH needs CR, and LINENO needs CR and PATH.
15979# Avoid depending upon Character Ranges.
15980as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15981as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15982as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15983as_cr_digits='0123456789'
15984as_cr_alnum=$as_cr_Letters$as_cr_digits
15985
15986# The user is always right.
15987if test "${PATH_SEPARATOR+set}" != set; then
15988 echo "#! /bin/sh" >conftest.sh
15989 echo "exit 0" >>conftest.sh
15990 chmod +x conftest.sh
15991 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
15992 PATH_SEPARATOR=';'
15993 else
15994 PATH_SEPARATOR=:
15995 fi
15996 rm -f conftest.sh
15997fi
15998
15999
16000 as_lineno_1=$LINENO
16001 as_lineno_2=$LINENO
16002 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16003 test "x$as_lineno_1" != "x$as_lineno_2" &&
16004 test "x$as_lineno_3" = "x$as_lineno_2" || {
16005 # Find who we are. Look in the path if we contain no path at all
16006 # relative or not.
16007 case $0 in
16008 *[\\/]* ) as_myself=$0 ;;
16009 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16010for as_dir in $PATH
16011do
16012 IFS=$as_save_IFS
16013 test -z "$as_dir" && as_dir=.
16014 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16015done
16016
16017 ;;
16018 esac
16019 # We did not find ourselves, most probably we were run as `sh COMMAND'
16020 # in which case we are not to be found in the path.
16021 if test "x$as_myself" = x; then
16022 as_myself=$0
16023 fi
16024 if test ! -f "$as_myself"; then
16025 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16026echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16027 { (exit 1); exit 1; }; }
16028 fi
16029 case $CONFIG_SHELL in
16030 '')
16031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16032for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16033do
16034 IFS=$as_save_IFS
16035 test -z "$as_dir" && as_dir=.
16036 for as_base in sh bash ksh sh5; do
16037 case $as_dir in
16038 /*)
16039 if ("$as_dir/$as_base" -c '
16040 as_lineno_1=$LINENO
16041 as_lineno_2=$LINENO
16042 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16043 test "x$as_lineno_1" != "x$as_lineno_2" &&
16044 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16045 CONFIG_SHELL=$as_dir/$as_base
16046 export CONFIG_SHELL
16047 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16048 fi;;
16049 esac
16050 done
16051done
16052;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016053 esac
16054
Martin v. Löwis11437992002-04-12 09:54:03 +000016055 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16056 # uniformly replaced by the line number. The first 'sed' inserts a
16057 # line-number line before each line; the second 'sed' does the real
16058 # work. The second script uses 'N' to pair each line-number line
16059 # with the numbered line, and appends trailing '-' during
16060 # substitution so that $LINENO is not a special case at line end.
16061 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16062 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16063 sed '=' <$as_myself |
16064 sed '
16065 N
16066 s,$,-,
16067 : loop
16068 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16069 t loop
16070 s,-$,,
16071 s,^['$as_cr_digits']*\n,,
16072 ' >$as_me.lineno &&
16073 chmod +x $as_me.lineno ||
16074 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16075echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16076 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016077
Martin v. Löwis11437992002-04-12 09:54:03 +000016078 # Don't try to exec as it changes $[0], causing all sort of problems
16079 # (the dirname of $[0] is not the place where we might find the
16080 # original and so on. Autoconf is especially sensible to this).
16081 . ./$as_me.lineno
16082 # Exit status is that of the last command.
16083 exit
16084}
16085
16086
16087case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16088 *c*,-n*) ECHO_N= ECHO_C='
16089' ECHO_T=' ' ;;
16090 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16091 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16092esac
16093
16094if expr a : '\(a\)' >/dev/null 2>&1; then
16095 as_expr=expr
16096else
16097 as_expr=false
16098fi
16099
16100rm -f conf$$ conf$$.exe conf$$.file
16101echo >conf$$.file
16102if ln -s conf$$.file conf$$ 2>/dev/null; then
16103 # We could just check for DJGPP; but this test a) works b) is more generic
16104 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16105 if test -f conf$$.exe; then
16106 # Don't use ln at all; we don't have any links
16107 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016108 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016109 as_ln_s='ln -s'
16110 fi
16111elif ln conf$$.file conf$$ 2>/dev/null; then
16112 as_ln_s=ln
16113else
16114 as_ln_s='cp -p'
16115fi
16116rm -f conf$$ conf$$.exe conf$$.file
16117
16118as_executable_p="test -f"
16119
16120# Sed expression to map a string onto a valid CPP name.
16121as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16122
16123# Sed expression to map a string onto a valid variable name.
16124as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16125
16126
16127# IFS
16128# We need space, tab and new line, in precisely that order.
16129as_nl='
16130'
16131IFS=" $as_nl"
16132
16133# CDPATH.
16134$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16135
16136exec 6>&1
16137
16138# Open the log real soon, to keep \$[0] and so on meaningful, and to
16139# report actual input values of CONFIG_FILES etc. instead of their
16140# values after options handling. Logging --version etc. is OK.
16141exec 5>>config.log
16142{
16143 echo
16144 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16145## Running $as_me. ##
16146_ASBOX
16147} >&5
16148cat >&5 <<_CSEOF
16149
16150This file was extended by $as_me, which was
16151generated by GNU Autoconf 2.53. Invocation command line was
16152
16153 CONFIG_FILES = $CONFIG_FILES
16154 CONFIG_HEADERS = $CONFIG_HEADERS
16155 CONFIG_LINKS = $CONFIG_LINKS
16156 CONFIG_COMMANDS = $CONFIG_COMMANDS
16157 $ $0 $@
16158
16159_CSEOF
16160echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16161echo >&5
16162_ACEOF
16163
16164# Files that config.status was made for.
16165if test -n "$ac_config_files"; then
16166 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16167fi
16168
16169if test -n "$ac_config_headers"; then
16170 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16171fi
16172
16173if test -n "$ac_config_links"; then
16174 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16175fi
16176
16177if test -n "$ac_config_commands"; then
16178 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16179fi
16180
16181cat >>$CONFIG_STATUS <<\_ACEOF
16182
16183ac_cs_usage="\
16184\`$as_me' instantiates files from templates according to the
16185current configuration.
16186
16187Usage: $0 [OPTIONS] [FILE]...
16188
16189 -h, --help print this help, then exit
16190 -V, --version print version number, then exit
16191 -d, --debug don't remove temporary files
16192 --recheck update $as_me by reconfiguring in the same conditions
16193 --file=FILE[:TEMPLATE]
16194 instantiate the configuration file FILE
16195 --header=FILE[:TEMPLATE]
16196 instantiate the configuration header FILE
16197
16198Configuration files:
16199$config_files
16200
16201Configuration headers:
16202$config_headers
16203
16204Report bugs to <bug-autoconf@gnu.org>."
16205_ACEOF
16206
16207cat >>$CONFIG_STATUS <<_ACEOF
16208ac_cs_version="\\
16209config.status
16210configured by $0, generated by GNU Autoconf 2.53,
16211 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16212
16213Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16214Free Software Foundation, Inc.
16215This config.status script is free software; the Free Software Foundation
16216gives unlimited permission to copy, distribute and modify it."
16217srcdir=$srcdir
16218INSTALL="$INSTALL"
16219_ACEOF
16220
16221cat >>$CONFIG_STATUS <<\_ACEOF
16222# If no file are specified by the user, then we need to provide default
16223# value. By we need to know if files were specified by the user.
16224ac_need_defaults=:
16225while test $# != 0
16226do
16227 case $1 in
16228 --*=*)
16229 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16230 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16231 shift
16232 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16233 shift
16234 ;;
16235 -*);;
16236 *) # This is not an option, so the user has probably given explicit
16237 # arguments.
16238 ac_need_defaults=false;;
16239 esac
16240
16241 case $1 in
16242 # Handling of the options.
16243_ACEOF
16244cat >>$CONFIG_STATUS <<_ACEOF
16245 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16246 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16247 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16248_ACEOF
16249cat >>$CONFIG_STATUS <<\_ACEOF
16250 --version | --vers* | -V )
16251 echo "$ac_cs_version"; exit 0 ;;
16252 --he | --h)
16253 # Conflict between --help and --header
16254 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16255Try \`$0 --help' for more information." >&5
16256echo "$as_me: error: ambiguous option: $1
16257Try \`$0 --help' for more information." >&2;}
16258 { (exit 1); exit 1; }; };;
16259 --help | --hel | -h )
16260 echo "$ac_cs_usage"; exit 0 ;;
16261 --debug | --d* | -d )
16262 debug=: ;;
16263 --file | --fil | --fi | --f )
16264 shift
16265 CONFIG_FILES="$CONFIG_FILES $1"
16266 ac_need_defaults=false;;
16267 --header | --heade | --head | --hea )
16268 shift
16269 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16270 ac_need_defaults=false;;
16271
16272 # This is an error.
16273 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16274Try \`$0 --help' for more information." >&5
16275echo "$as_me: error: unrecognized option: $1
16276Try \`$0 --help' for more information." >&2;}
16277 { (exit 1); exit 1; }; } ;;
16278
16279 *) ac_config_targets="$ac_config_targets $1" ;;
16280
16281 esac
16282 shift
16283done
16284
16285_ACEOF
16286
16287
16288
16289
16290
16291cat >>$CONFIG_STATUS <<\_ACEOF
16292for ac_config_target in $ac_config_targets
16293do
16294 case "$ac_config_target" in
16295 # Handling of arguments.
16296 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16297 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16298 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16299 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16300echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16301 { (exit 1); exit 1; }; };;
16302 esac
16303done
16304
16305# If the user did not use the arguments to specify the items to instantiate,
16306# then the envvar interface is used. Set only those that are not.
16307# We use the long form for the default assignment because of an extremely
16308# bizarre bug on SunOS 4.1.3.
16309if $ac_need_defaults; then
16310 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16311 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16312fi
16313
16314# Create a temporary directory, and hook for its removal unless debugging.
16315$debug ||
16316{
16317 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16318 trap '{ (exit 1); exit 1; }' 1 2 13 15
16319}
16320
16321# Create a (secure) tmp directory for tmp files.
16322: ${TMPDIR=/tmp}
16323{
16324 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16325 test -n "$tmp" && test -d "$tmp"
16326} ||
16327{
16328 tmp=$TMPDIR/cs$$-$RANDOM
16329 (umask 077 && mkdir $tmp)
16330} ||
16331{
16332 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16333 { (exit 1); exit 1; }
16334}
16335
16336_ACEOF
16337
16338cat >>$CONFIG_STATUS <<_ACEOF
16339
16340#
16341# CONFIG_FILES section.
16342#
16343
16344# No need to generate the scripts if there are no CONFIG_FILES.
16345# This happens for instance when ./config.status config.h
16346if test -n "\$CONFIG_FILES"; then
16347 # Protect against being on the right side of a sed subst in config.status.
16348 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16349 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16350s,@SHELL@,$SHELL,;t t
16351s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16352s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16353s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16354s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16355s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16356s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16357s,@exec_prefix@,$exec_prefix,;t t
16358s,@prefix@,$prefix,;t t
16359s,@program_transform_name@,$program_transform_name,;t t
16360s,@bindir@,$bindir,;t t
16361s,@sbindir@,$sbindir,;t t
16362s,@libexecdir@,$libexecdir,;t t
16363s,@datadir@,$datadir,;t t
16364s,@sysconfdir@,$sysconfdir,;t t
16365s,@sharedstatedir@,$sharedstatedir,;t t
16366s,@localstatedir@,$localstatedir,;t t
16367s,@libdir@,$libdir,;t t
16368s,@includedir@,$includedir,;t t
16369s,@oldincludedir@,$oldincludedir,;t t
16370s,@infodir@,$infodir,;t t
16371s,@mandir@,$mandir,;t t
16372s,@build_alias@,$build_alias,;t t
16373s,@host_alias@,$host_alias,;t t
16374s,@target_alias@,$target_alias,;t t
16375s,@DEFS@,$DEFS,;t t
16376s,@ECHO_C@,$ECHO_C,;t t
16377s,@ECHO_N@,$ECHO_N,;t t
16378s,@ECHO_T@,$ECHO_T,;t t
16379s,@LIBS@,$LIBS,;t t
16380s,@VERSION@,$VERSION,;t t
16381s,@SOVERSION@,$SOVERSION,;t t
16382s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16383s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16384s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16385s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16386s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16387s,@MACHDEP@,$MACHDEP,;t t
16388s,@SGI_ABI@,$SGI_ABI,;t t
16389s,@CXX@,$CXX,;t t
16390s,@MAINOBJ@,$MAINOBJ,;t t
16391s,@EXEEXT@,$EXEEXT,;t t
16392s,@CC@,$CC,;t t
16393s,@CFLAGS@,$CFLAGS,;t t
16394s,@LDFLAGS@,$LDFLAGS,;t t
16395s,@CPPFLAGS@,$CPPFLAGS,;t t
16396s,@ac_ct_CC@,$ac_ct_CC,;t t
16397s,@OBJEXT@,$OBJEXT,;t t
16398s,@CPP@,$CPP,;t t
16399s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16400s,@LIBRARY@,$LIBRARY,;t t
16401s,@LDLIBRARY@,$LDLIBRARY,;t t
16402s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16403s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16404s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16405s,@INSTSONAME@,$INSTSONAME,;t t
16406s,@RUNSHARED@,$RUNSHARED,;t t
16407s,@LINKCC@,$LINKCC,;t t
16408s,@RANLIB@,$RANLIB,;t t
16409s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16410s,@AR@,$AR,;t t
16411s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16412s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16413s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16414s,@LN@,$LN,;t t
16415s,@OPT@,$OPT,;t t
16416s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16417s,@SO@,$SO,;t t
16418s,@LDSHARED@,$LDSHARED,;t t
16419s,@BLDSHARED@,$BLDSHARED,;t t
16420s,@CCSHARED@,$CCSHARED,;t t
16421s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16422s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016423s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016424s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16425s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16426s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16427s,@LDLAST@,$LDLAST,;t t
16428s,@THREADOBJ@,$THREADOBJ,;t t
16429s,@DLINCLDIR@,$DLINCLDIR,;t t
16430s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16431s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16432s,@LIBOBJS@,$LIBOBJS,;t t
16433s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16434s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16435s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16436s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16437s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16438s,@LIBM@,$LIBM,;t t
16439s,@LIBC@,$LIBC,;t t
16440s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16441s,@THREADHEADERS@,$THREADHEADERS,;t t
16442s,@SRCDIRS@,$SRCDIRS,;t t
16443CEOF
16444
16445_ACEOF
16446
16447 cat >>$CONFIG_STATUS <<\_ACEOF
16448 # Split the substitutions into bite-sized pieces for seds with
16449 # small command number limits, like on Digital OSF/1 and HP-UX.
16450 ac_max_sed_lines=48
16451 ac_sed_frag=1 # Number of current file.
16452 ac_beg=1 # First line for current file.
16453 ac_end=$ac_max_sed_lines # Line after last line for current file.
16454 ac_more_lines=:
16455 ac_sed_cmds=
16456 while $ac_more_lines; do
16457 if test $ac_beg -gt 1; then
16458 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16459 else
16460 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16461 fi
16462 if test ! -s $tmp/subs.frag; then
16463 ac_more_lines=false
16464 else
16465 # The purpose of the label and of the branching condition is to
16466 # speed up the sed processing (if there are no `@' at all, there
16467 # is no need to browse any of the substitutions).
16468 # These are the two extra sed commands mentioned above.
16469 (echo ':t
16470 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16471 if test -z "$ac_sed_cmds"; then
16472 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16473 else
16474 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16475 fi
16476 ac_sed_frag=`expr $ac_sed_frag + 1`
16477 ac_beg=$ac_end
16478 ac_end=`expr $ac_end + $ac_max_sed_lines`
16479 fi
16480 done
16481 if test -z "$ac_sed_cmds"; then
16482 ac_sed_cmds=cat
16483 fi
16484fi # test -n "$CONFIG_FILES"
16485
16486_ACEOF
16487cat >>$CONFIG_STATUS <<\_ACEOF
16488for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16489 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16490 case $ac_file in
16491 - | *:- | *:-:* ) # input from stdin
16492 cat >$tmp/stdin
16493 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16494 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16495 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16496 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16497 * ) ac_file_in=$ac_file.in ;;
16498 esac
16499
16500 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16501 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16502$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16503 X"$ac_file" : 'X\(//\)[^/]' \| \
16504 X"$ac_file" : 'X\(//\)$' \| \
16505 X"$ac_file" : 'X\(/\)' \| \
16506 . : '\(.\)' 2>/dev/null ||
16507echo X"$ac_file" |
16508 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16509 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16510 /^X\(\/\/\)$/{ s//\1/; q; }
16511 /^X\(\/\).*/{ s//\1/; q; }
16512 s/.*/./; q'`
16513 { case "$ac_dir" in
16514 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16515 *) as_incr_dir=.;;
16516esac
16517as_dummy="$ac_dir"
16518for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16519 case $as_mkdir_dir in
16520 # Skip DOS drivespec
16521 ?:) as_incr_dir=$as_mkdir_dir ;;
16522 *)
16523 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16524 test -d "$as_incr_dir" ||
16525 mkdir "$as_incr_dir" ||
16526 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16527echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16528 { (exit 1); exit 1; }; }
16529 ;;
16530 esac
16531done; }
16532
16533 ac_builddir=.
16534
16535if test "$ac_dir" != .; then
16536 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16537 # A "../" for each directory in $ac_dir_suffix.
16538 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16539else
16540 ac_dir_suffix= ac_top_builddir=
16541fi
16542
16543case $srcdir in
16544 .) # No --srcdir option. We are building in place.
16545 ac_srcdir=.
16546 if test -z "$ac_top_builddir"; then
16547 ac_top_srcdir=.
16548 else
16549 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16550 fi ;;
16551 [\\/]* | ?:[\\/]* ) # Absolute path.
16552 ac_srcdir=$srcdir$ac_dir_suffix;
16553 ac_top_srcdir=$srcdir ;;
16554 *) # Relative path.
16555 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16556 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16557esac
16558# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16559# absolute.
16560ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16561ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16562ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16563ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16564
16565
16566 case $INSTALL in
16567 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16568 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16569 esac
16570
16571 if test x"$ac_file" != x-; then
16572 { echo "$as_me:$LINENO: creating $ac_file" >&5
16573echo "$as_me: creating $ac_file" >&6;}
16574 rm -f "$ac_file"
16575 fi
16576 # Let's still pretend it is `configure' which instantiates (i.e., don't
16577 # use $as_me), people would be surprised to read:
16578 # /* config.h. Generated by config.status. */
16579 if test x"$ac_file" = x-; then
16580 configure_input=
16581 else
16582 configure_input="$ac_file. "
16583 fi
16584 configure_input=$configure_input"Generated from `echo $ac_file_in |
16585 sed 's,.*/,,'` by configure."
16586
16587 # First look for the input files in the build tree, otherwise in the
16588 # src tree.
16589 ac_file_inputs=`IFS=:
16590 for f in $ac_file_in; do
16591 case $f in
16592 -) echo $tmp/stdin ;;
16593 [\\/$]*)
16594 # Absolute (can't be DOS-style, as IFS=:)
16595 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16596echo "$as_me: error: cannot find input file: $f" >&2;}
16597 { (exit 1); exit 1; }; }
16598 echo $f;;
16599 *) # Relative
16600 if test -f "$f"; then
16601 # Build tree
16602 echo $f
16603 elif test -f "$srcdir/$f"; then
16604 # Source tree
16605 echo $srcdir/$f
16606 else
16607 # /dev/null tree
16608 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16609echo "$as_me: error: cannot find input file: $f" >&2;}
16610 { (exit 1); exit 1; }; }
16611 fi;;
16612 esac
16613 done` || { (exit 1); exit 1; }
16614_ACEOF
16615cat >>$CONFIG_STATUS <<_ACEOF
16616 sed "$ac_vpsub
16617$extrasub
16618_ACEOF
16619cat >>$CONFIG_STATUS <<\_ACEOF
16620:t
16621/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16622s,@configure_input@,$configure_input,;t t
16623s,@srcdir@,$ac_srcdir,;t t
16624s,@abs_srcdir@,$ac_abs_srcdir,;t t
16625s,@top_srcdir@,$ac_top_srcdir,;t t
16626s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16627s,@builddir@,$ac_builddir,;t t
16628s,@abs_builddir@,$ac_abs_builddir,;t t
16629s,@top_builddir@,$ac_top_builddir,;t t
16630s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16631s,@INSTALL@,$ac_INSTALL,;t t
16632" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16633 rm -f $tmp/stdin
16634 if test x"$ac_file" != x-; then
16635 mv $tmp/out $ac_file
16636 else
16637 cat $tmp/out
16638 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016639 fi
16640
Martin v. Löwis11437992002-04-12 09:54:03 +000016641done
16642_ACEOF
16643cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016644
Martin v. Löwis11437992002-04-12 09:54:03 +000016645#
16646# CONFIG_HEADER section.
16647#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016648
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016649# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16650# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016651#
16652# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016653ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16654ac_dB='[ ].*$,\1#\2'
16655ac_dC=' '
16656ac_dD=',;t'
16657# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16658ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16659ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016660ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016661ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016662
Martin v. Löwis11437992002-04-12 09:54:03 +000016663for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016664 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016665 case $ac_file in
16666 - | *:- | *:-:* ) # input from stdin
16667 cat >$tmp/stdin
16668 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16669 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16670 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16671 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16672 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016673 esac
16674
Martin v. Löwis11437992002-04-12 09:54:03 +000016675 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16676echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016677
Martin v. Löwis11437992002-04-12 09:54:03 +000016678 # First look for the input files in the build tree, otherwise in the
16679 # src tree.
16680 ac_file_inputs=`IFS=:
16681 for f in $ac_file_in; do
16682 case $f in
16683 -) echo $tmp/stdin ;;
16684 [\\/$]*)
16685 # Absolute (can't be DOS-style, as IFS=:)
16686 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16687echo "$as_me: error: cannot find input file: $f" >&2;}
16688 { (exit 1); exit 1; }; }
16689 echo $f;;
16690 *) # Relative
16691 if test -f "$f"; then
16692 # Build tree
16693 echo $f
16694 elif test -f "$srcdir/$f"; then
16695 # Source tree
16696 echo $srcdir/$f
16697 else
16698 # /dev/null tree
16699 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16700echo "$as_me: error: cannot find input file: $f" >&2;}
16701 { (exit 1); exit 1; }; }
16702 fi;;
16703 esac
16704 done` || { (exit 1); exit 1; }
16705 # Remove the trailing spaces.
16706 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016707
Martin v. Löwis11437992002-04-12 09:54:03 +000016708_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016709
Martin v. Löwis11437992002-04-12 09:54:03 +000016710# Transform confdefs.h into two sed scripts, `conftest.defines' and
16711# `conftest.undefs', that substitutes the proper values into
16712# config.h.in to produce config.h. The first handles `#define'
16713# templates, and the second `#undef' templates.
16714# And first: Protect against being on the right side of a sed subst in
16715# config.status. Protect against being in an unquoted here document
16716# in config.status.
16717rm -f conftest.defines conftest.undefs
16718# Using a here document instead of a string reduces the quoting nightmare.
16719# Putting comments in sed scripts is not portable.
16720#
16721# `end' is used to avoid that the second main sed command (meant for
16722# 0-ary CPP macros) applies to n-ary macro definitions.
16723# See the Autoconf documentation for `clear'.
16724cat >confdef2sed.sed <<\_ACEOF
16725s/[\\&,]/\\&/g
16726s,[\\$`],\\&,g
16727t clear
16728: clear
16729s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16730t end
16731s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16732: end
16733_ACEOF
16734# If some macros were called several times there might be several times
16735# the same #defines, which is useless. Nevertheless, we may not want to
16736# sort them, since we want the *last* AC-DEFINE to be honored.
16737uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16738sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16739rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016740
16741# This sed command replaces #undef with comments. This is necessary, for
16742# example, in the case of _POSIX_SOURCE, which is predefined and required
16743# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016744cat >>conftest.undefs <<\_ACEOF
16745s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16746_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016747
Martin v. Löwis11437992002-04-12 09:54:03 +000016748# Break up conftest.defines because some shells have a limit on the size
16749# of here documents, and old seds have small limits too (100 cmds).
16750echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16751echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16752echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16753echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016754rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016755while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016756do
Martin v. Löwis11437992002-04-12 09:54:03 +000016757 # Write a limited-size here document to $tmp/defines.sed.
16758 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16759 # Speed up: don't consider the non `#define' lines.
16760 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16761 # Work around the forget-to-reset-the-flag bug.
16762 echo 't clr' >>$CONFIG_STATUS
16763 echo ': clr' >>$CONFIG_STATUS
16764 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016765 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016766 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16767 rm -f $tmp/in
16768 mv $tmp/out $tmp/in
16769' >>$CONFIG_STATUS
16770 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16771 rm -f conftest.defines
16772 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016773done
Martin v. Löwis11437992002-04-12 09:54:03 +000016774rm -f conftest.defines
16775echo ' fi # egrep' >>$CONFIG_STATUS
16776echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016777
Martin v. Löwis11437992002-04-12 09:54:03 +000016778# Break up conftest.undefs because some shells have a limit on the size
16779# of here documents, and old seds have small limits too (100 cmds).
16780echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16781rm -f conftest.tail
16782while grep . conftest.undefs >/dev/null
16783do
16784 # Write a limited-size here document to $tmp/undefs.sed.
16785 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16786 # Speed up: don't consider the non `#undef'
16787 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16788 # Work around the forget-to-reset-the-flag bug.
16789 echo 't clr' >>$CONFIG_STATUS
16790 echo ': clr' >>$CONFIG_STATUS
16791 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16792 echo 'CEOF
16793 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16794 rm -f $tmp/in
16795 mv $tmp/out $tmp/in
16796' >>$CONFIG_STATUS
16797 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16798 rm -f conftest.undefs
16799 mv conftest.tail conftest.undefs
16800done
16801rm -f conftest.undefs
16802
16803cat >>$CONFIG_STATUS <<\_ACEOF
16804 # Let's still pretend it is `configure' which instantiates (i.e., don't
16805 # use $as_me), people would be surprised to read:
16806 # /* config.h. Generated by config.status. */
16807 if test x"$ac_file" = x-; then
16808 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016809 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016810 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016811 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016812 cat $tmp/in >>$tmp/config.h
16813 rm -f $tmp/in
16814 if test x"$ac_file" != x-; then
16815 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16816 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16817echo "$as_me: $ac_file is unchanged" >&6;}
16818 else
16819 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16820$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16821 X"$ac_file" : 'X\(//\)[^/]' \| \
16822 X"$ac_file" : 'X\(//\)$' \| \
16823 X"$ac_file" : 'X\(/\)' \| \
16824 . : '\(.\)' 2>/dev/null ||
16825echo X"$ac_file" |
16826 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16827 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16828 /^X\(\/\/\)$/{ s//\1/; q; }
16829 /^X\(\/\).*/{ s//\1/; q; }
16830 s/.*/./; q'`
16831 { case "$ac_dir" in
16832 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16833 *) as_incr_dir=.;;
16834esac
16835as_dummy="$ac_dir"
16836for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16837 case $as_mkdir_dir in
16838 # Skip DOS drivespec
16839 ?:) as_incr_dir=$as_mkdir_dir ;;
16840 *)
16841 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16842 test -d "$as_incr_dir" ||
16843 mkdir "$as_incr_dir" ||
16844 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16845echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16846 { (exit 1); exit 1; }; }
16847 ;;
16848 esac
16849done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016850
Martin v. Löwis11437992002-04-12 09:54:03 +000016851 rm -f $ac_file
16852 mv $tmp/config.h $ac_file
16853 fi
16854 else
16855 cat $tmp/config.h
16856 rm -f $tmp/config.h
16857 fi
16858done
16859_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016860
Martin v. Löwis11437992002-04-12 09:54:03 +000016861cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016862
Martin v. Löwis11437992002-04-12 09:54:03 +000016863{ (exit 0); exit 0; }
16864_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016865chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016866ac_clean_files=$ac_clean_files_save
16867
16868
16869# configure is writing to config.log, and then calls config.status.
16870# config.status does its own redirection, appending to config.log.
16871# Unfortunately, on DOS this fails, as config.log is still kept open
16872# by configure, so config.status won't be able to write to it; its
16873# output is simply discarded. So we exec the FD to /dev/null,
16874# effectively closing config.log, so it can be properly (re)opened and
16875# appended to by config.status. When coming back to configure, we
16876# need to make the FD available again.
16877if test "$no_create" != yes; then
16878 ac_cs_success=:
16879 exec 5>/dev/null
16880 $SHELL $CONFIG_STATUS || ac_cs_success=false
16881 exec 5>>config.log
16882 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16883 # would make configure fail if this is the last instruction.
16884 $ac_cs_success || { (exit 1); exit 1; }
16885fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016886
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016887
16888echo "creating Setup"
16889if test ! -f Modules/Setup
16890then
16891 cp $srcdir/Modules/Setup.dist Modules/Setup
16892fi
16893
16894echo "creating Setup.local"
16895if test ! -f Modules/Setup.local
16896then
16897 echo "# Edit this file for local setup changes" >Modules/Setup.local
16898fi
16899
16900echo "creating Makefile"
16901$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16902 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016903 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016904mv config.c Modules