blob: aca04101775877e35238f1167dff11998b202493 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00002# From configure.in Revision: 1.317 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis11437992002-04-12 09:54:03 +00004# Generated by GNU Autoconf 2.53.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000010
Martin v. Löwis11437992002-04-12 09:54:03 +000011if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
18## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
30# NLS nuisances.
31# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
38(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
62
63
64# Name of the executable.
65as_me=`(basename "$0") 2>/dev/null ||
66$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
89 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
90 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
256PACKAGE_NAME=
257PACKAGE_TARNAME=
258PACKAGE_VERSION=
259PACKAGE_STRING=
260PACKAGE_BUGREPORT=
261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
764\`configure' configures this package to adapt to many kinds of systems.
765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
820
821 cat <<\_ACEOF
822
823Optional Features:
824 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
825 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
826 --enable-framework=INSTALLDIR Build (MacOSX|Darwin) framework
827 --enable-shared disable/enable building shared python library
828 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
829 --enable-ipv6 Enable ipv6 (with ipv4) support
830 --disable-ipv6 Disable ipv6 support
831 --enable-unicode=ucs2,ucs4 Enable Unicode strings (default is yes)
832
833Optional Packages:
834 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
835 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
836 --without-gcc never use gcc
837 --with-cxx=<compiler> enable C++ support
838 --with-suffix=.exe set executable suffix
839 --with-pydebug build with Py_DEBUG defined
840 --with-libs='lib1 ...' link against additional libs
841 --with-signal-module disable/enable signal module
842 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
843 --with(out)-threads=DIRECTORY disable/enable thread support
844 --with(out)-thread=DIRECTORY deprecated; use --with(out)-threads
845 --with-pth use GNU pth threading libraries
846 --with(out)-cycle-gc disable/enable garbage collection
Jack Jansen7b8c7542002-04-14 20:12:41 +0000847 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 --with(out)-pymalloc disable/enable specialized mallocs
849 --with-wctype-functions use wctype.h functions
850 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
851 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
852 --with-fpectl enable SIGFPE catching
853 --with-libm=STRING math library
854 --with-libc=STRING C library
855
856Some influential environment variables:
857 CC C compiler command
858 CFLAGS C compiler flags
859 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
860 nonstandard directory <lib dir>
861 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
862 headers in a nonstandard directory <include dir>
863 CPP C preprocessor
864
865Use these variables to override the choices made by `configure' or to help
866it to find libraries and programs with nonstandard names/locations.
867
868_ACEOF
869fi
870
871if test "$ac_init_help" = "recursive"; then
872 # If there are subdirs, report their specific --help.
873 ac_popdir=`pwd`
874 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
875 test -d $ac_dir || continue
876 ac_builddir=.
877
878if test "$ac_dir" != .; then
879 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
880 # A "../" for each directory in $ac_dir_suffix.
881 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
882else
883 ac_dir_suffix= ac_top_builddir=
884fi
885
886case $srcdir in
887 .) # No --srcdir option. We are building in place.
888 ac_srcdir=.
889 if test -z "$ac_top_builddir"; then
890 ac_top_srcdir=.
891 else
892 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
893 fi ;;
894 [\\/]* | ?:[\\/]* ) # Absolute path.
895 ac_srcdir=$srcdir$ac_dir_suffix;
896 ac_top_srcdir=$srcdir ;;
897 *) # Relative path.
898 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
899 ac_top_srcdir=$ac_top_builddir$srcdir ;;
900esac
901# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
902# absolute.
903ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
904ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
905ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
906ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
907
908 cd $ac_dir
909 # Check for guested configure; otherwise get Cygnus style configure.
910 if test -f $ac_srcdir/configure.gnu; then
911 echo
912 $SHELL $ac_srcdir/configure.gnu --help=recursive
913 elif test -f $ac_srcdir/configure; then
914 echo
915 $SHELL $ac_srcdir/configure --help=recursive
916 elif test -f $ac_srcdir/configure.ac ||
917 test -f $ac_srcdir/configure.in; then
918 echo
919 $ac_configure --help
920 else
921 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
922 fi
923 cd $ac_popdir
924 done
925fi
926
927test -n "$ac_init_help" && exit 0
928if $ac_init_version; then
929 cat <<\_ACEOF
930
931Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
932Free Software Foundation, Inc.
933This configure script is free software; the Free Software Foundation
934gives unlimited permission to copy, distribute and modify it.
935_ACEOF
936 exit 0
937fi
938exec 5>config.log
939cat >&5 <<_ACEOF
940This file contains any messages produced by compilers while
941running configure, to aid debugging if configure makes a mistake.
942
943It was created by $as_me, which was
944generated by GNU Autoconf 2.53. Invocation command line was
945
946 $ $0 $@
947
948_ACEOF
949{
950cat <<_ASUNAME
951## --------- ##
952## Platform. ##
953## --------- ##
954
955hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
956uname -m = `(uname -m) 2>/dev/null || echo unknown`
957uname -r = `(uname -r) 2>/dev/null || echo unknown`
958uname -s = `(uname -s) 2>/dev/null || echo unknown`
959uname -v = `(uname -v) 2>/dev/null || echo unknown`
960
961/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
962/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
963
964/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
965/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
966/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
967hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
968/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
969/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
970/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
971
972_ASUNAME
973
974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
975for as_dir in $PATH
976do
977 IFS=$as_save_IFS
978 test -z "$as_dir" && as_dir=.
979 echo "PATH: $as_dir"
980done
981
982} >&5
983
984cat >&5 <<_ACEOF
985
986
987## ----------- ##
988## Core tests. ##
989## ----------- ##
990
991_ACEOF
992
993
994# Keep a trace of the command line.
995# Strip out --no-create and --no-recursion so they do not pile up.
996# Also quote any args containing shell meta-characters.
997ac_configure_args=
998ac_sep=
999for ac_arg
1000do
1001 case $ac_arg in
1002 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1003 | --no-cr | --no-c | -n ) continue ;;
1004 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006 continue ;;
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1009 esac
1010 case " $ac_configure_args " in
1011 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1012 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1013 ac_sep=" " ;;
1014 esac
1015 # Get rid of the leading space.
1016done
1017
1018# When interrupted or exit'd, cleanup temporary files, and complete
1019# config.log. We remove comments because anyway the quotes in there
1020# would cause problems or look ugly.
1021# WARNING: Be sure not to use single quotes in there, as some shells,
1022# such as our DU 5.0 friend, will then `close' the trap.
1023trap 'exit_status=$?
1024 # Save into config.log some information that might help in debugging.
1025 {
1026 echo
1027 cat <<\_ASBOX
1028## ---------------- ##
1029## Cache variables. ##
1030## ---------------- ##
1031_ASBOX
1032 echo
1033 # The following way of writing the cache mishandles newlines in values,
1034{
1035 (set) 2>&1 |
1036 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1037 *ac_space=\ *)
1038 sed -n \
1039 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1040 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1041 ;;
1042 *)
1043 sed -n \
1044 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1045 ;;
1046 esac;
1047}
1048 echo
1049 if test -s confdefs.h; then
1050 cat <<\_ASBOX
1051## ----------- ##
1052## confdefs.h. ##
1053## ----------- ##
1054_ASBOX
1055 echo
1056 sed "/^$/d" confdefs.h
1057 echo
1058 fi
1059 test "$ac_signal" != 0 &&
1060 echo "$as_me: caught signal $ac_signal"
1061 echo "$as_me: exit $exit_status"
1062 } >&5
1063 rm -f core core.* *.core &&
1064 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1065 exit $exit_status
1066 ' 0
1067for ac_signal in 1 2 13 15; do
1068 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1069done
1070ac_signal=0
1071
1072# confdefs.h avoids OS command line length limits that DEFS can exceed.
1073rm -rf conftest* confdefs.h
1074# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1075echo >confdefs.h
1076
1077# Predefined preprocessor variables.
1078
1079cat >>confdefs.h <<_ACEOF
1080#define PACKAGE_NAME "$PACKAGE_NAME"
1081_ACEOF
1082
1083
1084cat >>confdefs.h <<_ACEOF
1085#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1086_ACEOF
1087
1088
1089cat >>confdefs.h <<_ACEOF
1090#define PACKAGE_VERSION "$PACKAGE_VERSION"
1091_ACEOF
1092
1093
1094cat >>confdefs.h <<_ACEOF
1095#define PACKAGE_STRING "$PACKAGE_STRING"
1096_ACEOF
1097
1098
1099cat >>confdefs.h <<_ACEOF
1100#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1101_ACEOF
1102
1103
1104# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105# Prefer explicitly selected file to automatically selected ones.
1106if test -z "$CONFIG_SITE"; then
1107 if test "x$prefix" != xNONE; then
1108 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1109 else
1110 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1111 fi
1112fi
1113for ac_site_file in $CONFIG_SITE; do
1114 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1116echo "$as_me: loading site script $ac_site_file" >&6;}
1117 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 . "$ac_site_file"
1119 fi
1120done
1121
1122if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 # Some versions of bash will fail to source /dev/null (special
1124 # files actually), so we avoid doing that.
1125 if test -f "$cache_file"; then
1126 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1127echo "$as_me: loading cache $cache_file" >&6;}
1128 case $cache_file in
1129 [\\/]* | ?:[\\/]* ) . $cache_file;;
1130 *) . ./$cache_file;;
1131 esac
1132 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133else
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1135echo "$as_me: creating cache $cache_file" >&6;}
1136 >$cache_file
1137fi
1138
1139# Check that the precious variables saved in the cache have kept the same
1140# value.
1141ac_cache_corrupted=false
1142for ac_var in `(set) 2>&1 |
1143 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1144 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1145 eval ac_new_set=\$ac_env_${ac_var}_set
1146 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1147 eval ac_new_val="\$ac_env_${ac_var}_value"
1148 case $ac_old_set,$ac_new_set in
1149 set,)
1150 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1151echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1152 ac_cache_corrupted=: ;;
1153 ,set)
1154 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1155echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1156 ac_cache_corrupted=: ;;
1157 ,);;
1158 *)
1159 if test "x$ac_old_val" != "x$ac_new_val"; then
1160 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1161echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1162 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1163echo "$as_me: former value: $ac_old_val" >&2;}
1164 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1165echo "$as_me: current value: $ac_new_val" >&2;}
1166 ac_cache_corrupted=:
1167 fi;;
1168 esac
1169 # Pass precious variables to config.status.
1170 if test "$ac_new_set" = set; then
1171 case $ac_new_val in
1172 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1173 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1174 *) ac_arg=$ac_var=$ac_new_val ;;
1175 esac
1176 case " $ac_configure_args " in
1177 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1178 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1179 esac
1180 fi
1181done
1182if $ac_cache_corrupted; then
1183 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1184echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1185 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1186echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1187 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188fi
1189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1194ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195
Guido van Rossum627b2d71993-12-24 10:39:16 +00001196
Michael W. Hudson54241132001-12-07 15:38:26 +00001197
1198
Guido van Rossum627b2d71993-12-24 10:39:16 +00001199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213ac_config_headers="$ac_config_headers pyconfig.h"
1214
1215
1216# This is for stuff that absolutely must end up in pyconfig.h.
1217# Please use pyport.h instead, if possible.
1218
1219
1220
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001221# Set VERSION so we only need to edit in one place (i.e., here)
1222
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001223VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001224
Martin v. Löwis1142de32002-03-29 16:28:31 +00001225
1226SOVERSION=1.0
1227
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001228# Arguments passed to configure.
1229
1230CONFIG_ARGS="$ac_configure_args"
1231
Michael W. Hudson54241132001-12-07 15:38:26 +00001232
Jack Jansene578a632001-08-15 01:27:14 +00001233# Check whether --enable-framework or --disable-framework was given.
1234if test "${enable_framework+set}" = set; then
1235 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001236
Jack Jansene578a632001-08-15 01:27:14 +00001237 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001239 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001240 esac
1241 case $enableval in
1242 no)
1243 PYTHONFRAMEWORK=
1244 PYTHONFRAMEWORKDIR=no-framework
1245 PYTHONFRAMEWORKPREFIX=
1246 PYTHONFRAMEWORKINSTALLDIR=
1247 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001248 ;;
1249 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001250 PYTHONFRAMEWORK=Python
1251 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001252 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001253 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1254 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001255 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001256
Guido van Rossum563e7081996-09-10 18:20:48 +00001257else
Martin v. Löwis11437992002-04-12 09:54:03 +00001258
Jack Jansene578a632001-08-15 01:27:14 +00001259 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001260 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001261 PYTHONFRAMEWORKPREFIX=
1262 PYTHONFRAMEWORKINSTALLDIR=
1263 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001264
Martin v. Löwis11437992002-04-12 09:54:03 +00001265fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001266
1267
1268
1269
Jack Jansene578a632001-08-15 01:27:14 +00001270
1271##AC_ARG_WITH(dyld,
1272##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1273##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001274# Set name for machine-dependent library files
1275
Martin v. Löwis11437992002-04-12 09:54:03 +00001276echo "$as_me:$LINENO: checking MACHDEP" >&5
1277echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001278if test -z "$MACHDEP"
1279then
Guido van Rossum563e7081996-09-10 18:20:48 +00001280 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +00001281 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001282 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001284 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001285 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001286 ac_md_system=`echo $ac_sys_system |
1287 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1288 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001289 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001290 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001291
Guido van Rossum07397971997-04-29 21:49:50 +00001292 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001293 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001294 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001295 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001296 esac
1297fi
Guido van Rossum91922671997-10-09 20:24:13 +00001298
1299#
1300# SGI compilers allow the specification of the both the ABI and the
1301# ISA on the command line. Depending on the values of these switches,
1302# different and often incompatable code will be generated.
1303#
1304# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1305# thus supply support for various ABI/ISA combinations. The MACHDEP
1306# variable is also adjusted.
1307#
1308
1309if test ! -z "$SGI_ABI"
1310then
1311 CC="cc $SGI_ABI"
1312 LDFLAGS="$SGI_ABI $LDFLAGS"
1313 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1314fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001315echo "$as_me:$LINENO: result: $MACHDEP" >&5
1316echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001317
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001319echo "$as_me:$LINENO: checking for --without-gcc" >&5
1320echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1321
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001322# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001323if test "${with_gcc+set}" = set; then
1324 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001325
Guido van Rossum7f43da71994-08-01 12:15:30 +00001326 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001327 no) CC=cc
1328 without_gcc=yes;;
1329 yes) CC=gcc
1330 without_gcc=no;;
1331 *) CC=$withval
1332 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001333 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001334else
Martin v. Löwis11437992002-04-12 09:54:03 +00001335
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001336 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001337 AIX*) CC=cc_r
1338 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001339 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001340 case $BE_HOST_CPU in
1341 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001342 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001343 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +00001344 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001345 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001346 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001347 ;;
1348 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001349 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001350 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001351 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001352 ;;
1353 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001354 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1355echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1356 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001357 ;;
1358 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001359 AR="\$(srcdir)/Modules/ar_beos"
1360 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001361 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001362 Monterey*)
1363 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001364 without_gcc=;;
1365 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001366 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001367fi;
1368echo "$as_me:$LINENO: result: $without_gcc" >&5
1369echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001370
1371
Guido van Rossum95012191999-12-16 17:50:52 +00001372
Fred Drakea1a84e72001-03-06 05:52:16 +00001373MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001374echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1375echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1376
Guido van Rossum95012191999-12-16 17:50:52 +00001377# Check whether --with-cxx or --without-cxx was given.
1378if test "${with_cxx+set}" = set; then
1379 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001380
Martin v. Löwis22352952000-12-13 17:37:02 +00001381 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001382 case $withval in
1383 no) CXX=
1384 with_cxx=no;;
1385 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001386 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001387 with_cxx=$withval;;
1388 esac
1389else
Martin v. Löwis11437992002-04-12 09:54:03 +00001390
Guido van Rossum95012191999-12-16 17:50:52 +00001391 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001392 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394fi;
1395echo "$as_me:$LINENO: result: $with_cxx" >&5
1396echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001397
1398if test "$with_cxx" = "yes"
1399then
Martin v. Löwis11437992002-04-12 09:54:03 +00001400 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1401echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1402 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001403fi
1404
1405
1406
1407
Martin v. Löwis11437992002-04-12 09:54:03 +00001408if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001409then
1410 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1411do
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 # 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 +00001413set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001414echo "$as_me:$LINENO: checking for $ac_word" >&5
1415echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1416if test "${ac_cv_prog_CXX+set}" = set; then
1417 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001418else
1419 if test -n "$CXX"; then
1420 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1421else
Martin v. Löwis11437992002-04-12 09:54:03 +00001422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1423for as_dir in $PATH
1424do
1425 IFS=$as_save_IFS
1426 test -z "$as_dir" && as_dir=.
1427 for ac_exec_ext in '' $ac_executable_extensions; do
1428 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1429 ac_cv_prog_CXX="$ac_prog"
1430 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1431 break 2
1432 fi
1433done
1434done
1435
Martin v. Löwis22352952000-12-13 17:37:02 +00001436fi
1437fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001438CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001439if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 echo "$as_me:$LINENO: result: $CXX" >&5
1441echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001442else
Martin v. Löwis11437992002-04-12 09:54:03 +00001443 echo "$as_me:$LINENO: result: no" >&5
1444echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001445fi
1446
Martin v. Löwis11437992002-04-12 09:54:03 +00001447 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001448done
1449test -n "$CXX" || CXX="notfound"
1450
1451 if test "$CXX" = "notfound"
1452 then
1453 CXX=
1454 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001455 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001456ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001457ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1458ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1459ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1460 cat >conftest.$ac_ext <<_ACEOF
1461#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001462#include "confdefs.h"
1463
Martin v. Löwis11437992002-04-12 09:54:03 +00001464#ifdef F77_DUMMY_MAIN
1465# ifdef __cplusplus
1466 extern "C"
1467# endif
1468 int F77_DUMMY_MAIN() { return 1; }
1469#endif
1470int
1471main ()
1472{
Michael W. Hudson54241132001-12-07 15:38:26 +00001473
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 ;
1475 return 0;
1476}
1477_ACEOF
1478ac_clean_files_save=$ac_clean_files
1479ac_clean_files="$ac_clean_files a.out a.exe"
1480# Try to create an executable without -o first, disregard a.out.
1481# It will help us diagnose broken compilers, and finding out an intuition
1482# of exeext.
1483echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1484echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1485ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1486if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1487 (eval $ac_link_default) 2>&5
1488 ac_status=$?
1489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1490 (exit $ac_status); }; then
1491 # Find the output, starting from the most likely. This scheme is
1492# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1493# resort.
1494
1495# Be careful to initialize this variable, since it used to be cached.
1496# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1497ac_cv_exeext=
1498for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1499 ls a.out conftest 2>/dev/null;
1500 ls a.* conftest.* 2>/dev/null`; do
1501 case $ac_file in
1502 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1503 a.out ) # We found the default executable, but exeext='' is most
1504 # certainly right.
1505 break;;
1506 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1507 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1508 export ac_cv_exeext
1509 break;;
1510 * ) break;;
1511 esac
1512done
1513else
1514 echo "$as_me: failed program was:" >&5
1515cat conftest.$ac_ext >&5
1516{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1517echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1518 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001519fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001520
1521ac_exeext=$ac_cv_exeext
1522echo "$as_me:$LINENO: result: $ac_file" >&5
1523echo "${ECHO_T}$ac_file" >&6
1524
1525# Check the compiler produces executables we can run. If not, either
1526# the compiler is broken, or we cross compile.
1527echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1528echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1529# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1530# If not cross compiling, check that we can run a simple program.
1531if test "$cross_compiling" != yes; then
1532 if { ac_try='./$ac_file'
1533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1534 (eval $ac_try) 2>&5
1535 ac_status=$?
1536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1537 (exit $ac_status); }; }; then
1538 cross_compiling=no
1539 else
1540 if test "$cross_compiling" = maybe; then
1541 cross_compiling=yes
1542 else
1543 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1544If you meant to cross compile, use \`--host'." >&5
1545echo "$as_me: error: cannot run C++ compiled programs.
1546If you meant to cross compile, use \`--host'." >&2;}
1547 { (exit 1); exit 1; }; }
1548 fi
1549 fi
1550fi
1551echo "$as_me:$LINENO: result: yes" >&5
1552echo "${ECHO_T}yes" >&6
1553
1554rm -f a.out a.exe conftest$ac_cv_exeext
1555ac_clean_files=$ac_clean_files_save
1556# Check the compiler produces executables we can run. If not, either
1557# the compiler is broken, or we cross compile.
1558echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1559echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1560echo "$as_me:$LINENO: result: $cross_compiling" >&5
1561echo "${ECHO_T}$cross_compiling" >&6
1562
1563echo "$as_me:$LINENO: checking for suffix of executables" >&5
1564echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1565if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1566 (eval $ac_link) 2>&5
1567 ac_status=$?
1568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1569 (exit $ac_status); }; then
1570 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1571# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1572# work properly (i.e., refer to `conftest.exe'), while it won't with
1573# `rm'.
1574for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1575 case $ac_file in
1576 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1577 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1578 export ac_cv_exeext
1579 break;;
1580 * ) break;;
1581 esac
1582done
1583else
1584 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1585echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1586 { (exit 1); exit 1; }; }
1587fi
1588
1589rm -f conftest$ac_cv_exeext
1590echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1591echo "${ECHO_T}$ac_cv_exeext" >&6
1592
1593rm -f conftest.$ac_ext
1594EXEEXT=$ac_cv_exeext
1595ac_exeext=$EXEEXT
1596
1597 ac_ext=c
1598ac_cpp='$CPP $CPPFLAGS'
1599ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1600ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1601ac_compiler_gnu=$ac_cv_c_compiler_gnu
1602
1603
Martin v. Löwis22352952000-12-13 17:37:02 +00001604
1605 fi
1606fi
1607
Guido van Rossum8b131c51995-03-09 14:10:13 +00001608# If the user switches compilers, we can't believe the cache
1609if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1610then
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1612(it is also a good idea to do 'make clean' before compiling)" >&5
1613echo "$as_me: error: cached CC is different -- throw away $cache_file
1614(it is also a good idea to do 'make clean' before compiling)" >&2;}
1615 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001616fi
1617
Martin v. Löwis11437992002-04-12 09:54:03 +00001618ac_ext=c
1619ac_cpp='$CPP $CPPFLAGS'
1620ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1621ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1622ac_compiler_gnu=$ac_cv_c_compiler_gnu
1623if test -n "$ac_tool_prefix"; then
1624 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1625set dummy ${ac_tool_prefix}gcc; ac_word=$2
1626echo "$as_me:$LINENO: checking for $ac_word" >&5
1627echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1628if test "${ac_cv_prog_CC+set}" = set; then
1629 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001630else
1631 if test -n "$CC"; then
1632 ac_cv_prog_CC="$CC" # Let the user override the test.
1633else
Martin v. Löwis11437992002-04-12 09:54:03 +00001634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1635for as_dir in $PATH
1636do
1637 IFS=$as_save_IFS
1638 test -z "$as_dir" && as_dir=.
1639 for ac_exec_ext in '' $ac_executable_extensions; do
1640 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1641 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1642 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1643 break 2
1644 fi
1645done
1646done
1647
Jack Jansendd19cf82001-12-06 22:36:17 +00001648fi
1649fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001650CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001651if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001652 echo "$as_me:$LINENO: result: $CC" >&5
1653echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001654else
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 echo "$as_me:$LINENO: result: no" >&5
1656echo "${ECHO_T}no" >&6
1657fi
1658
1659fi
1660if test -z "$ac_cv_prog_CC"; then
1661 ac_ct_CC=$CC
1662 # Extract the first word of "gcc", so it can be a program name with args.
1663set dummy gcc; ac_word=$2
1664echo "$as_me:$LINENO: checking for $ac_word" >&5
1665echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1666if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1667 echo $ECHO_N "(cached) $ECHO_C" >&6
1668else
1669 if test -n "$ac_ct_CC"; then
1670 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1671else
1672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1673for as_dir in $PATH
1674do
1675 IFS=$as_save_IFS
1676 test -z "$as_dir" && as_dir=.
1677 for ac_exec_ext in '' $ac_executable_extensions; do
1678 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1679 ac_cv_prog_ac_ct_CC="gcc"
1680 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1681 break 2
1682 fi
1683done
1684done
1685
1686fi
1687fi
1688ac_ct_CC=$ac_cv_prog_ac_ct_CC
1689if test -n "$ac_ct_CC"; then
1690 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1691echo "${ECHO_T}$ac_ct_CC" >&6
1692else
1693 echo "$as_me:$LINENO: result: no" >&5
1694echo "${ECHO_T}no" >&6
1695fi
1696
1697 CC=$ac_ct_CC
1698else
1699 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001700fi
1701
Jack Jansendd19cf82001-12-06 22:36:17 +00001702if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001703 if test -n "$ac_tool_prefix"; then
1704 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1705set dummy ${ac_tool_prefix}cc; ac_word=$2
1706echo "$as_me:$LINENO: checking for $ac_word" >&5
1707echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1708if test "${ac_cv_prog_CC+set}" = set; then
1709 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001710else
1711 if test -n "$CC"; then
1712 ac_cv_prog_CC="$CC" # Let the user override the test.
1713else
Martin v. Löwis11437992002-04-12 09:54:03 +00001714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1715for as_dir in $PATH
1716do
1717 IFS=$as_save_IFS
1718 test -z "$as_dir" && as_dir=.
1719 for ac_exec_ext in '' $ac_executable_extensions; do
1720 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1721 ac_cv_prog_CC="${ac_tool_prefix}cc"
1722 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1723 break 2
1724 fi
1725done
1726done
1727
1728fi
1729fi
1730CC=$ac_cv_prog_CC
1731if test -n "$CC"; then
1732 echo "$as_me:$LINENO: result: $CC" >&5
1733echo "${ECHO_T}$CC" >&6
1734else
1735 echo "$as_me:$LINENO: result: no" >&5
1736echo "${ECHO_T}no" >&6
1737fi
1738
1739fi
1740if test -z "$ac_cv_prog_CC"; then
1741 ac_ct_CC=$CC
1742 # Extract the first word of "cc", so it can be a program name with args.
1743set dummy cc; ac_word=$2
1744echo "$as_me:$LINENO: checking for $ac_word" >&5
1745echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1746if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1747 echo $ECHO_N "(cached) $ECHO_C" >&6
1748else
1749 if test -n "$ac_ct_CC"; then
1750 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1751else
1752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1753for as_dir in $PATH
1754do
1755 IFS=$as_save_IFS
1756 test -z "$as_dir" && as_dir=.
1757 for ac_exec_ext in '' $ac_executable_extensions; do
1758 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1759 ac_cv_prog_ac_ct_CC="cc"
1760 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1761 break 2
1762 fi
1763done
1764done
1765
1766fi
1767fi
1768ac_ct_CC=$ac_cv_prog_ac_ct_CC
1769if test -n "$ac_ct_CC"; then
1770 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1771echo "${ECHO_T}$ac_ct_CC" >&6
1772else
1773 echo "$as_me:$LINENO: result: no" >&5
1774echo "${ECHO_T}no" >&6
1775fi
1776
1777 CC=$ac_ct_CC
1778else
1779 CC="$ac_cv_prog_CC"
1780fi
1781
1782fi
1783if test -z "$CC"; then
1784 # Extract the first word of "cc", so it can be a program name with args.
1785set dummy cc; ac_word=$2
1786echo "$as_me:$LINENO: checking for $ac_word" >&5
1787echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1788if test "${ac_cv_prog_CC+set}" = set; then
1789 echo $ECHO_N "(cached) $ECHO_C" >&6
1790else
1791 if test -n "$CC"; then
1792 ac_cv_prog_CC="$CC" # Let the user override the test.
1793else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001794 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1796for as_dir in $PATH
1797do
1798 IFS=$as_save_IFS
1799 test -z "$as_dir" && as_dir=.
1800 for ac_exec_ext in '' $ac_executable_extensions; do
1801 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1802 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1803 ac_prog_rejected=yes
1804 continue
1805 fi
1806 ac_cv_prog_CC="cc"
1807 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1808 break 2
1809 fi
1810done
1811done
1812
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001813if test $ac_prog_rejected = yes; then
1814 # We found a bogon in the path, so make sure we never use it.
1815 set dummy $ac_cv_prog_CC
1816 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001817 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001818 # We chose a different compiler from the bogus one.
1819 # However, it has the same basename, so the bogon will be chosen
1820 # first if we set CC to just the basename; use the full file name.
1821 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001822 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001823 shift
1824 ac_cv_prog_CC="$@"
1825 fi
1826fi
1827fi
1828fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001829CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001830if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001831 echo "$as_me:$LINENO: result: $CC" >&5
1832echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001833else
Martin v. Löwis11437992002-04-12 09:54:03 +00001834 echo "$as_me:$LINENO: result: no" >&5
1835echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001836fi
1837
Martin v. Löwis11437992002-04-12 09:54:03 +00001838fi
1839if test -z "$CC"; then
1840 if test -n "$ac_tool_prefix"; then
1841 for ac_prog in cl
1842 do
1843 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1844set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1845echo "$as_me:$LINENO: checking for $ac_word" >&5
1846echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1847if test "${ac_cv_prog_CC+set}" = set; then
1848 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001849else
1850 if test -n "$CC"; then
1851 ac_cv_prog_CC="$CC" # Let the user override the test.
1852else
Martin v. Löwis11437992002-04-12 09:54:03 +00001853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1854for as_dir in $PATH
1855do
1856 IFS=$as_save_IFS
1857 test -z "$as_dir" && as_dir=.
1858 for ac_exec_ext in '' $ac_executable_extensions; do
1859 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1860 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1861 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1862 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001864done
1865done
1866
1867fi
1868fi
1869CC=$ac_cv_prog_CC
1870if test -n "$CC"; then
1871 echo "$as_me:$LINENO: result: $CC" >&5
1872echo "${ECHO_T}$CC" >&6
1873else
1874 echo "$as_me:$LINENO: result: no" >&5
1875echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001876fi
1877
Martin v. Löwis11437992002-04-12 09:54:03 +00001878 test -n "$CC" && break
1879 done
1880fi
1881if test -z "$CC"; then
1882 ac_ct_CC=$CC
1883 for ac_prog in cl
1884do
1885 # Extract the first word of "$ac_prog", so it can be a program name with args.
1886set dummy $ac_prog; ac_word=$2
1887echo "$as_me:$LINENO: checking for $ac_word" >&5
1888echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1889if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1890 echo $ECHO_N "(cached) $ECHO_C" >&6
1891else
1892 if test -n "$ac_ct_CC"; then
1893 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1894else
1895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1896for as_dir in $PATH
1897do
1898 IFS=$as_save_IFS
1899 test -z "$as_dir" && as_dir=.
1900 for ac_exec_ext in '' $ac_executable_extensions; do
1901 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1902 ac_cv_prog_ac_ct_CC="$ac_prog"
1903 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1904 break 2
1905 fi
1906done
1907done
Jack Jansendd19cf82001-12-06 22:36:17 +00001908
Martin v. Löwis11437992002-04-12 09:54:03 +00001909fi
1910fi
1911ac_ct_CC=$ac_cv_prog_ac_ct_CC
1912if test -n "$ac_ct_CC"; then
1913 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1914echo "${ECHO_T}$ac_ct_CC" >&6
1915else
1916 echo "$as_me:$LINENO: result: no" >&5
1917echo "${ECHO_T}no" >&6
1918fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001919
Martin v. Löwis11437992002-04-12 09:54:03 +00001920 test -n "$ac_ct_CC" && break
1921done
Michael W. Hudson54241132001-12-07 15:38:26 +00001922
Martin v. Löwis11437992002-04-12 09:54:03 +00001923 CC=$ac_ct_CC
1924fi
1925
1926fi
1927
1928
1929test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1930echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1931 { (exit 1); exit 1; }; }
1932
1933# Provide some information about the compiler.
1934echo "$as_me:$LINENO:" \
1935 "checking for C compiler version" >&5
1936ac_compiler=`set X $ac_compile; echo $2`
1937{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1938 (eval $ac_compiler --version </dev/null >&5) 2>&5
1939 ac_status=$?
1940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1941 (exit $ac_status); }
1942{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1943 (eval $ac_compiler -v </dev/null >&5) 2>&5
1944 ac_status=$?
1945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1946 (exit $ac_status); }
1947{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1948 (eval $ac_compiler -V </dev/null >&5) 2>&5
1949 ac_status=$?
1950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1951 (exit $ac_status); }
1952
1953cat >conftest.$ac_ext <<_ACEOF
1954#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001955#include "confdefs.h"
1956
Martin v. Löwis11437992002-04-12 09:54:03 +00001957#ifdef F77_DUMMY_MAIN
1958# ifdef __cplusplus
1959 extern "C"
1960# endif
1961 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001963int
1964main ()
1965{
1966
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971ac_clean_files_save=$ac_clean_files
1972ac_clean_files="$ac_clean_files a.out a.exe"
1973# Try to create an executable without -o first, disregard a.out.
1974# It will help us diagnose broken compilers, and finding out an intuition
1975# of exeext.
1976echo "$as_me:$LINENO: checking for C compiler default output" >&5
1977echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1978ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1979if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1980 (eval $ac_link_default) 2>&5
1981 ac_status=$?
1982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1983 (exit $ac_status); }; then
1984 # Find the output, starting from the most likely. This scheme is
1985# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1986# resort.
1987
1988# Be careful to initialize this variable, since it used to be cached.
1989# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1990ac_cv_exeext=
1991for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1992 ls a.out conftest 2>/dev/null;
1993 ls a.* conftest.* 2>/dev/null`; do
1994 case $ac_file in
1995 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1996 a.out ) # We found the default executable, but exeext='' is most
1997 # certainly right.
1998 break;;
1999 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2000 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2001 export ac_cv_exeext
2002 break;;
2003 * ) break;;
2004 esac
2005done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002006else
Martin v. Löwis11437992002-04-12 09:54:03 +00002007 echo "$as_me: failed program was:" >&5
2008cat conftest.$ac_ext >&5
2009{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2010echo "$as_me: error: C compiler cannot create executables" >&2;}
2011 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002012fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002013
Martin v. Löwis11437992002-04-12 09:54:03 +00002014ac_exeext=$ac_cv_exeext
2015echo "$as_me:$LINENO: result: $ac_file" >&5
2016echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002017
Martin v. Löwis11437992002-04-12 09:54:03 +00002018# Check the compiler produces executables we can run. If not, either
2019# the compiler is broken, or we cross compile.
2020echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2021echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2022# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2023# If not cross compiling, check that we can run a simple program.
2024if test "$cross_compiling" != yes; then
2025 if { ac_try='./$ac_file'
2026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2027 (eval $ac_try) 2>&5
2028 ac_status=$?
2029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2030 (exit $ac_status); }; }; then
2031 cross_compiling=no
2032 else
2033 if test "$cross_compiling" = maybe; then
2034 cross_compiling=yes
2035 else
2036 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2037If you meant to cross compile, use \`--host'." >&5
2038echo "$as_me: error: cannot run C compiled programs.
2039If you meant to cross compile, use \`--host'." >&2;}
2040 { (exit 1); exit 1; }; }
2041 fi
2042 fi
2043fi
2044echo "$as_me:$LINENO: result: yes" >&5
2045echo "${ECHO_T}yes" >&6
2046
2047rm -f a.out a.exe conftest$ac_cv_exeext
2048ac_clean_files=$ac_clean_files_save
2049# Check the compiler produces executables we can run. If not, either
2050# the compiler is broken, or we cross compile.
2051echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2052echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2053echo "$as_me:$LINENO: result: $cross_compiling" >&5
2054echo "${ECHO_T}$cross_compiling" >&6
2055
2056echo "$as_me:$LINENO: checking for suffix of executables" >&5
2057echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2058if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2059 (eval $ac_link) 2>&5
2060 ac_status=$?
2061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2062 (exit $ac_status); }; then
2063 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2064# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2065# work properly (i.e., refer to `conftest.exe'), while it won't with
2066# `rm'.
2067for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2068 case $ac_file in
2069 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2070 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2071 export ac_cv_exeext
2072 break;;
2073 * ) break;;
2074 esac
2075done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002076else
Martin v. Löwis11437992002-04-12 09:54:03 +00002077 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2078echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2079 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002080fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002081
Martin v. Löwis11437992002-04-12 09:54:03 +00002082rm -f conftest$ac_cv_exeext
2083echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2084echo "${ECHO_T}$ac_cv_exeext" >&6
2085
2086rm -f conftest.$ac_ext
2087EXEEXT=$ac_cv_exeext
2088ac_exeext=$EXEEXT
2089echo "$as_me:$LINENO: checking for suffix of object files" >&5
2090echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2091if test "${ac_cv_objext+set}" = set; then
2092 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002093else
Martin v. Löwis11437992002-04-12 09:54:03 +00002094 cat >conftest.$ac_ext <<_ACEOF
2095#line $LINENO "configure"
2096#include "confdefs.h"
2097
2098#ifdef F77_DUMMY_MAIN
2099# ifdef __cplusplus
2100 extern "C"
2101# endif
2102 int F77_DUMMY_MAIN() { return 1; }
2103#endif
2104int
2105main ()
2106{
2107
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112rm -f conftest.o conftest.obj
2113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2114 (eval $ac_compile) 2>&5
2115 ac_status=$?
2116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2117 (exit $ac_status); }; then
2118 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2119 case $ac_file in
2120 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2121 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2122 break;;
2123 esac
2124done
2125else
2126 echo "$as_me: failed program was:" >&5
2127cat conftest.$ac_ext >&5
2128{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2129echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2130 { (exit 1); exit 1; }; }
2131fi
2132
2133rm -f conftest.$ac_cv_objext conftest.$ac_ext
2134fi
2135echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2136echo "${ECHO_T}$ac_cv_objext" >&6
2137OBJEXT=$ac_cv_objext
2138ac_objext=$OBJEXT
2139echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2140echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2141if test "${ac_cv_c_compiler_gnu+set}" = set; then
2142 echo $ECHO_N "(cached) $ECHO_C" >&6
2143else
2144 cat >conftest.$ac_ext <<_ACEOF
2145#line $LINENO "configure"
2146#include "confdefs.h"
2147
2148#ifdef F77_DUMMY_MAIN
2149# ifdef __cplusplus
2150 extern "C"
2151# endif
2152 int F77_DUMMY_MAIN() { return 1; }
2153#endif
2154int
2155main ()
2156{
2157#ifndef __GNUC__
2158 choke me
2159#endif
2160
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165rm -f conftest.$ac_objext
2166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2167 (eval $ac_compile) 2>&5
2168 ac_status=$?
2169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2170 (exit $ac_status); } &&
2171 { ac_try='test -s conftest.$ac_objext'
2172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2173 (eval $ac_try) 2>&5
2174 ac_status=$?
2175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2176 (exit $ac_status); }; }; then
2177 ac_compiler_gnu=yes
2178else
2179 echo "$as_me: failed program was:" >&5
2180cat conftest.$ac_ext >&5
2181ac_compiler_gnu=no
2182fi
2183rm -f conftest.$ac_objext conftest.$ac_ext
2184ac_cv_c_compiler_gnu=$ac_compiler_gnu
2185
2186fi
2187echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2188echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2189GCC=`test $ac_compiler_gnu = yes && echo yes`
2190ac_test_CFLAGS=${CFLAGS+set}
2191ac_save_CFLAGS=$CFLAGS
2192CFLAGS="-g"
2193echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2194echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2195if test "${ac_cv_prog_cc_g+set}" = set; then
2196 echo $ECHO_N "(cached) $ECHO_C" >&6
2197else
2198 cat >conftest.$ac_ext <<_ACEOF
2199#line $LINENO "configure"
2200#include "confdefs.h"
2201
2202#ifdef F77_DUMMY_MAIN
2203# ifdef __cplusplus
2204 extern "C"
2205# endif
2206 int F77_DUMMY_MAIN() { return 1; }
2207#endif
2208int
2209main ()
2210{
2211
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216rm -f conftest.$ac_objext
2217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2218 (eval $ac_compile) 2>&5
2219 ac_status=$?
2220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2221 (exit $ac_status); } &&
2222 { ac_try='test -s conftest.$ac_objext'
2223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2224 (eval $ac_try) 2>&5
2225 ac_status=$?
2226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2227 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002228 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002229else
Martin v. Löwis11437992002-04-12 09:54:03 +00002230 echo "$as_me: failed program was:" >&5
2231cat conftest.$ac_ext >&5
2232ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002233fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002234rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002235fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002236echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2237echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002238if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002239 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002240elif test $ac_cv_prog_cc_g = yes; then
2241 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002242 CFLAGS="-g -O2"
2243 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002244 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002245 fi
2246else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002247 if test "$GCC" = yes; then
2248 CFLAGS="-O2"
2249 else
2250 CFLAGS=
2251 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002252fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002253# Some people use a C++ compiler to compile C. Since we use `exit',
2254# in C++ we need to declare it. In case someone uses the same compiler
2255# for both compiling C and C++ we need to have the C++ compiler decide
2256# the declaration of exit, since it's the most demanding environment.
2257cat >conftest.$ac_ext <<_ACEOF
2258#ifndef __cplusplus
2259 choke me
2260#endif
2261_ACEOF
2262rm -f conftest.$ac_objext
2263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2264 (eval $ac_compile) 2>&5
2265 ac_status=$?
2266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2267 (exit $ac_status); } &&
2268 { ac_try='test -s conftest.$ac_objext'
2269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2270 (eval $ac_try) 2>&5
2271 ac_status=$?
2272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2273 (exit $ac_status); }; }; then
2274 for ac_declaration in \
2275 ''\
2276 '#include <stdlib.h>' \
2277 'extern "C" void std::exit (int) throw (); using std::exit;' \
2278 'extern "C" void std::exit (int); using std::exit;' \
2279 'extern "C" void exit (int) throw ();' \
2280 'extern "C" void exit (int);' \
2281 'void exit (int);'
2282do
2283 cat >conftest.$ac_ext <<_ACEOF
2284#line $LINENO "configure"
2285#include "confdefs.h"
2286#include <stdlib.h>
2287$ac_declaration
2288#ifdef F77_DUMMY_MAIN
2289# ifdef __cplusplus
2290 extern "C"
2291# endif
2292 int F77_DUMMY_MAIN() { return 1; }
2293#endif
2294int
2295main ()
2296{
2297exit (42);
2298 ;
2299 return 0;
2300}
2301_ACEOF
2302rm -f conftest.$ac_objext
2303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2304 (eval $ac_compile) 2>&5
2305 ac_status=$?
2306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2307 (exit $ac_status); } &&
2308 { ac_try='test -s conftest.$ac_objext'
2309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2310 (eval $ac_try) 2>&5
2311 ac_status=$?
2312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2313 (exit $ac_status); }; }; then
2314 :
2315else
2316 echo "$as_me: failed program was:" >&5
2317cat conftest.$ac_ext >&5
2318continue
2319fi
2320rm -f conftest.$ac_objext conftest.$ac_ext
2321 cat >conftest.$ac_ext <<_ACEOF
2322#line $LINENO "configure"
2323#include "confdefs.h"
2324$ac_declaration
2325#ifdef F77_DUMMY_MAIN
2326# ifdef __cplusplus
2327 extern "C"
2328# endif
2329 int F77_DUMMY_MAIN() { return 1; }
2330#endif
2331int
2332main ()
2333{
2334exit (42);
2335 ;
2336 return 0;
2337}
2338_ACEOF
2339rm -f conftest.$ac_objext
2340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2341 (eval $ac_compile) 2>&5
2342 ac_status=$?
2343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2344 (exit $ac_status); } &&
2345 { ac_try='test -s conftest.$ac_objext'
2346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2347 (eval $ac_try) 2>&5
2348 ac_status=$?
2349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2350 (exit $ac_status); }; }; then
2351 break
2352else
2353 echo "$as_me: failed program was:" >&5
2354cat conftest.$ac_ext >&5
2355fi
2356rm -f conftest.$ac_objext conftest.$ac_ext
2357done
2358rm -f conftest*
2359if test -n "$ac_declaration"; then
2360 echo '#ifdef __cplusplus' >>confdefs.h
2361 echo $ac_declaration >>confdefs.h
2362 echo '#endif' >>confdefs.h
2363fi
2364
2365else
2366 echo "$as_me: failed program was:" >&5
2367cat conftest.$ac_ext >&5
2368fi
2369rm -f conftest.$ac_objext conftest.$ac_ext
2370ac_ext=c
2371ac_cpp='$CPP $CPPFLAGS'
2372ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2373ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2374ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002375
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002376
2377# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379ac_ext=c
2380ac_cpp='$CPP $CPPFLAGS'
2381ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2382ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2383ac_compiler_gnu=$ac_cv_c_compiler_gnu
2384echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2385echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002386# On Suns, sometimes $CPP names a directory.
2387if test -n "$CPP" && test -d "$CPP"; then
2388 CPP=
2389fi
2390if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002391 if test "${ac_cv_prog_CPP+set}" = set; then
2392 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002393else
Martin v. Löwis11437992002-04-12 09:54:03 +00002394 # Double quotes because CPP needs to be expanded
2395 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2396 do
2397 ac_preproc_ok=false
2398for ac_c_preproc_warn_flag in '' yes
2399do
2400 # Use a header file that comes with gcc, so configuring glibc
2401 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002402 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002403 # not just through cpp. "Syntax error" is here to catch this case.
2404 cat >conftest.$ac_ext <<_ACEOF
2405#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002406#include "confdefs.h"
2407#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002408 Syntax error
2409_ACEOF
2410if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2411 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2412 ac_status=$?
2413 egrep -v '^ *\+' conftest.er1 >conftest.err
2414 rm -f conftest.er1
2415 cat conftest.err >&5
2416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2417 (exit $ac_status); } >/dev/null; then
2418 if test -s conftest.err; then
2419 ac_cpp_err=$ac_c_preproc_warn_flag
2420 else
2421 ac_cpp_err=
2422 fi
2423else
2424 ac_cpp_err=yes
2425fi
2426if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002427 :
2428else
Martin v. Löwis11437992002-04-12 09:54:03 +00002429 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002430 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 # Broken: fails on valid input.
2432continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002433fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002434rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002435
Martin v. Löwis11437992002-04-12 09:54:03 +00002436 # OK, works on sane cases. Now check whether non-existent headers
2437 # can be detected and how.
2438 cat >conftest.$ac_ext <<_ACEOF
2439#line $LINENO "configure"
2440#include "confdefs.h"
2441#include <ac_nonexistent.h>
2442_ACEOF
2443if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2444 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2445 ac_status=$?
2446 egrep -v '^ *\+' conftest.er1 >conftest.err
2447 rm -f conftest.er1
2448 cat conftest.err >&5
2449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2450 (exit $ac_status); } >/dev/null; then
2451 if test -s conftest.err; then
2452 ac_cpp_err=$ac_c_preproc_warn_flag
2453 else
2454 ac_cpp_err=
2455 fi
2456else
2457 ac_cpp_err=yes
2458fi
2459if test -z "$ac_cpp_err"; then
2460 # Broken: success on invalid input.
2461continue
2462else
2463 echo "$as_me: failed program was:" >&5
2464 cat conftest.$ac_ext >&5
2465 # Passes both tests.
2466ac_preproc_ok=:
2467break
2468fi
2469rm -f conftest.err conftest.$ac_ext
2470
2471done
2472# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2473rm -f conftest.err conftest.$ac_ext
2474if $ac_preproc_ok; then
2475 break
2476fi
2477
2478 done
2479 ac_cv_prog_CPP=$CPP
2480
2481fi
2482 CPP=$ac_cv_prog_CPP
2483else
2484 ac_cv_prog_CPP=$CPP
2485fi
2486echo "$as_me:$LINENO: result: $CPP" >&5
2487echo "${ECHO_T}$CPP" >&6
2488ac_preproc_ok=false
2489for ac_c_preproc_warn_flag in '' yes
2490do
2491 # Use a header file that comes with gcc, so configuring glibc
2492 # with a fresh cross-compiler works.
2493 # On the NeXT, cc -E runs the code through the compiler's parser,
2494 # not just through cpp. "Syntax error" is here to catch this case.
2495 cat >conftest.$ac_ext <<_ACEOF
2496#line $LINENO "configure"
2497#include "confdefs.h"
2498#include <assert.h>
2499 Syntax error
2500_ACEOF
2501if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2502 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2503 ac_status=$?
2504 egrep -v '^ *\+' conftest.er1 >conftest.err
2505 rm -f conftest.er1
2506 cat conftest.err >&5
2507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2508 (exit $ac_status); } >/dev/null; then
2509 if test -s conftest.err; then
2510 ac_cpp_err=$ac_c_preproc_warn_flag
2511 else
2512 ac_cpp_err=
2513 fi
2514else
2515 ac_cpp_err=yes
2516fi
2517if test -z "$ac_cpp_err"; then
2518 :
2519else
2520 echo "$as_me: failed program was:" >&5
2521 cat conftest.$ac_ext >&5
2522 # Broken: fails on valid input.
2523continue
2524fi
2525rm -f conftest.err conftest.$ac_ext
2526
2527 # OK, works on sane cases. Now check whether non-existent headers
2528 # can be detected and how.
2529 cat >conftest.$ac_ext <<_ACEOF
2530#line $LINENO "configure"
2531#include "confdefs.h"
2532#include <ac_nonexistent.h>
2533_ACEOF
2534if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2535 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2536 ac_status=$?
2537 egrep -v '^ *\+' conftest.er1 >conftest.err
2538 rm -f conftest.er1
2539 cat conftest.err >&5
2540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2541 (exit $ac_status); } >/dev/null; then
2542 if test -s conftest.err; then
2543 ac_cpp_err=$ac_c_preproc_warn_flag
2544 else
2545 ac_cpp_err=
2546 fi
2547else
2548 ac_cpp_err=yes
2549fi
2550if test -z "$ac_cpp_err"; then
2551 # Broken: success on invalid input.
2552continue
2553else
2554 echo "$as_me: failed program was:" >&5
2555 cat conftest.$ac_ext >&5
2556 # Passes both tests.
2557ac_preproc_ok=:
2558break
2559fi
2560rm -f conftest.err conftest.$ac_ext
2561
2562done
2563# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2564rm -f conftest.err conftest.$ac_ext
2565if $ac_preproc_ok; then
2566 :
2567else
2568 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2569echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2570 { (exit 1); exit 1; }; }
2571fi
2572
2573ac_ext=c
2574ac_cpp='$CPP $CPPFLAGS'
2575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2577ac_compiler_gnu=$ac_cv_c_compiler_gnu
2578
2579
2580
2581echo "$as_me:$LINENO: checking for AIX" >&5
2582echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2583cat >conftest.$ac_ext <<_ACEOF
2584#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002585#include "confdefs.h"
2586#ifdef _AIX
2587 yes
2588#endif
2589
Martin v. Löwis11437992002-04-12 09:54:03 +00002590_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002591if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2592 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 echo "$as_me:$LINENO: result: yes" >&5
2594echo "${ECHO_T}yes" >&6
2595cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002596#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002597_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002598
2599else
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 echo "$as_me:$LINENO: result: no" >&5
2601echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002602fi
2603rm -f conftest*
2604
Michael W. Hudson54241132001-12-07 15:38:26 +00002605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2607echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2608if test "${ac_cv_header_stdc+set}" = set; then
2609 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002610else
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 cat >conftest.$ac_ext <<_ACEOF
2612#line $LINENO "configure"
2613#include "confdefs.h"
2614#include <stdlib.h>
2615#include <stdarg.h>
2616#include <string.h>
2617#include <float.h>
2618
2619_ACEOF
2620if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2621 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2622 ac_status=$?
2623 egrep -v '^ *\+' conftest.er1 >conftest.err
2624 rm -f conftest.er1
2625 cat conftest.err >&5
2626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2627 (exit $ac_status); } >/dev/null; then
2628 if test -s conftest.err; then
2629 ac_cpp_err=$ac_c_preproc_warn_flag
2630 else
2631 ac_cpp_err=
2632 fi
2633else
2634 ac_cpp_err=yes
2635fi
2636if test -z "$ac_cpp_err"; then
2637 ac_cv_header_stdc=yes
2638else
2639 echo "$as_me: failed program was:" >&5
2640 cat conftest.$ac_ext >&5
2641 ac_cv_header_stdc=no
2642fi
2643rm -f conftest.err conftest.$ac_ext
2644
2645if test $ac_cv_header_stdc = yes; then
2646 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2647 cat >conftest.$ac_ext <<_ACEOF
2648#line $LINENO "configure"
2649#include "confdefs.h"
2650#include <string.h>
2651
2652_ACEOF
2653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2654 egrep "memchr" >/dev/null 2>&1; then
2655 :
2656else
2657 ac_cv_header_stdc=no
2658fi
2659rm -f conftest*
2660
2661fi
2662
2663if test $ac_cv_header_stdc = yes; then
2664 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2665 cat >conftest.$ac_ext <<_ACEOF
2666#line $LINENO "configure"
2667#include "confdefs.h"
2668#include <stdlib.h>
2669
2670_ACEOF
2671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2672 egrep "free" >/dev/null 2>&1; then
2673 :
2674else
2675 ac_cv_header_stdc=no
2676fi
2677rm -f conftest*
2678
2679fi
2680
2681if test $ac_cv_header_stdc = yes; then
2682 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2683 if test "$cross_compiling" = yes; then
2684 :
2685else
2686 cat >conftest.$ac_ext <<_ACEOF
2687#line $LINENO "configure"
2688#include "confdefs.h"
2689#include <ctype.h>
2690#if ((' ' & 0x0FF) == 0x020)
2691# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2692# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2693#else
2694# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2695 || ('j' <= (c) && (c) <= 'r') \
2696 || ('s' <= (c) && (c) <= 'z'))
2697# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2698#endif
2699
2700#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2701int
2702main ()
2703{
2704 int i;
2705 for (i = 0; i < 256; i++)
2706 if (XOR (islower (i), ISLOWER (i))
2707 || toupper (i) != TOUPPER (i))
2708 exit(2);
2709 exit (0);
2710}
2711_ACEOF
2712rm -f conftest$ac_exeext
2713if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2714 (eval $ac_link) 2>&5
2715 ac_status=$?
2716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2717 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2719 (eval $ac_try) 2>&5
2720 ac_status=$?
2721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2722 (exit $ac_status); }; }; then
2723 :
2724else
2725 echo "$as_me: program exited with status $ac_status" >&5
2726echo "$as_me: failed program was:" >&5
2727cat conftest.$ac_ext >&5
2728( exit $ac_status )
2729ac_cv_header_stdc=no
2730fi
2731rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2732fi
2733fi
2734fi
2735echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2736echo "${ECHO_T}$ac_cv_header_stdc" >&6
2737if test $ac_cv_header_stdc = yes; then
2738
2739cat >>confdefs.h <<\_ACEOF
2740#define STDC_HEADERS 1
2741_ACEOF
2742
2743fi
2744
2745# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2756 inttypes.h stdint.h unistd.h
2757do
2758as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2759echo "$as_me:$LINENO: checking for $ac_header" >&5
2760echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2761if eval "test \"\${$as_ac_Header+set}\" = set"; then
2762 echo $ECHO_N "(cached) $ECHO_C" >&6
2763else
2764 cat >conftest.$ac_ext <<_ACEOF
2765#line $LINENO "configure"
2766#include "confdefs.h"
2767$ac_includes_default
2768
2769#include <$ac_header>
2770_ACEOF
2771rm -f conftest.$ac_objext
2772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2773 (eval $ac_compile) 2>&5
2774 ac_status=$?
2775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2776 (exit $ac_status); } &&
2777 { ac_try='test -s conftest.$ac_objext'
2778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2779 (eval $ac_try) 2>&5
2780 ac_status=$?
2781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2782 (exit $ac_status); }; }; then
2783 eval "$as_ac_Header=yes"
2784else
2785 echo "$as_me: failed program was:" >&5
2786cat conftest.$ac_ext >&5
2787eval "$as_ac_Header=no"
2788fi
2789rm -f conftest.$ac_objext conftest.$ac_ext
2790fi
2791echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2792echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2793if test `eval echo '${'$as_ac_Header'}'` = yes; then
2794 cat >>confdefs.h <<_ACEOF
2795#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2796_ACEOF
2797
2798fi
2799
2800done
2801
2802
2803if test "${ac_cv_header_minix_config_h+set}" = set; then
2804 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2805echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2806if test "${ac_cv_header_minix_config_h+set}" = set; then
2807 echo $ECHO_N "(cached) $ECHO_C" >&6
2808fi
2809echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2810echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2811else
2812 # Is the header compilable?
2813echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2814echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2815cat >conftest.$ac_ext <<_ACEOF
2816#line $LINENO "configure"
2817#include "confdefs.h"
2818$ac_includes_default
2819#include <minix/config.h>
2820_ACEOF
2821rm -f conftest.$ac_objext
2822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2823 (eval $ac_compile) 2>&5
2824 ac_status=$?
2825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2826 (exit $ac_status); } &&
2827 { ac_try='test -s conftest.$ac_objext'
2828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2829 (eval $ac_try) 2>&5
2830 ac_status=$?
2831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2832 (exit $ac_status); }; }; then
2833 ac_header_compiler=yes
2834else
2835 echo "$as_me: failed program was:" >&5
2836cat conftest.$ac_ext >&5
2837ac_header_compiler=no
2838fi
2839rm -f conftest.$ac_objext conftest.$ac_ext
2840echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2841echo "${ECHO_T}$ac_header_compiler" >&6
2842
2843# Is the header present?
2844echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2845echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2846cat >conftest.$ac_ext <<_ACEOF
2847#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002848#include "confdefs.h"
2849#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002850_ACEOF
2851if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2852 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2853 ac_status=$?
2854 egrep -v '^ *\+' conftest.er1 >conftest.err
2855 rm -f conftest.er1
2856 cat conftest.err >&5
2857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2858 (exit $ac_status); } >/dev/null; then
2859 if test -s conftest.err; then
2860 ac_cpp_err=$ac_c_preproc_warn_flag
2861 else
2862 ac_cpp_err=
2863 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002864else
Martin v. Löwis11437992002-04-12 09:54:03 +00002865 ac_cpp_err=yes
2866fi
2867if test -z "$ac_cpp_err"; then
2868 ac_header_preproc=yes
2869else
2870 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002871 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002872 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002873fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002874rm -f conftest.err conftest.$ac_ext
2875echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2876echo "${ECHO_T}$ac_header_preproc" >&6
2877
2878# So? What about this header?
2879case $ac_header_compiler:$ac_header_preproc in
2880 yes:no )
2881 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2882echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2883 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2884echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2885 no:yes )
2886 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2887echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2888 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2889echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2890 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2891echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2892esac
2893echo "$as_me:$LINENO: checking for minix/config.h" >&5
2894echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2895if test "${ac_cv_header_minix_config_h+set}" = set; then
2896 echo $ECHO_N "(cached) $ECHO_C" >&6
2897else
2898 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002899fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002900echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2901echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2902
2903fi
2904if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002905 MINIX=yes
2906else
Martin v. Löwis11437992002-04-12 09:54:03 +00002907 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002908fi
2909
Martin v. Löwis11437992002-04-12 09:54:03 +00002910
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002911if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002912
2913cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002914#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002915_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002916
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
2918cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002919#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002920_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002921
Martin v. Löwis11437992002-04-12 09:54:03 +00002922
2923cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002924#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002925_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002926
2927fi
2928
2929
Michael W. Hudson54241132001-12-07 15:38:26 +00002930
Martin v. Löwis11437992002-04-12 09:54:03 +00002931echo "$as_me:$LINENO: checking for --with-suffix" >&5
2932echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002933
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002934# Check whether --with-suffix or --without-suffix was given.
2935if test "${with_suffix+set}" = set; then
2936 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002937
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002938 case $withval in
2939 no) EXEEXT=;;
2940 yes) EXEEXT=.exe;;
2941 *) EXEEXT=$withval;;
2942 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002943fi;
2944echo "$as_me:$LINENO: result: $EXEEXT" >&5
2945echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002946
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002947# Test whether we're running on a non-case-sensitive system, in which
2948# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002949
Martin v. Löwis11437992002-04-12 09:54:03 +00002950echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2951echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002952if test -d "python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002953then
Martin v. Löwis11437992002-04-12 09:54:03 +00002954 echo "$as_me:$LINENO: result: yes" >&5
2955echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002956 BUILDEXEEXT=.exe
2957else
Martin v. Löwis11437992002-04-12 09:54:03 +00002958 echo "$as_me:$LINENO: result: no" >&5
2959echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002960 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002961fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002962
Guido van Rossumdd997f71998-10-07 19:58:26 +00002963case $MACHDEP in
2964bsdos*)
2965 case $CC in
2966 gcc) CC="$CC -D_HAVE_BSDI";;
2967 esac;;
2968esac
2969
Guido van Rossum24b1e751997-08-21 02:29:16 +00002970case $ac_sys_system in
2971hp*|HP*)
2972 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002973 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002974 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002975Monterey*)
2976 case $CC in
2977 cc) CC="$CC -Wl,-Bexport";;
2978 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002979SunOS*)
2980 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002981
2982cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002983#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002984_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002985
2986 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002987esac
2988
Michael W. Hudson54241132001-12-07 15:38:26 +00002989
2990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991echo "$as_me:$LINENO: checking LIBRARY" >&5
2992echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002993if test -z "$LIBRARY"
2994then
2995 LIBRARY='libpython$(VERSION).a'
2996fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002997echo "$as_me:$LINENO: result: $LIBRARY" >&5
2998echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002999
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003000# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003001# name of the library into which to insert object files). BLDLIBRARY is also
3002# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3003# is blank as the main program is not linked directly against LDLIBRARY.
3004# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3005# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3006# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3007# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003008#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003009# RUNSHARED is used to run shared python without installed libraries
3010#
3011# INSTSONAME is the name of the shared library that will be use to install
3012# on the system - some systems like version suffix, others don't
3013
3014
Michael W. Hudson54241132001-12-07 15:38:26 +00003015
3016
3017
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003018
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003019LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003020BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003021INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003022DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003023LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003024RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003025
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003026# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003027# If CXX is set, and if it is needed to link a main function that was
3028# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3029# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003030# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003031# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003032
Martin v. Löwis11437992002-04-12 09:54:03 +00003033echo "$as_me:$LINENO: checking LINKCC" >&5
3034echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003035if test -z "$LINKCC"
3036then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003037 if test -z "$CXX"; then
3038 LINKCC="\$(PURIFY) \$(CC)"
3039 else
3040 echo 'int main(){return 0;}' > conftest.$ac_ext
3041 $CXX -c conftest.$ac_ext 2>&5
3042 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3043 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3044 then
3045 LINKCC="\$(PURIFY) \$(CC)"
3046 else
3047 LINKCC="\$(PURIFY) \$(CXX)"
3048 fi
3049 rm -fr conftest*
3050 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003051 case $ac_sys_system in
3052 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003053 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003054 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003055 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003056 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003057 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003058 esac
3059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003060echo "$as_me:$LINENO: result: $LINKCC" >&5
3061echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003062
Martin v. Löwis11437992002-04-12 09:54:03 +00003063echo "$as_me:$LINENO: checking for --enable-shared" >&5
3064echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003065# Check whether --enable-shared or --disable-shared was given.
3066if test "${enable_shared+set}" = set; then
3067 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003068
Martin v. Löwis11437992002-04-12 09:54:03 +00003069fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003070
3071if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003072then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003073 case $ac_sys_system in
3074 CYGWIN*)
3075 enable_shared="yes";;
3076 *)
3077 enable_shared="no";;
3078 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003079fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003080echo "$as_me:$LINENO: result: $enable_shared" >&5
3081echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003082
3083
Martin v. Löwis11437992002-04-12 09:54:03 +00003084echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3085echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003086
Guido van Rossumb8552162001-09-05 14:58:11 +00003087# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3088# library that we build, but we do not want to link against it (we
3089# will find it with a -framework option). For this reason there is an
3090# extra variable BLDLIBRARY against which Python and the extension
3091# modules are linked, BLDLIBRARY. This is normally the same as
3092# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003093if test "$enable_framework"
3094then
3095 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3096 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3097 BLDLIBRARY=''
3098else
3099 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003100fi
Jack Jansene578a632001-08-15 01:27:14 +00003101
Martin v. Löwis1142de32002-03-29 16:28:31 +00003102# Other platforms follow
3103if test $enable_shared = "yes"; then
3104 case $ac_sys_system in
3105 BeOS*)
3106 LDLIBRARY='libpython$(VERSION).so'
3107 ;;
3108 CYGWIN*)
3109 LDLIBRARY='libpython$(VERSION).dll.a'
3110 DLLLIBRARY='libpython$(VERSION).dll'
3111 ;;
3112 SunOS*)
3113 LDLIBRARY='libpython$(VERSION).so'
3114 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3115 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3116 ;;
3117 Linux*)
3118 LDLIBRARY='libpython$(VERSION).so'
3119 BLDLIBRARY='-L. -lpython$(VERSION)'
3120 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3121 INSTSONAME="$LDLIBRARY".$SOVERSION
3122 ;;
3123 hp*|HP*)
3124 LDLIBRARY='libpython$(VERSION).sl'
3125 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3126 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3127 ;;
3128 OSF*)
3129 LDLIBRARY='libpython$(VERSION).so'
3130 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3131 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3132 ;;
3133 esac
3134 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3135 case $MACHDEP in
3136 dguxR4)
3137 LDLIBRARY='libpython$(VERSION).so'
3138 OPT="$OPT -pic"
3139 ;;
3140 esac
3141fi
3142
Martin v. Löwis11437992002-04-12 09:54:03 +00003143echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3144echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003145
Martin v. Löwis11437992002-04-12 09:54:03 +00003146if test -n "$ac_tool_prefix"; then
3147 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3148set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3149echo "$as_me:$LINENO: checking for $ac_word" >&5
3150echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3151if test "${ac_cv_prog_RANLIB+set}" = set; then
3152 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003153else
3154 if test -n "$RANLIB"; then
3155 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3156else
Martin v. Löwis11437992002-04-12 09:54:03 +00003157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3158for as_dir in $PATH
3159do
3160 IFS=$as_save_IFS
3161 test -z "$as_dir" && as_dir=.
3162 for ac_exec_ext in '' $ac_executable_extensions; do
3163 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3164 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3165 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3166 break 2
3167 fi
3168done
3169done
3170
Guido van Rossum627b2d71993-12-24 10:39:16 +00003171fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003172fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003173RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003174if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003175 echo "$as_me:$LINENO: result: $RANLIB" >&5
3176echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003177else
Martin v. Löwis11437992002-04-12 09:54:03 +00003178 echo "$as_me:$LINENO: result: no" >&5
3179echo "${ECHO_T}no" >&6
3180fi
3181
3182fi
3183if test -z "$ac_cv_prog_RANLIB"; then
3184 ac_ct_RANLIB=$RANLIB
3185 # Extract the first word of "ranlib", so it can be a program name with args.
3186set dummy ranlib; ac_word=$2
3187echo "$as_me:$LINENO: checking for $ac_word" >&5
3188echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3189if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3190 echo $ECHO_N "(cached) $ECHO_C" >&6
3191else
3192 if test -n "$ac_ct_RANLIB"; then
3193 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3194else
3195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3196for as_dir in $PATH
3197do
3198 IFS=$as_save_IFS
3199 test -z "$as_dir" && as_dir=.
3200 for ac_exec_ext in '' $ac_executable_extensions; do
3201 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3202 ac_cv_prog_ac_ct_RANLIB="ranlib"
3203 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3204 break 2
3205 fi
3206done
3207done
3208
3209 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3210fi
3211fi
3212ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3213if test -n "$ac_ct_RANLIB"; then
3214 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3215echo "${ECHO_T}$ac_ct_RANLIB" >&6
3216else
3217 echo "$as_me:$LINENO: result: no" >&5
3218echo "${ECHO_T}no" >&6
3219fi
3220
3221 RANLIB=$ac_ct_RANLIB
3222else
3223 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003224fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003225
3226
Guido van Rossum7f43da71994-08-01 12:15:30 +00003227for ac_prog in ar aal
3228do
Martin v. Löwis11437992002-04-12 09:54:03 +00003229 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003230set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003231echo "$as_me:$LINENO: checking for $ac_word" >&5
3232echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3233if test "${ac_cv_prog_AR+set}" = set; then
3234 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003235else
3236 if test -n "$AR"; then
3237 ac_cv_prog_AR="$AR" # Let the user override the test.
3238else
Martin v. Löwis11437992002-04-12 09:54:03 +00003239as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3240for as_dir in $PATH
3241do
3242 IFS=$as_save_IFS
3243 test -z "$as_dir" && as_dir=.
3244 for ac_exec_ext in '' $ac_executable_extensions; do
3245 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3246 ac_cv_prog_AR="$ac_prog"
3247 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3248 break 2
3249 fi
3250done
3251done
3252
Guido van Rossum7f43da71994-08-01 12:15:30 +00003253fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003254fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003255AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003256if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003257 echo "$as_me:$LINENO: result: $AR" >&5
3258echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003259else
Martin v. Löwis11437992002-04-12 09:54:03 +00003260 echo "$as_me:$LINENO: result: no" >&5
3261echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003262fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003263
Martin v. Löwis11437992002-04-12 09:54:03 +00003264 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003265done
3266test -n "$AR" || AR="ar"
3267
Michael W. Hudson54241132001-12-07 15:38:26 +00003268
Neil Schemenauera42c8272001-03-31 00:01:55 +00003269case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003270bsdos*|hp*|HP*)
3271 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003272 if test -z "$INSTALL"
3273 then
3274 INSTALL="${srcdir}/install-sh -c"
3275 fi
3276esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003277ac_aux_dir=
3278for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3279 if test -f $ac_dir/install-sh; then
3280 ac_aux_dir=$ac_dir
3281 ac_install_sh="$ac_aux_dir/install-sh -c"
3282 break
3283 elif test -f $ac_dir/install.sh; then
3284 ac_aux_dir=$ac_dir
3285 ac_install_sh="$ac_aux_dir/install.sh -c"
3286 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003287 elif test -f $ac_dir/shtool; then
3288 ac_aux_dir=$ac_dir
3289 ac_install_sh="$ac_aux_dir/shtool install -c"
3290 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003291 fi
3292done
3293if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003294 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3295echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3296 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003297fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003298ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3299ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3300ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003301
3302# Find a good install program. We prefer a C program (faster),
3303# so one script is as good as another. But avoid the broken or
3304# incompatible versions:
3305# SysV /etc/install, /usr/sbin/install
3306# SunOS /usr/etc/install
3307# IRIX /sbin/install
3308# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003309# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003310# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3311# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3312# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3313# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003314echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3315echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003316if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003317if test "${ac_cv_path_install+set}" = set; then
3318 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003319else
Martin v. Löwis11437992002-04-12 09:54:03 +00003320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3321for as_dir in $PATH
3322do
3323 IFS=$as_save_IFS
3324 test -z "$as_dir" && as_dir=.
3325 # Account for people who put trailing slashes in PATH elements.
3326case $as_dir/ in
3327 ./ | .// | /cC/* | \
3328 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3329 /usr/ucb/* ) ;;
3330 *)
3331 # OSF1 and SCO ODT 3.0 have their own names for install.
3332 # Don't use installbsd from OSF since it installs stuff as root
3333 # by default.
3334 for ac_prog in ginstall scoinst install; do
3335 for ac_exec_ext in '' $ac_executable_extensions; do
3336 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3337 if test $ac_prog = install &&
3338 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3339 # AIX install. It has an incompatible calling convention.
3340 :
3341 elif test $ac_prog = install &&
3342 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3343 # program-specific install script used by HP pwplus--don't use.
3344 :
3345 else
3346 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3347 break 3
3348 fi
3349 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003350 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003351 done
3352 ;;
3353esac
3354done
3355
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003356
3357fi
3358 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003359 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003360 else
3361 # As a last resort, use the slow shell script. We don't cache a
3362 # path for INSTALL within a source directory, because that will
3363 # break other packages using the cache if that directory is
3364 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003365 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003366 fi
3367fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003368echo "$as_me:$LINENO: result: $INSTALL" >&5
3369echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003370
3371# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3372# It thinks the first close brace ends the variable substitution.
3373test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3374
Martin v. Löwis11437992002-04-12 09:54:03 +00003375test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003376
3377test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3378
Michael W. Hudson54241132001-12-07 15:38:26 +00003379
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003380# Not every filesystem supports hard links
3381
3382if test -z "$LN" ; then
3383 case $ac_sys_system in
3384 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003385 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003386 *) LN=ln;;
3387 esac
3388fi
3389
Fred Drake109d9862001-07-11 06:27:56 +00003390# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003391echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3392echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3393
Fred Drake109d9862001-07-11 06:27:56 +00003394# Check whether --with-pydebug or --without-pydebug was given.
3395if test "${with_pydebug+set}" = set; then
3396 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003397
Fred Drake109d9862001-07-11 06:27:56 +00003398if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003399then
3400
3401cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003402#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003403_ACEOF
3404
3405 echo "$as_me:$LINENO: result: yes" >&5
3406echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003407 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003408else echo "$as_me:$LINENO: result: no" >&5
3409echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003410fi
3411else
Martin v. Löwis11437992002-04-12 09:54:03 +00003412 echo "$as_me:$LINENO: result: no" >&5
3413echo "${ECHO_T}no" >&6
3414fi;
Fred Drake109d9862001-07-11 06:27:56 +00003415
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003416# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003417
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003418if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003419then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003420 case $GCC in
3421 yes)
3422 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003423 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003424 if test "$Py_DEBUG" = 'true' ; then
3425 # Optimization messes up debuggers, so turn it off for
3426 # debug builds.
3427 OPT="-g -Wall -Wstrict-prototypes"
3428 else
3429 OPT="-g -O3 -Wall -Wstrict-prototypes"
3430 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003431 *)
Fred Drake109d9862001-07-11 06:27:56 +00003432 OPT="-O3 -Wall -Wstrict-prototypes";;
3433 esac
3434 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003435 *)
3436 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003437 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003438 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3439 *)
3440 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003441 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003442 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003443 case $ac_sys_system in
3444 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003445 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003446 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003447fi
3448
Fred Drakee1ceaa02001-12-04 20:55:47 +00003449if test "$Py_DEBUG" = 'true'; then
3450 :
3451else
3452 OPT="-DNDEBUG $OPT"
3453fi
3454
Trent Mick635f6fb2000-08-23 21:33:05 +00003455# The current (beta) Monterey compiler dies with optimizations
3456case $ac_sys_system in
3457Monterey*) OPT="";;
3458esac
3459
Guido van Rossum563e7081996-09-10 18:20:48 +00003460if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003461then
3462 OPT="$OPT $ac_arch_flags"
3463fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003464
Martin v. Löwis11437992002-04-12 09:54:03 +00003465echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3466echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3467if test "${ac_cv_opt_olimit_ok+set}" = set; then
3468 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003469else
3470 ac_save_cc="$CC"
3471CC="$CC -OPT:Olimit=0"
3472if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003473 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003474else
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 cat >conftest.$ac_ext <<_ACEOF
3476#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003477#include "confdefs.h"
3478int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003479_ACEOF
3480rm -f conftest$ac_exeext
3481if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3482 (eval $ac_link) 2>&5
3483 ac_status=$?
3484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3485 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3487 (eval $ac_try) 2>&5
3488 ac_status=$?
3489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3490 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003491 ac_cv_opt_olimit_ok=yes
3492else
Martin v. Löwis11437992002-04-12 09:54:03 +00003493 echo "$as_me: program exited with status $ac_status" >&5
3494echo "$as_me: failed program was:" >&5
3495cat conftest.$ac_ext >&5
3496( exit $ac_status )
3497ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003498fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003499rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003500fi
Guido van Rossum91922671997-10-09 20:24:13 +00003501CC="$ac_save_cc"
3502fi
3503
Martin v. Löwis11437992002-04-12 09:54:03 +00003504echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3505echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003506if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003507 case $ac_sys_system in
3508 Darwin*) OPT="$OPT" ;;
3509 *) OPT="$OPT -OPT:Olimit=0";;
3510 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003511else
Martin v. Löwis11437992002-04-12 09:54:03 +00003512 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3513echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3514 if test "${ac_cv_olimit_ok+set}" = set; then
3515 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003516else
3517 ac_save_cc="$CC"
3518 CC="$CC -Olimit 1500"
3519 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003520 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003521else
Martin v. Löwis11437992002-04-12 09:54:03 +00003522 cat >conftest.$ac_ext <<_ACEOF
3523#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003524#include "confdefs.h"
3525int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003526_ACEOF
3527rm -f conftest$ac_exeext
3528if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3529 (eval $ac_link) 2>&5
3530 ac_status=$?
3531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3532 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3534 (eval $ac_try) 2>&5
3535 ac_status=$?
3536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3537 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003538 ac_cv_olimit_ok=yes
3539else
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 echo "$as_me: program exited with status $ac_status" >&5
3541echo "$as_me: failed program was:" >&5
3542cat conftest.$ac_ext >&5
3543( exit $ac_status )
3544ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003545fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003546rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003547fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003548 CC="$ac_save_cc"
3549fi
3550
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3552echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003553 if test $ac_cv_olimit_ok = yes; then
3554 OPT="$OPT -Olimit 1500"
3555 fi
3556fi
3557
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003558# On some compilers, pthreads are available without further options
3559# (e.g. MacOS X). On some of these systems, the compiler will not
3560# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3561# So we have to see first whether pthreads are available without
3562# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003563echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3564echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3565if test "${ac_cv_pthread_is_default+set}" = set; then
3566 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003567else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003568 if test "$cross_compiling" = yes; then
3569 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003570else
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 cat >conftest.$ac_ext <<_ACEOF
3572#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003573#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003574
Martin v. Löwis130fb172001-07-19 11:00:41 +00003575#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003576
3577void* routine(void* p){return NULL;}
3578
3579int main(){
3580 pthread_t p;
3581 if(pthread_create(&p,NULL,routine,NULL)!=0)
3582 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003583 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003584 return 0;
3585}
3586
Martin v. Löwis11437992002-04-12 09:54:03 +00003587_ACEOF
3588rm -f conftest$ac_exeext
3589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3590 (eval $ac_link) 2>&5
3591 ac_status=$?
3592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3593 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3595 (eval $ac_try) 2>&5
3596 ac_status=$?
3597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3598 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003599 ac_cv_pthread_is_default=yes
3600else
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 echo "$as_me: program exited with status $ac_status" >&5
3602echo "$as_me: failed program was:" >&5
3603cat conftest.$ac_ext >&5
3604( exit $ac_status )
3605ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003607rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003608fi
3609
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003610fi
3611
Martin v. Löwis11437992002-04-12 09:54:03 +00003612echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3613echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003614
Michael W. Hudson54241132001-12-07 15:38:26 +00003615
Martin v. Löwis11437992002-04-12 09:54:03 +00003616if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003617then
3618 ac_cv_kpthread=no
3619else
3620# -Kpthread, if available, provides the right #defines
3621# and linker options to make pthread_create available
3622# Some compilers won't report that they do not support -Kpthread,
3623# so we need to run a program to see whether it really made the
3624# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003625echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3626echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3627if test "${ac_cv_kpthread+set}" = set; then
3628 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003629else
3630 ac_save_cc="$CC"
3631CC="$CC -Kpthread"
3632if test "$cross_compiling" = yes; then
3633 ac_cv_kpthread=no
3634else
Martin v. Löwis11437992002-04-12 09:54:03 +00003635 cat >conftest.$ac_ext <<_ACEOF
3636#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003637#include "confdefs.h"
3638
3639#include <pthread.h>
3640
3641void* routine(void* p){return NULL;}
3642
3643int main(){
3644 pthread_t p;
3645 if(pthread_create(&p,NULL,routine,NULL)!=0)
3646 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003647 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003648 return 0;
3649}
3650
Martin v. Löwis11437992002-04-12 09:54:03 +00003651_ACEOF
3652rm -f conftest$ac_exeext
3653if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3654 (eval $ac_link) 2>&5
3655 ac_status=$?
3656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3657 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3659 (eval $ac_try) 2>&5
3660 ac_status=$?
3661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3662 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003663 ac_cv_kpthread=yes
3664else
Martin v. Löwis11437992002-04-12 09:54:03 +00003665 echo "$as_me: program exited with status $ac_status" >&5
3666echo "$as_me: failed program was:" >&5
3667cat conftest.$ac_ext >&5
3668( exit $ac_status )
3669ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003670fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003671rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003672fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003673CC="$ac_save_cc"
3674fi
3675
Martin v. Löwis11437992002-04-12 09:54:03 +00003676echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3677echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003678fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003679
Michael W. Hudson54241132001-12-07 15:38:26 +00003680
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003681# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003682echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3683echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3684if test "${ac_cv_header_stdc+set}" = set; then
3685 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003686else
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 cat >conftest.$ac_ext <<_ACEOF
3688#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003689#include "confdefs.h"
3690#include <stdlib.h>
3691#include <stdarg.h>
3692#include <string.h>
3693#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003694
3695_ACEOF
3696if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3697 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3698 ac_status=$?
3699 egrep -v '^ *\+' conftest.er1 >conftest.err
3700 rm -f conftest.er1
3701 cat conftest.err >&5
3702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3703 (exit $ac_status); } >/dev/null; then
3704 if test -s conftest.err; then
3705 ac_cpp_err=$ac_c_preproc_warn_flag
3706 else
3707 ac_cpp_err=
3708 fi
3709else
3710 ac_cpp_err=yes
3711fi
3712if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003713 ac_cv_header_stdc=yes
3714else
Martin v. Löwis11437992002-04-12 09:54:03 +00003715 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003716 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003717 ac_cv_header_stdc=no
3718fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003719rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003720
3721if test $ac_cv_header_stdc = yes; then
3722 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 cat >conftest.$ac_ext <<_ACEOF
3724#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003725#include "confdefs.h"
3726#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003727
3728_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003729if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3730 egrep "memchr" >/dev/null 2>&1; then
3731 :
3732else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003733 ac_cv_header_stdc=no
3734fi
3735rm -f conftest*
3736
3737fi
3738
3739if test $ac_cv_header_stdc = yes; then
3740 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 cat >conftest.$ac_ext <<_ACEOF
3742#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003743#include "confdefs.h"
3744#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003745
3746_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3748 egrep "free" >/dev/null 2>&1; then
3749 :
3750else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003751 ac_cv_header_stdc=no
3752fi
3753rm -f conftest*
3754
3755fi
3756
3757if test $ac_cv_header_stdc = yes; then
3758 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003759 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003760 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003761else
Martin v. Löwis11437992002-04-12 09:54:03 +00003762 cat >conftest.$ac_ext <<_ACEOF
3763#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003764#include "confdefs.h"
3765#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003766#if ((' ' & 0x0FF) == 0x020)
3767# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3768# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3769#else
3770# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3771 || ('j' <= (c) && (c) <= 'r') \
3772 || ('s' <= (c) && (c) <= 'z'))
3773# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3774#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003775
Martin v. Löwis11437992002-04-12 09:54:03 +00003776#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3777int
3778main ()
3779{
3780 int i;
3781 for (i = 0; i < 256; i++)
3782 if (XOR (islower (i), ISLOWER (i))
3783 || toupper (i) != TOUPPER (i))
3784 exit(2);
3785 exit (0);
3786}
3787_ACEOF
3788rm -f conftest$ac_exeext
3789if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3790 (eval $ac_link) 2>&5
3791 ac_status=$?
3792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3793 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3795 (eval $ac_try) 2>&5
3796 ac_status=$?
3797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3798 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003799 :
3800else
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 echo "$as_me: program exited with status $ac_status" >&5
3802echo "$as_me: failed program was:" >&5
3803cat conftest.$ac_ext >&5
3804( exit $ac_status )
3805ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003806fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003807rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003808fi
3809fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003810fi
3811echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3812echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003813if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003814
3815cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003816#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003817_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003818
3819fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003820
Martin v. Löwis11437992002-04-12 09:54:03 +00003821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
Neal Norwitz3d949422002-04-20 13:46:43 +00003862
Martin v. Löwis11437992002-04-12 09:54:03 +00003863for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003864libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003865signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Neal Norwitz3d949422002-04-20 13:46:43 +00003866sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003867sys/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 +00003868sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00003869ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003870do
Martin v. Löwis11437992002-04-12 09:54:03 +00003871as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3872if eval "test \"\${$as_ac_Header+set}\" = set"; then
3873 echo "$as_me:$LINENO: checking for $ac_header" >&5
3874echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3875if eval "test \"\${$as_ac_Header+set}\" = set"; then
3876 echo $ECHO_N "(cached) $ECHO_C" >&6
3877fi
3878echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3879echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003880else
Martin v. Löwis11437992002-04-12 09:54:03 +00003881 # Is the header compilable?
3882echo "$as_me:$LINENO: checking $ac_header usability" >&5
3883echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3884cat >conftest.$ac_ext <<_ACEOF
3885#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003886#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003887$ac_includes_default
3888#include <$ac_header>
3889_ACEOF
3890rm -f conftest.$ac_objext
3891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3892 (eval $ac_compile) 2>&5
3893 ac_status=$?
3894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3895 (exit $ac_status); } &&
3896 { ac_try='test -s conftest.$ac_objext'
3897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3898 (eval $ac_try) 2>&5
3899 ac_status=$?
3900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3901 (exit $ac_status); }; }; then
3902 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003903else
Martin v. Löwis11437992002-04-12 09:54:03 +00003904 echo "$as_me: failed program was:" >&5
3905cat conftest.$ac_ext >&5
3906ac_header_compiler=no
3907fi
3908rm -f conftest.$ac_objext conftest.$ac_ext
3909echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3910echo "${ECHO_T}$ac_header_compiler" >&6
3911
3912# Is the header present?
3913echo "$as_me:$LINENO: checking $ac_header presence" >&5
3914echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3915cat >conftest.$ac_ext <<_ACEOF
3916#line $LINENO "configure"
3917#include "confdefs.h"
3918#include <$ac_header>
3919_ACEOF
3920if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3921 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3922 ac_status=$?
3923 egrep -v '^ *\+' conftest.er1 >conftest.err
3924 rm -f conftest.er1
3925 cat conftest.err >&5
3926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3927 (exit $ac_status); } >/dev/null; then
3928 if test -s conftest.err; then
3929 ac_cpp_err=$ac_c_preproc_warn_flag
3930 else
3931 ac_cpp_err=
3932 fi
3933else
3934 ac_cpp_err=yes
3935fi
3936if test -z "$ac_cpp_err"; then
3937 ac_header_preproc=yes
3938else
3939 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003940 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003941 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003942fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003943rm -f conftest.err conftest.$ac_ext
3944echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3945echo "${ECHO_T}$ac_header_preproc" >&6
3946
3947# So? What about this header?
3948case $ac_header_compiler:$ac_header_preproc in
3949 yes:no )
3950 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3951echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3952 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3953echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3954 no:yes )
3955 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3956echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3957 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3958echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3959 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3960echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3961esac
3962echo "$as_me:$LINENO: checking for $ac_header" >&5
3963echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3964if eval "test \"\${$as_ac_Header+set}\" = set"; then
3965 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003966else
Martin v. Löwis11437992002-04-12 09:54:03 +00003967 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003968fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003969echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3970echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3971
3972fi
3973if test `eval echo '${'$as_ac_Header'}'` = yes; then
3974 cat >>confdefs.h <<_ACEOF
3975#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3976_ACEOF
3977
3978fi
3979
Guido van Rossum627b2d71993-12-24 10:39:16 +00003980done
3981
Martin v. Löwis11437992002-04-12 09:54:03 +00003982
3983
3984
3985
3986
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003987ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003988for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3989 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3990echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3991echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3992if eval "test \"\${$as_ac_Header+set}\" = set"; then
3993 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003994else
Martin v. Löwis11437992002-04-12 09:54:03 +00003995 cat >conftest.$ac_ext <<_ACEOF
3996#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003997#include "confdefs.h"
3998#include <sys/types.h>
3999#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004000
4001#ifdef F77_DUMMY_MAIN
4002# ifdef __cplusplus
4003 extern "C"
4004# endif
4005 int F77_DUMMY_MAIN() { return 1; }
4006#endif
4007int
4008main ()
4009{
4010if ((DIR *) 0)
4011return 0;
4012 ;
4013 return 0;
4014}
4015_ACEOF
4016rm -f conftest.$ac_objext
4017if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4018 (eval $ac_compile) 2>&5
4019 ac_status=$?
4020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4021 (exit $ac_status); } &&
4022 { ac_try='test -s conftest.$ac_objext'
4023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4024 (eval $ac_try) 2>&5
4025 ac_status=$?
4026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4027 (exit $ac_status); }; }; then
4028 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004029else
Martin v. Löwis11437992002-04-12 09:54:03 +00004030 echo "$as_me: failed program was:" >&5
4031cat conftest.$ac_ext >&5
4032eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004033fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004034rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004035fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004036echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4037echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4038if test `eval echo '${'$as_ac_Header'}'` = yes; then
4039 cat >>confdefs.h <<_ACEOF
4040#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4041_ACEOF
4042
4043ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004044fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004045
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004046done
4047# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4048if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004049 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4050echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4051if test "${ac_cv_search_opendir+set}" = set; then
4052 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004053else
Martin v. Löwis11437992002-04-12 09:54:03 +00004054 ac_func_search_save_LIBS=$LIBS
4055ac_cv_search_opendir=no
4056cat >conftest.$ac_ext <<_ACEOF
4057#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004059
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004060/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004061#ifdef __cplusplus
4062extern "C"
4063#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004064/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004065 builtin and then its argument prototype would still apply. */
4066char opendir ();
4067#ifdef F77_DUMMY_MAIN
4068# ifdef __cplusplus
4069 extern "C"
4070# endif
4071 int F77_DUMMY_MAIN() { return 1; }
4072#endif
4073int
4074main ()
4075{
4076opendir ();
4077 ;
4078 return 0;
4079}
4080_ACEOF
4081rm -f conftest.$ac_objext conftest$ac_exeext
4082if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4083 (eval $ac_link) 2>&5
4084 ac_status=$?
4085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4086 (exit $ac_status); } &&
4087 { ac_try='test -s conftest$ac_exeext'
4088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4089 (eval $ac_try) 2>&5
4090 ac_status=$?
4091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4092 (exit $ac_status); }; }; then
4093 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004094else
Martin v. Löwis11437992002-04-12 09:54:03 +00004095 echo "$as_me: failed program was:" >&5
4096cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004097fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004098rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4099if test "$ac_cv_search_opendir" = no; then
4100 for ac_lib in dir; do
4101 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4102 cat >conftest.$ac_ext <<_ACEOF
4103#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004104#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004105
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004106/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004107#ifdef __cplusplus
4108extern "C"
4109#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004110/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004111 builtin and then its argument prototype would still apply. */
4112char opendir ();
4113#ifdef F77_DUMMY_MAIN
4114# ifdef __cplusplus
4115 extern "C"
4116# endif
4117 int F77_DUMMY_MAIN() { return 1; }
4118#endif
4119int
4120main ()
4121{
4122opendir ();
4123 ;
4124 return 0;
4125}
4126_ACEOF
4127rm -f conftest.$ac_objext conftest$ac_exeext
4128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4129 (eval $ac_link) 2>&5
4130 ac_status=$?
4131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4132 (exit $ac_status); } &&
4133 { ac_try='test -s conftest$ac_exeext'
4134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4135 (eval $ac_try) 2>&5
4136 ac_status=$?
4137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4138 (exit $ac_status); }; }; then
4139 ac_cv_search_opendir="-l$ac_lib"
4140break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004141else
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 echo "$as_me: failed program was:" >&5
4143cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004144fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004145rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4146 done
4147fi
4148LIBS=$ac_func_search_save_LIBS
4149fi
4150echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4151echo "${ECHO_T}$ac_cv_search_opendir" >&6
4152if test "$ac_cv_search_opendir" != no; then
4153 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004154
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004155fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004156
Michael W. Hudson54241132001-12-07 15:38:26 +00004157else
Martin v. Löwis11437992002-04-12 09:54:03 +00004158 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4159echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4160if test "${ac_cv_search_opendir+set}" = set; then
4161 echo $ECHO_N "(cached) $ECHO_C" >&6
4162else
4163 ac_func_search_save_LIBS=$LIBS
4164ac_cv_search_opendir=no
4165cat >conftest.$ac_ext <<_ACEOF
4166#line $LINENO "configure"
4167#include "confdefs.h"
4168
4169/* Override any gcc2 internal prototype to avoid an error. */
4170#ifdef __cplusplus
4171extern "C"
4172#endif
4173/* We use char because int might match the return type of a gcc2
4174 builtin and then its argument prototype would still apply. */
4175char opendir ();
4176#ifdef F77_DUMMY_MAIN
4177# ifdef __cplusplus
4178 extern "C"
4179# endif
4180 int F77_DUMMY_MAIN() { return 1; }
4181#endif
4182int
4183main ()
4184{
4185opendir ();
4186 ;
4187 return 0;
4188}
4189_ACEOF
4190rm -f conftest.$ac_objext conftest$ac_exeext
4191if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4192 (eval $ac_link) 2>&5
4193 ac_status=$?
4194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4195 (exit $ac_status); } &&
4196 { ac_try='test -s conftest$ac_exeext'
4197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4198 (eval $ac_try) 2>&5
4199 ac_status=$?
4200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4201 (exit $ac_status); }; }; then
4202 ac_cv_search_opendir="none required"
4203else
4204 echo "$as_me: failed program was:" >&5
4205cat conftest.$ac_ext >&5
4206fi
4207rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4208if test "$ac_cv_search_opendir" = no; then
4209 for ac_lib in x; do
4210 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4211 cat >conftest.$ac_ext <<_ACEOF
4212#line $LINENO "configure"
4213#include "confdefs.h"
4214
4215/* Override any gcc2 internal prototype to avoid an error. */
4216#ifdef __cplusplus
4217extern "C"
4218#endif
4219/* We use char because int might match the return type of a gcc2
4220 builtin and then its argument prototype would still apply. */
4221char opendir ();
4222#ifdef F77_DUMMY_MAIN
4223# ifdef __cplusplus
4224 extern "C"
4225# endif
4226 int F77_DUMMY_MAIN() { return 1; }
4227#endif
4228int
4229main ()
4230{
4231opendir ();
4232 ;
4233 return 0;
4234}
4235_ACEOF
4236rm -f conftest.$ac_objext conftest$ac_exeext
4237if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4238 (eval $ac_link) 2>&5
4239 ac_status=$?
4240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4241 (exit $ac_status); } &&
4242 { ac_try='test -s conftest$ac_exeext'
4243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4244 (eval $ac_try) 2>&5
4245 ac_status=$?
4246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4247 (exit $ac_status); }; }; then
4248 ac_cv_search_opendir="-l$ac_lib"
4249break
4250else
4251 echo "$as_me: failed program was:" >&5
4252cat conftest.$ac_ext >&5
4253fi
4254rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4255 done
4256fi
4257LIBS=$ac_func_search_save_LIBS
4258fi
4259echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4260echo "${ECHO_T}$ac_cv_search_opendir" >&6
4261if test "$ac_cv_search_opendir" != no; then
4262 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4263
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004264fi
4265
4266fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004267
Michael W. Hudson54241132001-12-07 15:38:26 +00004268
Guido van Rossum627b2d71993-12-24 10:39:16 +00004269# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004270was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004271echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4272echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4273cat >conftest.$ac_ext <<_ACEOF
4274#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275#include "confdefs.h"
4276#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004277
4278_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004279if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4280 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004281 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004282else
Martin v. Löwis11437992002-04-12 09:54:03 +00004283
4284
4285cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004286#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004287_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004288
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004289
Guido van Rossum627b2d71993-12-24 10:39:16 +00004290fi
4291rm -f conftest*
4292
Martin v. Löwis11437992002-04-12 09:54:03 +00004293echo "$as_me:$LINENO: result: $was_it_defined" >&5
4294echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004295
Guido van Rossum810cc512001-09-09 23:51:39 +00004296# Two defines needed to enable largefile support on various platforms
4297# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004298
Martin v. Löwis11437992002-04-12 09:54:03 +00004299cat >>confdefs.h <<\_ACEOF
4300#define _LARGEFILE_SOURCE 1
4301_ACEOF
4302
4303
4304cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004305#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004306_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004307
Michael W. Hudson54241132001-12-07 15:38:26 +00004308
Guido van Rossum84e7b241996-08-19 21:59:00 +00004309# Add some code to confdefs.h so that the test for off_t works on SCO
4310cat >> confdefs.h <<\EOF
4311#if defined(SCO_DS)
4312#undef _OFF_T
4313#endif
4314EOF
4315
Guido van Rossumef2255b2000-03-10 22:30:29 +00004316# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004317echo "$as_me:$LINENO: checking for mode_t" >&5
4318echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4319if test "${ac_cv_type_mode_t+set}" = set; then
4320 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004321else
Martin v. Löwis11437992002-04-12 09:54:03 +00004322 cat >conftest.$ac_ext <<_ACEOF
4323#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004324#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004325$ac_includes_default
4326#ifdef F77_DUMMY_MAIN
4327# ifdef __cplusplus
4328 extern "C"
4329# endif
4330 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004332int
4333main ()
4334{
4335if ((mode_t *) 0)
4336 return 0;
4337if (sizeof (mode_t))
4338 return 0;
4339 ;
4340 return 0;
4341}
4342_ACEOF
4343rm -f conftest.$ac_objext
4344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4345 (eval $ac_compile) 2>&5
4346 ac_status=$?
4347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4348 (exit $ac_status); } &&
4349 { ac_try='test -s conftest.$ac_objext'
4350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4351 (eval $ac_try) 2>&5
4352 ac_status=$?
4353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4354 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004355 ac_cv_type_mode_t=yes
4356else
Martin v. Löwis11437992002-04-12 09:54:03 +00004357 echo "$as_me: failed program was:" >&5
4358cat conftest.$ac_ext >&5
4359ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004361rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004363echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4364echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4365if test $ac_cv_type_mode_t = yes; then
4366 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004367else
Martin v. Löwis11437992002-04-12 09:54:03 +00004368
4369cat >>confdefs.h <<_ACEOF
4370#define mode_t int
4371_ACEOF
4372
4373fi
4374
4375echo "$as_me:$LINENO: checking for off_t" >&5
4376echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4377if test "${ac_cv_type_off_t+set}" = set; then
4378 echo $ECHO_N "(cached) $ECHO_C" >&6
4379else
4380 cat >conftest.$ac_ext <<_ACEOF
4381#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004382#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004383$ac_includes_default
4384#ifdef F77_DUMMY_MAIN
4385# ifdef __cplusplus
4386 extern "C"
4387# endif
4388 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004390int
4391main ()
4392{
4393if ((off_t *) 0)
4394 return 0;
4395if (sizeof (off_t))
4396 return 0;
4397 ;
4398 return 0;
4399}
4400_ACEOF
4401rm -f conftest.$ac_objext
4402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4403 (eval $ac_compile) 2>&5
4404 ac_status=$?
4405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4406 (exit $ac_status); } &&
4407 { ac_try='test -s conftest.$ac_objext'
4408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4409 (eval $ac_try) 2>&5
4410 ac_status=$?
4411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4412 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004413 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004414else
Martin v. Löwis11437992002-04-12 09:54:03 +00004415 echo "$as_me: failed program was:" >&5
4416cat conftest.$ac_ext >&5
4417ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004418fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004419rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004420fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004421echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4422echo "${ECHO_T}$ac_cv_type_off_t" >&6
4423if test $ac_cv_type_off_t = yes; then
4424 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004425else
Martin v. Löwis11437992002-04-12 09:54:03 +00004426
4427cat >>confdefs.h <<_ACEOF
4428#define off_t long
4429_ACEOF
4430
4431fi
4432
4433echo "$as_me:$LINENO: checking for pid_t" >&5
4434echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4435if test "${ac_cv_type_pid_t+set}" = set; then
4436 echo $ECHO_N "(cached) $ECHO_C" >&6
4437else
4438 cat >conftest.$ac_ext <<_ACEOF
4439#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004440#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004441$ac_includes_default
4442#ifdef F77_DUMMY_MAIN
4443# ifdef __cplusplus
4444 extern "C"
4445# endif
4446 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004448int
4449main ()
4450{
4451if ((pid_t *) 0)
4452 return 0;
4453if (sizeof (pid_t))
4454 return 0;
4455 ;
4456 return 0;
4457}
4458_ACEOF
4459rm -f conftest.$ac_objext
4460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4461 (eval $ac_compile) 2>&5
4462 ac_status=$?
4463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4464 (exit $ac_status); } &&
4465 { ac_try='test -s conftest.$ac_objext'
4466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4467 (eval $ac_try) 2>&5
4468 ac_status=$?
4469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4470 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004471 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004472else
Martin v. Löwis11437992002-04-12 09:54:03 +00004473 echo "$as_me: failed program was:" >&5
4474cat conftest.$ac_ext >&5
4475ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004476fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004477rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004478fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004479echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4480echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4481if test $ac_cv_type_pid_t = yes; then
4482 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004483else
Martin v. Löwis11437992002-04-12 09:54:03 +00004484
4485cat >>confdefs.h <<_ACEOF
4486#define pid_t int
4487_ACEOF
4488
4489fi
4490
4491echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4492echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4493if test "${ac_cv_type_signal+set}" = set; then
4494 echo $ECHO_N "(cached) $ECHO_C" >&6
4495else
4496 cat >conftest.$ac_ext <<_ACEOF
4497#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004498#include "confdefs.h"
4499#include <sys/types.h>
4500#include <signal.h>
4501#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004502# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004503#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004504#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004505extern "C" void (*signal (int, void (*)(int)))(int);
4506#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004507void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004508#endif
4509
Martin v. Löwis11437992002-04-12 09:54:03 +00004510#ifdef F77_DUMMY_MAIN
4511# ifdef __cplusplus
4512 extern "C"
4513# endif
4514 int F77_DUMMY_MAIN() { return 1; }
4515#endif
4516int
4517main ()
4518{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004519int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004520 ;
4521 return 0;
4522}
4523_ACEOF
4524rm -f conftest.$ac_objext
4525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4526 (eval $ac_compile) 2>&5
4527 ac_status=$?
4528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4529 (exit $ac_status); } &&
4530 { ac_try='test -s conftest.$ac_objext'
4531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4532 (eval $ac_try) 2>&5
4533 ac_status=$?
4534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4535 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004536 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004537else
Martin v. Löwis11437992002-04-12 09:54:03 +00004538 echo "$as_me: failed program was:" >&5
4539cat conftest.$ac_ext >&5
4540ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004541fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004542rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004544echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4545echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004546
Martin v. Löwis11437992002-04-12 09:54:03 +00004547cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004548#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004549_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004550
Michael W. Hudson54241132001-12-07 15:38:26 +00004551
Martin v. Löwis11437992002-04-12 09:54:03 +00004552echo "$as_me:$LINENO: checking for size_t" >&5
4553echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4554if test "${ac_cv_type_size_t+set}" = set; then
4555 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004556else
Martin v. Löwis11437992002-04-12 09:54:03 +00004557 cat >conftest.$ac_ext <<_ACEOF
4558#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004559#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004560$ac_includes_default
4561#ifdef F77_DUMMY_MAIN
4562# ifdef __cplusplus
4563 extern "C"
4564# endif
4565 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004566#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004567int
4568main ()
4569{
4570if ((size_t *) 0)
4571 return 0;
4572if (sizeof (size_t))
4573 return 0;
4574 ;
4575 return 0;
4576}
4577_ACEOF
4578rm -f conftest.$ac_objext
4579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4580 (eval $ac_compile) 2>&5
4581 ac_status=$?
4582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4583 (exit $ac_status); } &&
4584 { ac_try='test -s conftest.$ac_objext'
4585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4586 (eval $ac_try) 2>&5
4587 ac_status=$?
4588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4589 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004590 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004591else
Martin v. Löwis11437992002-04-12 09:54:03 +00004592 echo "$as_me: failed program was:" >&5
4593cat conftest.$ac_ext >&5
4594ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004595fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004596rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004597fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004598echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4599echo "${ECHO_T}$ac_cv_type_size_t" >&6
4600if test $ac_cv_type_size_t = yes; then
4601 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004602else
Martin v. Löwis11437992002-04-12 09:54:03 +00004603
4604cat >>confdefs.h <<_ACEOF
4605#define size_t unsigned
4606_ACEOF
4607
4608fi
4609
4610echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4611echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4612if test "${ac_cv_type_uid_t+set}" = set; then
4613 echo $ECHO_N "(cached) $ECHO_C" >&6
4614else
4615 cat >conftest.$ac_ext <<_ACEOF
4616#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004617#include "confdefs.h"
4618#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004619
4620_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004621if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4622 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004623 ac_cv_type_uid_t=yes
4624else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004625 ac_cv_type_uid_t=no
4626fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004627rm -f conftest*
4628
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004629fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004630echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4631echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004632if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004633
Martin v. Löwis11437992002-04-12 09:54:03 +00004634cat >>confdefs.h <<\_ACEOF
4635#define uid_t int
4636_ACEOF
4637
4638
4639cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004640#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004641_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004642
4643fi
4644
Jack Jansendd19cf82001-12-06 22:36:17 +00004645
Michael W. Hudson54241132001-12-07 15:38:26 +00004646# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004647echo "$as_me:$LINENO: checking for int" >&5
4648echo $ECHO_N "checking for int... $ECHO_C" >&6
4649if test "${ac_cv_type_int+set}" = set; then
4650 echo $ECHO_N "(cached) $ECHO_C" >&6
4651else
4652 cat >conftest.$ac_ext <<_ACEOF
4653#line $LINENO "configure"
4654#include "confdefs.h"
4655$ac_includes_default
4656#ifdef F77_DUMMY_MAIN
4657# ifdef __cplusplus
4658 extern "C"
4659# endif
4660 int F77_DUMMY_MAIN() { return 1; }
4661#endif
4662int
4663main ()
4664{
4665if ((int *) 0)
4666 return 0;
4667if (sizeof (int))
4668 return 0;
4669 ;
4670 return 0;
4671}
4672_ACEOF
4673rm -f conftest.$ac_objext
4674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4675 (eval $ac_compile) 2>&5
4676 ac_status=$?
4677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4678 (exit $ac_status); } &&
4679 { ac_try='test -s conftest.$ac_objext'
4680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4681 (eval $ac_try) 2>&5
4682 ac_status=$?
4683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4684 (exit $ac_status); }; }; then
4685 ac_cv_type_int=yes
4686else
4687 echo "$as_me: failed program was:" >&5
4688cat conftest.$ac_ext >&5
4689ac_cv_type_int=no
4690fi
4691rm -f conftest.$ac_objext conftest.$ac_ext
4692fi
4693echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4694echo "${ECHO_T}$ac_cv_type_int" >&6
4695
4696echo "$as_me:$LINENO: checking size of int" >&5
4697echo $ECHO_N "checking size of int... $ECHO_C" >&6
4698if test "${ac_cv_sizeof_int+set}" = set; then
4699 echo $ECHO_N "(cached) $ECHO_C" >&6
4700else
4701 if test "$ac_cv_type_int" = yes; then
4702 # The cast to unsigned long works around a bug in the HP C Compiler
4703 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4704 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4705 # This bug is HP SR number 8606223364.
4706 if test "$cross_compiling" = yes; then
4707 # Depending upon the size, compute the lo and hi bounds.
4708cat >conftest.$ac_ext <<_ACEOF
4709#line $LINENO "configure"
4710#include "confdefs.h"
4711$ac_includes_default
4712#ifdef F77_DUMMY_MAIN
4713# ifdef __cplusplus
4714 extern "C"
4715# endif
4716 int F77_DUMMY_MAIN() { return 1; }
4717#endif
4718int
4719main ()
4720{
4721static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4722test_array [0] = 0
4723
4724 ;
4725 return 0;
4726}
4727_ACEOF
4728rm -f conftest.$ac_objext
4729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4730 (eval $ac_compile) 2>&5
4731 ac_status=$?
4732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4733 (exit $ac_status); } &&
4734 { ac_try='test -s conftest.$ac_objext'
4735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4736 (eval $ac_try) 2>&5
4737 ac_status=$?
4738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4739 (exit $ac_status); }; }; then
4740 ac_lo=0 ac_mid=0
4741 while :; do
4742 cat >conftest.$ac_ext <<_ACEOF
4743#line $LINENO "configure"
4744#include "confdefs.h"
4745$ac_includes_default
4746#ifdef F77_DUMMY_MAIN
4747# ifdef __cplusplus
4748 extern "C"
4749# endif
4750 int F77_DUMMY_MAIN() { return 1; }
4751#endif
4752int
4753main ()
4754{
4755static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4756test_array [0] = 0
4757
4758 ;
4759 return 0;
4760}
4761_ACEOF
4762rm -f conftest.$ac_objext
4763if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4764 (eval $ac_compile) 2>&5
4765 ac_status=$?
4766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4767 (exit $ac_status); } &&
4768 { ac_try='test -s conftest.$ac_objext'
4769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4770 (eval $ac_try) 2>&5
4771 ac_status=$?
4772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4773 (exit $ac_status); }; }; then
4774 ac_hi=$ac_mid; break
4775else
4776 echo "$as_me: failed program was:" >&5
4777cat conftest.$ac_ext >&5
4778ac_lo=`expr $ac_mid + 1`
4779 if test $ac_lo -le $ac_mid; then
4780 ac_lo= ac_hi=
4781 break
4782 fi
4783 ac_mid=`expr 2 '*' $ac_mid + 1`
4784fi
4785rm -f conftest.$ac_objext conftest.$ac_ext
4786 done
4787else
4788 echo "$as_me: failed program was:" >&5
4789cat conftest.$ac_ext >&5
4790cat >conftest.$ac_ext <<_ACEOF
4791#line $LINENO "configure"
4792#include "confdefs.h"
4793$ac_includes_default
4794#ifdef F77_DUMMY_MAIN
4795# ifdef __cplusplus
4796 extern "C"
4797# endif
4798 int F77_DUMMY_MAIN() { return 1; }
4799#endif
4800int
4801main ()
4802{
4803static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4804test_array [0] = 0
4805
4806 ;
4807 return 0;
4808}
4809_ACEOF
4810rm -f conftest.$ac_objext
4811if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4812 (eval $ac_compile) 2>&5
4813 ac_status=$?
4814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815 (exit $ac_status); } &&
4816 { ac_try='test -s conftest.$ac_objext'
4817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4818 (eval $ac_try) 2>&5
4819 ac_status=$?
4820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4821 (exit $ac_status); }; }; then
4822 ac_hi=-1 ac_mid=-1
4823 while :; do
4824 cat >conftest.$ac_ext <<_ACEOF
4825#line $LINENO "configure"
4826#include "confdefs.h"
4827$ac_includes_default
4828#ifdef F77_DUMMY_MAIN
4829# ifdef __cplusplus
4830 extern "C"
4831# endif
4832 int F77_DUMMY_MAIN() { return 1; }
4833#endif
4834int
4835main ()
4836{
4837static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4838test_array [0] = 0
4839
4840 ;
4841 return 0;
4842}
4843_ACEOF
4844rm -f conftest.$ac_objext
4845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4846 (eval $ac_compile) 2>&5
4847 ac_status=$?
4848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4849 (exit $ac_status); } &&
4850 { ac_try='test -s conftest.$ac_objext'
4851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4852 (eval $ac_try) 2>&5
4853 ac_status=$?
4854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4855 (exit $ac_status); }; }; then
4856 ac_lo=$ac_mid; break
4857else
4858 echo "$as_me: failed program was:" >&5
4859cat conftest.$ac_ext >&5
4860ac_hi=`expr '(' $ac_mid ')' - 1`
4861 if test $ac_mid -le $ac_hi; then
4862 ac_lo= ac_hi=
4863 break
4864 fi
4865 ac_mid=`expr 2 '*' $ac_mid`
4866fi
4867rm -f conftest.$ac_objext conftest.$ac_ext
4868 done
4869else
4870 echo "$as_me: failed program was:" >&5
4871cat conftest.$ac_ext >&5
4872ac_lo= ac_hi=
4873fi
4874rm -f conftest.$ac_objext conftest.$ac_ext
4875fi
4876rm -f conftest.$ac_objext conftest.$ac_ext
4877# Binary search between lo and hi bounds.
4878while test "x$ac_lo" != "x$ac_hi"; do
4879 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4880 cat >conftest.$ac_ext <<_ACEOF
4881#line $LINENO "configure"
4882#include "confdefs.h"
4883$ac_includes_default
4884#ifdef F77_DUMMY_MAIN
4885# ifdef __cplusplus
4886 extern "C"
4887# endif
4888 int F77_DUMMY_MAIN() { return 1; }
4889#endif
4890int
4891main ()
4892{
4893static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4894test_array [0] = 0
4895
4896 ;
4897 return 0;
4898}
4899_ACEOF
4900rm -f conftest.$ac_objext
4901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4902 (eval $ac_compile) 2>&5
4903 ac_status=$?
4904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4905 (exit $ac_status); } &&
4906 { ac_try='test -s conftest.$ac_objext'
4907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4908 (eval $ac_try) 2>&5
4909 ac_status=$?
4910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4911 (exit $ac_status); }; }; then
4912 ac_hi=$ac_mid
4913else
4914 echo "$as_me: failed program was:" >&5
4915cat conftest.$ac_ext >&5
4916ac_lo=`expr '(' $ac_mid ')' + 1`
4917fi
4918rm -f conftest.$ac_objext conftest.$ac_ext
4919done
4920case $ac_lo in
4921?*) ac_cv_sizeof_int=$ac_lo;;
4922'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4923echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4924 { (exit 1); exit 1; }; } ;;
4925esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004926else
4927 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004928 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4929echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4930 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004931else
Martin v. Löwis11437992002-04-12 09:54:03 +00004932 cat >conftest.$ac_ext <<_ACEOF
4933#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004934#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004935$ac_includes_default
4936long longval () { return (long) (sizeof (int)); }
4937unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004938#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004939#include <stdlib.h>
4940#ifdef F77_DUMMY_MAIN
4941# ifdef __cplusplus
4942 extern "C"
4943# endif
4944 int F77_DUMMY_MAIN() { return 1; }
4945#endif
4946int
4947main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004948{
Martin v. Löwis11437992002-04-12 09:54:03 +00004949
4950 FILE *f = fopen ("conftest.val", "w");
4951 if (! f)
4952 exit (1);
4953 if (((long) (sizeof (int))) < 0)
4954 {
4955 long i = longval ();
4956 if (i != ((long) (sizeof (int))))
4957 exit (1);
4958 fprintf (f, "%ld\n", i);
4959 }
4960 else
4961 {
4962 unsigned long i = ulongval ();
4963 if (i != ((long) (sizeof (int))))
4964 exit (1);
4965 fprintf (f, "%lu\n", i);
4966 }
4967 exit (ferror (f) || fclose (f) != 0);
4968
4969 ;
4970 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004971}
Martin v. Löwis11437992002-04-12 09:54:03 +00004972_ACEOF
4973rm -f conftest$ac_exeext
4974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4975 (eval $ac_link) 2>&5
4976 ac_status=$?
4977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4980 (eval $ac_try) 2>&5
4981 ac_status=$?
4982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4983 (exit $ac_status); }; }; then
4984 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004985else
Martin v. Löwis11437992002-04-12 09:54:03 +00004986 echo "$as_me: program exited with status $ac_status" >&5
4987echo "$as_me: failed program was:" >&5
4988cat conftest.$ac_ext >&5
4989( exit $ac_status )
4990{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4991echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4992 { (exit 1); exit 1; }; }
4993fi
4994rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4995fi
4996fi
4997rm -f conftest.val
4998else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004999 ac_cv_sizeof_int=0
5000fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005001fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005002echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5003echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5004cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005005#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005006_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005007
5008
Martin v. Löwis11437992002-04-12 09:54:03 +00005009echo "$as_me:$LINENO: checking for long" >&5
5010echo $ECHO_N "checking for long... $ECHO_C" >&6
5011if test "${ac_cv_type_long+set}" = set; then
5012 echo $ECHO_N "(cached) $ECHO_C" >&6
5013else
5014 cat >conftest.$ac_ext <<_ACEOF
5015#line $LINENO "configure"
5016#include "confdefs.h"
5017$ac_includes_default
5018#ifdef F77_DUMMY_MAIN
5019# ifdef __cplusplus
5020 extern "C"
5021# endif
5022 int F77_DUMMY_MAIN() { return 1; }
5023#endif
5024int
5025main ()
5026{
5027if ((long *) 0)
5028 return 0;
5029if (sizeof (long))
5030 return 0;
5031 ;
5032 return 0;
5033}
5034_ACEOF
5035rm -f conftest.$ac_objext
5036if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5037 (eval $ac_compile) 2>&5
5038 ac_status=$?
5039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5040 (exit $ac_status); } &&
5041 { ac_try='test -s conftest.$ac_objext'
5042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5043 (eval $ac_try) 2>&5
5044 ac_status=$?
5045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5046 (exit $ac_status); }; }; then
5047 ac_cv_type_long=yes
5048else
5049 echo "$as_me: failed program was:" >&5
5050cat conftest.$ac_ext >&5
5051ac_cv_type_long=no
5052fi
5053rm -f conftest.$ac_objext conftest.$ac_ext
5054fi
5055echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5056echo "${ECHO_T}$ac_cv_type_long" >&6
5057
5058echo "$as_me:$LINENO: checking size of long" >&5
5059echo $ECHO_N "checking size of long... $ECHO_C" >&6
5060if test "${ac_cv_sizeof_long+set}" = set; then
5061 echo $ECHO_N "(cached) $ECHO_C" >&6
5062else
5063 if test "$ac_cv_type_long" = yes; then
5064 # The cast to unsigned long works around a bug in the HP C Compiler
5065 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5066 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5067 # This bug is HP SR number 8606223364.
5068 if test "$cross_compiling" = yes; then
5069 # Depending upon the size, compute the lo and hi bounds.
5070cat >conftest.$ac_ext <<_ACEOF
5071#line $LINENO "configure"
5072#include "confdefs.h"
5073$ac_includes_default
5074#ifdef F77_DUMMY_MAIN
5075# ifdef __cplusplus
5076 extern "C"
5077# endif
5078 int F77_DUMMY_MAIN() { return 1; }
5079#endif
5080int
5081main ()
5082{
5083static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5084test_array [0] = 0
5085
5086 ;
5087 return 0;
5088}
5089_ACEOF
5090rm -f conftest.$ac_objext
5091if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5092 (eval $ac_compile) 2>&5
5093 ac_status=$?
5094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5095 (exit $ac_status); } &&
5096 { ac_try='test -s conftest.$ac_objext'
5097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5098 (eval $ac_try) 2>&5
5099 ac_status=$?
5100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5101 (exit $ac_status); }; }; then
5102 ac_lo=0 ac_mid=0
5103 while :; do
5104 cat >conftest.$ac_ext <<_ACEOF
5105#line $LINENO "configure"
5106#include "confdefs.h"
5107$ac_includes_default
5108#ifdef F77_DUMMY_MAIN
5109# ifdef __cplusplus
5110 extern "C"
5111# endif
5112 int F77_DUMMY_MAIN() { return 1; }
5113#endif
5114int
5115main ()
5116{
5117static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5118test_array [0] = 0
5119
5120 ;
5121 return 0;
5122}
5123_ACEOF
5124rm -f conftest.$ac_objext
5125if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5126 (eval $ac_compile) 2>&5
5127 ac_status=$?
5128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5129 (exit $ac_status); } &&
5130 { ac_try='test -s conftest.$ac_objext'
5131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5132 (eval $ac_try) 2>&5
5133 ac_status=$?
5134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5135 (exit $ac_status); }; }; then
5136 ac_hi=$ac_mid; break
5137else
5138 echo "$as_me: failed program was:" >&5
5139cat conftest.$ac_ext >&5
5140ac_lo=`expr $ac_mid + 1`
5141 if test $ac_lo -le $ac_mid; then
5142 ac_lo= ac_hi=
5143 break
5144 fi
5145 ac_mid=`expr 2 '*' $ac_mid + 1`
5146fi
5147rm -f conftest.$ac_objext conftest.$ac_ext
5148 done
5149else
5150 echo "$as_me: failed program was:" >&5
5151cat conftest.$ac_ext >&5
5152cat >conftest.$ac_ext <<_ACEOF
5153#line $LINENO "configure"
5154#include "confdefs.h"
5155$ac_includes_default
5156#ifdef F77_DUMMY_MAIN
5157# ifdef __cplusplus
5158 extern "C"
5159# endif
5160 int F77_DUMMY_MAIN() { return 1; }
5161#endif
5162int
5163main ()
5164{
5165static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5166test_array [0] = 0
5167
5168 ;
5169 return 0;
5170}
5171_ACEOF
5172rm -f conftest.$ac_objext
5173if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5174 (eval $ac_compile) 2>&5
5175 ac_status=$?
5176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5177 (exit $ac_status); } &&
5178 { ac_try='test -s conftest.$ac_objext'
5179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5180 (eval $ac_try) 2>&5
5181 ac_status=$?
5182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5183 (exit $ac_status); }; }; then
5184 ac_hi=-1 ac_mid=-1
5185 while :; do
5186 cat >conftest.$ac_ext <<_ACEOF
5187#line $LINENO "configure"
5188#include "confdefs.h"
5189$ac_includes_default
5190#ifdef F77_DUMMY_MAIN
5191# ifdef __cplusplus
5192 extern "C"
5193# endif
5194 int F77_DUMMY_MAIN() { return 1; }
5195#endif
5196int
5197main ()
5198{
5199static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5200test_array [0] = 0
5201
5202 ;
5203 return 0;
5204}
5205_ACEOF
5206rm -f conftest.$ac_objext
5207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5208 (eval $ac_compile) 2>&5
5209 ac_status=$?
5210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5211 (exit $ac_status); } &&
5212 { ac_try='test -s conftest.$ac_objext'
5213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5214 (eval $ac_try) 2>&5
5215 ac_status=$?
5216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5217 (exit $ac_status); }; }; then
5218 ac_lo=$ac_mid; break
5219else
5220 echo "$as_me: failed program was:" >&5
5221cat conftest.$ac_ext >&5
5222ac_hi=`expr '(' $ac_mid ')' - 1`
5223 if test $ac_mid -le $ac_hi; then
5224 ac_lo= ac_hi=
5225 break
5226 fi
5227 ac_mid=`expr 2 '*' $ac_mid`
5228fi
5229rm -f conftest.$ac_objext conftest.$ac_ext
5230 done
5231else
5232 echo "$as_me: failed program was:" >&5
5233cat conftest.$ac_ext >&5
5234ac_lo= ac_hi=
5235fi
5236rm -f conftest.$ac_objext conftest.$ac_ext
5237fi
5238rm -f conftest.$ac_objext conftest.$ac_ext
5239# Binary search between lo and hi bounds.
5240while test "x$ac_lo" != "x$ac_hi"; do
5241 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5242 cat >conftest.$ac_ext <<_ACEOF
5243#line $LINENO "configure"
5244#include "confdefs.h"
5245$ac_includes_default
5246#ifdef F77_DUMMY_MAIN
5247# ifdef __cplusplus
5248 extern "C"
5249# endif
5250 int F77_DUMMY_MAIN() { return 1; }
5251#endif
5252int
5253main ()
5254{
5255static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5256test_array [0] = 0
5257
5258 ;
5259 return 0;
5260}
5261_ACEOF
5262rm -f conftest.$ac_objext
5263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5264 (eval $ac_compile) 2>&5
5265 ac_status=$?
5266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5267 (exit $ac_status); } &&
5268 { ac_try='test -s conftest.$ac_objext'
5269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5270 (eval $ac_try) 2>&5
5271 ac_status=$?
5272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5273 (exit $ac_status); }; }; then
5274 ac_hi=$ac_mid
5275else
5276 echo "$as_me: failed program was:" >&5
5277cat conftest.$ac_ext >&5
5278ac_lo=`expr '(' $ac_mid ')' + 1`
5279fi
5280rm -f conftest.$ac_objext conftest.$ac_ext
5281done
5282case $ac_lo in
5283?*) ac_cv_sizeof_long=$ac_lo;;
5284'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5285echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5286 { (exit 1); exit 1; }; } ;;
5287esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005288else
5289 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005290 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5291echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5292 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005293else
Martin v. Löwis11437992002-04-12 09:54:03 +00005294 cat >conftest.$ac_ext <<_ACEOF
5295#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005296#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005297$ac_includes_default
5298long longval () { return (long) (sizeof (long)); }
5299unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005300#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005301#include <stdlib.h>
5302#ifdef F77_DUMMY_MAIN
5303# ifdef __cplusplus
5304 extern "C"
5305# endif
5306 int F77_DUMMY_MAIN() { return 1; }
5307#endif
5308int
5309main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005310{
Martin v. Löwis11437992002-04-12 09:54:03 +00005311
5312 FILE *f = fopen ("conftest.val", "w");
5313 if (! f)
5314 exit (1);
5315 if (((long) (sizeof (long))) < 0)
5316 {
5317 long i = longval ();
5318 if (i != ((long) (sizeof (long))))
5319 exit (1);
5320 fprintf (f, "%ld\n", i);
5321 }
5322 else
5323 {
5324 unsigned long i = ulongval ();
5325 if (i != ((long) (sizeof (long))))
5326 exit (1);
5327 fprintf (f, "%lu\n", i);
5328 }
5329 exit (ferror (f) || fclose (f) != 0);
5330
5331 ;
5332 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005333}
Martin v. Löwis11437992002-04-12 09:54:03 +00005334_ACEOF
5335rm -f conftest$ac_exeext
5336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5337 (eval $ac_link) 2>&5
5338 ac_status=$?
5339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5340 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5342 (eval $ac_try) 2>&5
5343 ac_status=$?
5344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5345 (exit $ac_status); }; }; then
5346 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005347else
Martin v. Löwis11437992002-04-12 09:54:03 +00005348 echo "$as_me: program exited with status $ac_status" >&5
5349echo "$as_me: failed program was:" >&5
5350cat conftest.$ac_ext >&5
5351( exit $ac_status )
5352{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5353echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5354 { (exit 1); exit 1; }; }
5355fi
5356rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5357fi
5358fi
5359rm -f conftest.val
5360else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005361 ac_cv_sizeof_long=0
5362fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005364echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5365echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5366cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005367#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005368_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005369
5370
Martin v. Löwis11437992002-04-12 09:54:03 +00005371echo "$as_me:$LINENO: checking for void *" >&5
5372echo $ECHO_N "checking for void *... $ECHO_C" >&6
5373if test "${ac_cv_type_void_p+set}" = set; then
5374 echo $ECHO_N "(cached) $ECHO_C" >&6
5375else
5376 cat >conftest.$ac_ext <<_ACEOF
5377#line $LINENO "configure"
5378#include "confdefs.h"
5379$ac_includes_default
5380#ifdef F77_DUMMY_MAIN
5381# ifdef __cplusplus
5382 extern "C"
5383# endif
5384 int F77_DUMMY_MAIN() { return 1; }
5385#endif
5386int
5387main ()
5388{
5389if ((void * *) 0)
5390 return 0;
5391if (sizeof (void *))
5392 return 0;
5393 ;
5394 return 0;
5395}
5396_ACEOF
5397rm -f conftest.$ac_objext
5398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5399 (eval $ac_compile) 2>&5
5400 ac_status=$?
5401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5402 (exit $ac_status); } &&
5403 { ac_try='test -s conftest.$ac_objext'
5404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5405 (eval $ac_try) 2>&5
5406 ac_status=$?
5407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5408 (exit $ac_status); }; }; then
5409 ac_cv_type_void_p=yes
5410else
5411 echo "$as_me: failed program was:" >&5
5412cat conftest.$ac_ext >&5
5413ac_cv_type_void_p=no
5414fi
5415rm -f conftest.$ac_objext conftest.$ac_ext
5416fi
5417echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5418echo "${ECHO_T}$ac_cv_type_void_p" >&6
5419
5420echo "$as_me:$LINENO: checking size of void *" >&5
5421echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5422if test "${ac_cv_sizeof_void_p+set}" = set; then
5423 echo $ECHO_N "(cached) $ECHO_C" >&6
5424else
5425 if test "$ac_cv_type_void_p" = yes; then
5426 # The cast to unsigned long works around a bug in the HP C Compiler
5427 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5428 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5429 # This bug is HP SR number 8606223364.
5430 if test "$cross_compiling" = yes; then
5431 # Depending upon the size, compute the lo and hi bounds.
5432cat >conftest.$ac_ext <<_ACEOF
5433#line $LINENO "configure"
5434#include "confdefs.h"
5435$ac_includes_default
5436#ifdef F77_DUMMY_MAIN
5437# ifdef __cplusplus
5438 extern "C"
5439# endif
5440 int F77_DUMMY_MAIN() { return 1; }
5441#endif
5442int
5443main ()
5444{
5445static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5446test_array [0] = 0
5447
5448 ;
5449 return 0;
5450}
5451_ACEOF
5452rm -f conftest.$ac_objext
5453if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5454 (eval $ac_compile) 2>&5
5455 ac_status=$?
5456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5457 (exit $ac_status); } &&
5458 { ac_try='test -s conftest.$ac_objext'
5459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5460 (eval $ac_try) 2>&5
5461 ac_status=$?
5462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5463 (exit $ac_status); }; }; then
5464 ac_lo=0 ac_mid=0
5465 while :; do
5466 cat >conftest.$ac_ext <<_ACEOF
5467#line $LINENO "configure"
5468#include "confdefs.h"
5469$ac_includes_default
5470#ifdef F77_DUMMY_MAIN
5471# ifdef __cplusplus
5472 extern "C"
5473# endif
5474 int F77_DUMMY_MAIN() { return 1; }
5475#endif
5476int
5477main ()
5478{
5479static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5480test_array [0] = 0
5481
5482 ;
5483 return 0;
5484}
5485_ACEOF
5486rm -f conftest.$ac_objext
5487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5488 (eval $ac_compile) 2>&5
5489 ac_status=$?
5490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5491 (exit $ac_status); } &&
5492 { ac_try='test -s conftest.$ac_objext'
5493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5494 (eval $ac_try) 2>&5
5495 ac_status=$?
5496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5497 (exit $ac_status); }; }; then
5498 ac_hi=$ac_mid; break
5499else
5500 echo "$as_me: failed program was:" >&5
5501cat conftest.$ac_ext >&5
5502ac_lo=`expr $ac_mid + 1`
5503 if test $ac_lo -le $ac_mid; then
5504 ac_lo= ac_hi=
5505 break
5506 fi
5507 ac_mid=`expr 2 '*' $ac_mid + 1`
5508fi
5509rm -f conftest.$ac_objext conftest.$ac_ext
5510 done
5511else
5512 echo "$as_me: failed program was:" >&5
5513cat conftest.$ac_ext >&5
5514cat >conftest.$ac_ext <<_ACEOF
5515#line $LINENO "configure"
5516#include "confdefs.h"
5517$ac_includes_default
5518#ifdef F77_DUMMY_MAIN
5519# ifdef __cplusplus
5520 extern "C"
5521# endif
5522 int F77_DUMMY_MAIN() { return 1; }
5523#endif
5524int
5525main ()
5526{
5527static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5528test_array [0] = 0
5529
5530 ;
5531 return 0;
5532}
5533_ACEOF
5534rm -f conftest.$ac_objext
5535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5536 (eval $ac_compile) 2>&5
5537 ac_status=$?
5538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5539 (exit $ac_status); } &&
5540 { ac_try='test -s conftest.$ac_objext'
5541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5542 (eval $ac_try) 2>&5
5543 ac_status=$?
5544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5545 (exit $ac_status); }; }; then
5546 ac_hi=-1 ac_mid=-1
5547 while :; do
5548 cat >conftest.$ac_ext <<_ACEOF
5549#line $LINENO "configure"
5550#include "confdefs.h"
5551$ac_includes_default
5552#ifdef F77_DUMMY_MAIN
5553# ifdef __cplusplus
5554 extern "C"
5555# endif
5556 int F77_DUMMY_MAIN() { return 1; }
5557#endif
5558int
5559main ()
5560{
5561static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5562test_array [0] = 0
5563
5564 ;
5565 return 0;
5566}
5567_ACEOF
5568rm -f conftest.$ac_objext
5569if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5570 (eval $ac_compile) 2>&5
5571 ac_status=$?
5572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5573 (exit $ac_status); } &&
5574 { ac_try='test -s conftest.$ac_objext'
5575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5576 (eval $ac_try) 2>&5
5577 ac_status=$?
5578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5579 (exit $ac_status); }; }; then
5580 ac_lo=$ac_mid; break
5581else
5582 echo "$as_me: failed program was:" >&5
5583cat conftest.$ac_ext >&5
5584ac_hi=`expr '(' $ac_mid ')' - 1`
5585 if test $ac_mid -le $ac_hi; then
5586 ac_lo= ac_hi=
5587 break
5588 fi
5589 ac_mid=`expr 2 '*' $ac_mid`
5590fi
5591rm -f conftest.$ac_objext conftest.$ac_ext
5592 done
5593else
5594 echo "$as_me: failed program was:" >&5
5595cat conftest.$ac_ext >&5
5596ac_lo= ac_hi=
5597fi
5598rm -f conftest.$ac_objext conftest.$ac_ext
5599fi
5600rm -f conftest.$ac_objext conftest.$ac_ext
5601# Binary search between lo and hi bounds.
5602while test "x$ac_lo" != "x$ac_hi"; do
5603 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5604 cat >conftest.$ac_ext <<_ACEOF
5605#line $LINENO "configure"
5606#include "confdefs.h"
5607$ac_includes_default
5608#ifdef F77_DUMMY_MAIN
5609# ifdef __cplusplus
5610 extern "C"
5611# endif
5612 int F77_DUMMY_MAIN() { return 1; }
5613#endif
5614int
5615main ()
5616{
5617static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5618test_array [0] = 0
5619
5620 ;
5621 return 0;
5622}
5623_ACEOF
5624rm -f conftest.$ac_objext
5625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5626 (eval $ac_compile) 2>&5
5627 ac_status=$?
5628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5629 (exit $ac_status); } &&
5630 { ac_try='test -s conftest.$ac_objext'
5631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5632 (eval $ac_try) 2>&5
5633 ac_status=$?
5634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5635 (exit $ac_status); }; }; then
5636 ac_hi=$ac_mid
5637else
5638 echo "$as_me: failed program was:" >&5
5639cat conftest.$ac_ext >&5
5640ac_lo=`expr '(' $ac_mid ')' + 1`
5641fi
5642rm -f conftest.$ac_objext conftest.$ac_ext
5643done
5644case $ac_lo in
5645?*) ac_cv_sizeof_void_p=$ac_lo;;
5646'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5647echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5648 { (exit 1); exit 1; }; } ;;
5649esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005650else
5651 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005652 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5653echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5654 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005655else
Martin v. Löwis11437992002-04-12 09:54:03 +00005656 cat >conftest.$ac_ext <<_ACEOF
5657#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005658#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005659$ac_includes_default
5660long longval () { return (long) (sizeof (void *)); }
5661unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005662#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005663#include <stdlib.h>
5664#ifdef F77_DUMMY_MAIN
5665# ifdef __cplusplus
5666 extern "C"
5667# endif
5668 int F77_DUMMY_MAIN() { return 1; }
5669#endif
5670int
5671main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005672{
Martin v. Löwis11437992002-04-12 09:54:03 +00005673
5674 FILE *f = fopen ("conftest.val", "w");
5675 if (! f)
5676 exit (1);
5677 if (((long) (sizeof (void *))) < 0)
5678 {
5679 long i = longval ();
5680 if (i != ((long) (sizeof (void *))))
5681 exit (1);
5682 fprintf (f, "%ld\n", i);
5683 }
5684 else
5685 {
5686 unsigned long i = ulongval ();
5687 if (i != ((long) (sizeof (void *))))
5688 exit (1);
5689 fprintf (f, "%lu\n", i);
5690 }
5691 exit (ferror (f) || fclose (f) != 0);
5692
5693 ;
5694 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005695}
Martin v. Löwis11437992002-04-12 09:54:03 +00005696_ACEOF
5697rm -f conftest$ac_exeext
5698if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5699 (eval $ac_link) 2>&5
5700 ac_status=$?
5701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5702 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5704 (eval $ac_try) 2>&5
5705 ac_status=$?
5706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5707 (exit $ac_status); }; }; then
5708 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005709else
Martin v. Löwis11437992002-04-12 09:54:03 +00005710 echo "$as_me: program exited with status $ac_status" >&5
5711echo "$as_me: failed program was:" >&5
5712cat conftest.$ac_ext >&5
5713( exit $ac_status )
5714{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5715echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5716 { (exit 1); exit 1; }; }
5717fi
5718rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5719fi
5720fi
5721rm -f conftest.val
5722else
Guido van Rossumad678af1998-10-02 14:42:15 +00005723 ac_cv_sizeof_void_p=0
5724fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005725fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005726echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5727echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5728cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005729#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005730_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005731
5732
Martin v. Löwis11437992002-04-12 09:54:03 +00005733echo "$as_me:$LINENO: checking for char" >&5
5734echo $ECHO_N "checking for char... $ECHO_C" >&6
5735if test "${ac_cv_type_char+set}" = set; then
5736 echo $ECHO_N "(cached) $ECHO_C" >&6
5737else
5738 cat >conftest.$ac_ext <<_ACEOF
5739#line $LINENO "configure"
5740#include "confdefs.h"
5741$ac_includes_default
5742#ifdef F77_DUMMY_MAIN
5743# ifdef __cplusplus
5744 extern "C"
5745# endif
5746 int F77_DUMMY_MAIN() { return 1; }
5747#endif
5748int
5749main ()
5750{
5751if ((char *) 0)
5752 return 0;
5753if (sizeof (char))
5754 return 0;
5755 ;
5756 return 0;
5757}
5758_ACEOF
5759rm -f conftest.$ac_objext
5760if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5761 (eval $ac_compile) 2>&5
5762 ac_status=$?
5763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5764 (exit $ac_status); } &&
5765 { ac_try='test -s conftest.$ac_objext'
5766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5767 (eval $ac_try) 2>&5
5768 ac_status=$?
5769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5770 (exit $ac_status); }; }; then
5771 ac_cv_type_char=yes
5772else
5773 echo "$as_me: failed program was:" >&5
5774cat conftest.$ac_ext >&5
5775ac_cv_type_char=no
5776fi
5777rm -f conftest.$ac_objext conftest.$ac_ext
5778fi
5779echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5780echo "${ECHO_T}$ac_cv_type_char" >&6
5781
5782echo "$as_me:$LINENO: checking size of char" >&5
5783echo $ECHO_N "checking size of char... $ECHO_C" >&6
5784if test "${ac_cv_sizeof_char+set}" = set; then
5785 echo $ECHO_N "(cached) $ECHO_C" >&6
5786else
5787 if test "$ac_cv_type_char" = yes; then
5788 # The cast to unsigned long works around a bug in the HP C Compiler
5789 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5790 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5791 # This bug is HP SR number 8606223364.
5792 if test "$cross_compiling" = yes; then
5793 # Depending upon the size, compute the lo and hi bounds.
5794cat >conftest.$ac_ext <<_ACEOF
5795#line $LINENO "configure"
5796#include "confdefs.h"
5797$ac_includes_default
5798#ifdef F77_DUMMY_MAIN
5799# ifdef __cplusplus
5800 extern "C"
5801# endif
5802 int F77_DUMMY_MAIN() { return 1; }
5803#endif
5804int
5805main ()
5806{
5807static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5808test_array [0] = 0
5809
5810 ;
5811 return 0;
5812}
5813_ACEOF
5814rm -f conftest.$ac_objext
5815if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5816 (eval $ac_compile) 2>&5
5817 ac_status=$?
5818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5819 (exit $ac_status); } &&
5820 { ac_try='test -s conftest.$ac_objext'
5821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5822 (eval $ac_try) 2>&5
5823 ac_status=$?
5824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5825 (exit $ac_status); }; }; then
5826 ac_lo=0 ac_mid=0
5827 while :; do
5828 cat >conftest.$ac_ext <<_ACEOF
5829#line $LINENO "configure"
5830#include "confdefs.h"
5831$ac_includes_default
5832#ifdef F77_DUMMY_MAIN
5833# ifdef __cplusplus
5834 extern "C"
5835# endif
5836 int F77_DUMMY_MAIN() { return 1; }
5837#endif
5838int
5839main ()
5840{
5841static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5842test_array [0] = 0
5843
5844 ;
5845 return 0;
5846}
5847_ACEOF
5848rm -f conftest.$ac_objext
5849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5850 (eval $ac_compile) 2>&5
5851 ac_status=$?
5852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5853 (exit $ac_status); } &&
5854 { ac_try='test -s conftest.$ac_objext'
5855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5856 (eval $ac_try) 2>&5
5857 ac_status=$?
5858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5859 (exit $ac_status); }; }; then
5860 ac_hi=$ac_mid; break
5861else
5862 echo "$as_me: failed program was:" >&5
5863cat conftest.$ac_ext >&5
5864ac_lo=`expr $ac_mid + 1`
5865 if test $ac_lo -le $ac_mid; then
5866 ac_lo= ac_hi=
5867 break
5868 fi
5869 ac_mid=`expr 2 '*' $ac_mid + 1`
5870fi
5871rm -f conftest.$ac_objext conftest.$ac_ext
5872 done
5873else
5874 echo "$as_me: failed program was:" >&5
5875cat conftest.$ac_ext >&5
5876cat >conftest.$ac_ext <<_ACEOF
5877#line $LINENO "configure"
5878#include "confdefs.h"
5879$ac_includes_default
5880#ifdef F77_DUMMY_MAIN
5881# ifdef __cplusplus
5882 extern "C"
5883# endif
5884 int F77_DUMMY_MAIN() { return 1; }
5885#endif
5886int
5887main ()
5888{
5889static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5890test_array [0] = 0
5891
5892 ;
5893 return 0;
5894}
5895_ACEOF
5896rm -f conftest.$ac_objext
5897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5898 (eval $ac_compile) 2>&5
5899 ac_status=$?
5900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5901 (exit $ac_status); } &&
5902 { ac_try='test -s conftest.$ac_objext'
5903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5904 (eval $ac_try) 2>&5
5905 ac_status=$?
5906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5907 (exit $ac_status); }; }; then
5908 ac_hi=-1 ac_mid=-1
5909 while :; do
5910 cat >conftest.$ac_ext <<_ACEOF
5911#line $LINENO "configure"
5912#include "confdefs.h"
5913$ac_includes_default
5914#ifdef F77_DUMMY_MAIN
5915# ifdef __cplusplus
5916 extern "C"
5917# endif
5918 int F77_DUMMY_MAIN() { return 1; }
5919#endif
5920int
5921main ()
5922{
5923static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5924test_array [0] = 0
5925
5926 ;
5927 return 0;
5928}
5929_ACEOF
5930rm -f conftest.$ac_objext
5931if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5932 (eval $ac_compile) 2>&5
5933 ac_status=$?
5934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5935 (exit $ac_status); } &&
5936 { ac_try='test -s conftest.$ac_objext'
5937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5938 (eval $ac_try) 2>&5
5939 ac_status=$?
5940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5941 (exit $ac_status); }; }; then
5942 ac_lo=$ac_mid; break
5943else
5944 echo "$as_me: failed program was:" >&5
5945cat conftest.$ac_ext >&5
5946ac_hi=`expr '(' $ac_mid ')' - 1`
5947 if test $ac_mid -le $ac_hi; then
5948 ac_lo= ac_hi=
5949 break
5950 fi
5951 ac_mid=`expr 2 '*' $ac_mid`
5952fi
5953rm -f conftest.$ac_objext conftest.$ac_ext
5954 done
5955else
5956 echo "$as_me: failed program was:" >&5
5957cat conftest.$ac_ext >&5
5958ac_lo= ac_hi=
5959fi
5960rm -f conftest.$ac_objext conftest.$ac_ext
5961fi
5962rm -f conftest.$ac_objext conftest.$ac_ext
5963# Binary search between lo and hi bounds.
5964while test "x$ac_lo" != "x$ac_hi"; do
5965 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5966 cat >conftest.$ac_ext <<_ACEOF
5967#line $LINENO "configure"
5968#include "confdefs.h"
5969$ac_includes_default
5970#ifdef F77_DUMMY_MAIN
5971# ifdef __cplusplus
5972 extern "C"
5973# endif
5974 int F77_DUMMY_MAIN() { return 1; }
5975#endif
5976int
5977main ()
5978{
5979static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5980test_array [0] = 0
5981
5982 ;
5983 return 0;
5984}
5985_ACEOF
5986rm -f conftest.$ac_objext
5987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5988 (eval $ac_compile) 2>&5
5989 ac_status=$?
5990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5991 (exit $ac_status); } &&
5992 { ac_try='test -s conftest.$ac_objext'
5993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5994 (eval $ac_try) 2>&5
5995 ac_status=$?
5996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5997 (exit $ac_status); }; }; then
5998 ac_hi=$ac_mid
5999else
6000 echo "$as_me: failed program was:" >&5
6001cat conftest.$ac_ext >&5
6002ac_lo=`expr '(' $ac_mid ')' + 1`
6003fi
6004rm -f conftest.$ac_objext conftest.$ac_ext
6005done
6006case $ac_lo in
6007?*) ac_cv_sizeof_char=$ac_lo;;
6008'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6009echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6010 { (exit 1); exit 1; }; } ;;
6011esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006012else
6013 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006014 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6015echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6016 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006017else
Martin v. Löwis11437992002-04-12 09:54:03 +00006018 cat >conftest.$ac_ext <<_ACEOF
6019#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006020#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006021$ac_includes_default
6022long longval () { return (long) (sizeof (char)); }
6023unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006024#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006025#include <stdlib.h>
6026#ifdef F77_DUMMY_MAIN
6027# ifdef __cplusplus
6028 extern "C"
6029# endif
6030 int F77_DUMMY_MAIN() { return 1; }
6031#endif
6032int
6033main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006034{
Martin v. Löwis11437992002-04-12 09:54:03 +00006035
6036 FILE *f = fopen ("conftest.val", "w");
6037 if (! f)
6038 exit (1);
6039 if (((long) (sizeof (char))) < 0)
6040 {
6041 long i = longval ();
6042 if (i != ((long) (sizeof (char))))
6043 exit (1);
6044 fprintf (f, "%ld\n", i);
6045 }
6046 else
6047 {
6048 unsigned long i = ulongval ();
6049 if (i != ((long) (sizeof (char))))
6050 exit (1);
6051 fprintf (f, "%lu\n", i);
6052 }
6053 exit (ferror (f) || fclose (f) != 0);
6054
6055 ;
6056 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006057}
Martin v. Löwis11437992002-04-12 09:54:03 +00006058_ACEOF
6059rm -f conftest$ac_exeext
6060if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6061 (eval $ac_link) 2>&5
6062 ac_status=$?
6063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6064 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6066 (eval $ac_try) 2>&5
6067 ac_status=$?
6068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6069 (exit $ac_status); }; }; then
6070 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006071else
Martin v. Löwis11437992002-04-12 09:54:03 +00006072 echo "$as_me: program exited with status $ac_status" >&5
6073echo "$as_me: failed program was:" >&5
6074cat conftest.$ac_ext >&5
6075( exit $ac_status )
6076{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6077echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6078 { (exit 1); exit 1; }; }
6079fi
6080rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6081fi
6082fi
6083rm -f conftest.val
6084else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006085 ac_cv_sizeof_char=0
6086fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006087fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006088echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6089echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6090cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006091#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006092_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006093
6094
Martin v. Löwis11437992002-04-12 09:54:03 +00006095echo "$as_me:$LINENO: checking for short" >&5
6096echo $ECHO_N "checking for short... $ECHO_C" >&6
6097if test "${ac_cv_type_short+set}" = set; then
6098 echo $ECHO_N "(cached) $ECHO_C" >&6
6099else
6100 cat >conftest.$ac_ext <<_ACEOF
6101#line $LINENO "configure"
6102#include "confdefs.h"
6103$ac_includes_default
6104#ifdef F77_DUMMY_MAIN
6105# ifdef __cplusplus
6106 extern "C"
6107# endif
6108 int F77_DUMMY_MAIN() { return 1; }
6109#endif
6110int
6111main ()
6112{
6113if ((short *) 0)
6114 return 0;
6115if (sizeof (short))
6116 return 0;
6117 ;
6118 return 0;
6119}
6120_ACEOF
6121rm -f conftest.$ac_objext
6122if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6123 (eval $ac_compile) 2>&5
6124 ac_status=$?
6125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6126 (exit $ac_status); } &&
6127 { ac_try='test -s conftest.$ac_objext'
6128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6129 (eval $ac_try) 2>&5
6130 ac_status=$?
6131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6132 (exit $ac_status); }; }; then
6133 ac_cv_type_short=yes
6134else
6135 echo "$as_me: failed program was:" >&5
6136cat conftest.$ac_ext >&5
6137ac_cv_type_short=no
6138fi
6139rm -f conftest.$ac_objext conftest.$ac_ext
6140fi
6141echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6142echo "${ECHO_T}$ac_cv_type_short" >&6
6143
6144echo "$as_me:$LINENO: checking size of short" >&5
6145echo $ECHO_N "checking size of short... $ECHO_C" >&6
6146if test "${ac_cv_sizeof_short+set}" = set; then
6147 echo $ECHO_N "(cached) $ECHO_C" >&6
6148else
6149 if test "$ac_cv_type_short" = yes; then
6150 # The cast to unsigned long works around a bug in the HP C Compiler
6151 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6152 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6153 # This bug is HP SR number 8606223364.
6154 if test "$cross_compiling" = yes; then
6155 # Depending upon the size, compute the lo and hi bounds.
6156cat >conftest.$ac_ext <<_ACEOF
6157#line $LINENO "configure"
6158#include "confdefs.h"
6159$ac_includes_default
6160#ifdef F77_DUMMY_MAIN
6161# ifdef __cplusplus
6162 extern "C"
6163# endif
6164 int F77_DUMMY_MAIN() { return 1; }
6165#endif
6166int
6167main ()
6168{
6169static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6170test_array [0] = 0
6171
6172 ;
6173 return 0;
6174}
6175_ACEOF
6176rm -f conftest.$ac_objext
6177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6178 (eval $ac_compile) 2>&5
6179 ac_status=$?
6180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6181 (exit $ac_status); } &&
6182 { ac_try='test -s conftest.$ac_objext'
6183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6184 (eval $ac_try) 2>&5
6185 ac_status=$?
6186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6187 (exit $ac_status); }; }; then
6188 ac_lo=0 ac_mid=0
6189 while :; do
6190 cat >conftest.$ac_ext <<_ACEOF
6191#line $LINENO "configure"
6192#include "confdefs.h"
6193$ac_includes_default
6194#ifdef F77_DUMMY_MAIN
6195# ifdef __cplusplus
6196 extern "C"
6197# endif
6198 int F77_DUMMY_MAIN() { return 1; }
6199#endif
6200int
6201main ()
6202{
6203static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6204test_array [0] = 0
6205
6206 ;
6207 return 0;
6208}
6209_ACEOF
6210rm -f conftest.$ac_objext
6211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6212 (eval $ac_compile) 2>&5
6213 ac_status=$?
6214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6215 (exit $ac_status); } &&
6216 { ac_try='test -s conftest.$ac_objext'
6217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6218 (eval $ac_try) 2>&5
6219 ac_status=$?
6220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6221 (exit $ac_status); }; }; then
6222 ac_hi=$ac_mid; break
6223else
6224 echo "$as_me: failed program was:" >&5
6225cat conftest.$ac_ext >&5
6226ac_lo=`expr $ac_mid + 1`
6227 if test $ac_lo -le $ac_mid; then
6228 ac_lo= ac_hi=
6229 break
6230 fi
6231 ac_mid=`expr 2 '*' $ac_mid + 1`
6232fi
6233rm -f conftest.$ac_objext conftest.$ac_ext
6234 done
6235else
6236 echo "$as_me: failed program was:" >&5
6237cat conftest.$ac_ext >&5
6238cat >conftest.$ac_ext <<_ACEOF
6239#line $LINENO "configure"
6240#include "confdefs.h"
6241$ac_includes_default
6242#ifdef F77_DUMMY_MAIN
6243# ifdef __cplusplus
6244 extern "C"
6245# endif
6246 int F77_DUMMY_MAIN() { return 1; }
6247#endif
6248int
6249main ()
6250{
6251static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6252test_array [0] = 0
6253
6254 ;
6255 return 0;
6256}
6257_ACEOF
6258rm -f conftest.$ac_objext
6259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6260 (eval $ac_compile) 2>&5
6261 ac_status=$?
6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6263 (exit $ac_status); } &&
6264 { ac_try='test -s conftest.$ac_objext'
6265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6266 (eval $ac_try) 2>&5
6267 ac_status=$?
6268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6269 (exit $ac_status); }; }; then
6270 ac_hi=-1 ac_mid=-1
6271 while :; do
6272 cat >conftest.$ac_ext <<_ACEOF
6273#line $LINENO "configure"
6274#include "confdefs.h"
6275$ac_includes_default
6276#ifdef F77_DUMMY_MAIN
6277# ifdef __cplusplus
6278 extern "C"
6279# endif
6280 int F77_DUMMY_MAIN() { return 1; }
6281#endif
6282int
6283main ()
6284{
6285static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6286test_array [0] = 0
6287
6288 ;
6289 return 0;
6290}
6291_ACEOF
6292rm -f conftest.$ac_objext
6293if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6294 (eval $ac_compile) 2>&5
6295 ac_status=$?
6296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6297 (exit $ac_status); } &&
6298 { ac_try='test -s conftest.$ac_objext'
6299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6300 (eval $ac_try) 2>&5
6301 ac_status=$?
6302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6303 (exit $ac_status); }; }; then
6304 ac_lo=$ac_mid; break
6305else
6306 echo "$as_me: failed program was:" >&5
6307cat conftest.$ac_ext >&5
6308ac_hi=`expr '(' $ac_mid ')' - 1`
6309 if test $ac_mid -le $ac_hi; then
6310 ac_lo= ac_hi=
6311 break
6312 fi
6313 ac_mid=`expr 2 '*' $ac_mid`
6314fi
6315rm -f conftest.$ac_objext conftest.$ac_ext
6316 done
6317else
6318 echo "$as_me: failed program was:" >&5
6319cat conftest.$ac_ext >&5
6320ac_lo= ac_hi=
6321fi
6322rm -f conftest.$ac_objext conftest.$ac_ext
6323fi
6324rm -f conftest.$ac_objext conftest.$ac_ext
6325# Binary search between lo and hi bounds.
6326while test "x$ac_lo" != "x$ac_hi"; do
6327 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6328 cat >conftest.$ac_ext <<_ACEOF
6329#line $LINENO "configure"
6330#include "confdefs.h"
6331$ac_includes_default
6332#ifdef F77_DUMMY_MAIN
6333# ifdef __cplusplus
6334 extern "C"
6335# endif
6336 int F77_DUMMY_MAIN() { return 1; }
6337#endif
6338int
6339main ()
6340{
6341static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6342test_array [0] = 0
6343
6344 ;
6345 return 0;
6346}
6347_ACEOF
6348rm -f conftest.$ac_objext
6349if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6350 (eval $ac_compile) 2>&5
6351 ac_status=$?
6352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6353 (exit $ac_status); } &&
6354 { ac_try='test -s conftest.$ac_objext'
6355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6356 (eval $ac_try) 2>&5
6357 ac_status=$?
6358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6359 (exit $ac_status); }; }; then
6360 ac_hi=$ac_mid
6361else
6362 echo "$as_me: failed program was:" >&5
6363cat conftest.$ac_ext >&5
6364ac_lo=`expr '(' $ac_mid ')' + 1`
6365fi
6366rm -f conftest.$ac_objext conftest.$ac_ext
6367done
6368case $ac_lo in
6369?*) ac_cv_sizeof_short=$ac_lo;;
6370'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6371echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6372 { (exit 1); exit 1; }; } ;;
6373esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006374else
6375 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006376 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6377echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6378 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006379else
Martin v. Löwis11437992002-04-12 09:54:03 +00006380 cat >conftest.$ac_ext <<_ACEOF
6381#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006382#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006383$ac_includes_default
6384long longval () { return (long) (sizeof (short)); }
6385unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006386#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006387#include <stdlib.h>
6388#ifdef F77_DUMMY_MAIN
6389# ifdef __cplusplus
6390 extern "C"
6391# endif
6392 int F77_DUMMY_MAIN() { return 1; }
6393#endif
6394int
6395main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006396{
Martin v. Löwis11437992002-04-12 09:54:03 +00006397
6398 FILE *f = fopen ("conftest.val", "w");
6399 if (! f)
6400 exit (1);
6401 if (((long) (sizeof (short))) < 0)
6402 {
6403 long i = longval ();
6404 if (i != ((long) (sizeof (short))))
6405 exit (1);
6406 fprintf (f, "%ld\n", i);
6407 }
6408 else
6409 {
6410 unsigned long i = ulongval ();
6411 if (i != ((long) (sizeof (short))))
6412 exit (1);
6413 fprintf (f, "%lu\n", i);
6414 }
6415 exit (ferror (f) || fclose (f) != 0);
6416
6417 ;
6418 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006419}
Martin v. Löwis11437992002-04-12 09:54:03 +00006420_ACEOF
6421rm -f conftest$ac_exeext
6422if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6423 (eval $ac_link) 2>&5
6424 ac_status=$?
6425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6426 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6428 (eval $ac_try) 2>&5
6429 ac_status=$?
6430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6431 (exit $ac_status); }; }; then
6432 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006433else
Martin v. Löwis11437992002-04-12 09:54:03 +00006434 echo "$as_me: program exited with status $ac_status" >&5
6435echo "$as_me: failed program was:" >&5
6436cat conftest.$ac_ext >&5
6437( exit $ac_status )
6438{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6439echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6440 { (exit 1); exit 1; }; }
6441fi
6442rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6443fi
6444fi
6445rm -f conftest.val
6446else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006447 ac_cv_sizeof_short=0
6448fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006449fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006450echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6451echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6452cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006453#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006454_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006455
6456
Martin v. Löwis11437992002-04-12 09:54:03 +00006457echo "$as_me:$LINENO: checking for float" >&5
6458echo $ECHO_N "checking for float... $ECHO_C" >&6
6459if test "${ac_cv_type_float+set}" = set; then
6460 echo $ECHO_N "(cached) $ECHO_C" >&6
6461else
6462 cat >conftest.$ac_ext <<_ACEOF
6463#line $LINENO "configure"
6464#include "confdefs.h"
6465$ac_includes_default
6466#ifdef F77_DUMMY_MAIN
6467# ifdef __cplusplus
6468 extern "C"
6469# endif
6470 int F77_DUMMY_MAIN() { return 1; }
6471#endif
6472int
6473main ()
6474{
6475if ((float *) 0)
6476 return 0;
6477if (sizeof (float))
6478 return 0;
6479 ;
6480 return 0;
6481}
6482_ACEOF
6483rm -f conftest.$ac_objext
6484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6485 (eval $ac_compile) 2>&5
6486 ac_status=$?
6487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6488 (exit $ac_status); } &&
6489 { ac_try='test -s conftest.$ac_objext'
6490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6491 (eval $ac_try) 2>&5
6492 ac_status=$?
6493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6494 (exit $ac_status); }; }; then
6495 ac_cv_type_float=yes
6496else
6497 echo "$as_me: failed program was:" >&5
6498cat conftest.$ac_ext >&5
6499ac_cv_type_float=no
6500fi
6501rm -f conftest.$ac_objext conftest.$ac_ext
6502fi
6503echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6504echo "${ECHO_T}$ac_cv_type_float" >&6
6505
6506echo "$as_me:$LINENO: checking size of float" >&5
6507echo $ECHO_N "checking size of float... $ECHO_C" >&6
6508if test "${ac_cv_sizeof_float+set}" = set; then
6509 echo $ECHO_N "(cached) $ECHO_C" >&6
6510else
6511 if test "$ac_cv_type_float" = yes; then
6512 # The cast to unsigned long works around a bug in the HP C Compiler
6513 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6514 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6515 # This bug is HP SR number 8606223364.
6516 if test "$cross_compiling" = yes; then
6517 # Depending upon the size, compute the lo and hi bounds.
6518cat >conftest.$ac_ext <<_ACEOF
6519#line $LINENO "configure"
6520#include "confdefs.h"
6521$ac_includes_default
6522#ifdef F77_DUMMY_MAIN
6523# ifdef __cplusplus
6524 extern "C"
6525# endif
6526 int F77_DUMMY_MAIN() { return 1; }
6527#endif
6528int
6529main ()
6530{
6531static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6532test_array [0] = 0
6533
6534 ;
6535 return 0;
6536}
6537_ACEOF
6538rm -f conftest.$ac_objext
6539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6540 (eval $ac_compile) 2>&5
6541 ac_status=$?
6542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6543 (exit $ac_status); } &&
6544 { ac_try='test -s conftest.$ac_objext'
6545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6546 (eval $ac_try) 2>&5
6547 ac_status=$?
6548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6549 (exit $ac_status); }; }; then
6550 ac_lo=0 ac_mid=0
6551 while :; do
6552 cat >conftest.$ac_ext <<_ACEOF
6553#line $LINENO "configure"
6554#include "confdefs.h"
6555$ac_includes_default
6556#ifdef F77_DUMMY_MAIN
6557# ifdef __cplusplus
6558 extern "C"
6559# endif
6560 int F77_DUMMY_MAIN() { return 1; }
6561#endif
6562int
6563main ()
6564{
6565static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6566test_array [0] = 0
6567
6568 ;
6569 return 0;
6570}
6571_ACEOF
6572rm -f conftest.$ac_objext
6573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6574 (eval $ac_compile) 2>&5
6575 ac_status=$?
6576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6577 (exit $ac_status); } &&
6578 { ac_try='test -s conftest.$ac_objext'
6579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6580 (eval $ac_try) 2>&5
6581 ac_status=$?
6582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6583 (exit $ac_status); }; }; then
6584 ac_hi=$ac_mid; break
6585else
6586 echo "$as_me: failed program was:" >&5
6587cat conftest.$ac_ext >&5
6588ac_lo=`expr $ac_mid + 1`
6589 if test $ac_lo -le $ac_mid; then
6590 ac_lo= ac_hi=
6591 break
6592 fi
6593 ac_mid=`expr 2 '*' $ac_mid + 1`
6594fi
6595rm -f conftest.$ac_objext conftest.$ac_ext
6596 done
6597else
6598 echo "$as_me: failed program was:" >&5
6599cat conftest.$ac_ext >&5
6600cat >conftest.$ac_ext <<_ACEOF
6601#line $LINENO "configure"
6602#include "confdefs.h"
6603$ac_includes_default
6604#ifdef F77_DUMMY_MAIN
6605# ifdef __cplusplus
6606 extern "C"
6607# endif
6608 int F77_DUMMY_MAIN() { return 1; }
6609#endif
6610int
6611main ()
6612{
6613static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6614test_array [0] = 0
6615
6616 ;
6617 return 0;
6618}
6619_ACEOF
6620rm -f conftest.$ac_objext
6621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6622 (eval $ac_compile) 2>&5
6623 ac_status=$?
6624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6625 (exit $ac_status); } &&
6626 { ac_try='test -s conftest.$ac_objext'
6627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6628 (eval $ac_try) 2>&5
6629 ac_status=$?
6630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6631 (exit $ac_status); }; }; then
6632 ac_hi=-1 ac_mid=-1
6633 while :; do
6634 cat >conftest.$ac_ext <<_ACEOF
6635#line $LINENO "configure"
6636#include "confdefs.h"
6637$ac_includes_default
6638#ifdef F77_DUMMY_MAIN
6639# ifdef __cplusplus
6640 extern "C"
6641# endif
6642 int F77_DUMMY_MAIN() { return 1; }
6643#endif
6644int
6645main ()
6646{
6647static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6648test_array [0] = 0
6649
6650 ;
6651 return 0;
6652}
6653_ACEOF
6654rm -f conftest.$ac_objext
6655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6656 (eval $ac_compile) 2>&5
6657 ac_status=$?
6658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6659 (exit $ac_status); } &&
6660 { ac_try='test -s conftest.$ac_objext'
6661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6662 (eval $ac_try) 2>&5
6663 ac_status=$?
6664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6665 (exit $ac_status); }; }; then
6666 ac_lo=$ac_mid; break
6667else
6668 echo "$as_me: failed program was:" >&5
6669cat conftest.$ac_ext >&5
6670ac_hi=`expr '(' $ac_mid ')' - 1`
6671 if test $ac_mid -le $ac_hi; then
6672 ac_lo= ac_hi=
6673 break
6674 fi
6675 ac_mid=`expr 2 '*' $ac_mid`
6676fi
6677rm -f conftest.$ac_objext conftest.$ac_ext
6678 done
6679else
6680 echo "$as_me: failed program was:" >&5
6681cat conftest.$ac_ext >&5
6682ac_lo= ac_hi=
6683fi
6684rm -f conftest.$ac_objext conftest.$ac_ext
6685fi
6686rm -f conftest.$ac_objext conftest.$ac_ext
6687# Binary search between lo and hi bounds.
6688while test "x$ac_lo" != "x$ac_hi"; do
6689 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6690 cat >conftest.$ac_ext <<_ACEOF
6691#line $LINENO "configure"
6692#include "confdefs.h"
6693$ac_includes_default
6694#ifdef F77_DUMMY_MAIN
6695# ifdef __cplusplus
6696 extern "C"
6697# endif
6698 int F77_DUMMY_MAIN() { return 1; }
6699#endif
6700int
6701main ()
6702{
6703static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6704test_array [0] = 0
6705
6706 ;
6707 return 0;
6708}
6709_ACEOF
6710rm -f conftest.$ac_objext
6711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6712 (eval $ac_compile) 2>&5
6713 ac_status=$?
6714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6715 (exit $ac_status); } &&
6716 { ac_try='test -s conftest.$ac_objext'
6717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6718 (eval $ac_try) 2>&5
6719 ac_status=$?
6720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6721 (exit $ac_status); }; }; then
6722 ac_hi=$ac_mid
6723else
6724 echo "$as_me: failed program was:" >&5
6725cat conftest.$ac_ext >&5
6726ac_lo=`expr '(' $ac_mid ')' + 1`
6727fi
6728rm -f conftest.$ac_objext conftest.$ac_ext
6729done
6730case $ac_lo in
6731?*) ac_cv_sizeof_float=$ac_lo;;
6732'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6733echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6734 { (exit 1); exit 1; }; } ;;
6735esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006736else
6737 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006738 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6739echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6740 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006741else
Martin v. Löwis11437992002-04-12 09:54:03 +00006742 cat >conftest.$ac_ext <<_ACEOF
6743#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006744#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006745$ac_includes_default
6746long longval () { return (long) (sizeof (float)); }
6747unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006748#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006749#include <stdlib.h>
6750#ifdef F77_DUMMY_MAIN
6751# ifdef __cplusplus
6752 extern "C"
6753# endif
6754 int F77_DUMMY_MAIN() { return 1; }
6755#endif
6756int
6757main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006758{
Martin v. Löwis11437992002-04-12 09:54:03 +00006759
6760 FILE *f = fopen ("conftest.val", "w");
6761 if (! f)
6762 exit (1);
6763 if (((long) (sizeof (float))) < 0)
6764 {
6765 long i = longval ();
6766 if (i != ((long) (sizeof (float))))
6767 exit (1);
6768 fprintf (f, "%ld\n", i);
6769 }
6770 else
6771 {
6772 unsigned long i = ulongval ();
6773 if (i != ((long) (sizeof (float))))
6774 exit (1);
6775 fprintf (f, "%lu\n", i);
6776 }
6777 exit (ferror (f) || fclose (f) != 0);
6778
6779 ;
6780 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006781}
Martin v. Löwis11437992002-04-12 09:54:03 +00006782_ACEOF
6783rm -f conftest$ac_exeext
6784if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6785 (eval $ac_link) 2>&5
6786 ac_status=$?
6787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6788 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6790 (eval $ac_try) 2>&5
6791 ac_status=$?
6792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6793 (exit $ac_status); }; }; then
6794 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006795else
Martin v. Löwis11437992002-04-12 09:54:03 +00006796 echo "$as_me: program exited with status $ac_status" >&5
6797echo "$as_me: failed program was:" >&5
6798cat conftest.$ac_ext >&5
6799( exit $ac_status )
6800{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6801echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6802 { (exit 1); exit 1; }; }
6803fi
6804rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6805fi
6806fi
6807rm -f conftest.val
6808else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006809 ac_cv_sizeof_float=0
6810fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006811fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006812echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6813echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6814cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006815#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006816_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006817
6818
Martin v. Löwis11437992002-04-12 09:54:03 +00006819echo "$as_me:$LINENO: checking for double" >&5
6820echo $ECHO_N "checking for double... $ECHO_C" >&6
6821if test "${ac_cv_type_double+set}" = set; then
6822 echo $ECHO_N "(cached) $ECHO_C" >&6
6823else
6824 cat >conftest.$ac_ext <<_ACEOF
6825#line $LINENO "configure"
6826#include "confdefs.h"
6827$ac_includes_default
6828#ifdef F77_DUMMY_MAIN
6829# ifdef __cplusplus
6830 extern "C"
6831# endif
6832 int F77_DUMMY_MAIN() { return 1; }
6833#endif
6834int
6835main ()
6836{
6837if ((double *) 0)
6838 return 0;
6839if (sizeof (double))
6840 return 0;
6841 ;
6842 return 0;
6843}
6844_ACEOF
6845rm -f conftest.$ac_objext
6846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6847 (eval $ac_compile) 2>&5
6848 ac_status=$?
6849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6850 (exit $ac_status); } &&
6851 { ac_try='test -s conftest.$ac_objext'
6852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6853 (eval $ac_try) 2>&5
6854 ac_status=$?
6855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6856 (exit $ac_status); }; }; then
6857 ac_cv_type_double=yes
6858else
6859 echo "$as_me: failed program was:" >&5
6860cat conftest.$ac_ext >&5
6861ac_cv_type_double=no
6862fi
6863rm -f conftest.$ac_objext conftest.$ac_ext
6864fi
6865echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6866echo "${ECHO_T}$ac_cv_type_double" >&6
6867
6868echo "$as_me:$LINENO: checking size of double" >&5
6869echo $ECHO_N "checking size of double... $ECHO_C" >&6
6870if test "${ac_cv_sizeof_double+set}" = set; then
6871 echo $ECHO_N "(cached) $ECHO_C" >&6
6872else
6873 if test "$ac_cv_type_double" = yes; then
6874 # The cast to unsigned long works around a bug in the HP C Compiler
6875 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6876 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6877 # This bug is HP SR number 8606223364.
6878 if test "$cross_compiling" = yes; then
6879 # Depending upon the size, compute the lo and hi bounds.
6880cat >conftest.$ac_ext <<_ACEOF
6881#line $LINENO "configure"
6882#include "confdefs.h"
6883$ac_includes_default
6884#ifdef F77_DUMMY_MAIN
6885# ifdef __cplusplus
6886 extern "C"
6887# endif
6888 int F77_DUMMY_MAIN() { return 1; }
6889#endif
6890int
6891main ()
6892{
6893static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6894test_array [0] = 0
6895
6896 ;
6897 return 0;
6898}
6899_ACEOF
6900rm -f conftest.$ac_objext
6901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6902 (eval $ac_compile) 2>&5
6903 ac_status=$?
6904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6905 (exit $ac_status); } &&
6906 { ac_try='test -s conftest.$ac_objext'
6907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6908 (eval $ac_try) 2>&5
6909 ac_status=$?
6910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6911 (exit $ac_status); }; }; then
6912 ac_lo=0 ac_mid=0
6913 while :; do
6914 cat >conftest.$ac_ext <<_ACEOF
6915#line $LINENO "configure"
6916#include "confdefs.h"
6917$ac_includes_default
6918#ifdef F77_DUMMY_MAIN
6919# ifdef __cplusplus
6920 extern "C"
6921# endif
6922 int F77_DUMMY_MAIN() { return 1; }
6923#endif
6924int
6925main ()
6926{
6927static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6928test_array [0] = 0
6929
6930 ;
6931 return 0;
6932}
6933_ACEOF
6934rm -f conftest.$ac_objext
6935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6936 (eval $ac_compile) 2>&5
6937 ac_status=$?
6938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6939 (exit $ac_status); } &&
6940 { ac_try='test -s conftest.$ac_objext'
6941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6942 (eval $ac_try) 2>&5
6943 ac_status=$?
6944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6945 (exit $ac_status); }; }; then
6946 ac_hi=$ac_mid; break
6947else
6948 echo "$as_me: failed program was:" >&5
6949cat conftest.$ac_ext >&5
6950ac_lo=`expr $ac_mid + 1`
6951 if test $ac_lo -le $ac_mid; then
6952 ac_lo= ac_hi=
6953 break
6954 fi
6955 ac_mid=`expr 2 '*' $ac_mid + 1`
6956fi
6957rm -f conftest.$ac_objext conftest.$ac_ext
6958 done
6959else
6960 echo "$as_me: failed program was:" >&5
6961cat conftest.$ac_ext >&5
6962cat >conftest.$ac_ext <<_ACEOF
6963#line $LINENO "configure"
6964#include "confdefs.h"
6965$ac_includes_default
6966#ifdef F77_DUMMY_MAIN
6967# ifdef __cplusplus
6968 extern "C"
6969# endif
6970 int F77_DUMMY_MAIN() { return 1; }
6971#endif
6972int
6973main ()
6974{
6975static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6976test_array [0] = 0
6977
6978 ;
6979 return 0;
6980}
6981_ACEOF
6982rm -f conftest.$ac_objext
6983if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6984 (eval $ac_compile) 2>&5
6985 ac_status=$?
6986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6987 (exit $ac_status); } &&
6988 { ac_try='test -s conftest.$ac_objext'
6989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6990 (eval $ac_try) 2>&5
6991 ac_status=$?
6992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6993 (exit $ac_status); }; }; then
6994 ac_hi=-1 ac_mid=-1
6995 while :; do
6996 cat >conftest.$ac_ext <<_ACEOF
6997#line $LINENO "configure"
6998#include "confdefs.h"
6999$ac_includes_default
7000#ifdef F77_DUMMY_MAIN
7001# ifdef __cplusplus
7002 extern "C"
7003# endif
7004 int F77_DUMMY_MAIN() { return 1; }
7005#endif
7006int
7007main ()
7008{
7009static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7010test_array [0] = 0
7011
7012 ;
7013 return 0;
7014}
7015_ACEOF
7016rm -f conftest.$ac_objext
7017if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7018 (eval $ac_compile) 2>&5
7019 ac_status=$?
7020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7021 (exit $ac_status); } &&
7022 { ac_try='test -s conftest.$ac_objext'
7023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7024 (eval $ac_try) 2>&5
7025 ac_status=$?
7026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7027 (exit $ac_status); }; }; then
7028 ac_lo=$ac_mid; break
7029else
7030 echo "$as_me: failed program was:" >&5
7031cat conftest.$ac_ext >&5
7032ac_hi=`expr '(' $ac_mid ')' - 1`
7033 if test $ac_mid -le $ac_hi; then
7034 ac_lo= ac_hi=
7035 break
7036 fi
7037 ac_mid=`expr 2 '*' $ac_mid`
7038fi
7039rm -f conftest.$ac_objext conftest.$ac_ext
7040 done
7041else
7042 echo "$as_me: failed program was:" >&5
7043cat conftest.$ac_ext >&5
7044ac_lo= ac_hi=
7045fi
7046rm -f conftest.$ac_objext conftest.$ac_ext
7047fi
7048rm -f conftest.$ac_objext conftest.$ac_ext
7049# Binary search between lo and hi bounds.
7050while test "x$ac_lo" != "x$ac_hi"; do
7051 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7052 cat >conftest.$ac_ext <<_ACEOF
7053#line $LINENO "configure"
7054#include "confdefs.h"
7055$ac_includes_default
7056#ifdef F77_DUMMY_MAIN
7057# ifdef __cplusplus
7058 extern "C"
7059# endif
7060 int F77_DUMMY_MAIN() { return 1; }
7061#endif
7062int
7063main ()
7064{
7065static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7066test_array [0] = 0
7067
7068 ;
7069 return 0;
7070}
7071_ACEOF
7072rm -f conftest.$ac_objext
7073if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7074 (eval $ac_compile) 2>&5
7075 ac_status=$?
7076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7077 (exit $ac_status); } &&
7078 { ac_try='test -s conftest.$ac_objext'
7079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7080 (eval $ac_try) 2>&5
7081 ac_status=$?
7082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7083 (exit $ac_status); }; }; then
7084 ac_hi=$ac_mid
7085else
7086 echo "$as_me: failed program was:" >&5
7087cat conftest.$ac_ext >&5
7088ac_lo=`expr '(' $ac_mid ')' + 1`
7089fi
7090rm -f conftest.$ac_objext conftest.$ac_ext
7091done
7092case $ac_lo in
7093?*) ac_cv_sizeof_double=$ac_lo;;
7094'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7095echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7096 { (exit 1); exit 1; }; } ;;
7097esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007098else
7099 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007100 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7101echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7102 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007103else
Martin v. Löwis11437992002-04-12 09:54:03 +00007104 cat >conftest.$ac_ext <<_ACEOF
7105#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007106#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007107$ac_includes_default
7108long longval () { return (long) (sizeof (double)); }
7109unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007110#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007111#include <stdlib.h>
7112#ifdef F77_DUMMY_MAIN
7113# ifdef __cplusplus
7114 extern "C"
7115# endif
7116 int F77_DUMMY_MAIN() { return 1; }
7117#endif
7118int
7119main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007120{
Martin v. Löwis11437992002-04-12 09:54:03 +00007121
7122 FILE *f = fopen ("conftest.val", "w");
7123 if (! f)
7124 exit (1);
7125 if (((long) (sizeof (double))) < 0)
7126 {
7127 long i = longval ();
7128 if (i != ((long) (sizeof (double))))
7129 exit (1);
7130 fprintf (f, "%ld\n", i);
7131 }
7132 else
7133 {
7134 unsigned long i = ulongval ();
7135 if (i != ((long) (sizeof (double))))
7136 exit (1);
7137 fprintf (f, "%lu\n", i);
7138 }
7139 exit (ferror (f) || fclose (f) != 0);
7140
7141 ;
7142 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007143}
Martin v. Löwis11437992002-04-12 09:54:03 +00007144_ACEOF
7145rm -f conftest$ac_exeext
7146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7147 (eval $ac_link) 2>&5
7148 ac_status=$?
7149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7150 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7152 (eval $ac_try) 2>&5
7153 ac_status=$?
7154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7155 (exit $ac_status); }; }; then
7156 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007157else
Martin v. Löwis11437992002-04-12 09:54:03 +00007158 echo "$as_me: program exited with status $ac_status" >&5
7159echo "$as_me: failed program was:" >&5
7160cat conftest.$ac_ext >&5
7161( exit $ac_status )
7162{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7163echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7164 { (exit 1); exit 1; }; }
7165fi
7166rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7167fi
7168fi
7169rm -f conftest.val
7170else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007171 ac_cv_sizeof_double=0
7172fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007173fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007174echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7175echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7176cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007177#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007178_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007179
7180
Martin v. Löwis11437992002-04-12 09:54:03 +00007181echo "$as_me:$LINENO: checking for fpos_t" >&5
7182echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7183if test "${ac_cv_type_fpos_t+set}" = set; then
7184 echo $ECHO_N "(cached) $ECHO_C" >&6
7185else
7186 cat >conftest.$ac_ext <<_ACEOF
7187#line $LINENO "configure"
7188#include "confdefs.h"
7189$ac_includes_default
7190#ifdef F77_DUMMY_MAIN
7191# ifdef __cplusplus
7192 extern "C"
7193# endif
7194 int F77_DUMMY_MAIN() { return 1; }
7195#endif
7196int
7197main ()
7198{
7199if ((fpos_t *) 0)
7200 return 0;
7201if (sizeof (fpos_t))
7202 return 0;
7203 ;
7204 return 0;
7205}
7206_ACEOF
7207rm -f conftest.$ac_objext
7208if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7209 (eval $ac_compile) 2>&5
7210 ac_status=$?
7211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7212 (exit $ac_status); } &&
7213 { ac_try='test -s conftest.$ac_objext'
7214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7215 (eval $ac_try) 2>&5
7216 ac_status=$?
7217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7218 (exit $ac_status); }; }; then
7219 ac_cv_type_fpos_t=yes
7220else
7221 echo "$as_me: failed program was:" >&5
7222cat conftest.$ac_ext >&5
7223ac_cv_type_fpos_t=no
7224fi
7225rm -f conftest.$ac_objext conftest.$ac_ext
7226fi
7227echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7228echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7229
7230echo "$as_me:$LINENO: checking size of fpos_t" >&5
7231echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7232if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7233 echo $ECHO_N "(cached) $ECHO_C" >&6
7234else
7235 if test "$ac_cv_type_fpos_t" = yes; then
7236 # The cast to unsigned long works around a bug in the HP C Compiler
7237 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7238 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7239 # This bug is HP SR number 8606223364.
7240 if test "$cross_compiling" = yes; then
7241 # Depending upon the size, compute the lo and hi bounds.
7242cat >conftest.$ac_ext <<_ACEOF
7243#line $LINENO "configure"
7244#include "confdefs.h"
7245$ac_includes_default
7246#ifdef F77_DUMMY_MAIN
7247# ifdef __cplusplus
7248 extern "C"
7249# endif
7250 int F77_DUMMY_MAIN() { return 1; }
7251#endif
7252int
7253main ()
7254{
7255static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7256test_array [0] = 0
7257
7258 ;
7259 return 0;
7260}
7261_ACEOF
7262rm -f conftest.$ac_objext
7263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7264 (eval $ac_compile) 2>&5
7265 ac_status=$?
7266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7267 (exit $ac_status); } &&
7268 { ac_try='test -s conftest.$ac_objext'
7269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7270 (eval $ac_try) 2>&5
7271 ac_status=$?
7272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7273 (exit $ac_status); }; }; then
7274 ac_lo=0 ac_mid=0
7275 while :; do
7276 cat >conftest.$ac_ext <<_ACEOF
7277#line $LINENO "configure"
7278#include "confdefs.h"
7279$ac_includes_default
7280#ifdef F77_DUMMY_MAIN
7281# ifdef __cplusplus
7282 extern "C"
7283# endif
7284 int F77_DUMMY_MAIN() { return 1; }
7285#endif
7286int
7287main ()
7288{
7289static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7290test_array [0] = 0
7291
7292 ;
7293 return 0;
7294}
7295_ACEOF
7296rm -f conftest.$ac_objext
7297if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7298 (eval $ac_compile) 2>&5
7299 ac_status=$?
7300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7301 (exit $ac_status); } &&
7302 { ac_try='test -s conftest.$ac_objext'
7303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7304 (eval $ac_try) 2>&5
7305 ac_status=$?
7306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7307 (exit $ac_status); }; }; then
7308 ac_hi=$ac_mid; break
7309else
7310 echo "$as_me: failed program was:" >&5
7311cat conftest.$ac_ext >&5
7312ac_lo=`expr $ac_mid + 1`
7313 if test $ac_lo -le $ac_mid; then
7314 ac_lo= ac_hi=
7315 break
7316 fi
7317 ac_mid=`expr 2 '*' $ac_mid + 1`
7318fi
7319rm -f conftest.$ac_objext conftest.$ac_ext
7320 done
7321else
7322 echo "$as_me: failed program was:" >&5
7323cat conftest.$ac_ext >&5
7324cat >conftest.$ac_ext <<_ACEOF
7325#line $LINENO "configure"
7326#include "confdefs.h"
7327$ac_includes_default
7328#ifdef F77_DUMMY_MAIN
7329# ifdef __cplusplus
7330 extern "C"
7331# endif
7332 int F77_DUMMY_MAIN() { return 1; }
7333#endif
7334int
7335main ()
7336{
7337static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7338test_array [0] = 0
7339
7340 ;
7341 return 0;
7342}
7343_ACEOF
7344rm -f conftest.$ac_objext
7345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7346 (eval $ac_compile) 2>&5
7347 ac_status=$?
7348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7349 (exit $ac_status); } &&
7350 { ac_try='test -s conftest.$ac_objext'
7351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7352 (eval $ac_try) 2>&5
7353 ac_status=$?
7354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7355 (exit $ac_status); }; }; then
7356 ac_hi=-1 ac_mid=-1
7357 while :; do
7358 cat >conftest.$ac_ext <<_ACEOF
7359#line $LINENO "configure"
7360#include "confdefs.h"
7361$ac_includes_default
7362#ifdef F77_DUMMY_MAIN
7363# ifdef __cplusplus
7364 extern "C"
7365# endif
7366 int F77_DUMMY_MAIN() { return 1; }
7367#endif
7368int
7369main ()
7370{
7371static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7372test_array [0] = 0
7373
7374 ;
7375 return 0;
7376}
7377_ACEOF
7378rm -f conftest.$ac_objext
7379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7380 (eval $ac_compile) 2>&5
7381 ac_status=$?
7382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7383 (exit $ac_status); } &&
7384 { ac_try='test -s conftest.$ac_objext'
7385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7386 (eval $ac_try) 2>&5
7387 ac_status=$?
7388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7389 (exit $ac_status); }; }; then
7390 ac_lo=$ac_mid; break
7391else
7392 echo "$as_me: failed program was:" >&5
7393cat conftest.$ac_ext >&5
7394ac_hi=`expr '(' $ac_mid ')' - 1`
7395 if test $ac_mid -le $ac_hi; then
7396 ac_lo= ac_hi=
7397 break
7398 fi
7399 ac_mid=`expr 2 '*' $ac_mid`
7400fi
7401rm -f conftest.$ac_objext conftest.$ac_ext
7402 done
7403else
7404 echo "$as_me: failed program was:" >&5
7405cat conftest.$ac_ext >&5
7406ac_lo= ac_hi=
7407fi
7408rm -f conftest.$ac_objext conftest.$ac_ext
7409fi
7410rm -f conftest.$ac_objext conftest.$ac_ext
7411# Binary search between lo and hi bounds.
7412while test "x$ac_lo" != "x$ac_hi"; do
7413 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7414 cat >conftest.$ac_ext <<_ACEOF
7415#line $LINENO "configure"
7416#include "confdefs.h"
7417$ac_includes_default
7418#ifdef F77_DUMMY_MAIN
7419# ifdef __cplusplus
7420 extern "C"
7421# endif
7422 int F77_DUMMY_MAIN() { return 1; }
7423#endif
7424int
7425main ()
7426{
7427static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7428test_array [0] = 0
7429
7430 ;
7431 return 0;
7432}
7433_ACEOF
7434rm -f conftest.$ac_objext
7435if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7436 (eval $ac_compile) 2>&5
7437 ac_status=$?
7438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7439 (exit $ac_status); } &&
7440 { ac_try='test -s conftest.$ac_objext'
7441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7442 (eval $ac_try) 2>&5
7443 ac_status=$?
7444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7445 (exit $ac_status); }; }; then
7446 ac_hi=$ac_mid
7447else
7448 echo "$as_me: failed program was:" >&5
7449cat conftest.$ac_ext >&5
7450ac_lo=`expr '(' $ac_mid ')' + 1`
7451fi
7452rm -f conftest.$ac_objext conftest.$ac_ext
7453done
7454case $ac_lo in
7455?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7456'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7457echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7458 { (exit 1); exit 1; }; } ;;
7459esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007460else
7461 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007462 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7463echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7464 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007465else
Martin v. Löwis11437992002-04-12 09:54:03 +00007466 cat >conftest.$ac_ext <<_ACEOF
7467#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007468#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007469$ac_includes_default
7470long longval () { return (long) (sizeof (fpos_t)); }
7471unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007472#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007473#include <stdlib.h>
7474#ifdef F77_DUMMY_MAIN
7475# ifdef __cplusplus
7476 extern "C"
7477# endif
7478 int F77_DUMMY_MAIN() { return 1; }
7479#endif
7480int
7481main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007482{
Martin v. Löwis11437992002-04-12 09:54:03 +00007483
7484 FILE *f = fopen ("conftest.val", "w");
7485 if (! f)
7486 exit (1);
7487 if (((long) (sizeof (fpos_t))) < 0)
7488 {
7489 long i = longval ();
7490 if (i != ((long) (sizeof (fpos_t))))
7491 exit (1);
7492 fprintf (f, "%ld\n", i);
7493 }
7494 else
7495 {
7496 unsigned long i = ulongval ();
7497 if (i != ((long) (sizeof (fpos_t))))
7498 exit (1);
7499 fprintf (f, "%lu\n", i);
7500 }
7501 exit (ferror (f) || fclose (f) != 0);
7502
7503 ;
7504 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007505}
Martin v. Löwis11437992002-04-12 09:54:03 +00007506_ACEOF
7507rm -f conftest$ac_exeext
7508if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7509 (eval $ac_link) 2>&5
7510 ac_status=$?
7511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7514 (eval $ac_try) 2>&5
7515 ac_status=$?
7516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7517 (exit $ac_status); }; }; then
7518 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007519else
Martin v. Löwis11437992002-04-12 09:54:03 +00007520 echo "$as_me: program exited with status $ac_status" >&5
7521echo "$as_me: failed program was:" >&5
7522cat conftest.$ac_ext >&5
7523( exit $ac_status )
7524{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7525echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7526 { (exit 1); exit 1; }; }
7527fi
7528rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7529fi
7530fi
7531rm -f conftest.val
7532else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007533 ac_cv_sizeof_fpos_t=0
7534fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007535fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007536echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7537echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7538cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007539#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007540_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007541
Michael W. Hudson54241132001-12-07 15:38:26 +00007542
7543
Martin v. Löwis11437992002-04-12 09:54:03 +00007544echo "$as_me:$LINENO: checking for long long support" >&5
7545echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007546have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007547cat >conftest.$ac_ext <<_ACEOF
7548#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007549#include "confdefs.h"
7550
Martin v. Löwis11437992002-04-12 09:54:03 +00007551#ifdef F77_DUMMY_MAIN
7552# ifdef __cplusplus
7553 extern "C"
7554# endif
7555 int F77_DUMMY_MAIN() { return 1; }
7556#endif
7557int
7558main ()
7559{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007560long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007561 ;
7562 return 0;
7563}
7564_ACEOF
7565rm -f conftest.$ac_objext
7566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7567 (eval $ac_compile) 2>&5
7568 ac_status=$?
7569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7570 (exit $ac_status); } &&
7571 { ac_try='test -s conftest.$ac_objext'
7572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7573 (eval $ac_try) 2>&5
7574 ac_status=$?
7575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7576 (exit $ac_status); }; }; then
7577
7578
7579cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007580#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007581_ACEOF
7582
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007583 have_long_long=yes
7584
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007585else
Martin v. Löwis11437992002-04-12 09:54:03 +00007586 echo "$as_me: failed program was:" >&5
7587cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007589rm -f conftest.$ac_objext conftest.$ac_ext
7590echo "$as_me:$LINENO: result: $have_long_long" >&5
7591echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007592if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007593echo "$as_me:$LINENO: checking for long long" >&5
7594echo $ECHO_N "checking for long long... $ECHO_C" >&6
7595if test "${ac_cv_type_long_long+set}" = set; then
7596 echo $ECHO_N "(cached) $ECHO_C" >&6
7597else
7598 cat >conftest.$ac_ext <<_ACEOF
7599#line $LINENO "configure"
7600#include "confdefs.h"
7601$ac_includes_default
7602#ifdef F77_DUMMY_MAIN
7603# ifdef __cplusplus
7604 extern "C"
7605# endif
7606 int F77_DUMMY_MAIN() { return 1; }
7607#endif
7608int
7609main ()
7610{
7611if ((long long *) 0)
7612 return 0;
7613if (sizeof (long long))
7614 return 0;
7615 ;
7616 return 0;
7617}
7618_ACEOF
7619rm -f conftest.$ac_objext
7620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7621 (eval $ac_compile) 2>&5
7622 ac_status=$?
7623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624 (exit $ac_status); } &&
7625 { ac_try='test -s conftest.$ac_objext'
7626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7627 (eval $ac_try) 2>&5
7628 ac_status=$?
7629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7630 (exit $ac_status); }; }; then
7631 ac_cv_type_long_long=yes
7632else
7633 echo "$as_me: failed program was:" >&5
7634cat conftest.$ac_ext >&5
7635ac_cv_type_long_long=no
7636fi
7637rm -f conftest.$ac_objext conftest.$ac_ext
7638fi
7639echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7640echo "${ECHO_T}$ac_cv_type_long_long" >&6
7641
7642echo "$as_me:$LINENO: checking size of long long" >&5
7643echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7644if test "${ac_cv_sizeof_long_long+set}" = set; then
7645 echo $ECHO_N "(cached) $ECHO_C" >&6
7646else
7647 if test "$ac_cv_type_long_long" = yes; then
7648 # The cast to unsigned long works around a bug in the HP C Compiler
7649 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7650 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7651 # This bug is HP SR number 8606223364.
7652 if test "$cross_compiling" = yes; then
7653 # Depending upon the size, compute the lo and hi bounds.
7654cat >conftest.$ac_ext <<_ACEOF
7655#line $LINENO "configure"
7656#include "confdefs.h"
7657$ac_includes_default
7658#ifdef F77_DUMMY_MAIN
7659# ifdef __cplusplus
7660 extern "C"
7661# endif
7662 int F77_DUMMY_MAIN() { return 1; }
7663#endif
7664int
7665main ()
7666{
7667static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7668test_array [0] = 0
7669
7670 ;
7671 return 0;
7672}
7673_ACEOF
7674rm -f conftest.$ac_objext
7675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7676 (eval $ac_compile) 2>&5
7677 ac_status=$?
7678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7679 (exit $ac_status); } &&
7680 { ac_try='test -s conftest.$ac_objext'
7681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7682 (eval $ac_try) 2>&5
7683 ac_status=$?
7684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7685 (exit $ac_status); }; }; then
7686 ac_lo=0 ac_mid=0
7687 while :; do
7688 cat >conftest.$ac_ext <<_ACEOF
7689#line $LINENO "configure"
7690#include "confdefs.h"
7691$ac_includes_default
7692#ifdef F77_DUMMY_MAIN
7693# ifdef __cplusplus
7694 extern "C"
7695# endif
7696 int F77_DUMMY_MAIN() { return 1; }
7697#endif
7698int
7699main ()
7700{
7701static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7702test_array [0] = 0
7703
7704 ;
7705 return 0;
7706}
7707_ACEOF
7708rm -f conftest.$ac_objext
7709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7710 (eval $ac_compile) 2>&5
7711 ac_status=$?
7712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7713 (exit $ac_status); } &&
7714 { ac_try='test -s conftest.$ac_objext'
7715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7716 (eval $ac_try) 2>&5
7717 ac_status=$?
7718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7719 (exit $ac_status); }; }; then
7720 ac_hi=$ac_mid; break
7721else
7722 echo "$as_me: failed program was:" >&5
7723cat conftest.$ac_ext >&5
7724ac_lo=`expr $ac_mid + 1`
7725 if test $ac_lo -le $ac_mid; then
7726 ac_lo= ac_hi=
7727 break
7728 fi
7729 ac_mid=`expr 2 '*' $ac_mid + 1`
7730fi
7731rm -f conftest.$ac_objext conftest.$ac_ext
7732 done
7733else
7734 echo "$as_me: failed program was:" >&5
7735cat conftest.$ac_ext >&5
7736cat >conftest.$ac_ext <<_ACEOF
7737#line $LINENO "configure"
7738#include "confdefs.h"
7739$ac_includes_default
7740#ifdef F77_DUMMY_MAIN
7741# ifdef __cplusplus
7742 extern "C"
7743# endif
7744 int F77_DUMMY_MAIN() { return 1; }
7745#endif
7746int
7747main ()
7748{
7749static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7750test_array [0] = 0
7751
7752 ;
7753 return 0;
7754}
7755_ACEOF
7756rm -f conftest.$ac_objext
7757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7758 (eval $ac_compile) 2>&5
7759 ac_status=$?
7760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7761 (exit $ac_status); } &&
7762 { ac_try='test -s conftest.$ac_objext'
7763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7764 (eval $ac_try) 2>&5
7765 ac_status=$?
7766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7767 (exit $ac_status); }; }; then
7768 ac_hi=-1 ac_mid=-1
7769 while :; do
7770 cat >conftest.$ac_ext <<_ACEOF
7771#line $LINENO "configure"
7772#include "confdefs.h"
7773$ac_includes_default
7774#ifdef F77_DUMMY_MAIN
7775# ifdef __cplusplus
7776 extern "C"
7777# endif
7778 int F77_DUMMY_MAIN() { return 1; }
7779#endif
7780int
7781main ()
7782{
7783static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7784test_array [0] = 0
7785
7786 ;
7787 return 0;
7788}
7789_ACEOF
7790rm -f conftest.$ac_objext
7791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7792 (eval $ac_compile) 2>&5
7793 ac_status=$?
7794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7795 (exit $ac_status); } &&
7796 { ac_try='test -s conftest.$ac_objext'
7797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7798 (eval $ac_try) 2>&5
7799 ac_status=$?
7800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7801 (exit $ac_status); }; }; then
7802 ac_lo=$ac_mid; break
7803else
7804 echo "$as_me: failed program was:" >&5
7805cat conftest.$ac_ext >&5
7806ac_hi=`expr '(' $ac_mid ')' - 1`
7807 if test $ac_mid -le $ac_hi; then
7808 ac_lo= ac_hi=
7809 break
7810 fi
7811 ac_mid=`expr 2 '*' $ac_mid`
7812fi
7813rm -f conftest.$ac_objext conftest.$ac_ext
7814 done
7815else
7816 echo "$as_me: failed program was:" >&5
7817cat conftest.$ac_ext >&5
7818ac_lo= ac_hi=
7819fi
7820rm -f conftest.$ac_objext conftest.$ac_ext
7821fi
7822rm -f conftest.$ac_objext conftest.$ac_ext
7823# Binary search between lo and hi bounds.
7824while test "x$ac_lo" != "x$ac_hi"; do
7825 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7826 cat >conftest.$ac_ext <<_ACEOF
7827#line $LINENO "configure"
7828#include "confdefs.h"
7829$ac_includes_default
7830#ifdef F77_DUMMY_MAIN
7831# ifdef __cplusplus
7832 extern "C"
7833# endif
7834 int F77_DUMMY_MAIN() { return 1; }
7835#endif
7836int
7837main ()
7838{
7839static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7840test_array [0] = 0
7841
7842 ;
7843 return 0;
7844}
7845_ACEOF
7846rm -f conftest.$ac_objext
7847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7848 (eval $ac_compile) 2>&5
7849 ac_status=$?
7850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7851 (exit $ac_status); } &&
7852 { ac_try='test -s conftest.$ac_objext'
7853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7854 (eval $ac_try) 2>&5
7855 ac_status=$?
7856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7857 (exit $ac_status); }; }; then
7858 ac_hi=$ac_mid
7859else
7860 echo "$as_me: failed program was:" >&5
7861cat conftest.$ac_ext >&5
7862ac_lo=`expr '(' $ac_mid ')' + 1`
7863fi
7864rm -f conftest.$ac_objext conftest.$ac_ext
7865done
7866case $ac_lo in
7867?*) ac_cv_sizeof_long_long=$ac_lo;;
7868'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7869echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7870 { (exit 1); exit 1; }; } ;;
7871esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007872else
7873 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007874 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7875echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7876 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007877else
Martin v. Löwis11437992002-04-12 09:54:03 +00007878 cat >conftest.$ac_ext <<_ACEOF
7879#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007880#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007881$ac_includes_default
7882long longval () { return (long) (sizeof (long long)); }
7883unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007884#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007885#include <stdlib.h>
7886#ifdef F77_DUMMY_MAIN
7887# ifdef __cplusplus
7888 extern "C"
7889# endif
7890 int F77_DUMMY_MAIN() { return 1; }
7891#endif
7892int
7893main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007894{
Martin v. Löwis11437992002-04-12 09:54:03 +00007895
7896 FILE *f = fopen ("conftest.val", "w");
7897 if (! f)
7898 exit (1);
7899 if (((long) (sizeof (long long))) < 0)
7900 {
7901 long i = longval ();
7902 if (i != ((long) (sizeof (long long))))
7903 exit (1);
7904 fprintf (f, "%ld\n", i);
7905 }
7906 else
7907 {
7908 unsigned long i = ulongval ();
7909 if (i != ((long) (sizeof (long long))))
7910 exit (1);
7911 fprintf (f, "%lu\n", i);
7912 }
7913 exit (ferror (f) || fclose (f) != 0);
7914
7915 ;
7916 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007917}
Martin v. Löwis11437992002-04-12 09:54:03 +00007918_ACEOF
7919rm -f conftest$ac_exeext
7920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7921 (eval $ac_link) 2>&5
7922 ac_status=$?
7923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7924 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7926 (eval $ac_try) 2>&5
7927 ac_status=$?
7928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7929 (exit $ac_status); }; }; then
7930 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007931else
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 echo "$as_me: program exited with status $ac_status" >&5
7933echo "$as_me: failed program was:" >&5
7934cat conftest.$ac_ext >&5
7935( exit $ac_status )
7936{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7937echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7938 { (exit 1); exit 1; }; }
7939fi
7940rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7941fi
7942fi
7943rm -f conftest.val
7944else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007945 ac_cv_sizeof_long_long=0
7946fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007947fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007948echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7949echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7950cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007951#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007952_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007953
Michael W. Hudson54241132001-12-07 15:38:26 +00007954
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007955fi
7956
Martin v. Löwis11437992002-04-12 09:54:03 +00007957echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7958echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007959have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007960cat >conftest.$ac_ext <<_ACEOF
7961#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007962#include "confdefs.h"
7963
Martin v. Löwis11437992002-04-12 09:54:03 +00007964#ifdef F77_DUMMY_MAIN
7965# ifdef __cplusplus
7966 extern "C"
7967# endif
7968 int F77_DUMMY_MAIN() { return 1; }
7969#endif
7970int
7971main ()
7972{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007973uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007974 ;
7975 return 0;
7976}
7977_ACEOF
7978rm -f conftest.$ac_objext
7979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7980 (eval $ac_compile) 2>&5
7981 ac_status=$?
7982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7983 (exit $ac_status); } &&
7984 { ac_try='test -s conftest.$ac_objext'
7985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7986 (eval $ac_try) 2>&5
7987 ac_status=$?
7988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7989 (exit $ac_status); }; }; then
7990
7991
7992cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007993#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007994_ACEOF
7995
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007996 have_uintptr_t=yes
7997
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007998else
Martin v. Löwis11437992002-04-12 09:54:03 +00007999 echo "$as_me: failed program was:" >&5
8000cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008001fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008002rm -f conftest.$ac_objext conftest.$ac_ext
8003echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8004echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008005if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008006echo "$as_me:$LINENO: checking for uintptr_t" >&5
8007echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8008if test "${ac_cv_type_uintptr_t+set}" = set; then
8009 echo $ECHO_N "(cached) $ECHO_C" >&6
8010else
8011 cat >conftest.$ac_ext <<_ACEOF
8012#line $LINENO "configure"
8013#include "confdefs.h"
8014$ac_includes_default
8015#ifdef F77_DUMMY_MAIN
8016# ifdef __cplusplus
8017 extern "C"
8018# endif
8019 int F77_DUMMY_MAIN() { return 1; }
8020#endif
8021int
8022main ()
8023{
8024if ((uintptr_t *) 0)
8025 return 0;
8026if (sizeof (uintptr_t))
8027 return 0;
8028 ;
8029 return 0;
8030}
8031_ACEOF
8032rm -f conftest.$ac_objext
8033if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8034 (eval $ac_compile) 2>&5
8035 ac_status=$?
8036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8037 (exit $ac_status); } &&
8038 { ac_try='test -s conftest.$ac_objext'
8039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8040 (eval $ac_try) 2>&5
8041 ac_status=$?
8042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8043 (exit $ac_status); }; }; then
8044 ac_cv_type_uintptr_t=yes
8045else
8046 echo "$as_me: failed program was:" >&5
8047cat conftest.$ac_ext >&5
8048ac_cv_type_uintptr_t=no
8049fi
8050rm -f conftest.$ac_objext conftest.$ac_ext
8051fi
8052echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8053echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8054
8055echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8056echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8057if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8058 echo $ECHO_N "(cached) $ECHO_C" >&6
8059else
8060 if test "$ac_cv_type_uintptr_t" = yes; then
8061 # The cast to unsigned long works around a bug in the HP C Compiler
8062 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8063 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8064 # This bug is HP SR number 8606223364.
8065 if test "$cross_compiling" = yes; then
8066 # Depending upon the size, compute the lo and hi bounds.
8067cat >conftest.$ac_ext <<_ACEOF
8068#line $LINENO "configure"
8069#include "confdefs.h"
8070$ac_includes_default
8071#ifdef F77_DUMMY_MAIN
8072# ifdef __cplusplus
8073 extern "C"
8074# endif
8075 int F77_DUMMY_MAIN() { return 1; }
8076#endif
8077int
8078main ()
8079{
8080static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8081test_array [0] = 0
8082
8083 ;
8084 return 0;
8085}
8086_ACEOF
8087rm -f conftest.$ac_objext
8088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8089 (eval $ac_compile) 2>&5
8090 ac_status=$?
8091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8092 (exit $ac_status); } &&
8093 { ac_try='test -s conftest.$ac_objext'
8094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8095 (eval $ac_try) 2>&5
8096 ac_status=$?
8097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8098 (exit $ac_status); }; }; then
8099 ac_lo=0 ac_mid=0
8100 while :; do
8101 cat >conftest.$ac_ext <<_ACEOF
8102#line $LINENO "configure"
8103#include "confdefs.h"
8104$ac_includes_default
8105#ifdef F77_DUMMY_MAIN
8106# ifdef __cplusplus
8107 extern "C"
8108# endif
8109 int F77_DUMMY_MAIN() { return 1; }
8110#endif
8111int
8112main ()
8113{
8114static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8115test_array [0] = 0
8116
8117 ;
8118 return 0;
8119}
8120_ACEOF
8121rm -f conftest.$ac_objext
8122if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8123 (eval $ac_compile) 2>&5
8124 ac_status=$?
8125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8126 (exit $ac_status); } &&
8127 { ac_try='test -s conftest.$ac_objext'
8128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8129 (eval $ac_try) 2>&5
8130 ac_status=$?
8131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8132 (exit $ac_status); }; }; then
8133 ac_hi=$ac_mid; break
8134else
8135 echo "$as_me: failed program was:" >&5
8136cat conftest.$ac_ext >&5
8137ac_lo=`expr $ac_mid + 1`
8138 if test $ac_lo -le $ac_mid; then
8139 ac_lo= ac_hi=
8140 break
8141 fi
8142 ac_mid=`expr 2 '*' $ac_mid + 1`
8143fi
8144rm -f conftest.$ac_objext conftest.$ac_ext
8145 done
8146else
8147 echo "$as_me: failed program was:" >&5
8148cat conftest.$ac_ext >&5
8149cat >conftest.$ac_ext <<_ACEOF
8150#line $LINENO "configure"
8151#include "confdefs.h"
8152$ac_includes_default
8153#ifdef F77_DUMMY_MAIN
8154# ifdef __cplusplus
8155 extern "C"
8156# endif
8157 int F77_DUMMY_MAIN() { return 1; }
8158#endif
8159int
8160main ()
8161{
8162static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8163test_array [0] = 0
8164
8165 ;
8166 return 0;
8167}
8168_ACEOF
8169rm -f conftest.$ac_objext
8170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8171 (eval $ac_compile) 2>&5
8172 ac_status=$?
8173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8174 (exit $ac_status); } &&
8175 { ac_try='test -s conftest.$ac_objext'
8176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8177 (eval $ac_try) 2>&5
8178 ac_status=$?
8179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8180 (exit $ac_status); }; }; then
8181 ac_hi=-1 ac_mid=-1
8182 while :; do
8183 cat >conftest.$ac_ext <<_ACEOF
8184#line $LINENO "configure"
8185#include "confdefs.h"
8186$ac_includes_default
8187#ifdef F77_DUMMY_MAIN
8188# ifdef __cplusplus
8189 extern "C"
8190# endif
8191 int F77_DUMMY_MAIN() { return 1; }
8192#endif
8193int
8194main ()
8195{
8196static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8197test_array [0] = 0
8198
8199 ;
8200 return 0;
8201}
8202_ACEOF
8203rm -f conftest.$ac_objext
8204if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8205 (eval $ac_compile) 2>&5
8206 ac_status=$?
8207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8208 (exit $ac_status); } &&
8209 { ac_try='test -s conftest.$ac_objext'
8210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8211 (eval $ac_try) 2>&5
8212 ac_status=$?
8213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8214 (exit $ac_status); }; }; then
8215 ac_lo=$ac_mid; break
8216else
8217 echo "$as_me: failed program was:" >&5
8218cat conftest.$ac_ext >&5
8219ac_hi=`expr '(' $ac_mid ')' - 1`
8220 if test $ac_mid -le $ac_hi; then
8221 ac_lo= ac_hi=
8222 break
8223 fi
8224 ac_mid=`expr 2 '*' $ac_mid`
8225fi
8226rm -f conftest.$ac_objext conftest.$ac_ext
8227 done
8228else
8229 echo "$as_me: failed program was:" >&5
8230cat conftest.$ac_ext >&5
8231ac_lo= ac_hi=
8232fi
8233rm -f conftest.$ac_objext conftest.$ac_ext
8234fi
8235rm -f conftest.$ac_objext conftest.$ac_ext
8236# Binary search between lo and hi bounds.
8237while test "x$ac_lo" != "x$ac_hi"; do
8238 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8239 cat >conftest.$ac_ext <<_ACEOF
8240#line $LINENO "configure"
8241#include "confdefs.h"
8242$ac_includes_default
8243#ifdef F77_DUMMY_MAIN
8244# ifdef __cplusplus
8245 extern "C"
8246# endif
8247 int F77_DUMMY_MAIN() { return 1; }
8248#endif
8249int
8250main ()
8251{
8252static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8253test_array [0] = 0
8254
8255 ;
8256 return 0;
8257}
8258_ACEOF
8259rm -f conftest.$ac_objext
8260if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8261 (eval $ac_compile) 2>&5
8262 ac_status=$?
8263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8264 (exit $ac_status); } &&
8265 { ac_try='test -s conftest.$ac_objext'
8266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8267 (eval $ac_try) 2>&5
8268 ac_status=$?
8269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8270 (exit $ac_status); }; }; then
8271 ac_hi=$ac_mid
8272else
8273 echo "$as_me: failed program was:" >&5
8274cat conftest.$ac_ext >&5
8275ac_lo=`expr '(' $ac_mid ')' + 1`
8276fi
8277rm -f conftest.$ac_objext conftest.$ac_ext
8278done
8279case $ac_lo in
8280?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8281'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8282echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8283 { (exit 1); exit 1; }; } ;;
8284esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008285else
8286 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008287 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8288echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8289 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008290else
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 cat >conftest.$ac_ext <<_ACEOF
8292#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008293#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008294$ac_includes_default
8295long longval () { return (long) (sizeof (uintptr_t)); }
8296unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008297#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008298#include <stdlib.h>
8299#ifdef F77_DUMMY_MAIN
8300# ifdef __cplusplus
8301 extern "C"
8302# endif
8303 int F77_DUMMY_MAIN() { return 1; }
8304#endif
8305int
8306main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008307{
Martin v. Löwis11437992002-04-12 09:54:03 +00008308
8309 FILE *f = fopen ("conftest.val", "w");
8310 if (! f)
8311 exit (1);
8312 if (((long) (sizeof (uintptr_t))) < 0)
8313 {
8314 long i = longval ();
8315 if (i != ((long) (sizeof (uintptr_t))))
8316 exit (1);
8317 fprintf (f, "%ld\n", i);
8318 }
8319 else
8320 {
8321 unsigned long i = ulongval ();
8322 if (i != ((long) (sizeof (uintptr_t))))
8323 exit (1);
8324 fprintf (f, "%lu\n", i);
8325 }
8326 exit (ferror (f) || fclose (f) != 0);
8327
8328 ;
8329 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008330}
Martin v. Löwis11437992002-04-12 09:54:03 +00008331_ACEOF
8332rm -f conftest$ac_exeext
8333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8334 (eval $ac_link) 2>&5
8335 ac_status=$?
8336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8339 (eval $ac_try) 2>&5
8340 ac_status=$?
8341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8342 (exit $ac_status); }; }; then
8343 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008344else
Martin v. Löwis11437992002-04-12 09:54:03 +00008345 echo "$as_me: program exited with status $ac_status" >&5
8346echo "$as_me: failed program was:" >&5
8347cat conftest.$ac_ext >&5
8348( exit $ac_status )
8349{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8350echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8351 { (exit 1); exit 1; }; }
8352fi
8353rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8354fi
8355fi
8356rm -f conftest.val
8357else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008358 ac_cv_sizeof_uintptr_t=0
8359fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008361echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8362echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8363cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008364#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008365_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008366
Michael W. Hudson54241132001-12-07 15:38:26 +00008367
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008368fi
8369
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008370# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008371echo "$as_me:$LINENO: checking size of off_t" >&5
8372echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8373if test "${ac_cv_sizeof_off_t+set}" = set; then
8374 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008375else
8376 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008377 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008378else
Martin v. Löwis11437992002-04-12 09:54:03 +00008379 cat >conftest.$ac_ext <<_ACEOF
8380#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008381#include "confdefs.h"
8382#include <stdio.h>
8383#include <sys/types.h>
8384main()
8385{
8386 FILE *f=fopen("conftestval", "w");
8387 if (!f) exit(1);
8388 fprintf(f, "%d\n", sizeof(off_t));
8389 exit(0);
8390}
Martin v. Löwis11437992002-04-12 09:54:03 +00008391_ACEOF
8392rm -f conftest$ac_exeext
8393if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8394 (eval $ac_link) 2>&5
8395 ac_status=$?
8396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8397 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8399 (eval $ac_try) 2>&5
8400 ac_status=$?
8401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8402 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008403 ac_cv_sizeof_off_t=`cat conftestval`
8404else
Martin v. Löwis11437992002-04-12 09:54:03 +00008405 echo "$as_me: program exited with status $ac_status" >&5
8406echo "$as_me: failed program was:" >&5
8407cat conftest.$ac_ext >&5
8408( exit $ac_status )
8409ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008410fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008411rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008412fi
8413
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008414fi
8415
Martin v. Löwis11437992002-04-12 09:54:03 +00008416echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8417echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8418
8419cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008420#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008421_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008422
Michael W. Hudson54241132001-12-07 15:38:26 +00008423
Martin v. Löwis11437992002-04-12 09:54:03 +00008424echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8425echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008426if test "$have_long_long" = yes -a \
8427 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8428 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008429
Martin v. Löwis11437992002-04-12 09:54:03 +00008430cat >>confdefs.h <<\_ACEOF
8431#define HAVE_LARGEFILE_SUPPORT 1
8432_ACEOF
8433
8434 echo "$as_me:$LINENO: result: yes" >&5
8435echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008436else
Martin v. Löwis11437992002-04-12 09:54:03 +00008437 echo "$as_me:$LINENO: result: no" >&5
8438echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008439fi
8440
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008441# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008442echo "$as_me:$LINENO: checking size of time_t" >&5
8443echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8444if test "${ac_cv_sizeof_time_t+set}" = set; then
8445 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008446else
8447 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008448 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008449else
Martin v. Löwis11437992002-04-12 09:54:03 +00008450 cat >conftest.$ac_ext <<_ACEOF
8451#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008452#include "confdefs.h"
8453#include <stdio.h>
8454#include <time.h>
8455main()
8456{
8457 FILE *f=fopen("conftestval", "w");
8458 if (!f) exit(1);
8459 fprintf(f, "%d\n", sizeof(time_t));
8460 exit(0);
8461}
Martin v. Löwis11437992002-04-12 09:54:03 +00008462_ACEOF
8463rm -f conftest$ac_exeext
8464if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8465 (eval $ac_link) 2>&5
8466 ac_status=$?
8467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8468 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8470 (eval $ac_try) 2>&5
8471 ac_status=$?
8472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8473 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008474 ac_cv_sizeof_time_t=`cat conftestval`
8475else
Martin v. Löwis11437992002-04-12 09:54:03 +00008476 echo "$as_me: program exited with status $ac_status" >&5
8477echo "$as_me: failed program was:" >&5
8478cat conftest.$ac_ext >&5
8479( exit $ac_status )
8480ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008481fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008482rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008483fi
8484
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008485fi
8486
Martin v. Löwis11437992002-04-12 09:54:03 +00008487echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8488echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8489
8490cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008491#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008492_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008493
Michael W. Hudson54241132001-12-07 15:38:26 +00008494
8495
Trent Mick635f6fb2000-08-23 21:33:05 +00008496# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008497ac_save_cc="$CC"
8498if test "$ac_cv_kpthread" = "yes"
8499then CC="$CC -Kpthread"
8500fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008501echo "$as_me:$LINENO: checking for pthread_t" >&5
8502echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008503have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008504cat >conftest.$ac_ext <<_ACEOF
8505#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008506#include "confdefs.h"
8507#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008508#ifdef F77_DUMMY_MAIN
8509# ifdef __cplusplus
8510 extern "C"
8511# endif
8512 int F77_DUMMY_MAIN() { return 1; }
8513#endif
8514int
8515main ()
8516{
Guido van Rossum12580492000-09-24 16:47:19 +00008517pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008518 ;
8519 return 0;
8520}
8521_ACEOF
8522rm -f conftest.$ac_objext
8523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8524 (eval $ac_compile) 2>&5
8525 ac_status=$?
8526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8527 (exit $ac_status); } &&
8528 { ac_try='test -s conftest.$ac_objext'
8529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8530 (eval $ac_try) 2>&5
8531 ac_status=$?
8532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8533 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008534 have_pthread_t=yes
8535else
Martin v. Löwis11437992002-04-12 09:54:03 +00008536 echo "$as_me: failed program was:" >&5
8537cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008538fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008539rm -f conftest.$ac_objext conftest.$ac_ext
8540echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8541echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008542if test "$have_pthread_t" = yes ; then
8543 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008544 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8545echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8546 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8547 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008548else
8549 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008550 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008551else
Martin v. Löwis11437992002-04-12 09:54:03 +00008552 cat >conftest.$ac_ext <<_ACEOF
8553#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008554#include "confdefs.h"
8555#include <stdio.h>
8556 #include <pthread.h>
8557 main()
8558 {
8559 FILE *f=fopen("conftestval", "w");
8560 if (!f) exit(1);
8561 fprintf(f, "%d\n", sizeof(pthread_t));
8562 exit(0);
8563 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008564_ACEOF
8565rm -f conftest$ac_exeext
8566if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8567 (eval $ac_link) 2>&5
8568 ac_status=$?
8569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8572 (eval $ac_try) 2>&5
8573 ac_status=$?
8574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8575 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008576 ac_cv_sizeof_pthread_t=`cat conftestval`
8577else
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 echo "$as_me: program exited with status $ac_status" >&5
8579echo "$as_me: failed program was:" >&5
8580cat conftest.$ac_ext >&5
8581( exit $ac_status )
8582ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008583fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008584rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008585fi
8586
Trent Mick635f6fb2000-08-23 21:33:05 +00008587fi
8588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8590echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8591
8592cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008593#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008594_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008595
8596fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008597CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008598
Martin v. Löwis11437992002-04-12 09:54:03 +00008599echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8600echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008601# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8602if test "${enable_toolbox_glue+set}" = set; then
8603 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008604
Martin v. Löwis11437992002-04-12 09:54:03 +00008605fi;
Jack Jansene578a632001-08-15 01:27:14 +00008606
8607if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008608then
Jack Jansene578a632001-08-15 01:27:14 +00008609 case $ac_sys_system/$ac_sys_release in
8610 Darwin/*)
8611 enable_toolbox_glue="yes";;
8612 *)
8613 enable_toolbox_glue="no";;
8614 esac
8615fi
8616case "$enable_toolbox_glue" in
8617yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008618 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008619 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008620 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008621
8622cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008623#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008624_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008625
8626 ;;
8627*)
8628 extra_frameworks=""
8629 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008630 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008631 ;;
8632esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008633echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8634echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008635
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008636
8637case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008638 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008639 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008640 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8641 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008642 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8643 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008644 Darwin/*)
8645 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008646 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8647 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008648 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8649 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008650esac
8651
Martin v. Löwis11437992002-04-12 09:54:03 +00008652echo "$as_me:$LINENO: checking for --enable-framework" >&5
8653echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008654if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008655then
Jack Jansenca06bc62001-08-03 15:32:23 +00008656 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008657 # -U __environ is needed since bundles don't have access
8658 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008660 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008661
Jack Jansena3891ea2001-09-07 14:25:12 +00008662 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008663 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8664 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008665 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008666
Martin v. Löwis11437992002-04-12 09:54:03 +00008667cat >>confdefs.h <<\_ACEOF
8668#define WITH_NEXT_FRAMEWORK 1
8669_ACEOF
8670
8671 echo "$as_me:$LINENO: result: yes" >&5
8672echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008673else
Martin v. Löwis11437992002-04-12 09:54:03 +00008674 echo "$as_me:$LINENO: result: no" >&5
8675echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008676fi
8677
Martin v. Löwis11437992002-04-12 09:54:03 +00008678echo "$as_me:$LINENO: checking for dyld" >&5
8679echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008680case $ac_sys_system/$ac_sys_release in
8681 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008682
Martin v. Löwis11437992002-04-12 09:54:03 +00008683cat >>confdefs.h <<\_ACEOF
8684#define WITH_DYLD 1
8685_ACEOF
8686
8687 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8688echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008689 ;;
8690 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 echo "$as_me:$LINENO: result: no" >&5
8692echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008693 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008694esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008695
Guido van Rossum0a516c91994-09-12 10:58:40 +00008696# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008697
Michael W. Hudson54241132001-12-07 15:38:26 +00008698
8699
8700
8701
Guido van Rossum0a516c91994-09-12 10:58:40 +00008702# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008703# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008704echo "$as_me:$LINENO: checking SO" >&5
8705echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008706if test -z "$SO"
8707then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008708 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008709 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008710 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008711 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008712 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008713fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008714echo "$as_me:$LINENO: result: $SO" >&5
8715echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008716# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008717# -- "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 +00008718# (Shared libraries in this instance are shared modules to be loaded into
8719# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008720echo "$as_me:$LINENO: checking LDSHARED" >&5
8721echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008722if test -z "$LDSHARED"
8723then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008724 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008725 AIX*)
8726 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008727 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008728 ;;
8729 BeOS*)
8730 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008731 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008732 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008733 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008734 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008735 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008736 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00008737 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008738 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008739 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00008740 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008741 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008742 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8743 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008744 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008745 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8746 if test "$enable_framework" ; then
8747 # Link against the framework. All externals should be defined.
8748 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8749 else
8750 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008751 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008752 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008753 Darwin/*)
8754 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8755 if test "$enable_framework" ; then
8756 # Link against the framework. All externals should be defined.
8757 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8758 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008759 # No framework, use the Python app as bundle-loader
8760 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8761 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008762 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008763 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008764 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008765 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008766 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008767 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008768 then
8769 LDSHARED="cc -shared ${LDFLAGS}"
8770 else
8771 LDSHARED="ld -Bshareable ${LDFLAGS}"
8772 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008773 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008774 if test "$GCC" = "yes"
8775 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008776 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008777 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008778 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008779 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008780 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008781 *) LDSHARED="ld";;
8782 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008783fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008784echo "$as_me:$LINENO: result: $LDSHARED" >&5
8785echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008786BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008787# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008788# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008789echo "$as_me:$LINENO: checking CCSHARED" >&5
8790echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008791if test -z "$CCSHARED"
8792then
Guido van Rossum07397971997-04-29 21:49:50 +00008793 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008794 SunOS*) if test "$GCC" = yes;
8795 then CCSHARED="-fPIC";
8796 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008797 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008798 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008799 else CCSHARED="+z";
8800 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008801 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008802 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008803 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008804 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008805 if test "$GCC" = "yes"
8806 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008807 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008808 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008809 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008810 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008811 IRIX*/6*) case $CC in
8812 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008813 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008814 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008815 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008816 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008817fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008818echo "$as_me:$LINENO: result: $CCSHARED" >&5
8819echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008820# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008821# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008822echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8823echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008824if test -z "$LINKFORSHARED"
8825then
Guido van Rossum07397971997-04-29 21:49:50 +00008826 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008827 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008828 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008829 LINKFORSHARED="-Wl,-E -Wl,+s";;
8830# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008831 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008832 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008833 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008835 # -u __dummy makes the linker aware of the objc runtime
8836 # in System.framework; otherwise, __objcInit (referenced in
8837 # crt1.o) gets erroneously defined as common, which breaks dynamic
8838 # loading of any modules which reference it in System.framework.
8839 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8840 # not used by the core itself but which needs to be in the core so
8841 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008842 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008843 if test "$enable_framework"
8844 then
8845 LINKFORSHARED="$LINKFORSHARED -framework Python"
8846 fi
8847 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008848 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008849 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008850 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008852 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8853 then
8854 LINKFORSHARED="-Wl,--export-dynamic"
8855 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008856 SunOS/5*) case $CC in
8857 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008858 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008859 then
8860 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008861 fi;;
8862 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008863 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008864fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008865echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8866echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008867
Michael W. Hudson54241132001-12-07 15:38:26 +00008868
Martin v. Löwis11437992002-04-12 09:54:03 +00008869echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8870echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008871if test ! "$LIBRARY" = "$LDLIBRARY"
8872then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008873 case $ac_sys_system in
8874 CYGWIN*)
8875 # Cygwin needs CCSHARED when building extension DLLs
8876 # but not when building the interpreter DLL.
8877 CFLAGSFORSHARED='';;
8878 *)
8879 CFLAGSFORSHARED='$(CCSHARED)'
8880 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008881fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008882echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8883echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008884
Guido van Rossum627b2d71993-12-24 10:39:16 +00008885# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008886
8887echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8888echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8889if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8890 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008891else
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008893LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008894cat >conftest.$ac_ext <<_ACEOF
8895#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008896#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008897
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008898/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008899#ifdef __cplusplus
8900extern "C"
8901#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008902/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 builtin and then its argument prototype would still apply. */
8904char dlopen ();
8905#ifdef F77_DUMMY_MAIN
8906# ifdef __cplusplus
8907 extern "C"
8908# endif
8909 int F77_DUMMY_MAIN() { return 1; }
8910#endif
8911int
8912main ()
8913{
8914dlopen ();
8915 ;
8916 return 0;
8917}
8918_ACEOF
8919rm -f conftest.$ac_objext conftest$ac_exeext
8920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8921 (eval $ac_link) 2>&5
8922 ac_status=$?
8923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8924 (exit $ac_status); } &&
8925 { ac_try='test -s conftest$ac_exeext'
8926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8927 (eval $ac_try) 2>&5
8928 ac_status=$?
8929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8930 (exit $ac_status); }; }; then
8931 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008932else
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 echo "$as_me: failed program was:" >&5
8934cat conftest.$ac_ext >&5
8935ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008936fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008937rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8938LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008939fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008940echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8941echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8942if test $ac_cv_lib_dl_dlopen = yes; then
8943 cat >>confdefs.h <<_ACEOF
8944#define HAVE_LIBDL 1
8945_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008946
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008947 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008948
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008949fi
8950 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008951
8952echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8953echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8954if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8955 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008956else
Martin v. Löwis11437992002-04-12 09:54:03 +00008957 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008958LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008959cat >conftest.$ac_ext <<_ACEOF
8960#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008961#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008962
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008963/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008964#ifdef __cplusplus
8965extern "C"
8966#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008967/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 builtin and then its argument prototype would still apply. */
8969char shl_load ();
8970#ifdef F77_DUMMY_MAIN
8971# ifdef __cplusplus
8972 extern "C"
8973# endif
8974 int F77_DUMMY_MAIN() { return 1; }
8975#endif
8976int
8977main ()
8978{
8979shl_load ();
8980 ;
8981 return 0;
8982}
8983_ACEOF
8984rm -f conftest.$ac_objext conftest$ac_exeext
8985if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8986 (eval $ac_link) 2>&5
8987 ac_status=$?
8988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8989 (exit $ac_status); } &&
8990 { ac_try='test -s conftest$ac_exeext'
8991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8992 (eval $ac_try) 2>&5
8993 ac_status=$?
8994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8995 (exit $ac_status); }; }; then
8996 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008997else
Martin v. Löwis11437992002-04-12 09:54:03 +00008998 echo "$as_me: failed program was:" >&5
8999cat conftest.$ac_ext >&5
9000ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009001fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009002rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9003LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009004fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009005echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9006echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9007if test $ac_cv_lib_dld_shl_load = yes; then
9008 cat >>confdefs.h <<_ACEOF
9009#define HAVE_LIBDLD 1
9010_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009011
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009012 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009013
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009014fi
9015 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009016
9017echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9018echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9019if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9020 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009021else
Martin v. Löwis11437992002-04-12 09:54:03 +00009022 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009023LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009024cat >conftest.$ac_ext <<_ACEOF
9025#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009026#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009027
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009028/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009029#ifdef __cplusplus
9030extern "C"
9031#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009032/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009033 builtin and then its argument prototype would still apply. */
9034char sem_init ();
9035#ifdef F77_DUMMY_MAIN
9036# ifdef __cplusplus
9037 extern "C"
9038# endif
9039 int F77_DUMMY_MAIN() { return 1; }
9040#endif
9041int
9042main ()
9043{
9044sem_init ();
9045 ;
9046 return 0;
9047}
9048_ACEOF
9049rm -f conftest.$ac_objext conftest$ac_exeext
9050if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9051 (eval $ac_link) 2>&5
9052 ac_status=$?
9053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9054 (exit $ac_status); } &&
9055 { ac_try='test -s conftest$ac_exeext'
9056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9057 (eval $ac_try) 2>&5
9058 ac_status=$?
9059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9060 (exit $ac_status); }; }; then
9061 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009062else
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 echo "$as_me: failed program was:" >&5
9064cat conftest.$ac_ext >&5
9065ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009066fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009067rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9068LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009069fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009070echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9071echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9072if test $ac_cv_lib_rt_sem_init = yes; then
9073 cat >>confdefs.h <<_ACEOF
9074#define HAVE_LIBRT 1
9075_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009076
9077 LIBS="-lrt $LIBS"
9078
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009079fi
9080 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009081
9082# checks for system dependent C++ extensions support
9083case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9085echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9086 cat >conftest.$ac_ext <<_ACEOF
9087#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009088#include "confdefs.h"
9089#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009090#ifdef F77_DUMMY_MAIN
9091# ifdef __cplusplus
9092 extern "C"
9093# endif
9094 int F77_DUMMY_MAIN() { return 1; }
9095#endif
9096int
9097main ()
9098{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009099loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009100 ;
9101 return 0;
9102}
9103_ACEOF
9104rm -f conftest.$ac_objext conftest$ac_exeext
9105if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9106 (eval $ac_link) 2>&5
9107 ac_status=$?
9108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109 (exit $ac_status); } &&
9110 { ac_try='test -s conftest$ac_exeext'
9111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9112 (eval $ac_try) 2>&5
9113 ac_status=$?
9114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9115 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009116
Martin v. Löwis11437992002-04-12 09:54:03 +00009117cat >>confdefs.h <<\_ACEOF
9118#define AIX_GENUINE_CPLUSPLUS 1
9119_ACEOF
9120
9121 echo "$as_me:$LINENO: result: yes" >&5
9122echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009123else
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 echo "$as_me: failed program was:" >&5
9125cat conftest.$ac_ext >&5
9126echo "$as_me:$LINENO: result: no" >&5
9127echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009128fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009129rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009130 *) ;;
9131esac
9132
Guido van Rossum70c7f481998-03-26 18:44:10 +00009133# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9134# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009135# BeOS' sockets are stashed in libnet.
9136case "$ac_sys_system" in
9137IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009138*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009139echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9140echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9141if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9142 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009143else
Martin v. Löwis11437992002-04-12 09:54:03 +00009144 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009145LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009146cat >conftest.$ac_ext <<_ACEOF
9147#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009148#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009149
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009150/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009151#ifdef __cplusplus
9152extern "C"
9153#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009154/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 builtin and then its argument prototype would still apply. */
9156char t_open ();
9157#ifdef F77_DUMMY_MAIN
9158# ifdef __cplusplus
9159 extern "C"
9160# endif
9161 int F77_DUMMY_MAIN() { return 1; }
9162#endif
9163int
9164main ()
9165{
9166t_open ();
9167 ;
9168 return 0;
9169}
9170_ACEOF
9171rm -f conftest.$ac_objext conftest$ac_exeext
9172if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9173 (eval $ac_link) 2>&5
9174 ac_status=$?
9175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9176 (exit $ac_status); } &&
9177 { ac_try='test -s conftest$ac_exeext'
9178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9179 (eval $ac_try) 2>&5
9180 ac_status=$?
9181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9182 (exit $ac_status); }; }; then
9183 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009184else
Martin v. Löwis11437992002-04-12 09:54:03 +00009185 echo "$as_me: failed program was:" >&5
9186cat conftest.$ac_ext >&5
9187ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009188fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009189rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9190LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009191fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009192echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9193echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9194if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009195 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009196fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009197 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009198echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9199echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9200if test "${ac_cv_lib_socket_socket+set}" = set; then
9201 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009202else
Martin v. Löwis11437992002-04-12 09:54:03 +00009203 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009204LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009205cat >conftest.$ac_ext <<_ACEOF
9206#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009207#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009208
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009209/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009210#ifdef __cplusplus
9211extern "C"
9212#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009213/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009214 builtin and then its argument prototype would still apply. */
9215char socket ();
9216#ifdef F77_DUMMY_MAIN
9217# ifdef __cplusplus
9218 extern "C"
9219# endif
9220 int F77_DUMMY_MAIN() { return 1; }
9221#endif
9222int
9223main ()
9224{
9225socket ();
9226 ;
9227 return 0;
9228}
9229_ACEOF
9230rm -f conftest.$ac_objext conftest$ac_exeext
9231if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9232 (eval $ac_link) 2>&5
9233 ac_status=$?
9234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9235 (exit $ac_status); } &&
9236 { ac_try='test -s conftest$ac_exeext'
9237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9238 (eval $ac_try) 2>&5
9239 ac_status=$?
9240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9241 (exit $ac_status); }; }; then
9242 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009243else
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 echo "$as_me: failed program was:" >&5
9245cat conftest.$ac_ext >&5
9246ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009247fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009248rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9249LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009250fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009251echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9252echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9253if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009254 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009255fi
9256 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009257;;
9258esac
9259case "$ac_sys_system" in
9260BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009261echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9262echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9263if test "${ac_cv_lib_net_socket+set}" = set; then
9264 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009265else
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009267LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009268cat >conftest.$ac_ext <<_ACEOF
9269#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009270#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009271
Guido van Rossumad678af1998-10-02 14:42:15 +00009272/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009273#ifdef __cplusplus
9274extern "C"
9275#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009276/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009277 builtin and then its argument prototype would still apply. */
9278char socket ();
9279#ifdef F77_DUMMY_MAIN
9280# ifdef __cplusplus
9281 extern "C"
9282# endif
9283 int F77_DUMMY_MAIN() { return 1; }
9284#endif
9285int
9286main ()
9287{
9288socket ();
9289 ;
9290 return 0;
9291}
9292_ACEOF
9293rm -f conftest.$ac_objext conftest$ac_exeext
9294if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9295 (eval $ac_link) 2>&5
9296 ac_status=$?
9297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9298 (exit $ac_status); } &&
9299 { ac_try='test -s conftest$ac_exeext'
9300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9301 (eval $ac_try) 2>&5
9302 ac_status=$?
9303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9304 (exit $ac_status); }; }; then
9305 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009306else
Martin v. Löwis11437992002-04-12 09:54:03 +00009307 echo "$as_me: failed program was:" >&5
9308cat conftest.$ac_ext >&5
9309ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009310fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009311rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9312LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009313fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009314echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9315echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9316if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009317 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009318fi
9319 # BeOS
9320;;
9321esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009322
Martin v. Löwis11437992002-04-12 09:54:03 +00009323echo "$as_me:$LINENO: checking for --with-libs" >&5
9324echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9325
Guido van Rossuma68acba1996-07-31 17:36:39 +00009326# Check whether --with-libs or --without-libs was given.
9327if test "${with_libs+set}" = set; then
9328 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009329
9330echo "$as_me:$LINENO: result: $withval" >&5
9331echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009332LIBS="$withval $LIBS"
9333
9334else
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 echo "$as_me:$LINENO: result: no" >&5
9336echo "${ECHO_T}no" >&6
9337fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009338
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009339# Determine if signalmodule should be used.
9340
9341
Martin v. Löwis11437992002-04-12 09:54:03 +00009342echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9343echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9344
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009345# Check whether --with-signal-module or --without-signal-module was given.
9346if test "${with_signal_module+set}" = set; then
9347 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009348
Martin v. Löwis11437992002-04-12 09:54:03 +00009349fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009350
9351if test -z "$with_signal_module"
9352then with_signal_module="yes"
9353fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009354echo "$as_me:$LINENO: result: $with_signal_module" >&5
9355echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009356
9357if test "${with_signal_module}" = "yes"; then
9358 USE_SIGNAL_MODULE=""
9359 SIGNAL_OBJS=""
9360else
9361 USE_SIGNAL_MODULE="#"
9362 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9363fi
9364
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009365# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009366
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009367USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009368
Martin v. Löwis11437992002-04-12 09:54:03 +00009369echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9370echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9371
Guido van Rossumec2f0731997-01-22 20:54:01 +00009372
9373# Check whether --with-dec-threads or --without-dec-threads was given.
9374if test "${with_dec_threads+set}" = set; then
9375 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009376
9377echo "$as_me:$LINENO: result: $withval" >&5
9378echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009379LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009380if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009381 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009382fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009383else
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 echo "$as_me:$LINENO: result: no" >&5
9385echo "${ECHO_T}no" >&6
9386fi;
9387
9388# Templates for things AC_DEFINEd more than once.
9389# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009390
9391
Martin v. Löwis11437992002-04-12 09:54:03 +00009392
9393
9394
9395
9396
9397echo "$as_me:$LINENO: checking for --with-threads" >&5
9398echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9399
Guido van Rossumec2f0731997-01-22 20:54:01 +00009400# Check whether --with-threads or --without-threads was given.
9401if test "${with_threads+set}" = set; then
9402 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009403
Martin v. Löwis11437992002-04-12 09:54:03 +00009404fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009405
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009406# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009407
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009408# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009409if test "${with_thread+set}" = set; then
9410 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009411
Martin v. Löwis11437992002-04-12 09:54:03 +00009412with_threads=$with_thread
9413fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009414
9415if test -z "$with_threads"
9416then with_threads="yes"
9417fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009418echo "$as_me:$LINENO: result: $with_threads" >&5
9419echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009420
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009421
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009422if test "$with_threads" = "no"
9423then
9424 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009425elif test "$ac_cv_pthread_is_default" = yes
9426then
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009428#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009429_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009430
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009431 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009432 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009433#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009434_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009435
9436 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009438elif test "$ac_cv_kpthread" = "yes"
9439then
9440 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009442#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009443_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009444
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009445 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009446 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009447else
9448 if test ! -z "$with_threads" -a -d "$with_threads"
9449 then LDFLAGS="$LDFLAGS -L$with_threads"
9450 fi
9451 if test ! -z "$withval" -a -d "$withval"
9452 then LDFLAGS="$LDFLAGS -L$withval"
9453 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009454
9455 # According to the POSIX spec, a pthreads implementation must
9456 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9458echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9459 cat >conftest.$ac_ext <<_ACEOF
9460#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009461#include "confdefs.h"
9462#include <unistd.h>
9463 #ifdef _POSIX_THREADS
9464 yes
9465 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009466
9467_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9469 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009470 unistd_defines_pthreads=yes
9471else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009472 unistd_defines_pthreads=no
9473fi
9474rm -f conftest*
9475
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9477echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009478
Martin v. Löwis11437992002-04-12 09:54:03 +00009479 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009480#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009481_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009482
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 if test "${ac_cv_header_cthreads_h+set}" = set; then
9484 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9485echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9486if test "${ac_cv_header_cthreads_h+set}" = set; then
9487 echo $ECHO_N "(cached) $ECHO_C" >&6
9488fi
9489echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9490echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009491else
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 # Is the header compilable?
9493echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9494echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9495cat >conftest.$ac_ext <<_ACEOF
9496#line $LINENO "configure"
9497#include "confdefs.h"
9498$ac_includes_default
9499#include <cthreads.h>
9500_ACEOF
9501rm -f conftest.$ac_objext
9502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9503 (eval $ac_compile) 2>&5
9504 ac_status=$?
9505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9506 (exit $ac_status); } &&
9507 { ac_try='test -s conftest.$ac_objext'
9508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9509 (eval $ac_try) 2>&5
9510 ac_status=$?
9511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9512 (exit $ac_status); }; }; then
9513 ac_header_compiler=yes
9514else
9515 echo "$as_me: failed program was:" >&5
9516cat conftest.$ac_ext >&5
9517ac_header_compiler=no
9518fi
9519rm -f conftest.$ac_objext conftest.$ac_ext
9520echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9521echo "${ECHO_T}$ac_header_compiler" >&6
9522
9523# Is the header present?
9524echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9525echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9526cat >conftest.$ac_ext <<_ACEOF
9527#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009528#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009529#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009530_ACEOF
9531if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9532 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9533 ac_status=$?
9534 egrep -v '^ *\+' conftest.er1 >conftest.err
9535 rm -f conftest.er1
9536 cat conftest.err >&5
9537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9538 (exit $ac_status); } >/dev/null; then
9539 if test -s conftest.err; then
9540 ac_cpp_err=$ac_c_preproc_warn_flag
9541 else
9542 ac_cpp_err=
9543 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009544else
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 ac_cpp_err=yes
9546fi
9547if test -z "$ac_cpp_err"; then
9548 ac_header_preproc=yes
9549else
9550 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009551 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009552 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009554rm -f conftest.err conftest.$ac_ext
9555echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9556echo "${ECHO_T}$ac_header_preproc" >&6
9557
9558# So? What about this header?
9559case $ac_header_compiler:$ac_header_preproc in
9560 yes:no )
9561 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9562echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9563 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9564echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9565 no:yes )
9566 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9567echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9568 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9569echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9570 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9571echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9572esac
9573echo "$as_me:$LINENO: checking for cthreads.h" >&5
9574echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9575if test "${ac_cv_header_cthreads_h+set}" = set; then
9576 echo $ECHO_N "(cached) $ECHO_C" >&6
9577else
9578 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009579fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009580echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9581echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9582
9583fi
9584if test $ac_cv_header_cthreads_h = yes; then
9585 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009586#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009587_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009588
Martin v. Löwis11437992002-04-12 09:54:03 +00009589 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009590#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009591_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009592
Martin v. Löwis11437992002-04-12 09:54:03 +00009593
9594cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009595#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009596_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009597
9598 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009599 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009600else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009601
Martin v. Löwis11437992002-04-12 09:54:03 +00009602 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9603 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9604echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9605if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9606 echo $ECHO_N "(cached) $ECHO_C" >&6
9607fi
9608echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9609echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009610else
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 # Is the header compilable?
9612echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9613echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9614cat >conftest.$ac_ext <<_ACEOF
9615#line $LINENO "configure"
9616#include "confdefs.h"
9617$ac_includes_default
9618#include <mach/cthreads.h>
9619_ACEOF
9620rm -f conftest.$ac_objext
9621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9622 (eval $ac_compile) 2>&5
9623 ac_status=$?
9624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9625 (exit $ac_status); } &&
9626 { ac_try='test -s conftest.$ac_objext'
9627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9628 (eval $ac_try) 2>&5
9629 ac_status=$?
9630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9631 (exit $ac_status); }; }; then
9632 ac_header_compiler=yes
9633else
9634 echo "$as_me: failed program was:" >&5
9635cat conftest.$ac_ext >&5
9636ac_header_compiler=no
9637fi
9638rm -f conftest.$ac_objext conftest.$ac_ext
9639echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9640echo "${ECHO_T}$ac_header_compiler" >&6
9641
9642# Is the header present?
9643echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9644echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9645cat >conftest.$ac_ext <<_ACEOF
9646#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009647#include "confdefs.h"
9648#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009649_ACEOF
9650if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9651 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9652 ac_status=$?
9653 egrep -v '^ *\+' conftest.er1 >conftest.err
9654 rm -f conftest.er1
9655 cat conftest.err >&5
9656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9657 (exit $ac_status); } >/dev/null; then
9658 if test -s conftest.err; then
9659 ac_cpp_err=$ac_c_preproc_warn_flag
9660 else
9661 ac_cpp_err=
9662 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009663else
Martin v. Löwis11437992002-04-12 09:54:03 +00009664 ac_cpp_err=yes
9665fi
9666if test -z "$ac_cpp_err"; then
9667 ac_header_preproc=yes
9668else
9669 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009670 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009672fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009673rm -f conftest.err conftest.$ac_ext
9674echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9675echo "${ECHO_T}$ac_header_preproc" >&6
9676
9677# So? What about this header?
9678case $ac_header_compiler:$ac_header_preproc in
9679 yes:no )
9680 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9681echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9682 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9683echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9684 no:yes )
9685 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9686echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9687 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9688echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9689 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9690echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9691esac
9692echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9693echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9694if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9695 echo $ECHO_N "(cached) $ECHO_C" >&6
9696else
9697 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009698fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009699echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9700echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9701
9702fi
9703if test $ac_cv_header_mach_cthreads_h = yes; then
9704 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009705#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009706_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009707
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009709#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009710_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009711
Martin v. Löwis11437992002-04-12 09:54:03 +00009712
9713cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009714#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009715_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009716
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009717 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009718else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009719
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 echo "$as_me:$LINENO: checking for --with-pth" >&5
9721echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9722
9723# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009724if test "${with_pth+set}" = set; then
9725 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009726
Martin v. Löwis11437992002-04-12 09:54:03 +00009727 echo "$as_me:$LINENO: result: $withval" >&5
9728echo "${ECHO_T}$withval" >&6
9729 cat >>confdefs.h <<\_ACEOF
9730#define WITH_THREAD 1
9731_ACEOF
9732
9733
9734cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009735#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009736_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009737
Martin v. Löwis130fb172001-07-19 11:00:41 +00009738 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009739 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009740else
Martin v. Löwis11437992002-04-12 09:54:03 +00009741
9742 echo "$as_me:$LINENO: result: no" >&5
9743echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009744
9745 # Just looking for pthread_create in libpthread is not enough:
9746 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9747 # So we really have to include pthread.h, and then link.
9748 _libs=$LIBS
9749 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009750 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9751echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9752 cat >conftest.$ac_ext <<_ACEOF
9753#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009754#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009755#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009756
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009757void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009758#ifdef F77_DUMMY_MAIN
9759# ifdef __cplusplus
9760 extern "C"
9761# endif
9762 int F77_DUMMY_MAIN() { return 1; }
9763#endif
9764int
9765main ()
9766{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009767
9768pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 ;
9770 return 0;
9771}
9772_ACEOF
9773rm -f conftest.$ac_objext conftest$ac_exeext
9774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9775 (eval $ac_link) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); } &&
9779 { ac_try='test -s conftest$ac_exeext'
9780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9781 (eval $ac_try) 2>&5
9782 ac_status=$?
9783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9784 (exit $ac_status); }; }; then
9785
9786 echo "$as_me:$LINENO: result: yes" >&5
9787echo "${ECHO_T}yes" >&6
9788 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009789#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009790_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009791
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009792 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009793 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009794else
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 echo "$as_me: failed program was:" >&5
9796cat conftest.$ac_ext >&5
9797
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009798 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9800echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9801if test "${ac_cv_func_pthread_detach+set}" = set; then
9802 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009803else
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 cat >conftest.$ac_ext <<_ACEOF
9805#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009806#include "confdefs.h"
9807/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009808 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009809#include <assert.h>
9810/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009811#ifdef __cplusplus
9812extern "C"
9813#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009814/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009815 builtin and then its argument prototype would still apply. */
9816char pthread_detach ();
9817char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009818
Martin v. Löwis11437992002-04-12 09:54:03 +00009819#ifdef F77_DUMMY_MAIN
9820# ifdef __cplusplus
9821 extern "C"
9822# endif
9823 int F77_DUMMY_MAIN() { return 1; }
9824#endif
9825int
9826main ()
9827{
Guido van Rossumad678af1998-10-02 14:42:15 +00009828/* The GNU C library defines this for functions which it implements
9829 to always fail with ENOSYS. Some functions are actually named
9830 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009831#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009832choke me
9833#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009834f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009835#endif
9836
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 ;
9838 return 0;
9839}
9840_ACEOF
9841rm -f conftest.$ac_objext conftest$ac_exeext
9842if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9843 (eval $ac_link) 2>&5
9844 ac_status=$?
9845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846 (exit $ac_status); } &&
9847 { ac_try='test -s conftest$ac_exeext'
9848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9849 (eval $ac_try) 2>&5
9850 ac_status=$?
9851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9852 (exit $ac_status); }; }; then
9853 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009854else
Martin v. Löwis11437992002-04-12 09:54:03 +00009855 echo "$as_me: failed program was:" >&5
9856cat conftest.$ac_ext >&5
9857ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009858fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009859rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009860fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009861echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9862echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9863if test $ac_cv_func_pthread_detach = yes; then
9864 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009865#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009866_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009867
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009868 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009869 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009870else
Guido van Rossumad678af1998-10-02 14:42:15 +00009871
Martin v. Löwis11437992002-04-12 09:54:03 +00009872 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9873 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9874echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9875if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9876 echo $ECHO_N "(cached) $ECHO_C" >&6
9877fi
9878echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9879echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009880else
Martin v. Löwis11437992002-04-12 09:54:03 +00009881 # Is the header compilable?
9882echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
9883echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
9884cat >conftest.$ac_ext <<_ACEOF
9885#line $LINENO "configure"
9886#include "confdefs.h"
9887$ac_includes_default
9888#include <kernel/OS.h>
9889_ACEOF
9890rm -f conftest.$ac_objext
9891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9892 (eval $ac_compile) 2>&5
9893 ac_status=$?
9894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9895 (exit $ac_status); } &&
9896 { ac_try='test -s conftest.$ac_objext'
9897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9898 (eval $ac_try) 2>&5
9899 ac_status=$?
9900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9901 (exit $ac_status); }; }; then
9902 ac_header_compiler=yes
9903else
9904 echo "$as_me: failed program was:" >&5
9905cat conftest.$ac_ext >&5
9906ac_header_compiler=no
9907fi
9908rm -f conftest.$ac_objext conftest.$ac_ext
9909echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9910echo "${ECHO_T}$ac_header_compiler" >&6
9911
9912# Is the header present?
9913echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
9914echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
9915cat >conftest.$ac_ext <<_ACEOF
9916#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009917#include "confdefs.h"
9918#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009919_ACEOF
9920if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9921 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9922 ac_status=$?
9923 egrep -v '^ *\+' conftest.er1 >conftest.err
9924 rm -f conftest.er1
9925 cat conftest.err >&5
9926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9927 (exit $ac_status); } >/dev/null; then
9928 if test -s conftest.err; then
9929 ac_cpp_err=$ac_c_preproc_warn_flag
9930 else
9931 ac_cpp_err=
9932 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009933else
Martin v. Löwis11437992002-04-12 09:54:03 +00009934 ac_cpp_err=yes
9935fi
9936if test -z "$ac_cpp_err"; then
9937 ac_header_preproc=yes
9938else
9939 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009940 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009941 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009942fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009943rm -f conftest.err conftest.$ac_ext
9944echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9945echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009946
Martin v. Löwis11437992002-04-12 09:54:03 +00009947# So? What about this header?
9948case $ac_header_compiler:$ac_header_preproc in
9949 yes:no )
9950 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
9951echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9952 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9953echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9954 no:yes )
9955 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
9956echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
9957 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
9958echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
9959 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9960echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9961esac
9962echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9963echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9964if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9965 echo $ECHO_N "(cached) $ECHO_C" >&6
9966else
9967 ac_cv_header_kernel_OS_h=$ac_header_preproc
9968fi
9969echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9970echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
9971
9972fi
9973if test $ac_cv_header_kernel_OS_h = yes; then
9974 cat >>confdefs.h <<\_ACEOF
9975#define WITH_THREAD 1
9976_ACEOF
9977
9978
9979cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009980#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009981_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009982
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009983 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009984else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009985
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
9987echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
9988if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
9989 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009990else
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009992LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009993cat >conftest.$ac_ext <<_ACEOF
9994#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00009995#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009996
Greg Steinadf63d62000-07-05 10:38:09 +00009997/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009998#ifdef __cplusplus
9999extern "C"
10000#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010001/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 builtin and then its argument prototype would still apply. */
10003char pthread_create ();
10004#ifdef F77_DUMMY_MAIN
10005# ifdef __cplusplus
10006 extern "C"
10007# endif
10008 int F77_DUMMY_MAIN() { return 1; }
10009#endif
10010int
10011main ()
10012{
10013pthread_create ();
10014 ;
10015 return 0;
10016}
10017_ACEOF
10018rm -f conftest.$ac_objext conftest$ac_exeext
10019if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10020 (eval $ac_link) 2>&5
10021 ac_status=$?
10022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10023 (exit $ac_status); } &&
10024 { ac_try='test -s conftest$ac_exeext'
10025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10026 (eval $ac_try) 2>&5
10027 ac_status=$?
10028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10029 (exit $ac_status); }; }; then
10030 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010031else
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 echo "$as_me: failed program was:" >&5
10033cat conftest.$ac_ext >&5
10034ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010036rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10037LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010038fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010039echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10040echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10041if test $ac_cv_lib_pthreads_pthread_create = yes; then
10042 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010043#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010044_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010045
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010046 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010047 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010048 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010049else
Greg Steinadf63d62000-07-05 10:38:09 +000010050
Martin v. Löwis11437992002-04-12 09:54:03 +000010051 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10052echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10053if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10054 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010055else
Martin v. Löwis11437992002-04-12 09:54:03 +000010056 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010057LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010058cat >conftest.$ac_ext <<_ACEOF
10059#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010060#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010061
Guido van Rossum49545951997-12-02 19:28:29 +000010062/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010063#ifdef __cplusplus
10064extern "C"
10065#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010066/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010067 builtin and then its argument prototype would still apply. */
10068char pthread_create ();
10069#ifdef F77_DUMMY_MAIN
10070# ifdef __cplusplus
10071 extern "C"
10072# endif
10073 int F77_DUMMY_MAIN() { return 1; }
10074#endif
10075int
10076main ()
10077{
10078pthread_create ();
10079 ;
10080 return 0;
10081}
10082_ACEOF
10083rm -f conftest.$ac_objext conftest$ac_exeext
10084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10085 (eval $ac_link) 2>&5
10086 ac_status=$?
10087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10088 (exit $ac_status); } &&
10089 { ac_try='test -s conftest$ac_exeext'
10090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10091 (eval $ac_try) 2>&5
10092 ac_status=$?
10093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10094 (exit $ac_status); }; }; then
10095 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010096else
Martin v. Löwis11437992002-04-12 09:54:03 +000010097 echo "$as_me: failed program was:" >&5
10098cat conftest.$ac_ext >&5
10099ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010100fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010101rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10102LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010103fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010104echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10105echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10106if test $ac_cv_lib_c_r_pthread_create = yes; then
10107 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010108#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010109_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010110
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010111 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010112 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010113 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010114else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010115
Martin v. Löwis11437992002-04-12 09:54:03 +000010116 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10117echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10118if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10119 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010120else
Martin v. Löwis11437992002-04-12 09:54:03 +000010121 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010122LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010123cat >conftest.$ac_ext <<_ACEOF
10124#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010125#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010126
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010127/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010128#ifdef __cplusplus
10129extern "C"
10130#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010131/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 builtin and then its argument prototype would still apply. */
10133char __d6_pthread_create ();
10134#ifdef F77_DUMMY_MAIN
10135# ifdef __cplusplus
10136 extern "C"
10137# endif
10138 int F77_DUMMY_MAIN() { return 1; }
10139#endif
10140int
10141main ()
10142{
10143__d6_pthread_create ();
10144 ;
10145 return 0;
10146}
10147_ACEOF
10148rm -f conftest.$ac_objext conftest$ac_exeext
10149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10150 (eval $ac_link) 2>&5
10151 ac_status=$?
10152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153 (exit $ac_status); } &&
10154 { ac_try='test -s conftest$ac_exeext'
10155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10156 (eval $ac_try) 2>&5
10157 ac_status=$?
10158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10159 (exit $ac_status); }; }; then
10160 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010161else
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 echo "$as_me: failed program was:" >&5
10163cat conftest.$ac_ext >&5
10164ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010165fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010166rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10167LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010168fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010169echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10170echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10171if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10172 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010173#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010174_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010175
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010176 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010177 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010178 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010179else
Guido van Rossum49545951997-12-02 19:28:29 +000010180
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10182echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10183if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10184 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010185else
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010187LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010188cat >conftest.$ac_ext <<_ACEOF
10189#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010190#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010191
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010192/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010193#ifdef __cplusplus
10194extern "C"
10195#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010196/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 builtin and then its argument prototype would still apply. */
10198char __pthread_create_system ();
10199#ifdef F77_DUMMY_MAIN
10200# ifdef __cplusplus
10201 extern "C"
10202# endif
10203 int F77_DUMMY_MAIN() { return 1; }
10204#endif
10205int
10206main ()
10207{
10208__pthread_create_system ();
10209 ;
10210 return 0;
10211}
10212_ACEOF
10213rm -f conftest.$ac_objext conftest$ac_exeext
10214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10215 (eval $ac_link) 2>&5
10216 ac_status=$?
10217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10218 (exit $ac_status); } &&
10219 { ac_try='test -s conftest$ac_exeext'
10220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10221 (eval $ac_try) 2>&5
10222 ac_status=$?
10223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10224 (exit $ac_status); }; }; then
10225 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010226else
Martin v. Löwis11437992002-04-12 09:54:03 +000010227 echo "$as_me: failed program was:" >&5
10228cat conftest.$ac_ext >&5
10229ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010231rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10232LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010233fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010234echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10235echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10236if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10237 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010238#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010239_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010240
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010241 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010242 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010243 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010244else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010245
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10247echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10248if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10249 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010250else
Martin v. Löwis11437992002-04-12 09:54:03 +000010251 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010252LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010253cat >conftest.$ac_ext <<_ACEOF
10254#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010255#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010256
Guido van Rossumb93a8621998-05-07 13:27:32 +000010257/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010258#ifdef __cplusplus
10259extern "C"
10260#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010261/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 builtin and then its argument prototype would still apply. */
10263char pthread_create ();
10264#ifdef F77_DUMMY_MAIN
10265# ifdef __cplusplus
10266 extern "C"
10267# endif
10268 int F77_DUMMY_MAIN() { return 1; }
10269#endif
10270int
10271main ()
10272{
10273pthread_create ();
10274 ;
10275 return 0;
10276}
10277_ACEOF
10278rm -f conftest.$ac_objext conftest$ac_exeext
10279if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10280 (eval $ac_link) 2>&5
10281 ac_status=$?
10282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10283 (exit $ac_status); } &&
10284 { ac_try='test -s conftest$ac_exeext'
10285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10286 (eval $ac_try) 2>&5
10287 ac_status=$?
10288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10289 (exit $ac_status); }; }; then
10290 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010291else
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 echo "$as_me: failed program was:" >&5
10293cat conftest.$ac_ext >&5
10294ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010295fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010296rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10297LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010298fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010299echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10300echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10301if test $ac_cv_lib_cma_pthread_create = yes; then
10302 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010303#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010304_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010305
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010306 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010307 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010308 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010309else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010310
Martin v. Löwis130fb172001-07-19 11:00:41 +000010311 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010312fi
10313
Guido van Rossum627b2d71993-12-24 10:39:16 +000010314
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010315fi
10316
Guido van Rossum0be3e491997-05-22 20:33:33 +000010317fi
10318
Guido van Rossum49545951997-12-02 19:28:29 +000010319fi
10320
Guido van Rossumb93a8621998-05-07 13:27:32 +000010321fi
10322
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010323fi
10324
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010325
Michael W. Hudson54241132001-12-07 15:38:26 +000010326fi
10327
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010328fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010329rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10330fi;
10331fi
10332
10333
10334fi
10335
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010336
Michael W. Hudson54241132001-12-07 15:38:26 +000010337
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010338 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010339 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010340
10341cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010342#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010343_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010344
10345 fi
10346
Martin v. Löwis11437992002-04-12 09:54:03 +000010347 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10348echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10349 if test "${ac_cv_pthread_system_supported+set}" = set; then
10350 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010351else
10352 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010353 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010354else
Martin v. Löwis11437992002-04-12 09:54:03 +000010355 cat >conftest.$ac_ext <<_ACEOF
10356#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010357#include "confdefs.h"
10358#include <pthread.h>
10359 void *foo(void *parm) {
10360 return NULL;
10361 }
10362 main() {
10363 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010364 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010365 if (pthread_attr_init(&attr)) exit(-1);
10366 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010367 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010368 exit(0);
10369 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010370_ACEOF
10371rm -f conftest$ac_exeext
10372if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10373 (eval $ac_link) 2>&5
10374 ac_status=$?
10375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10376 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10378 (eval $ac_try) 2>&5
10379 ac_status=$?
10380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10381 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010382 ac_cv_pthread_system_supported=yes
10383else
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 echo "$as_me: program exited with status $ac_status" >&5
10385echo "$as_me: failed program was:" >&5
10386cat conftest.$ac_ext >&5
10387( exit $ac_status )
10388ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010389fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010390rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010391fi
10392
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010393fi
10394
Martin v. Löwis11437992002-04-12 09:54:03 +000010395 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10396echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010397 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010398
10399cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010400#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010401_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010402
10403 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010404
10405for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010406do
Martin v. Löwis11437992002-04-12 09:54:03 +000010407as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10408echo "$as_me:$LINENO: checking for $ac_func" >&5
10409echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10410if eval "test \"\${$as_ac_var+set}\" = set"; then
10411 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010412else
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 cat >conftest.$ac_ext <<_ACEOF
10414#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010415#include "confdefs.h"
10416/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010418#include <assert.h>
10419/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010420#ifdef __cplusplus
10421extern "C"
10422#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010423/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010424 builtin and then its argument prototype would still apply. */
10425char $ac_func ();
10426char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010427
Martin v. Löwis11437992002-04-12 09:54:03 +000010428#ifdef F77_DUMMY_MAIN
10429# ifdef __cplusplus
10430 extern "C"
10431# endif
10432 int F77_DUMMY_MAIN() { return 1; }
10433#endif
10434int
10435main ()
10436{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010437/* The GNU C library defines this for functions which it implements
10438 to always fail with ENOSYS. Some functions are actually named
10439 something starting with __ and the normal name is an alias. */
10440#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10441choke me
10442#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010443f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010444#endif
10445
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 ;
10447 return 0;
10448}
10449_ACEOF
10450rm -f conftest.$ac_objext conftest$ac_exeext
10451if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10452 (eval $ac_link) 2>&5
10453 ac_status=$?
10454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10455 (exit $ac_status); } &&
10456 { ac_try='test -s conftest$ac_exeext'
10457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10458 (eval $ac_try) 2>&5
10459 ac_status=$?
10460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10461 (exit $ac_status); }; }; then
10462 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010463else
Martin v. Löwis11437992002-04-12 09:54:03 +000010464 echo "$as_me: failed program was:" >&5
10465cat conftest.$ac_ext >&5
10466eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010467fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010468rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010469fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010470echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10471echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10472if test `eval echo '${'$as_ac_var'}'` = yes; then
10473 cat >>confdefs.h <<_ACEOF
10474#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10475_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010476
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010477fi
10478done
10479
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010480 fi
10481
Martin v. Löwis11437992002-04-12 09:54:03 +000010482 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10483echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10484if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10485 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010486else
Martin v. Löwis11437992002-04-12 09:54:03 +000010487 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010488LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010489cat >conftest.$ac_ext <<_ACEOF
10490#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010491#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010492
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010493/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010494#ifdef __cplusplus
10495extern "C"
10496#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010497/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010498 builtin and then its argument prototype would still apply. */
10499char usconfig ();
10500#ifdef F77_DUMMY_MAIN
10501# ifdef __cplusplus
10502 extern "C"
10503# endif
10504 int F77_DUMMY_MAIN() { return 1; }
10505#endif
10506int
10507main ()
10508{
10509usconfig ();
10510 ;
10511 return 0;
10512}
10513_ACEOF
10514rm -f conftest.$ac_objext conftest$ac_exeext
10515if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10516 (eval $ac_link) 2>&5
10517 ac_status=$?
10518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10519 (exit $ac_status); } &&
10520 { ac_try='test -s conftest$ac_exeext'
10521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10522 (eval $ac_try) 2>&5
10523 ac_status=$?
10524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10525 (exit $ac_status); }; }; then
10526 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010527else
Martin v. Löwis11437992002-04-12 09:54:03 +000010528 echo "$as_me: failed program was:" >&5
10529cat conftest.$ac_ext >&5
10530ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010531fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010532rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10533LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010534fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010535echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10536echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10537if test $ac_cv_lib_mpc_usconfig = yes; then
10538 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010539#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010540_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010541
Martin v. Löwis130fb172001-07-19 11:00:41 +000010542 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010543 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010544 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010545fi
10546
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010547
Martin v. Löwis11437992002-04-12 09:54:03 +000010548 if test $posix_threads != "yes"; then
10549 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10550echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10551if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10552 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010553else
Martin v. Löwis11437992002-04-12 09:54:03 +000010554 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010555LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010556cat >conftest.$ac_ext <<_ACEOF
10557#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010558#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010559
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010560/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010561#ifdef __cplusplus
10562extern "C"
10563#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010564/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010565 builtin and then its argument prototype would still apply. */
10566char thr_create ();
10567#ifdef F77_DUMMY_MAIN
10568# ifdef __cplusplus
10569 extern "C"
10570# endif
10571 int F77_DUMMY_MAIN() { return 1; }
10572#endif
10573int
10574main ()
10575{
10576thr_create ();
10577 ;
10578 return 0;
10579}
10580_ACEOF
10581rm -f conftest.$ac_objext conftest$ac_exeext
10582if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10583 (eval $ac_link) 2>&5
10584 ac_status=$?
10585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10586 (exit $ac_status); } &&
10587 { ac_try='test -s conftest$ac_exeext'
10588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10589 (eval $ac_try) 2>&5
10590 ac_status=$?
10591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10592 (exit $ac_status); }; }; then
10593 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010594else
Martin v. Löwis11437992002-04-12 09:54:03 +000010595 echo "$as_me: failed program was:" >&5
10596cat conftest.$ac_ext >&5
10597ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010598fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010599rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10600LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010601fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010602echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10603echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10604if test $ac_cv_lib_thread_thr_create = yes; then
10605 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010606#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010607_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010608
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010609 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010610 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010611 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010612fi
10613
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010614 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010615
Martin v. Löwis130fb172001-07-19 11:00:41 +000010616 if test "$USE_THREAD_MODULE" != "#"
10617 then
10618 # If the above checks didn't disable threads, (at least) OSF1
10619 # needs this '-threads' argument during linking.
10620 case $ac_sys_system in
10621 OSF1) LDLAST=-threads;;
10622 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010623 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010624fi
10625
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010626# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010627
10628
10629echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10630echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010631# Check whether --enable-ipv6 or --disable-ipv6 was given.
10632if test "${enable_ipv6+set}" = set; then
10633 enableval="$enable_ipv6"
10634 case "$enableval" in
10635 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010636 echo "$as_me:$LINENO: result: no" >&5
10637echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010638 ipv6=no
10639 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010640 *) echo "$as_me:$LINENO: result: yes" >&5
10641echo "${ECHO_T}yes" >&6
10642 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010643#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010644_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010645
10646 ipv6=yes
10647 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010648 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010649else
Martin v. Löwis11437992002-04-12 09:54:03 +000010650
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010651 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 echo "$as_me:$LINENO: result: no" >&5
10653echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010654 ipv6=no
10655
10656else
Martin v. Löwis11437992002-04-12 09:54:03 +000010657 cat >conftest.$ac_ext <<_ACEOF
10658#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010659#include "confdefs.h"
10660 /* AF_INET6 available check */
10661#include <sys/types.h>
10662#include <sys/socket.h>
10663main()
10664{
10665 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10666 exit(1);
10667 else
10668 exit(0);
10669}
10670
Martin v. Löwis11437992002-04-12 09:54:03 +000010671_ACEOF
10672rm -f 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); } && { ac_try='./conftest$ac_exeext'
10678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10679 (eval $ac_try) 2>&5
10680 ac_status=$?
10681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10682 (exit $ac_status); }; }; then
10683 echo "$as_me:$LINENO: result: yes" >&5
10684echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010685 ipv6=yes
10686else
Martin v. Löwis11437992002-04-12 09:54:03 +000010687 echo "$as_me: program exited with status $ac_status" >&5
10688echo "$as_me: failed program was:" >&5
10689cat conftest.$ac_ext >&5
10690( exit $ac_status )
10691echo "$as_me:$LINENO: result: no" >&5
10692echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010693 ipv6=no
10694fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010695rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010696fi
10697
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010698if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010699 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10700echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10701 cat >conftest.$ac_ext <<_ACEOF
10702#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010703#include "confdefs.h"
10704#include <sys/types.h>
10705#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010706#ifdef F77_DUMMY_MAIN
10707# ifdef __cplusplus
10708 extern "C"
10709# endif
10710 int F77_DUMMY_MAIN() { return 1; }
10711#endif
10712int
10713main ()
10714{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010715struct sockaddr_in6 x;
10716x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010717 ;
10718 return 0;
10719}
10720_ACEOF
10721rm -f conftest.$ac_objext
10722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10723 (eval $ac_compile) 2>&5
10724 ac_status=$?
10725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10726 (exit $ac_status); } &&
10727 { ac_try='test -s conftest.$ac_objext'
10728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10729 (eval $ac_try) 2>&5
10730 ac_status=$?
10731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10732 (exit $ac_status); }; }; then
10733 echo "$as_me:$LINENO: result: yes" >&5
10734echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010735 ipv6=yes
10736else
Martin v. Löwis11437992002-04-12 09:54:03 +000010737 echo "$as_me: failed program was:" >&5
10738cat conftest.$ac_ext >&5
10739echo "$as_me:$LINENO: result: no" >&5
10740echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010741 ipv6=no
10742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010743rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010744fi
10745
10746if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010747 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010748#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010749_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010750
10751fi
10752
Martin v. Löwis11437992002-04-12 09:54:03 +000010753fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010754
10755ipv6type=unknown
10756ipv6lib=none
10757ipv6trylibc=no
10758
10759if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10761echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010762 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10763 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010764 case $i in
10765 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010766 cat >conftest.$ac_ext <<_ACEOF
10767#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010768#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010769
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770#include <netinet/in.h>
10771#ifdef IPV6_INRIA_VERSION
10772yes
10773#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010774_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010775if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10776 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010777 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778fi
10779rm -f conftest*
10780
10781 ;;
10782 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010783 cat >conftest.$ac_ext <<_ACEOF
10784#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010786
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787#include <netinet/in.h>
10788#ifdef __KAME__
10789yes
10790#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010791_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10793 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010794 ipv6type=$i;
10795 ipv6lib=inet6
10796 ipv6libdir=/usr/local/v6/lib
10797 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798fi
10799rm -f conftest*
10800
10801 ;;
10802 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010803 cat >conftest.$ac_ext <<_ACEOF
10804#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010805#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010806
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807#include <features.h>
10808#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10809yes
10810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010811_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10813 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814 ipv6type=$i;
10815 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816fi
10817rm -f conftest*
10818
10819 ;;
10820 linux-inet6)
10821 if test -d /usr/inet6; then
10822 ipv6type=$i
10823 ipv6lib=inet6
10824 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010825 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010826 fi
10827 ;;
10828 solaris)
10829 if test -f /etc/netconfig; then
10830 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10831 ipv6type=$i
10832 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833 fi
10834 fi
10835 ;;
10836 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010837 cat >conftest.$ac_ext <<_ACEOF
10838#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010839#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010840
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841#include <sys/param.h>
10842#ifdef _TOSHIBA_INET6
10843yes
10844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010845_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10847 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848 ipv6type=$i;
10849 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010850 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851fi
10852rm -f conftest*
10853
10854 ;;
10855 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000010856 cat >conftest.$ac_ext <<_ACEOF
10857#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010858#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010859
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860#include </usr/local/v6/include/sys/v6config.h>
10861#ifdef __V6D__
10862yes
10863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010864_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10866 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010867 ipv6type=$i;
10868 ipv6lib=v6;
10869 ipv6libdir=/usr/local/v6/lib;
10870 OPT="-I/usr/local/v6/include $OPT"
10871fi
10872rm -f conftest*
10873
10874 ;;
10875 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000010876 cat >conftest.$ac_ext <<_ACEOF
10877#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010878#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010879
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880#include <sys/param.h>
10881#ifdef _ZETA_MINAMI_INET6
10882yes
10883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010884_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10886 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010887 ipv6type=$i;
10888 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010889 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010890fi
10891rm -f conftest*
10892
10893 ;;
10894 esac
10895 if test "$ipv6type" != "unknown"; then
10896 break
10897 fi
10898 done
Martin v. Löwis11437992002-04-12 09:54:03 +000010899 echo "$as_me:$LINENO: result: $ipv6type" >&5
10900echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010901fi
10902
10903if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10904 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10905 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10906 echo "using lib$ipv6lib"
10907 else
10908 if test $ipv6trylibc = "yes"; then
10909 echo "using libc"
10910 else
10911 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10912 echo "You need to fetch lib$ipv6lib.a from appropriate"
10913 echo 'ipv6 kit and compile beforehand.'
10914 exit 1
10915 fi
10916 fi
10917fi
10918
Barry Warsawef82cd72000-06-30 16:21:01 +000010919# Check for GC support
Martin v. Löwis11437992002-04-12 09:54:03 +000010920echo "$as_me:$LINENO: checking for --with-cycle-gc" >&5
10921echo $ECHO_N "checking for --with-cycle-gc... $ECHO_C" >&6
10922
Barry Warsawef82cd72000-06-30 16:21:01 +000010923# Check whether --with-cycle-gc or --without-cycle-gc was given.
10924if test "${with_cycle_gc+set}" = set; then
10925 withval="$with_cycle_gc"
Barry Warsawef82cd72000-06-30 16:21:01 +000010926
Martin v. Löwis11437992002-04-12 09:54:03 +000010927fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000010928
10929if test -z "$with_cycle_gc"
10930then with_cycle_gc="yes"
10931fi
Neil Schemenauercf229462001-08-29 23:58:47 +000010932if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +000010933then
Martin v. Löwis11437992002-04-12 09:54:03 +000010934
10935cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010936#define WITH_CYCLE_GC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010937_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010938
10939fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010940echo "$as_me:$LINENO: result: $with_cycle_gc" >&5
10941echo "${ECHO_T}$with_cycle_gc" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000010942
Jack Jansen7b8c7542002-04-14 20:12:41 +000010943# Check for universal newline support
10944echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
10945echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
10946
10947# Check whether --with-universal-newlines or --without-universal-newlines was given.
10948if test "${with_universal_newlines+set}" = set; then
10949 withval="$with_universal_newlines"
10950
10951fi;
10952
10953if test -z "$with_universal_newlines"
10954then with_universal_newlines="yes"
10955fi
10956if test "$with_universal_newlines" != "no"
10957then
Martin v. Löwise8aea582002-04-16 05:51:02 +000010958
10959cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000010960#define WITH_UNIVERSAL_NEWLINES 1
10961_ACEOF
10962
10963fi
10964echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
10965echo "${ECHO_T}$with_universal_newlines" >&6
10966
Neil Schemenauera35c6882001-02-27 04:45:05 +000010967# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000010968echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
10969echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
10970
Neil Schemenauera35c6882001-02-27 04:45:05 +000010971# Check whether --with-pymalloc or --without-pymalloc was given.
10972if test "${with_pymalloc+set}" = set; then
10973 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000010974
Martin v. Löwis11437992002-04-12 09:54:03 +000010975fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000010976
Neil Schemenauer16c22972002-03-22 15:34:49 +000010977if test -z "$with_pymalloc"
10978then with_pymalloc="yes"
10979fi
10980if test "$with_pymalloc" != "no"
10981then
Martin v. Löwis11437992002-04-12 09:54:03 +000010982
10983cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000010984#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010985_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000010986
10987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010988echo "$as_me:$LINENO: result: $with_pymalloc" >&5
10989echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000010990
Barry Warsawef82cd72000-06-30 16:21:01 +000010991# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000010992echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
10993echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
10994
Barry Warsawef82cd72000-06-30 16:21:01 +000010995# Check whether --with-wctype-functions or --without-wctype-functions was given.
10996if test "${with_wctype_functions+set}" = set; then
10997 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000010998
Barry Warsawef82cd72000-06-30 16:21:01 +000010999if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011000then
11001
11002cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011003#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011004_ACEOF
11005
11006 echo "$as_me:$LINENO: result: yes" >&5
11007echo "${ECHO_T}yes" >&6
11008else echo "$as_me:$LINENO: result: no" >&5
11009echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011010fi
11011else
Martin v. Löwis11437992002-04-12 09:54:03 +000011012 echo "$as_me:$LINENO: result: no" >&5
11013echo "${ECHO_T}no" >&6
11014fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011015
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011016# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011017
Guido van Rossum98935bf2001-09-05 19:13:16 +000011018DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011019
Martin v. Löwis11437992002-04-12 09:54:03 +000011020echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11021echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11022
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011023# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011024if test "${with_sgi_dl+set}" = set; then
11025 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011026
11027echo "$as_me:$LINENO: result: $withval" >&5
11028echo "${ECHO_T}$withval" >&6
11029
11030cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011031#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011032_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011033
Guido van Rossume97ee181999-12-20 21:27:22 +000011034DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011035dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011036if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011037then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011038else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11039echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11040 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011041fi
11042DLINCLDIR=${dldir}
11043LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011044else
Martin v. Löwis11437992002-04-12 09:54:03 +000011045 echo "$as_me:$LINENO: result: no" >&5
11046echo "${ECHO_T}no" >&6
11047fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011048
Martin v. Löwis11437992002-04-12 09:54:03 +000011049echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11050echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011051
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011052# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011053if test "${with_dl_dld+set}" = set; then
11054 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011055
11056echo "$as_me:$LINENO: result: $withval" >&5
11057echo "${ECHO_T}$withval" >&6
11058
11059cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011060#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011061_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011062
Guido van Rossume97ee181999-12-20 21:27:22 +000011063DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011064dldir=`echo "$withval" | sed 's/,.*//'`
11065dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011066if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011067then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011068else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11069echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11070 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011071fi
11072DLINCLDIR=${dldir}
11073LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011074else
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 echo "$as_me:$LINENO: result: no" >&5
11076echo "${ECHO_T}no" >&6
11077fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011078
Guido van Rossume97ee181999-12-20 21:27:22 +000011079# the dlopen() function means we might want to use dynload_shlib.o. some
11080# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011081
Thomas Wouters3a584202000-08-05 23:28:51 +000011082for ac_func in dlopen
11083do
Martin v. Löwis11437992002-04-12 09:54:03 +000011084as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11085echo "$as_me:$LINENO: checking for $ac_func" >&5
11086echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11087if eval "test \"\${$as_ac_var+set}\" = set"; then
11088 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011089else
Martin v. Löwis11437992002-04-12 09:54:03 +000011090 cat >conftest.$ac_ext <<_ACEOF
11091#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011092#include "confdefs.h"
11093/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011094 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011095#include <assert.h>
11096/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011097#ifdef __cplusplus
11098extern "C"
11099#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011100/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011101 builtin and then its argument prototype would still apply. */
11102char $ac_func ();
11103char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011104
Martin v. Löwis11437992002-04-12 09:54:03 +000011105#ifdef F77_DUMMY_MAIN
11106# ifdef __cplusplus
11107 extern "C"
11108# endif
11109 int F77_DUMMY_MAIN() { return 1; }
11110#endif
11111int
11112main ()
11113{
Guido van Rossume97ee181999-12-20 21:27:22 +000011114/* The GNU C library defines this for functions which it implements
11115 to always fail with ENOSYS. Some functions are actually named
11116 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011117#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011118choke me
11119#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011120f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011121#endif
11122
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 ;
11124 return 0;
11125}
11126_ACEOF
11127rm -f conftest.$ac_objext conftest$ac_exeext
11128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11129 (eval $ac_link) 2>&5
11130 ac_status=$?
11131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11132 (exit $ac_status); } &&
11133 { ac_try='test -s conftest$ac_exeext'
11134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11135 (eval $ac_try) 2>&5
11136 ac_status=$?
11137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11138 (exit $ac_status); }; }; then
11139 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011140else
Martin v. Löwis11437992002-04-12 09:54:03 +000011141 echo "$as_me: failed program was:" >&5
11142cat conftest.$ac_ext >&5
11143eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011144fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011145rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011146fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011147echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11148echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11149if test `eval echo '${'$as_ac_var'}'` = yes; then
11150 cat >>confdefs.h <<_ACEOF
11151#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11152_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011153
Guido van Rossume97ee181999-12-20 21:27:22 +000011154fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011155done
Guido van Rossume97ee181999-12-20 21:27:22 +000011156
Michael W. Hudson54241132001-12-07 15:38:26 +000011157
Guido van Rossume97ee181999-12-20 21:27:22 +000011158# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11159# loading of modules.
11160
Martin v. Löwis11437992002-04-12 09:54:03 +000011161echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11162echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011163if test -z "$DYNLOADFILE"
11164then
11165 case $ac_sys_system/$ac_sys_release in
11166 AIX*) DYNLOADFILE="dynload_aix.o";;
11167 BeOS*) DYNLOADFILE="dynload_beos.o";;
11168 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011169 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011170 *)
11171 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11172 # out any dynamic loading
11173 if test "$ac_cv_func_dlopen" = yes
11174 then DYNLOADFILE="dynload_shlib.o"
11175 else DYNLOADFILE="dynload_stub.o"
11176 fi
11177 ;;
11178 esac
11179fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011180echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11181echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011182if test "$DYNLOADFILE" != "dynload_stub.o"
11183then
Martin v. Löwis11437992002-04-12 09:54:03 +000011184
11185cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011186#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011187_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011188
11189fi
11190
Neil Schemenauer4e425612001-06-19 15:44:15 +000011191# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11192
Michael W. Hudson54241132001-12-07 15:38:26 +000011193
Martin v. Löwis11437992002-04-12 09:54:03 +000011194echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11195echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011196if test -z "$MACHDEP_OBJS"
11197then
Jack Jansene578a632001-08-15 01:27:14 +000011198 MACHDEP_OBJS=$extra_machdep_objs
11199else
11200 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011201fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011202echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11203echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011204
Guido van Rossum627b2d71993-12-24 10:39:16 +000011205# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011279
Fred Drake6b3cc522002-04-15 19:20:27 +000011280
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011281
Martin v. Löwis244edc82001-10-04 22:44:26 +000011282for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011283 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +000011284 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011285 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011286 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011287 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011288 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011289 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011290 sigaction siginterrupt sigprocmask sigrelse strftime strptime symlink \
11291 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011292 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011293do
Martin v. Löwis11437992002-04-12 09:54:03 +000011294as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11295echo "$as_me:$LINENO: checking for $ac_func" >&5
11296echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11297if eval "test \"\${$as_ac_var+set}\" = set"; then
11298 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011299else
Martin v. Löwis11437992002-04-12 09:54:03 +000011300 cat >conftest.$ac_ext <<_ACEOF
11301#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011302#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011303/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011305#include <assert.h>
11306/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011307#ifdef __cplusplus
11308extern "C"
11309#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011310/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 builtin and then its argument prototype would still apply. */
11312char $ac_func ();
11313char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011314
Martin v. Löwis11437992002-04-12 09:54:03 +000011315#ifdef F77_DUMMY_MAIN
11316# ifdef __cplusplus
11317 extern "C"
11318# endif
11319 int F77_DUMMY_MAIN() { return 1; }
11320#endif
11321int
11322main ()
11323{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011324/* The GNU C library defines this for functions which it implements
11325 to always fail with ENOSYS. Some functions are actually named
11326 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011327#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011328choke me
11329#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011330f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011331#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011332
Martin v. Löwis11437992002-04-12 09:54:03 +000011333 ;
11334 return 0;
11335}
11336_ACEOF
11337rm -f conftest.$ac_objext conftest$ac_exeext
11338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11339 (eval $ac_link) 2>&5
11340 ac_status=$?
11341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11342 (exit $ac_status); } &&
11343 { ac_try='test -s conftest$ac_exeext'
11344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11345 (eval $ac_try) 2>&5
11346 ac_status=$?
11347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11348 (exit $ac_status); }; }; then
11349 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011350else
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 echo "$as_me: failed program was:" >&5
11352cat conftest.$ac_ext >&5
11353eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011354fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011355rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011356fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011357echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11358echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11359if test `eval echo '${'$as_ac_var'}'` = yes; then
11360 cat >>confdefs.h <<_ACEOF
11361#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11362_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011363
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011364fi
11365done
11366
Michael W. Hudson54241132001-12-07 15:38:26 +000011367
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011368# check for openpty and forkpty
11369
Martin v. Löwis11437992002-04-12 09:54:03 +000011370
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011371for ac_func in openpty
11372do
Martin v. Löwis11437992002-04-12 09:54:03 +000011373as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11374echo "$as_me:$LINENO: checking for $ac_func" >&5
11375echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11376if eval "test \"\${$as_ac_var+set}\" = set"; then
11377 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011378else
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 cat >conftest.$ac_ext <<_ACEOF
11380#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011381#include "confdefs.h"
11382/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011384#include <assert.h>
11385/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011386#ifdef __cplusplus
11387extern "C"
11388#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011389/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 builtin and then its argument prototype would still apply. */
11391char $ac_func ();
11392char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011393
Martin v. Löwis11437992002-04-12 09:54:03 +000011394#ifdef F77_DUMMY_MAIN
11395# ifdef __cplusplus
11396 extern "C"
11397# endif
11398 int F77_DUMMY_MAIN() { return 1; }
11399#endif
11400int
11401main ()
11402{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011403/* The GNU C library defines this for functions which it implements
11404 to always fail with ENOSYS. Some functions are actually named
11405 something starting with __ and the normal name is an alias. */
11406#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11407choke me
11408#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011409f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011410#endif
11411
Martin v. Löwis11437992002-04-12 09:54:03 +000011412 ;
11413 return 0;
11414}
11415_ACEOF
11416rm -f conftest.$ac_objext conftest$ac_exeext
11417if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11418 (eval $ac_link) 2>&5
11419 ac_status=$?
11420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11421 (exit $ac_status); } &&
11422 { ac_try='test -s conftest$ac_exeext'
11423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11424 (eval $ac_try) 2>&5
11425 ac_status=$?
11426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11427 (exit $ac_status); }; }; then
11428 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011429else
Martin v. Löwis11437992002-04-12 09:54:03 +000011430 echo "$as_me: failed program was:" >&5
11431cat conftest.$ac_ext >&5
11432eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011434rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011435fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011436echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11437echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11438if test `eval echo '${'$as_ac_var'}'` = yes; then
11439 cat >>confdefs.h <<_ACEOF
11440#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11441_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011442
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011443else
Martin v. Löwis11437992002-04-12 09:54:03 +000011444 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11445echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11446if test "${ac_cv_lib_util_openpty+set}" = set; then
11447 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011448else
Martin v. Löwis11437992002-04-12 09:54:03 +000011449 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011450LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011451cat >conftest.$ac_ext <<_ACEOF
11452#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011453#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011454
Fred Drake8cef4cf2000-06-28 16:40:38 +000011455/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011456#ifdef __cplusplus
11457extern "C"
11458#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011459/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011460 builtin and then its argument prototype would still apply. */
11461char openpty ();
11462#ifdef F77_DUMMY_MAIN
11463# ifdef __cplusplus
11464 extern "C"
11465# endif
11466 int F77_DUMMY_MAIN() { return 1; }
11467#endif
11468int
11469main ()
11470{
11471openpty ();
11472 ;
11473 return 0;
11474}
11475_ACEOF
11476rm -f conftest.$ac_objext conftest$ac_exeext
11477if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11478 (eval $ac_link) 2>&5
11479 ac_status=$?
11480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11481 (exit $ac_status); } &&
11482 { ac_try='test -s conftest$ac_exeext'
11483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11484 (eval $ac_try) 2>&5
11485 ac_status=$?
11486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11487 (exit $ac_status); }; }; then
11488 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011489else
Martin v. Löwis11437992002-04-12 09:54:03 +000011490 echo "$as_me: failed program was:" >&5
11491cat conftest.$ac_ext >&5
11492ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011493fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011494rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11495LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011496fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011497echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11498echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11499if test $ac_cv_lib_util_openpty = yes; then
11500 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011501#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011502_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011503 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011504fi
11505
11506fi
11507done
11508
Martin v. Löwis11437992002-04-12 09:54:03 +000011509
Fred Drake8cef4cf2000-06-28 16:40:38 +000011510for ac_func in forkpty
11511do
Martin v. Löwis11437992002-04-12 09:54:03 +000011512as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11513echo "$as_me:$LINENO: checking for $ac_func" >&5
11514echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11515if eval "test \"\${$as_ac_var+set}\" = set"; then
11516 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011517else
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 cat >conftest.$ac_ext <<_ACEOF
11519#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011520#include "confdefs.h"
11521/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011522 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011523#include <assert.h>
11524/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011525#ifdef __cplusplus
11526extern "C"
11527#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011528/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011529 builtin and then its argument prototype would still apply. */
11530char $ac_func ();
11531char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011532
Martin v. Löwis11437992002-04-12 09:54:03 +000011533#ifdef F77_DUMMY_MAIN
11534# ifdef __cplusplus
11535 extern "C"
11536# endif
11537 int F77_DUMMY_MAIN() { return 1; }
11538#endif
11539int
11540main ()
11541{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011542/* The GNU C library defines this for functions which it implements
11543 to always fail with ENOSYS. Some functions are actually named
11544 something starting with __ and the normal name is an alias. */
11545#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11546choke me
11547#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011548f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011549#endif
11550
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 ;
11552 return 0;
11553}
11554_ACEOF
11555rm -f conftest.$ac_objext conftest$ac_exeext
11556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11557 (eval $ac_link) 2>&5
11558 ac_status=$?
11559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11560 (exit $ac_status); } &&
11561 { ac_try='test -s conftest$ac_exeext'
11562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11563 (eval $ac_try) 2>&5
11564 ac_status=$?
11565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11566 (exit $ac_status); }; }; then
11567 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011568else
Martin v. Löwis11437992002-04-12 09:54:03 +000011569 echo "$as_me: failed program was:" >&5
11570cat conftest.$ac_ext >&5
11571eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011572fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011573rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011574fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011575echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11576echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11577if test `eval echo '${'$as_ac_var'}'` = yes; then
11578 cat >>confdefs.h <<_ACEOF
11579#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11580_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011581
Fred Drake8cef4cf2000-06-28 16:40:38 +000011582else
Martin v. Löwis11437992002-04-12 09:54:03 +000011583 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11584echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11585if test "${ac_cv_lib_util_forkpty+set}" = set; then
11586 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011587else
Martin v. Löwis11437992002-04-12 09:54:03 +000011588 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011589LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011590cat >conftest.$ac_ext <<_ACEOF
11591#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011592#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011593
Fred Drake8cef4cf2000-06-28 16:40:38 +000011594/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011595#ifdef __cplusplus
11596extern "C"
11597#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011598/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011599 builtin and then its argument prototype would still apply. */
11600char forkpty ();
11601#ifdef F77_DUMMY_MAIN
11602# ifdef __cplusplus
11603 extern "C"
11604# endif
11605 int F77_DUMMY_MAIN() { return 1; }
11606#endif
11607int
11608main ()
11609{
11610forkpty ();
11611 ;
11612 return 0;
11613}
11614_ACEOF
11615rm -f conftest.$ac_objext conftest$ac_exeext
11616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11617 (eval $ac_link) 2>&5
11618 ac_status=$?
11619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11620 (exit $ac_status); } &&
11621 { ac_try='test -s conftest$ac_exeext'
11622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11623 (eval $ac_try) 2>&5
11624 ac_status=$?
11625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11626 (exit $ac_status); }; }; then
11627 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011628else
Martin v. Löwis11437992002-04-12 09:54:03 +000011629 echo "$as_me: failed program was:" >&5
11630cat conftest.$ac_ext >&5
11631ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011632fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011633rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11634LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011636echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11637echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11638if test $ac_cv_lib_util_forkpty = yes; then
11639 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011640#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011641_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011642 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011643fi
11644
11645fi
11646done
11647
Jack Jansendd19cf82001-12-06 22:36:17 +000011648
Michael W. Hudson54241132001-12-07 15:38:26 +000011649# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011650
11651
11652
11653
11654
11655
Fred Drake8cef4cf2000-06-28 16:40:38 +000011656for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11657do
Martin v. Löwis11437992002-04-12 09:54:03 +000011658as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11659echo "$as_me:$LINENO: checking for $ac_func" >&5
11660echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11661if eval "test \"\${$as_ac_var+set}\" = set"; then
11662 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011663else
Martin v. Löwis11437992002-04-12 09:54:03 +000011664 cat >conftest.$ac_ext <<_ACEOF
11665#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011666#include "confdefs.h"
11667/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011668 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011669#include <assert.h>
11670/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011671#ifdef __cplusplus
11672extern "C"
11673#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011674/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011675 builtin and then its argument prototype would still apply. */
11676char $ac_func ();
11677char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011678
Martin v. Löwis11437992002-04-12 09:54:03 +000011679#ifdef F77_DUMMY_MAIN
11680# ifdef __cplusplus
11681 extern "C"
11682# endif
11683 int F77_DUMMY_MAIN() { return 1; }
11684#endif
11685int
11686main ()
11687{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011688/* The GNU C library defines this for functions which it implements
11689 to always fail with ENOSYS. Some functions are actually named
11690 something starting with __ and the normal name is an alias. */
11691#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11692choke me
11693#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011694f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011695#endif
11696
Martin v. Löwis11437992002-04-12 09:54:03 +000011697 ;
11698 return 0;
11699}
11700_ACEOF
11701rm -f conftest.$ac_objext conftest$ac_exeext
11702if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11703 (eval $ac_link) 2>&5
11704 ac_status=$?
11705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11706 (exit $ac_status); } &&
11707 { ac_try='test -s conftest$ac_exeext'
11708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11709 (eval $ac_try) 2>&5
11710 ac_status=$?
11711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11712 (exit $ac_status); }; }; then
11713 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011714else
Martin v. Löwis11437992002-04-12 09:54:03 +000011715 echo "$as_me: failed program was:" >&5
11716cat conftest.$ac_ext >&5
11717eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011718fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011719rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011720fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011721echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11722echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11723if test `eval echo '${'$as_ac_var'}'` = yes; then
11724 cat >>confdefs.h <<_ACEOF
11725#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11726_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011727
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011728fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011729done
11730
Michael W. Hudson54241132001-12-07 15:38:26 +000011731
Martin v. Löwis11437992002-04-12 09:54:03 +000011732
11733
11734
11735
11736
Martin v. Löwis1142de32002-03-29 16:28:31 +000011737for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011738do
Martin v. Löwis11437992002-04-12 09:54:03 +000011739as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11740echo "$as_me:$LINENO: checking for $ac_func" >&5
11741echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11742if eval "test \"\${$as_ac_var+set}\" = set"; then
11743 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011744else
Martin v. Löwis11437992002-04-12 09:54:03 +000011745 cat >conftest.$ac_ext <<_ACEOF
11746#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011747#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011748/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011749 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011750#include <assert.h>
11751/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011752#ifdef __cplusplus
11753extern "C"
11754#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011755/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011756 builtin and then its argument prototype would still apply. */
11757char $ac_func ();
11758char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011759
Martin v. Löwis11437992002-04-12 09:54:03 +000011760#ifdef F77_DUMMY_MAIN
11761# ifdef __cplusplus
11762 extern "C"
11763# endif
11764 int F77_DUMMY_MAIN() { return 1; }
11765#endif
11766int
11767main ()
11768{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011769/* The GNU C library defines this for functions which it implements
11770 to always fail with ENOSYS. Some functions are actually named
11771 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011772#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011773choke me
11774#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011775f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011776#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011777
Martin v. Löwis11437992002-04-12 09:54:03 +000011778 ;
11779 return 0;
11780}
11781_ACEOF
11782rm -f conftest.$ac_objext conftest$ac_exeext
11783if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11784 (eval $ac_link) 2>&5
11785 ac_status=$?
11786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11787 (exit $ac_status); } &&
11788 { ac_try='test -s conftest$ac_exeext'
11789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11790 (eval $ac_try) 2>&5
11791 ac_status=$?
11792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11793 (exit $ac_status); }; }; then
11794 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011795else
Martin v. Löwis11437992002-04-12 09:54:03 +000011796 echo "$as_me: failed program was:" >&5
11797cat conftest.$ac_ext >&5
11798eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011799fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011800rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011801fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011802echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11803echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11804if test `eval echo '${'$as_ac_var'}'` = yes; then
11805 cat >>confdefs.h <<_ACEOF
11806#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11807_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011808
Martin v. Löwis1142de32002-03-29 16:28:31 +000011809else
Martin v. Löwis11437992002-04-12 09:54:03 +000011810 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011811fi
11812done
11813
11814
Martin v. Löwis11437992002-04-12 09:54:03 +000011815
Martin v. Löwis1142de32002-03-29 16:28:31 +000011816for ac_func in getpgrp
11817do
Martin v. Löwis11437992002-04-12 09:54:03 +000011818as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11819echo "$as_me:$LINENO: checking for $ac_func" >&5
11820echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11821if eval "test \"\${$as_ac_var+set}\" = set"; then
11822 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011823else
Martin v. Löwis11437992002-04-12 09:54:03 +000011824 cat >conftest.$ac_ext <<_ACEOF
11825#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011826#include "confdefs.h"
11827/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011828 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011829#include <assert.h>
11830/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011831#ifdef __cplusplus
11832extern "C"
11833#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011834/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011835 builtin and then its argument prototype would still apply. */
11836char $ac_func ();
11837char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011838
Martin v. Löwis11437992002-04-12 09:54:03 +000011839#ifdef F77_DUMMY_MAIN
11840# ifdef __cplusplus
11841 extern "C"
11842# endif
11843 int F77_DUMMY_MAIN() { return 1; }
11844#endif
11845int
11846main ()
11847{
Martin v. Löwis1142de32002-03-29 16:28:31 +000011848/* The GNU C library defines this for functions which it implements
11849 to always fail with ENOSYS. Some functions are actually named
11850 something starting with __ and the normal name is an alias. */
11851#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11852choke me
11853#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011854f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000011855#endif
11856
Martin v. Löwis11437992002-04-12 09:54:03 +000011857 ;
11858 return 0;
11859}
11860_ACEOF
11861rm -f conftest.$ac_objext conftest$ac_exeext
11862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11863 (eval $ac_link) 2>&5
11864 ac_status=$?
11865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11866 (exit $ac_status); } &&
11867 { ac_try='test -s conftest$ac_exeext'
11868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11869 (eval $ac_try) 2>&5
11870 ac_status=$?
11871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11872 (exit $ac_status); }; }; then
11873 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011874else
Martin v. Löwis11437992002-04-12 09:54:03 +000011875 echo "$as_me: failed program was:" >&5
11876cat conftest.$ac_ext >&5
11877eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011878fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011879rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011880fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011881echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11882echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11883if test `eval echo '${'$as_ac_var'}'` = yes; then
11884 cat >>confdefs.h <<_ACEOF
11885#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11886_ACEOF
11887 cat >conftest.$ac_ext <<_ACEOF
11888#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011889#include "confdefs.h"
11890#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011891#ifdef F77_DUMMY_MAIN
11892# ifdef __cplusplus
11893 extern "C"
11894# endif
11895 int F77_DUMMY_MAIN() { return 1; }
11896#endif
11897int
11898main ()
11899{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011900getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011901 ;
11902 return 0;
11903}
11904_ACEOF
11905rm -f conftest.$ac_objext
11906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11907 (eval $ac_compile) 2>&5
11908 ac_status=$?
11909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11910 (exit $ac_status); } &&
11911 { ac_try='test -s conftest.$ac_objext'
11912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11913 (eval $ac_try) 2>&5
11914 ac_status=$?
11915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11916 (exit $ac_status); }; }; then
11917
11918cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011919#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011920_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011921
Martin v. Löwis11437992002-04-12 09:54:03 +000011922
Guido van Rossumf78abae1997-01-21 22:02:36 +000011923else
Martin v. Löwis11437992002-04-12 09:54:03 +000011924 echo "$as_me: failed program was:" >&5
11925cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000011926fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011927rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011928
Guido van Rossum627b2d71993-12-24 10:39:16 +000011929fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011930done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011931
Martin v. Löwis11437992002-04-12 09:54:03 +000011932
Thomas Wouters3a584202000-08-05 23:28:51 +000011933for ac_func in setpgrp
11934do
Martin v. Löwis11437992002-04-12 09:54:03 +000011935as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11936echo "$as_me:$LINENO: checking for $ac_func" >&5
11937echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11938if eval "test \"\${$as_ac_var+set}\" = set"; then
11939 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011940else
Martin v. Löwis11437992002-04-12 09:54:03 +000011941 cat >conftest.$ac_ext <<_ACEOF
11942#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011943#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011944/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011945 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011946#include <assert.h>
11947/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011948#ifdef __cplusplus
11949extern "C"
11950#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011951/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011952 builtin and then its argument prototype would still apply. */
11953char $ac_func ();
11954char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011955
Martin v. Löwis11437992002-04-12 09:54:03 +000011956#ifdef F77_DUMMY_MAIN
11957# ifdef __cplusplus
11958 extern "C"
11959# endif
11960 int F77_DUMMY_MAIN() { return 1; }
11961#endif
11962int
11963main ()
11964{
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011965/* The GNU C library defines this for functions which it implements
11966 to always fail with ENOSYS. Some functions are actually named
11967 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011968#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011969choke me
11970#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011971f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011972#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011973
Martin v. Löwis11437992002-04-12 09:54:03 +000011974 ;
11975 return 0;
11976}
11977_ACEOF
11978rm -f conftest.$ac_objext conftest$ac_exeext
11979if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11980 (eval $ac_link) 2>&5
11981 ac_status=$?
11982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11983 (exit $ac_status); } &&
11984 { ac_try='test -s conftest$ac_exeext'
11985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11986 (eval $ac_try) 2>&5
11987 ac_status=$?
11988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11989 (exit $ac_status); }; }; then
11990 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011991else
Martin v. Löwis11437992002-04-12 09:54:03 +000011992 echo "$as_me: failed program was:" >&5
11993cat conftest.$ac_ext >&5
11994eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011995fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011996rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011997fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011998echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11999echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12000if test `eval echo '${'$as_ac_var'}'` = yes; then
12001 cat >>confdefs.h <<_ACEOF
12002#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12003_ACEOF
12004 cat >conftest.$ac_ext <<_ACEOF
12005#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012006#include "confdefs.h"
12007#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012008#ifdef F77_DUMMY_MAIN
12009# ifdef __cplusplus
12010 extern "C"
12011# endif
12012 int F77_DUMMY_MAIN() { return 1; }
12013#endif
12014int
12015main ()
12016{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012017setpgrp(0,0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012018 ;
12019 return 0;
12020}
12021_ACEOF
12022rm -f conftest.$ac_objext
12023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12024 (eval $ac_compile) 2>&5
12025 ac_status=$?
12026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12027 (exit $ac_status); } &&
12028 { ac_try='test -s conftest.$ac_objext'
12029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12030 (eval $ac_try) 2>&5
12031 ac_status=$?
12032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12033 (exit $ac_status); }; }; then
12034
12035cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012036#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012037_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012038
Martin v. Löwis11437992002-04-12 09:54:03 +000012039
Guido van Rossumf78abae1997-01-21 22:02:36 +000012040else
Martin v. Löwis11437992002-04-12 09:54:03 +000012041 echo "$as_me: failed program was:" >&5
12042cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012043fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012044rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012045
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012046fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012047done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012048
Martin v. Löwis11437992002-04-12 09:54:03 +000012049
Thomas Wouters3a584202000-08-05 23:28:51 +000012050for ac_func in gettimeofday
12051do
Martin v. Löwis11437992002-04-12 09:54:03 +000012052as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12053echo "$as_me:$LINENO: checking for $ac_func" >&5
12054echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12055if eval "test \"\${$as_ac_var+set}\" = set"; then
12056 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012057else
Martin v. Löwis11437992002-04-12 09:54:03 +000012058 cat >conftest.$ac_ext <<_ACEOF
12059#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012060#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012061/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012062 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012063#include <assert.h>
12064/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012065#ifdef __cplusplus
12066extern "C"
12067#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012068/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012069 builtin and then its argument prototype would still apply. */
12070char $ac_func ();
12071char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012072
Martin v. Löwis11437992002-04-12 09:54:03 +000012073#ifdef F77_DUMMY_MAIN
12074# ifdef __cplusplus
12075 extern "C"
12076# endif
12077 int F77_DUMMY_MAIN() { return 1; }
12078#endif
12079int
12080main ()
12081{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012082/* The GNU C library defines this for functions which it implements
12083 to always fail with ENOSYS. Some functions are actually named
12084 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012085#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012086choke me
12087#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012088f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012089#endif
12090
Martin v. Löwis11437992002-04-12 09:54:03 +000012091 ;
12092 return 0;
12093}
12094_ACEOF
12095rm -f conftest.$ac_objext conftest$ac_exeext
12096if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12097 (eval $ac_link) 2>&5
12098 ac_status=$?
12099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12100 (exit $ac_status); } &&
12101 { ac_try='test -s conftest$ac_exeext'
12102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12103 (eval $ac_try) 2>&5
12104 ac_status=$?
12105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12106 (exit $ac_status); }; }; then
12107 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012108else
Martin v. Löwis11437992002-04-12 09:54:03 +000012109 echo "$as_me: failed program was:" >&5
12110cat conftest.$ac_ext >&5
12111eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012112fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012113rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012114fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012115echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12116echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12117if test `eval echo '${'$as_ac_var'}'` = yes; then
12118 cat >>confdefs.h <<_ACEOF
12119#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12120_ACEOF
12121 cat >conftest.$ac_ext <<_ACEOF
12122#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012123#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012124#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012125#ifdef F77_DUMMY_MAIN
12126# ifdef __cplusplus
12127 extern "C"
12128# endif
12129 int F77_DUMMY_MAIN() { return 1; }
12130#endif
12131int
12132main ()
12133{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012134gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012135 ;
12136 return 0;
12137}
12138_ACEOF
12139rm -f conftest.$ac_objext
12140if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12141 (eval $ac_compile) 2>&5
12142 ac_status=$?
12143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12144 (exit $ac_status); } &&
12145 { ac_try='test -s conftest.$ac_objext'
12146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12147 (eval $ac_try) 2>&5
12148 ac_status=$?
12149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12150 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012151 :
12152else
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 echo "$as_me: failed program was:" >&5
12154cat conftest.$ac_ext >&5
12155
12156cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012157#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012158_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012159
Martin v. Löwis11437992002-04-12 09:54:03 +000012160
Guido van Rossum627b2d71993-12-24 10:39:16 +000012161fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012162rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012163
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012164fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012165done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012166
Michael W. Hudson54241132001-12-07 15:38:26 +000012167
12168
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012169# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012170# for [no]getaddrinfo in netdb.h.
12171echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12172echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12173cat >conftest.$ac_ext <<_ACEOF
12174#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012175#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012176
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012177#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012178#include <sys/socket.h>
12179#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012180#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012181
Martin v. Löwis11437992002-04-12 09:54:03 +000012182#ifdef F77_DUMMY_MAIN
12183# ifdef __cplusplus
12184 extern "C"
12185# endif
12186 int F77_DUMMY_MAIN() { return 1; }
12187#endif
12188int
12189main ()
12190{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012191
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012192getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012193
Martin v. Löwis11437992002-04-12 09:54:03 +000012194 ;
12195 return 0;
12196}
12197_ACEOF
12198rm -f conftest.$ac_objext conftest$ac_exeext
12199if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12200 (eval $ac_link) 2>&5
12201 ac_status=$?
12202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12203 (exit $ac_status); } &&
12204 { ac_try='test -s conftest$ac_exeext'
12205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12206 (eval $ac_try) 2>&5
12207 ac_status=$?
12208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12209 (exit $ac_status); }; }; then
12210
12211echo "$as_me:$LINENO: result: yes" >&5
12212echo "${ECHO_T}yes" >&6
12213echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12214echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012215if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012216 echo "$as_me:$LINENO: result: buggy" >&5
12217echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012218buggygetaddrinfo=yes
12219else
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 cat >conftest.$ac_ext <<_ACEOF
12221#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012222#include "confdefs.h"
12223
12224#include <sys/types.h>
12225#include <netdb.h>
12226#include <string.h>
12227#include <sys/socket.h>
12228#include <netinet/in.h>
12229
12230main()
12231{
12232 int passive, gaierr, inet4 = 0, inet6 = 0;
12233 struct addrinfo hints, *ai, *aitop;
12234 char straddr[INET6_ADDRSTRLEN], strport[16];
12235
12236 for (passive = 0; passive <= 1; passive++) {
12237 memset(&hints, 0, sizeof(hints));
12238 hints.ai_family = AF_UNSPEC;
12239 hints.ai_flags = passive ? AI_PASSIVE : 0;
12240 hints.ai_socktype = SOCK_STREAM;
12241 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12242 (void)gai_strerror(gaierr);
12243 goto bad;
12244 }
12245 for (ai = aitop; ai; ai = ai->ai_next) {
12246 if (ai->ai_addr == NULL ||
12247 ai->ai_addrlen == 0 ||
12248 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12249 straddr, sizeof(straddr), strport, sizeof(strport),
12250 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12251 goto bad;
12252 }
12253 switch (ai->ai_family) {
12254 case AF_INET:
12255 if (strcmp(strport, "54321") != 0) {
12256 goto bad;
12257 }
12258 if (passive) {
12259 if (strcmp(straddr, "0.0.0.0") != 0) {
12260 goto bad;
12261 }
12262 } else {
12263 if (strcmp(straddr, "127.0.0.1") != 0) {
12264 goto bad;
12265 }
12266 }
12267 inet4++;
12268 break;
12269 case AF_INET6:
12270 if (strcmp(strport, "54321") != 0) {
12271 goto bad;
12272 }
12273 if (passive) {
12274 if (strcmp(straddr, "::") != 0) {
12275 goto bad;
12276 }
12277 } else {
12278 if (strcmp(straddr, "::1") != 0) {
12279 goto bad;
12280 }
12281 }
12282 inet6++;
12283 break;
12284 case AF_UNSPEC:
12285 goto bad;
12286 break;
12287 default:
12288 /* another family support? */
12289 break;
12290 }
12291 }
12292 }
12293
12294 if (!(inet4 == 0 || inet4 == 2))
12295 goto bad;
12296 if (!(inet6 == 0 || inet6 == 2))
12297 goto bad;
12298
12299 if (aitop)
12300 freeaddrinfo(aitop);
12301 exit(0);
12302
12303 bad:
12304 if (aitop)
12305 freeaddrinfo(aitop);
12306 exit(1);
12307}
12308
Martin v. Löwis11437992002-04-12 09:54:03 +000012309_ACEOF
12310rm -f conftest$ac_exeext
12311if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12312 (eval $ac_link) 2>&5
12313 ac_status=$?
12314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12315 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12317 (eval $ac_try) 2>&5
12318 ac_status=$?
12319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12320 (exit $ac_status); }; }; then
12321 echo "$as_me:$LINENO: result: good" >&5
12322echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012323buggygetaddrinfo=no
12324else
Martin v. Löwis11437992002-04-12 09:54:03 +000012325 echo "$as_me: program exited with status $ac_status" >&5
12326echo "$as_me: failed program was:" >&5
12327cat conftest.$ac_ext >&5
12328( exit $ac_status )
12329echo "$as_me:$LINENO: result: buggy" >&5
12330echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012331buggygetaddrinfo=yes
12332fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012333rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012334fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012335else
Martin v. Löwis11437992002-04-12 09:54:03 +000012336 echo "$as_me: failed program was:" >&5
12337cat conftest.$ac_ext >&5
12338
12339echo "$as_me:$LINENO: result: no" >&5
12340echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012341buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012342
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012344rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012345
12346if test "$buggygetaddrinfo" = "yes"; then
12347 if test "$ipv6" = "yes"; then
12348 echo 'Fatal: You must get working getaddrinfo() function.'
12349 echo ' or you can specify "--disable-ipv6"'.
12350 exit 1
12351 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012352else
Martin v. Löwis11437992002-04-12 09:54:03 +000012353
12354cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012355#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012356_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012357
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012358fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012359
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012360for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012361do
Martin v. Löwis11437992002-04-12 09:54:03 +000012362as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12363echo "$as_me:$LINENO: checking for $ac_func" >&5
12364echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12365if eval "test \"\${$as_ac_var+set}\" = set"; then
12366 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012367else
Martin v. Löwis11437992002-04-12 09:54:03 +000012368 cat >conftest.$ac_ext <<_ACEOF
12369#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012370#include "confdefs.h"
12371/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012372 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012373#include <assert.h>
12374/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012375#ifdef __cplusplus
12376extern "C"
12377#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012378/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012379 builtin and then its argument prototype would still apply. */
12380char $ac_func ();
12381char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012382
Martin v. Löwis11437992002-04-12 09:54:03 +000012383#ifdef F77_DUMMY_MAIN
12384# ifdef __cplusplus
12385 extern "C"
12386# endif
12387 int F77_DUMMY_MAIN() { return 1; }
12388#endif
12389int
12390main ()
12391{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012392/* The GNU C library defines this for functions which it implements
12393 to always fail with ENOSYS. Some functions are actually named
12394 something starting with __ and the normal name is an alias. */
12395#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12396choke me
12397#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012398f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012399#endif
12400
Martin v. Löwis11437992002-04-12 09:54:03 +000012401 ;
12402 return 0;
12403}
12404_ACEOF
12405rm -f conftest.$ac_objext conftest$ac_exeext
12406if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12407 (eval $ac_link) 2>&5
12408 ac_status=$?
12409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12410 (exit $ac_status); } &&
12411 { ac_try='test -s conftest$ac_exeext'
12412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12413 (eval $ac_try) 2>&5
12414 ac_status=$?
12415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12416 (exit $ac_status); }; }; then
12417 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012418else
Martin v. Löwis11437992002-04-12 09:54:03 +000012419 echo "$as_me: failed program was:" >&5
12420cat conftest.$ac_ext >&5
12421eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012422fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012423rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012424fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012425echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12426echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12427if test `eval echo '${'$as_ac_var'}'` = yes; then
12428 cat >>confdefs.h <<_ACEOF
12429#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12430_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012431
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012432fi
12433done
12434
Michael W. Hudson54241132001-12-07 15:38:26 +000012435
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012436# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012437echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12438echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12439if test "${ac_cv_header_time+set}" = set; then
12440 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012441else
Martin v. Löwis11437992002-04-12 09:54:03 +000012442 cat >conftest.$ac_ext <<_ACEOF
12443#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012444#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012445#include <sys/types.h>
12446#include <sys/time.h>
12447#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012448
12449#ifdef F77_DUMMY_MAIN
12450# ifdef __cplusplus
12451 extern "C"
12452# endif
12453 int F77_DUMMY_MAIN() { return 1; }
12454#endif
12455int
12456main ()
12457{
12458if ((struct tm *) 0)
12459return 0;
12460 ;
12461 return 0;
12462}
12463_ACEOF
12464rm -f conftest.$ac_objext
12465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12466 (eval $ac_compile) 2>&5
12467 ac_status=$?
12468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12469 (exit $ac_status); } &&
12470 { ac_try='test -s conftest.$ac_objext'
12471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12472 (eval $ac_try) 2>&5
12473 ac_status=$?
12474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12475 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012476 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012477else
Martin v. Löwis11437992002-04-12 09:54:03 +000012478 echo "$as_me: failed program was:" >&5
12479cat conftest.$ac_ext >&5
12480ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012481fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012482rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012483fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012484echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12485echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012486if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012487
12488cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012489#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012490_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012491
12492fi
12493
Martin v. Löwis11437992002-04-12 09:54:03 +000012494echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12495echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12496if test "${ac_cv_struct_tm+set}" = set; then
12497 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012498else
Martin v. Löwis11437992002-04-12 09:54:03 +000012499 cat >conftest.$ac_ext <<_ACEOF
12500#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012501#include "confdefs.h"
12502#include <sys/types.h>
12503#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012504
12505#ifdef F77_DUMMY_MAIN
12506# ifdef __cplusplus
12507 extern "C"
12508# endif
12509 int F77_DUMMY_MAIN() { return 1; }
12510#endif
12511int
12512main ()
12513{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012514struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012515 ;
12516 return 0;
12517}
12518_ACEOF
12519rm -f conftest.$ac_objext
12520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12521 (eval $ac_compile) 2>&5
12522 ac_status=$?
12523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12524 (exit $ac_status); } &&
12525 { ac_try='test -s conftest.$ac_objext'
12526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12527 (eval $ac_try) 2>&5
12528 ac_status=$?
12529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12530 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012531 ac_cv_struct_tm=time.h
12532else
Martin v. Löwis11437992002-04-12 09:54:03 +000012533 echo "$as_me: failed program was:" >&5
12534cat conftest.$ac_ext >&5
12535ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012536fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012537rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012538fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012539echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12540echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012541if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012542
12543cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012544#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012545_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012546
12547fi
12548
Martin v. Löwis11437992002-04-12 09:54:03 +000012549echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12550echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12551if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12552 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012553else
Martin v. Löwis11437992002-04-12 09:54:03 +000012554 cat >conftest.$ac_ext <<_ACEOF
12555#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012556#include "confdefs.h"
12557#include <sys/types.h>
12558#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012559
12560
12561#ifdef F77_DUMMY_MAIN
12562# ifdef __cplusplus
12563 extern "C"
12564# endif
12565 int F77_DUMMY_MAIN() { return 1; }
12566#endif
12567int
12568main ()
12569{
12570static struct tm ac_aggr;
12571if (ac_aggr.tm_zone)
12572return 0;
12573 ;
12574 return 0;
12575}
12576_ACEOF
12577rm -f conftest.$ac_objext
12578if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12579 (eval $ac_compile) 2>&5
12580 ac_status=$?
12581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12582 (exit $ac_status); } &&
12583 { ac_try='test -s conftest.$ac_objext'
12584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12585 (eval $ac_try) 2>&5
12586 ac_status=$?
12587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12588 (exit $ac_status); }; }; then
12589 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012590else
Martin v. Löwis11437992002-04-12 09:54:03 +000012591 echo "$as_me: failed program was:" >&5
12592cat conftest.$ac_ext >&5
12593ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012594fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012595rm -f conftest.$ac_objext conftest.$ac_ext
12596fi
12597echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12598echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12599if test $ac_cv_member_struct_tm_tm_zone = yes; then
12600
12601cat >>confdefs.h <<_ACEOF
12602#define HAVE_STRUCT_TM_TM_ZONE 1
12603_ACEOF
12604
12605
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012606fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012607
Martin v. Löwis11437992002-04-12 09:54:03 +000012608if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12609
12610cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012611#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012612_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012613
12614else
Martin v. Löwis11437992002-04-12 09:54:03 +000012615 echo "$as_me:$LINENO: checking for tzname" >&5
12616echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12617if test "${ac_cv_var_tzname+set}" = set; then
12618 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012619else
Martin v. Löwis11437992002-04-12 09:54:03 +000012620 cat >conftest.$ac_ext <<_ACEOF
12621#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012622#include "confdefs.h"
12623#include <time.h>
12624#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012625extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012627
12628#ifdef F77_DUMMY_MAIN
12629# ifdef __cplusplus
12630 extern "C"
12631# endif
12632 int F77_DUMMY_MAIN() { return 1; }
12633#endif
12634int
12635main ()
12636{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012637atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012638 ;
12639 return 0;
12640}
12641_ACEOF
12642rm -f conftest.$ac_objext conftest$ac_exeext
12643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12644 (eval $ac_link) 2>&5
12645 ac_status=$?
12646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12647 (exit $ac_status); } &&
12648 { ac_try='test -s conftest$ac_exeext'
12649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12650 (eval $ac_try) 2>&5
12651 ac_status=$?
12652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12653 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012654 ac_cv_var_tzname=yes
12655else
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 echo "$as_me: failed program was:" >&5
12657cat conftest.$ac_ext >&5
12658ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012659fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012660rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012661fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012662echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12663echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012664 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012665
12666cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012667#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012668_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012669
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012670 fi
12671fi
12672
Jack Jansendd19cf82001-12-06 22:36:17 +000012673
Martin v. Löwis11437992002-04-12 09:54:03 +000012674echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12675echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12676if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12677 echo $ECHO_N "(cached) $ECHO_C" >&6
12678else
12679 cat >conftest.$ac_ext <<_ACEOF
12680#line $LINENO "configure"
12681#include "confdefs.h"
12682$ac_includes_default
12683#ifdef F77_DUMMY_MAIN
12684# ifdef __cplusplus
12685 extern "C"
12686# endif
12687 int F77_DUMMY_MAIN() { return 1; }
12688#endif
12689int
12690main ()
12691{
12692static struct stat ac_aggr;
12693if (ac_aggr.st_rdev)
12694return 0;
12695 ;
12696 return 0;
12697}
12698_ACEOF
12699rm -f conftest.$ac_objext
12700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12701 (eval $ac_compile) 2>&5
12702 ac_status=$?
12703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12704 (exit $ac_status); } &&
12705 { ac_try='test -s conftest.$ac_objext'
12706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12707 (eval $ac_try) 2>&5
12708 ac_status=$?
12709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12710 (exit $ac_status); }; }; then
12711 ac_cv_member_struct_stat_st_rdev=yes
12712else
12713 echo "$as_me: failed program was:" >&5
12714cat conftest.$ac_ext >&5
12715ac_cv_member_struct_stat_st_rdev=no
12716fi
12717rm -f conftest.$ac_objext conftest.$ac_ext
12718fi
12719echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12720echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12721if test $ac_cv_member_struct_stat_st_rdev = yes; then
12722
12723cat >>confdefs.h <<_ACEOF
12724#define HAVE_STRUCT_STAT_ST_RDEV 1
12725_ACEOF
12726
12727
12728cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012729#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012730_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012731
12732fi
12733
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
12735
12736echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12737echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12738if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012740else
Martin v. Löwis11437992002-04-12 09:54:03 +000012741 cat >conftest.$ac_ext <<_ACEOF
12742#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012743#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012744$ac_includes_default
12745#ifdef F77_DUMMY_MAIN
12746# ifdef __cplusplus
12747 extern "C"
12748# endif
12749 int F77_DUMMY_MAIN() { return 1; }
12750#endif
12751int
12752main ()
12753{
12754static struct stat ac_aggr;
12755if (ac_aggr.st_blksize)
12756return 0;
12757 ;
12758 return 0;
12759}
12760_ACEOF
12761rm -f conftest.$ac_objext
12762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12763 (eval $ac_compile) 2>&5
12764 ac_status=$?
12765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12766 (exit $ac_status); } &&
12767 { ac_try='test -s conftest.$ac_objext'
12768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12769 (eval $ac_try) 2>&5
12770 ac_status=$?
12771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12772 (exit $ac_status); }; }; then
12773 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012774else
Martin v. Löwis11437992002-04-12 09:54:03 +000012775 echo "$as_me: failed program was:" >&5
12776cat conftest.$ac_ext >&5
12777ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012778fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012779rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012780fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012781echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12782echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12783if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012784
Martin v. Löwis11437992002-04-12 09:54:03 +000012785cat >>confdefs.h <<_ACEOF
12786#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12787_ACEOF
12788
12789
12790cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012791#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012792_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012793
12794fi
12795
Martin v. Löwis11437992002-04-12 09:54:03 +000012796
12797echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12798echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12799if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12800 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012801else
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 cat >conftest.$ac_ext <<_ACEOF
12803#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012804#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012805$ac_includes_default
12806#ifdef F77_DUMMY_MAIN
12807# ifdef __cplusplus
12808 extern "C"
12809# endif
12810 int F77_DUMMY_MAIN() { return 1; }
12811#endif
12812int
12813main ()
12814{
12815static struct stat ac_aggr;
12816if (ac_aggr.st_blocks)
12817return 0;
12818 ;
12819 return 0;
12820}
12821_ACEOF
12822rm -f conftest.$ac_objext
12823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12824 (eval $ac_compile) 2>&5
12825 ac_status=$?
12826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12827 (exit $ac_status); } &&
12828 { ac_try='test -s conftest.$ac_objext'
12829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12830 (eval $ac_try) 2>&5
12831 ac_status=$?
12832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12833 (exit $ac_status); }; }; then
12834 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012835else
Martin v. Löwis11437992002-04-12 09:54:03 +000012836 echo "$as_me: failed program was:" >&5
12837cat conftest.$ac_ext >&5
12838ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012839fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012840rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012841fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012842echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12843echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12844if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012845
Martin v. Löwis11437992002-04-12 09:54:03 +000012846cat >>confdefs.h <<_ACEOF
12847#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12848_ACEOF
12849
12850
12851cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012852#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012853_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012854
12855else
Martin v. Löwis11437992002-04-12 09:54:03 +000012856 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012857fi
12858
Michael W. Hudson54241132001-12-07 15:38:26 +000012859
Martin v. Löwis11437992002-04-12 09:54:03 +000012860
12861echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
12862echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
12863if test "${ac_cv_header_time_altzone+set}" = set; then
12864 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012865else
Martin v. Löwis11437992002-04-12 09:54:03 +000012866 cat >conftest.$ac_ext <<_ACEOF
12867#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012868#include "confdefs.h"
12869#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012870#ifdef F77_DUMMY_MAIN
12871# ifdef __cplusplus
12872 extern "C"
12873# endif
12874 int F77_DUMMY_MAIN() { return 1; }
12875#endif
12876int
12877main ()
12878{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012879return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 ;
12881 return 0;
12882}
12883_ACEOF
12884rm -f conftest.$ac_objext
12885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12886 (eval $ac_compile) 2>&5
12887 ac_status=$?
12888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12889 (exit $ac_status); } &&
12890 { ac_try='test -s conftest.$ac_objext'
12891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12892 (eval $ac_try) 2>&5
12893 ac_status=$?
12894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12895 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012896 ac_cv_header_time_altzone=yes
12897else
Martin v. Löwis11437992002-04-12 09:54:03 +000012898 echo "$as_me: failed program was:" >&5
12899cat conftest.$ac_ext >&5
12900ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012901fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012902rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012903fi
12904
Martin v. Löwis11437992002-04-12 09:54:03 +000012905echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
12906echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012907if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012908
12909cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012910#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012911_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012912
12913fi
12914
Guido van Rossumda88dad1995-01-26 00:46:29 +000012915was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012916echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
12917echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
12918cat >conftest.$ac_ext <<_ACEOF
12919#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012920#include "confdefs.h"
12921
12922#include <sys/types.h>
12923#include <sys/select.h>
12924#include <sys/time.h>
12925
Martin v. Löwis11437992002-04-12 09:54:03 +000012926#ifdef F77_DUMMY_MAIN
12927# ifdef __cplusplus
12928 extern "C"
12929# endif
12930 int F77_DUMMY_MAIN() { return 1; }
12931#endif
12932int
12933main ()
12934{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012935;
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 ;
12937 return 0;
12938}
12939_ACEOF
12940rm -f conftest.$ac_objext
12941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12942 (eval $ac_compile) 2>&5
12943 ac_status=$?
12944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12945 (exit $ac_status); } &&
12946 { ac_try='test -s conftest.$ac_objext'
12947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12948 (eval $ac_try) 2>&5
12949 ac_status=$?
12950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12951 (exit $ac_status); }; }; then
12952
12953
12954cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012955#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012956_ACEOF
12957
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012958 was_it_defined=yes
12959
Guido van Rossumf78abae1997-01-21 22:02:36 +000012960else
Martin v. Löwis11437992002-04-12 09:54:03 +000012961 echo "$as_me: failed program was:" >&5
12962cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012963fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012964rm -f conftest.$ac_objext conftest.$ac_ext
12965echo "$as_me:$LINENO: result: $was_it_defined" >&5
12966echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000012967
Martin v. Löwis11437992002-04-12 09:54:03 +000012968echo "$as_me:$LINENO: checking for addrinfo" >&5
12969echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
12970if test "${ac_cv_struct_addrinfo+set}" = set; then
12971 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012972else
Martin v. Löwis11437992002-04-12 09:54:03 +000012973 cat >conftest.$ac_ext <<_ACEOF
12974#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012975#include "confdefs.h"
12976
12977# include <netdb.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{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012987struct addrinfo a
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
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013004 ac_cv_struct_addrinfo=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_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013009fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013010rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013011fi
13012
Martin v. Löwis11437992002-04-12 09:54:03 +000013013echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13014echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013015if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013016
13017cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013018#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013019_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013020
13021fi
13022
Martin v. Löwis11437992002-04-12 09:54:03 +000013023echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13024echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13025if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13026 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013027else
Martin v. Löwis11437992002-04-12 09:54:03 +000013028 cat >conftest.$ac_ext <<_ACEOF
13029#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013030#include "confdefs.h"
13031
13032# include <sys/types.h>
13033# include <sys/socket.h>
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{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013043struct sockaddr_storage s
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
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013060 ac_cv_struct_sockaddr_storage=yes
13061else
Martin v. Löwis11437992002-04-12 09:54:03 +000013062 echo "$as_me: failed program was:" >&5
13063cat conftest.$ac_ext >&5
13064ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013065fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013066rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013067fi
13068
Martin v. Löwis11437992002-04-12 09:54:03 +000013069echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13070echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013071if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013072
13073cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013074#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013075_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013076
13077fi
13078
Guido van Rossum627b2d71993-12-24 10:39:16 +000013079# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013080
Michael W. Hudson54241132001-12-07 15:38:26 +000013081
Martin v. Löwis11437992002-04-12 09:54:03 +000013082echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13083echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13084if test "${ac_cv_c_char_unsigned+set}" = set; then
13085 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013086else
Martin v. Löwis11437992002-04-12 09:54:03 +000013087 cat >conftest.$ac_ext <<_ACEOF
13088#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013089#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013090$ac_includes_default
13091#ifdef F77_DUMMY_MAIN
13092# ifdef __cplusplus
13093 extern "C"
13094# endif
13095 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013097int
13098main ()
13099{
13100static int test_array [1 - 2 * !(((char) -1) < 0)];
13101test_array [0] = 0
13102
13103 ;
13104 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013105}
Martin v. Löwis11437992002-04-12 09:54:03 +000013106_ACEOF
13107rm -f conftest.$ac_objext
13108if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13109 (eval $ac_compile) 2>&5
13110 ac_status=$?
13111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13112 (exit $ac_status); } &&
13113 { ac_try='test -s conftest.$ac_objext'
13114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13115 (eval $ac_try) 2>&5
13116 ac_status=$?
13117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13118 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013119 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013120else
13121 echo "$as_me: failed program was:" >&5
13122cat conftest.$ac_ext >&5
13123ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013124fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013125rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013126fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013127echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13128echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013129if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013130 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013131#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013132_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013133
13134fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013135
Martin v. Löwis11437992002-04-12 09:54:03 +000013136echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13137echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13138if test "${ac_cv_prog_cc_stdc+set}" = set; then
13139 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013140else
Martin v. Löwis11437992002-04-12 09:54:03 +000013141 ac_cv_prog_cc_stdc=no
13142ac_save_CC=$CC
13143cat >conftest.$ac_ext <<_ACEOF
13144#line $LINENO "configure"
13145#include "confdefs.h"
13146#include <stdarg.h>
13147#include <stdio.h>
13148#include <sys/types.h>
13149#include <sys/stat.h>
13150/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13151struct buf { int x; };
13152FILE * (*rcsopen) (struct buf *, struct stat *, int);
13153static char *e (p, i)
13154 char **p;
13155 int i;
13156{
13157 return p[i];
13158}
13159static char *f (char * (*g) (char **, int), char **p, ...)
13160{
13161 char *s;
13162 va_list v;
13163 va_start (v,p);
13164 s = g (p, va_arg (v,int));
13165 va_end (v);
13166 return s;
13167}
13168int test (int i, double x);
13169struct s1 {int (*f) (int a);};
13170struct s2 {int (*f) (double a);};
13171int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13172int argc;
13173char **argv;
13174#ifdef F77_DUMMY_MAIN
13175# ifdef __cplusplus
13176 extern "C"
13177# endif
13178 int F77_DUMMY_MAIN() { return 1; }
13179#endif
13180int
13181main ()
13182{
13183return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13184 ;
13185 return 0;
13186}
13187_ACEOF
13188# Don't try gcc -ansi; that turns off useful extensions and
13189# breaks some systems' header files.
13190# AIX -qlanglvl=ansi
13191# Ultrix and OSF/1 -std1
13192# HP-UX 10.20 and later -Ae
13193# HP-UX older versions -Aa -D_HPUX_SOURCE
13194# SVR4 -Xc -D__EXTENSIONS__
13195for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13196do
13197 CC="$ac_save_CC $ac_arg"
13198 rm -f conftest.$ac_objext
13199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13200 (eval $ac_compile) 2>&5
13201 ac_status=$?
13202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13203 (exit $ac_status); } &&
13204 { ac_try='test -s conftest.$ac_objext'
13205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13206 (eval $ac_try) 2>&5
13207 ac_status=$?
13208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13209 (exit $ac_status); }; }; then
13210 ac_cv_prog_cc_stdc=$ac_arg
13211break
13212else
13213 echo "$as_me: failed program was:" >&5
13214cat conftest.$ac_ext >&5
13215fi
13216rm -f conftest.$ac_objext
13217done
13218rm -f conftest.$ac_ext conftest.$ac_objext
13219CC=$ac_save_CC
13220
13221fi
13222
13223case "x$ac_cv_prog_cc_stdc" in
13224 x|xno)
13225 echo "$as_me:$LINENO: result: none needed" >&5
13226echo "${ECHO_T}none needed" >&6 ;;
13227 *)
13228 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13229echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13230 CC="$CC $ac_cv_prog_cc_stdc" ;;
13231esac
13232
13233echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13234echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13235if test "${ac_cv_c_const+set}" = set; then
13236 echo $ECHO_N "(cached) $ECHO_C" >&6
13237else
13238 cat >conftest.$ac_ext <<_ACEOF
13239#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013240#include "confdefs.h"
13241
Martin v. Löwis11437992002-04-12 09:54:03 +000013242#ifdef F77_DUMMY_MAIN
13243# ifdef __cplusplus
13244 extern "C"
13245# endif
13246 int F77_DUMMY_MAIN() { return 1; }
13247#endif
13248int
13249main ()
13250{
13251/* FIXME: Include the comments suggested by Paul. */
13252#ifndef __cplusplus
13253 /* Ultrix mips cc rejects this. */
13254 typedef int charset[2];
13255 const charset x;
13256 /* SunOS 4.1.1 cc rejects this. */
13257 char const *const *ccp;
13258 char **p;
13259 /* NEC SVR4.0.2 mips cc rejects this. */
13260 struct point {int x, y;};
13261 static struct point const zero = {0,0};
13262 /* AIX XL C 1.02.0.0 rejects this.
13263 It does not let you subtract one const X* pointer from another in
13264 an arm of an if-expression whose if-part is not a constant
13265 expression */
13266 const char *g = "string";
13267 ccp = &g + (g ? g-g : 0);
13268 /* HPUX 7.0 cc rejects these. */
13269 ++ccp;
13270 p = (char**) ccp;
13271 ccp = (char const *const *) p;
13272 { /* SCO 3.2v4 cc rejects this. */
13273 char *t;
13274 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013275
Martin v. Löwis11437992002-04-12 09:54:03 +000013276 *t++ = 0;
13277 }
13278 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13279 int x[] = {25, 17};
13280 const int *foo = &x[0];
13281 ++foo;
13282 }
13283 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13284 typedef const int *iptr;
13285 iptr p = 0;
13286 ++p;
13287 }
13288 { /* AIX XL C 1.02.0.0 rejects this saying
13289 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13290 struct s { int j; const int *ap[3]; };
13291 struct s *b; b->j = 5;
13292 }
13293 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13294 const int foo = 10;
13295 }
13296#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013297
Martin v. Löwis11437992002-04-12 09:54:03 +000013298 ;
13299 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013300}
Martin v. Löwis11437992002-04-12 09:54:03 +000013301_ACEOF
13302rm -f conftest.$ac_objext
13303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13304 (eval $ac_compile) 2>&5
13305 ac_status=$?
13306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13307 (exit $ac_status); } &&
13308 { ac_try='test -s conftest.$ac_objext'
13309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13310 (eval $ac_try) 2>&5
13311 ac_status=$?
13312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13313 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013314 ac_cv_c_const=yes
13315else
Martin v. Löwis11437992002-04-12 09:54:03 +000013316 echo "$as_me: failed program was:" >&5
13317cat conftest.$ac_ext >&5
13318ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013319fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013320rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013321fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013322echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13323echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013324if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013325
13326cat >>confdefs.h <<\_ACEOF
13327#define const
13328_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329
13330fi
13331
Michael W. Hudson54241132001-12-07 15:38:26 +000013332
Guido van Rossumda88dad1995-01-26 00:46:29 +000013333works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013334echo "$as_me:$LINENO: checking for working volatile" >&5
13335echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13336cat >conftest.$ac_ext <<_ACEOF
13337#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013338#include "confdefs.h"
13339
Martin v. Löwis11437992002-04-12 09:54:03 +000013340#ifdef F77_DUMMY_MAIN
13341# ifdef __cplusplus
13342 extern "C"
13343# endif
13344 int F77_DUMMY_MAIN() { return 1; }
13345#endif
13346int
13347main ()
13348{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013349volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 ;
13351 return 0;
13352}
13353_ACEOF
13354rm -f conftest.$ac_objext
13355if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13356 (eval $ac_compile) 2>&5
13357 ac_status=$?
13358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13359 (exit $ac_status); } &&
13360 { ac_try='test -s conftest.$ac_objext'
13361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13362 (eval $ac_try) 2>&5
13363 ac_status=$?
13364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13365 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013366 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013367else
Martin v. Löwis11437992002-04-12 09:54:03 +000013368 echo "$as_me: failed program was:" >&5
13369cat conftest.$ac_ext >&5
13370
13371cat >>confdefs.h <<\_ACEOF
13372#define volatile
13373_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013374
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013375
Guido van Rossum627b2d71993-12-24 10:39:16 +000013376fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013377rm -f conftest.$ac_objext conftest.$ac_ext
13378echo "$as_me:$LINENO: result: $works" >&5
13379echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013380
Guido van Rossumda88dad1995-01-26 00:46:29 +000013381works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013382echo "$as_me:$LINENO: checking for working signed char" >&5
13383echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13384cat >conftest.$ac_ext <<_ACEOF
13385#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013386#include "confdefs.h"
13387
Martin v. Löwis11437992002-04-12 09:54:03 +000013388#ifdef F77_DUMMY_MAIN
13389# ifdef __cplusplus
13390 extern "C"
13391# endif
13392 int F77_DUMMY_MAIN() { return 1; }
13393#endif
13394int
13395main ()
13396{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013397signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013398 ;
13399 return 0;
13400}
13401_ACEOF
13402rm -f conftest.$ac_objext
13403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13404 (eval $ac_compile) 2>&5
13405 ac_status=$?
13406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13407 (exit $ac_status); } &&
13408 { ac_try='test -s conftest.$ac_objext'
13409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13410 (eval $ac_try) 2>&5
13411 ac_status=$?
13412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13413 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013414 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013415else
Martin v. Löwis11437992002-04-12 09:54:03 +000013416 echo "$as_me: failed program was:" >&5
13417cat conftest.$ac_ext >&5
13418
13419cat >>confdefs.h <<\_ACEOF
13420#define signed
13421_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013422
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013423
Guido van Rossum7f43da71994-08-01 12:15:30 +000013424fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013425rm -f conftest.$ac_objext conftest.$ac_ext
13426echo "$as_me:$LINENO: result: $works" >&5
13427echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013428
Guido van Rossumda88dad1995-01-26 00:46:29 +000013429have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013430echo "$as_me:$LINENO: checking for prototypes" >&5
13431echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13432cat >conftest.$ac_ext <<_ACEOF
13433#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013434#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013435int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013436#ifdef F77_DUMMY_MAIN
13437# ifdef __cplusplus
13438 extern "C"
13439# endif
13440 int F77_DUMMY_MAIN() { return 1; }
13441#endif
13442int
13443main ()
13444{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013445return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013446 ;
13447 return 0;
13448}
13449_ACEOF
13450rm -f conftest.$ac_objext
13451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13452 (eval $ac_compile) 2>&5
13453 ac_status=$?
13454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13455 (exit $ac_status); } &&
13456 { ac_try='test -s conftest.$ac_objext'
13457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13458 (eval $ac_try) 2>&5
13459 ac_status=$?
13460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13461 (exit $ac_status); }; }; then
13462
13463
13464cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013465#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013466_ACEOF
13467
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013468 have_prototypes=yes
13469
Guido van Rossumf78abae1997-01-21 22:02:36 +000013470else
Martin v. Löwis11437992002-04-12 09:54:03 +000013471 echo "$as_me: failed program was:" >&5
13472cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013473fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013474rm -f conftest.$ac_objext conftest.$ac_ext
13475echo "$as_me:$LINENO: result: $have_prototypes" >&5
13476echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013477
Guido van Rossumda88dad1995-01-26 00:46:29 +000013478works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013479echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13480echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13481cat >conftest.$ac_ext <<_ACEOF
13482#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013483#include "confdefs.h"
13484
13485#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013486int foo(int x, ...) {
13487 va_list va;
13488 va_start(va, x);
13489 va_arg(va, int);
13490 va_arg(va, char *);
13491 va_arg(va, double);
13492 return 0;
13493}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013494
Martin v. Löwis11437992002-04-12 09:54:03 +000013495#ifdef F77_DUMMY_MAIN
13496# ifdef __cplusplus
13497 extern "C"
13498# endif
13499 int F77_DUMMY_MAIN() { return 1; }
13500#endif
13501int
13502main ()
13503{
Guido van Rossum90eea071996-08-30 20:58:57 +000013504return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013505 ;
13506 return 0;
13507}
13508_ACEOF
13509rm -f conftest.$ac_objext
13510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13511 (eval $ac_compile) 2>&5
13512 ac_status=$?
13513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13514 (exit $ac_status); } &&
13515 { ac_try='test -s conftest.$ac_objext'
13516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13517 (eval $ac_try) 2>&5
13518 ac_status=$?
13519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13520 (exit $ac_status); }; }; then
13521
13522
13523cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013524#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013525_ACEOF
13526
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013527 works=yes
13528
Guido van Rossumf78abae1997-01-21 22:02:36 +000013529else
Martin v. Löwis11437992002-04-12 09:54:03 +000013530 echo "$as_me: failed program was:" >&5
13531cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +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 Rossum76be6ed1995-01-02 18:33:54 +000013536
Guido van Rossumda88dad1995-01-26 00:46:29 +000013537if test "$have_prototypes" = yes; then
13538bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013539echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13540echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13541cat >conftest.$ac_ext <<_ACEOF
13542#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013543#include "confdefs.h"
13544#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013545#ifdef F77_DUMMY_MAIN
13546# ifdef __cplusplus
13547 extern "C"
13548# endif
13549 int F77_DUMMY_MAIN() { return 1; }
13550#endif
13551int
13552main ()
13553{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013554char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013555 ;
13556 return 0;
13557}
13558_ACEOF
13559rm -f conftest.$ac_objext
13560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13561 (eval $ac_compile) 2>&5
13562 ac_status=$?
13563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13564 (exit $ac_status); } &&
13565 { ac_try='test -s conftest.$ac_objext'
13566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13567 (eval $ac_try) 2>&5
13568 ac_status=$?
13569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13570 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013571 :
13572else
Martin v. Löwis11437992002-04-12 09:54:03 +000013573 echo "$as_me: failed program was:" >&5
13574cat conftest.$ac_ext >&5
13575
13576cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013577#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013578_ACEOF
13579
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013580 bad_prototypes=yes
13581
Guido van Rossum627b2d71993-12-24 10:39:16 +000013582fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013583rm -f conftest.$ac_objext conftest.$ac_ext
13584echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13585echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013586fi
13587
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013588# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013589echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13590echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13591cat >conftest.$ac_ext <<_ACEOF
13592#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013593#include "confdefs.h"
13594#include <sys/types.h>
13595#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013596#ifdef F77_DUMMY_MAIN
13597# ifdef __cplusplus
13598 extern "C"
13599# endif
13600 int F77_DUMMY_MAIN() { return 1; }
13601#endif
13602int
13603main ()
13604{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013605struct sockaddr x;
13606x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013607 ;
13608 return 0;
13609}
13610_ACEOF
13611rm -f conftest.$ac_objext
13612if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13613 (eval $ac_compile) 2>&5
13614 ac_status=$?
13615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13616 (exit $ac_status); } &&
13617 { ac_try='test -s conftest.$ac_objext'
13618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13619 (eval $ac_try) 2>&5
13620 ac_status=$?
13621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13622 (exit $ac_status); }; }; then
13623 echo "$as_me:$LINENO: result: yes" >&5
13624echo "${ECHO_T}yes" >&6
13625
13626cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013627#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013628_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013629
13630else
Martin v. Löwis11437992002-04-12 09:54:03 +000013631 echo "$as_me: failed program was:" >&5
13632cat conftest.$ac_ext >&5
13633echo "$as_me:$LINENO: result: no" >&5
13634echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013636rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013637
Martin v. Löwis11437992002-04-12 09:54:03 +000013638echo "$as_me:$LINENO: checking for bad static forward" >&5
13639echo $ECHO_N "checking for bad static forward... $ECHO_C" >&6
13640if test "${ac_cv_bad_static_forward+set}" = set; then
13641 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013642else
13643 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013644 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013645else
Martin v. Löwis11437992002-04-12 09:54:03 +000013646 cat >conftest.$ac_ext <<_ACEOF
13647#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013648#include "confdefs.h"
13649
13650struct s { int a; int b; };
13651static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013652int foobar() {
13653 static int random;
13654 random = (int) &foo;
13655 return random;
13656}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013657static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013658main() {
13659 exit(!((int)&foo == foobar()));
13660}
Martin v. Löwis11437992002-04-12 09:54:03 +000013661_ACEOF
13662rm -f conftest$ac_exeext
13663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13664 (eval $ac_link) 2>&5
13665 ac_status=$?
13666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13667 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13669 (eval $ac_try) 2>&5
13670 ac_status=$?
13671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13672 (exit $ac_status); }; }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013673 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013674else
Martin v. Löwis11437992002-04-12 09:54:03 +000013675 echo "$as_me: program exited with status $ac_status" >&5
13676echo "$as_me: failed program was:" >&5
13677cat conftest.$ac_ext >&5
13678( exit $ac_status )
13679ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013680fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013681rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13682fi
Guido van Rossumf78abae1997-01-21 22:02:36 +000013683fi
13684
Martin v. Löwis11437992002-04-12 09:54:03 +000013685echo "$as_me:$LINENO: result: $ac_cv_bad_static_forward" >&5
13686echo "${ECHO_T}$ac_cv_bad_static_forward" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013687if test "$ac_cv_bad_static_forward" = yes
13688then
Martin v. Löwis11437992002-04-12 09:54:03 +000013689
13690cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013691#define BAD_STATIC_FORWARD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013692_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013693
13694fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013695
Guido van Rossumda88dad1995-01-26 00:46:29 +000013696va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013697echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13698echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13699cat >conftest.$ac_ext <<_ACEOF
13700#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013701#include "confdefs.h"
13702
13703#ifdef HAVE_STDARG_PROTOTYPES
13704#include <stdarg.h>
13705#else
13706#include <varargs.h>
13707#endif
13708
Martin v. Löwis11437992002-04-12 09:54:03 +000013709#ifdef F77_DUMMY_MAIN
13710# ifdef __cplusplus
13711 extern "C"
13712# endif
13713 int F77_DUMMY_MAIN() { return 1; }
13714#endif
13715int
13716main ()
13717{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013718va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013719 ;
13720 return 0;
13721}
13722_ACEOF
13723rm -f conftest.$ac_objext
13724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13725 (eval $ac_compile) 2>&5
13726 ac_status=$?
13727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13728 (exit $ac_status); } &&
13729 { ac_try='test -s conftest.$ac_objext'
13730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13731 (eval $ac_try) 2>&5
13732 ac_status=$?
13733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13734 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013735 :
13736else
Martin v. Löwis11437992002-04-12 09:54:03 +000013737 echo "$as_me: failed program was:" >&5
13738cat conftest.$ac_ext >&5
13739
13740
13741cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013742#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013743_ACEOF
13744
Guido van Rossumda88dad1995-01-26 00:46:29 +000013745 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013746
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013747fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013748rm -f conftest.$ac_objext conftest.$ac_ext
13749echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13750echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013751
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013752# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013753
13754
13755
13756echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13757echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13758if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13759 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013760else
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 cat >conftest.$ac_ext <<_ACEOF
13762#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013763#include "confdefs.h"
13764/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013765 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013766#include <assert.h>
13767/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013768#ifdef __cplusplus
13769extern "C"
13770#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013771/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 builtin and then its argument prototype would still apply. */
13773char gethostbyname_r ();
13774char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013775
Martin v. Löwis11437992002-04-12 09:54:03 +000013776#ifdef F77_DUMMY_MAIN
13777# ifdef __cplusplus
13778 extern "C"
13779# endif
13780 int F77_DUMMY_MAIN() { return 1; }
13781#endif
13782int
13783main ()
13784{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013785/* The GNU C library defines this for functions which it implements
13786 to always fail with ENOSYS. Some functions are actually named
13787 something starting with __ and the normal name is an alias. */
13788#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13789choke me
13790#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013791f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013792#endif
13793
Martin v. Löwis11437992002-04-12 09:54:03 +000013794 ;
13795 return 0;
13796}
13797_ACEOF
13798rm -f conftest.$ac_objext conftest$ac_exeext
13799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13800 (eval $ac_link) 2>&5
13801 ac_status=$?
13802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13803 (exit $ac_status); } &&
13804 { ac_try='test -s conftest$ac_exeext'
13805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13806 (eval $ac_try) 2>&5
13807 ac_status=$?
13808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13809 (exit $ac_status); }; }; then
13810 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013811else
Martin v. Löwis11437992002-04-12 09:54:03 +000013812 echo "$as_me: failed program was:" >&5
13813cat conftest.$ac_ext >&5
13814ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013815fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013816rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013817fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013818echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13819echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13820if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013821
Martin v. Löwis11437992002-04-12 09:54:03 +000013822 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013823#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013824_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013825
Martin v. Löwis11437992002-04-12 09:54:03 +000013826 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13827echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013828 OLD_CFLAGS=$CFLAGS
13829 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013830 cat >conftest.$ac_ext <<_ACEOF
13831#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013832#include "confdefs.h"
13833
13834# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013835
13836#ifdef F77_DUMMY_MAIN
13837# ifdef __cplusplus
13838 extern "C"
13839# endif
13840 int F77_DUMMY_MAIN() { return 1; }
13841#endif
13842int
13843main ()
13844{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013845
13846 char *name;
13847 struct hostent *he, *res;
13848 char buffer[2048];
13849 int buflen = 2048;
13850 int h_errnop;
13851
13852 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013853
13854 ;
13855 return 0;
13856}
13857_ACEOF
13858rm -f conftest.$ac_objext
13859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13860 (eval $ac_compile) 2>&5
13861 ac_status=$?
13862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13863 (exit $ac_status); } &&
13864 { ac_try='test -s conftest.$ac_objext'
13865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13866 (eval $ac_try) 2>&5
13867 ac_status=$?
13868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13869 (exit $ac_status); }; }; then
13870
13871 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013872#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013873_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013874
Martin v. Löwis11437992002-04-12 09:54:03 +000013875
13876cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013877#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013878_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013879
Martin v. Löwis11437992002-04-12 09:54:03 +000013880 echo "$as_me:$LINENO: result: yes" >&5
13881echo "${ECHO_T}yes" >&6
13882
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013883else
Martin v. Löwis11437992002-04-12 09:54:03 +000013884 echo "$as_me: failed program was:" >&5
13885cat conftest.$ac_ext >&5
13886
13887 echo "$as_me:$LINENO: result: no" >&5
13888echo "${ECHO_T}no" >&6
13889 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
13890echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
13891 cat >conftest.$ac_ext <<_ACEOF
13892#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013893#include "confdefs.h"
13894
13895# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013896
13897#ifdef F77_DUMMY_MAIN
13898# ifdef __cplusplus
13899 extern "C"
13900# endif
13901 int F77_DUMMY_MAIN() { return 1; }
13902#endif
13903int
13904main ()
13905{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013906
13907 char *name;
13908 struct hostent *he;
13909 char buffer[2048];
13910 int buflen = 2048;
13911 int h_errnop;
13912
13913 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013914
13915 ;
13916 return 0;
13917}
13918_ACEOF
13919rm -f conftest.$ac_objext
13920if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13921 (eval $ac_compile) 2>&5
13922 ac_status=$?
13923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13924 (exit $ac_status); } &&
13925 { ac_try='test -s conftest.$ac_objext'
13926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13927 (eval $ac_try) 2>&5
13928 ac_status=$?
13929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13930 (exit $ac_status); }; }; then
13931
13932 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013933#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013934_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013935
Martin v. Löwis11437992002-04-12 09:54:03 +000013936
13937cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013938#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013939_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013940
Martin v. Löwis11437992002-04-12 09:54:03 +000013941 echo "$as_me:$LINENO: result: yes" >&5
13942echo "${ECHO_T}yes" >&6
13943
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013944else
Martin v. Löwis11437992002-04-12 09:54:03 +000013945 echo "$as_me: failed program was:" >&5
13946cat conftest.$ac_ext >&5
13947
13948 echo "$as_me:$LINENO: result: no" >&5
13949echo "${ECHO_T}no" >&6
13950 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
13951echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
13952 cat >conftest.$ac_ext <<_ACEOF
13953#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013954#include "confdefs.h"
13955
13956# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013957
13958#ifdef F77_DUMMY_MAIN
13959# ifdef __cplusplus
13960 extern "C"
13961# endif
13962 int F77_DUMMY_MAIN() { return 1; }
13963#endif
13964int
13965main ()
13966{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013967
13968 char *name;
13969 struct hostent *he;
13970 struct hostent_data data;
13971
13972 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000013973
13974 ;
13975 return 0;
13976}
13977_ACEOF
13978rm -f conftest.$ac_objext
13979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13980 (eval $ac_compile) 2>&5
13981 ac_status=$?
13982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13983 (exit $ac_status); } &&
13984 { ac_try='test -s conftest.$ac_objext'
13985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13986 (eval $ac_try) 2>&5
13987 ac_status=$?
13988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13989 (exit $ac_status); }; }; then
13990
13991 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013992#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013993_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013994
Martin v. Löwis11437992002-04-12 09:54:03 +000013995
13996cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013997#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013998_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013999
Martin v. Löwis11437992002-04-12 09:54:03 +000014000 echo "$as_me:$LINENO: result: yes" >&5
14001echo "${ECHO_T}yes" >&6
14002
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014003else
Martin v. Löwis11437992002-04-12 09:54:03 +000014004 echo "$as_me: failed program was:" >&5
14005cat conftest.$ac_ext >&5
14006
14007 echo "$as_me:$LINENO: result: no" >&5
14008echo "${ECHO_T}no" >&6
14009
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014010fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014011rm -f conftest.$ac_objext conftest.$ac_ext
14012
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014013fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014014rm -f conftest.$ac_objext conftest.$ac_ext
14015
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014016fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014017rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014018 CFLAGS=$OLD_CFLAGS
14019
14020else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014021
Martin v. Löwis11437992002-04-12 09:54:03 +000014022
14023for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014024do
Martin v. Löwis11437992002-04-12 09:54:03 +000014025as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14026echo "$as_me:$LINENO: checking for $ac_func" >&5
14027echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14028if eval "test \"\${$as_ac_var+set}\" = set"; then
14029 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014030else
Martin v. Löwis11437992002-04-12 09:54:03 +000014031 cat >conftest.$ac_ext <<_ACEOF
14032#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014033#include "confdefs.h"
14034/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014035 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014036#include <assert.h>
14037/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014038#ifdef __cplusplus
14039extern "C"
14040#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014041/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014042 builtin and then its argument prototype would still apply. */
14043char $ac_func ();
14044char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014045
Martin v. Löwis11437992002-04-12 09:54:03 +000014046#ifdef F77_DUMMY_MAIN
14047# ifdef __cplusplus
14048 extern "C"
14049# endif
14050 int F77_DUMMY_MAIN() { return 1; }
14051#endif
14052int
14053main ()
14054{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014055/* The GNU C library defines this for functions which it implements
14056 to always fail with ENOSYS. Some functions are actually named
14057 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014058#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014059choke me
14060#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014061f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014062#endif
14063
Martin v. Löwis11437992002-04-12 09:54:03 +000014064 ;
14065 return 0;
14066}
14067_ACEOF
14068rm -f conftest.$ac_objext conftest$ac_exeext
14069if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14070 (eval $ac_link) 2>&5
14071 ac_status=$?
14072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14073 (exit $ac_status); } &&
14074 { ac_try='test -s conftest$ac_exeext'
14075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14076 (eval $ac_try) 2>&5
14077 ac_status=$?
14078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14079 (exit $ac_status); }; }; then
14080 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014081else
Martin v. Löwis11437992002-04-12 09:54:03 +000014082 echo "$as_me: failed program was:" >&5
14083cat conftest.$ac_ext >&5
14084eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014085fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014086rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014087fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014088echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14089echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14090if test `eval echo '${'$as_ac_var'}'` = yes; then
14091 cat >>confdefs.h <<_ACEOF
14092#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14093_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014094
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014095fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014096done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014097
Michael W. Hudson54241132001-12-07 15:38:26 +000014098
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014099fi
14100
Michael W. Hudson54241132001-12-07 15:38:26 +000014101
14102
14103
14104
14105
14106
Guido van Rossum627b2d71993-12-24 10:39:16 +000014107# checks for system services
14108# (none yet)
14109
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014110# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014111echo "$as_me:$LINENO: checking for __fpu_control" >&5
14112echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14113if test "${ac_cv_func___fpu_control+set}" = set; then
14114 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014115else
Martin v. Löwis11437992002-04-12 09:54:03 +000014116 cat >conftest.$ac_ext <<_ACEOF
14117#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014118#include "confdefs.h"
14119/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014120 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014121#include <assert.h>
14122/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014123#ifdef __cplusplus
14124extern "C"
14125#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014126/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014127 builtin and then its argument prototype would still apply. */
14128char __fpu_control ();
14129char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014130
Martin v. Löwis11437992002-04-12 09:54:03 +000014131#ifdef F77_DUMMY_MAIN
14132# ifdef __cplusplus
14133 extern "C"
14134# endif
14135 int F77_DUMMY_MAIN() { return 1; }
14136#endif
14137int
14138main ()
14139{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014140/* The GNU C library defines this for functions which it implements
14141 to always fail with ENOSYS. Some functions are actually named
14142 something starting with __ and the normal name is an alias. */
14143#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14144choke me
14145#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014146f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014147#endif
14148
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 ;
14150 return 0;
14151}
14152_ACEOF
14153rm -f conftest.$ac_objext conftest$ac_exeext
14154if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14155 (eval $ac_link) 2>&5
14156 ac_status=$?
14157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14158 (exit $ac_status); } &&
14159 { ac_try='test -s conftest$ac_exeext'
14160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14161 (eval $ac_try) 2>&5
14162 ac_status=$?
14163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14164 (exit $ac_status); }; }; then
14165 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014166else
Martin v. Löwis11437992002-04-12 09:54:03 +000014167 echo "$as_me: failed program was:" >&5
14168cat conftest.$ac_ext >&5
14169ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014170fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014171rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014172fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014173echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14174echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14175if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014176 :
14177else
Martin v. Löwis11437992002-04-12 09:54:03 +000014178
14179echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14180echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14181if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14182 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014183else
Martin v. Löwis11437992002-04-12 09:54:03 +000014184 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014185LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014186cat >conftest.$ac_ext <<_ACEOF
14187#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014188#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014189
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014190/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014191#ifdef __cplusplus
14192extern "C"
14193#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014194/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014195 builtin and then its argument prototype would still apply. */
14196char __fpu_control ();
14197#ifdef F77_DUMMY_MAIN
14198# ifdef __cplusplus
14199 extern "C"
14200# endif
14201 int F77_DUMMY_MAIN() { return 1; }
14202#endif
14203int
14204main ()
14205{
14206__fpu_control ();
14207 ;
14208 return 0;
14209}
14210_ACEOF
14211rm -f conftest.$ac_objext conftest$ac_exeext
14212if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14213 (eval $ac_link) 2>&5
14214 ac_status=$?
14215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14216 (exit $ac_status); } &&
14217 { ac_try='test -s conftest$ac_exeext'
14218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14219 (eval $ac_try) 2>&5
14220 ac_status=$?
14221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14222 (exit $ac_status); }; }; then
14223 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014224else
Martin v. Löwis11437992002-04-12 09:54:03 +000014225 echo "$as_me: failed program was:" >&5
14226cat conftest.$ac_ext >&5
14227ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014228fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014229rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14230LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014231fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014232echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14233echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14234if test $ac_cv_lib_ieee___fpu_control = yes; then
14235 cat >>confdefs.h <<_ACEOF
14236#define HAVE_LIBIEEE 1
14237_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014238
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014239 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014240
Guido van Rossum627b2d71993-12-24 10:39:16 +000014241fi
14242
Michael W. Hudson54241132001-12-07 15:38:26 +000014243
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014244fi
14245
Michael W. Hudson54241132001-12-07 15:38:26 +000014246
Guido van Rossum7f253911997-05-09 02:42:48 +000014247# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014248echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14249echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14250
Guido van Rossum7f253911997-05-09 02:42:48 +000014251# Check whether --with-fpectl or --without-fpectl was given.
14252if test "${with_fpectl+set}" = set; then
14253 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014254
Guido van Rossum7f253911997-05-09 02:42:48 +000014255if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014256then
14257
14258cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014259#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014260_ACEOF
14261
14262 echo "$as_me:$LINENO: result: yes" >&5
14263echo "${ECHO_T}yes" >&6
14264else echo "$as_me:$LINENO: result: no" >&5
14265echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014266fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014267else
Martin v. Löwis11437992002-04-12 09:54:03 +000014268 echo "$as_me:$LINENO: result: no" >&5
14269echo "${ECHO_T}no" >&6
14270fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014271
Guido van Rossum7f43da71994-08-01 12:15:30 +000014272# check for --with-libm=...
14273
Guido van Rossum563e7081996-09-10 18:20:48 +000014274case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014275Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014276BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014277*) LIBM=-lm
14278esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014279echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14280echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14281
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014282# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014283if test "${with_libm+set}" = set; then
14284 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014285
Guido van Rossum7f253911997-05-09 02:42:48 +000014286if test "$withval" = no
14287then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014288 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14289echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014290elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014291then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14293echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14294else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14295echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14296 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014297fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014298else
Martin v. Löwis11437992002-04-12 09:54:03 +000014299 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14300echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14301fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014302
14303# check for --with-libc=...
14304
Martin v. Löwis11437992002-04-12 09:54:03 +000014305echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14306echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14307
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014308# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014309if test "${with_libc+set}" = set; then
14310 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014311
Guido van Rossum7f253911997-05-09 02:42:48 +000014312if test "$withval" = no
14313then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014314 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14315echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014316elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014317then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014318 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14319echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14320else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14321echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14322 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014323fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014324else
Martin v. Löwis11437992002-04-12 09:54:03 +000014325 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14326echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14327fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014328
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014329# check for hypot() in math library
14330LIBS_SAVE=$LIBS
14331LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014332
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014333for ac_func in hypot
14334do
Martin v. Löwis11437992002-04-12 09:54:03 +000014335as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14336echo "$as_me:$LINENO: checking for $ac_func" >&5
14337echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14338if eval "test \"\${$as_ac_var+set}\" = set"; then
14339 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014340else
Martin v. Löwis11437992002-04-12 09:54:03 +000014341 cat >conftest.$ac_ext <<_ACEOF
14342#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014343#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014344/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014345 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014346#include <assert.h>
14347/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014348#ifdef __cplusplus
14349extern "C"
14350#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014351/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014352 builtin and then its argument prototype would still apply. */
14353char $ac_func ();
14354char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014355
Martin v. Löwis11437992002-04-12 09:54:03 +000014356#ifdef F77_DUMMY_MAIN
14357# ifdef __cplusplus
14358 extern "C"
14359# endif
14360 int F77_DUMMY_MAIN() { return 1; }
14361#endif
14362int
14363main ()
14364{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014365/* The GNU C library defines this for functions which it implements
14366 to always fail with ENOSYS. Some functions are actually named
14367 something starting with __ and the normal name is an alias. */
14368#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14369choke me
14370#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014371f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014372#endif
14373
Martin v. Löwis11437992002-04-12 09:54:03 +000014374 ;
14375 return 0;
14376}
14377_ACEOF
14378rm -f conftest.$ac_objext conftest$ac_exeext
14379if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14380 (eval $ac_link) 2>&5
14381 ac_status=$?
14382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14383 (exit $ac_status); } &&
14384 { ac_try='test -s conftest$ac_exeext'
14385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14386 (eval $ac_try) 2>&5
14387 ac_status=$?
14388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14389 (exit $ac_status); }; }; then
14390 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014391else
Martin v. Löwis11437992002-04-12 09:54:03 +000014392 echo "$as_me: failed program was:" >&5
14393cat conftest.$ac_ext >&5
14394eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014395fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014396rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014397fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014398echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14399echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14400if test `eval echo '${'$as_ac_var'}'` = yes; then
14401 cat >>confdefs.h <<_ACEOF
14402#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14403_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014404
Michael W. Hudson54241132001-12-07 15:38:26 +000014405else
Martin v. Löwis11437992002-04-12 09:54:03 +000014406 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014407fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014408done
14409
Michael W. Hudson54241132001-12-07 15:38:26 +000014410
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014411LIBS=$LIBS_SAVE
14412
Guido van Rossumad713701997-07-10 22:42:38 +000014413# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014414echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14415echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14416if test "${ac_cv_malloc_zero+set}" = set; then
14417 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014418else
14419 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014420 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014421else
Martin v. Löwis11437992002-04-12 09:54:03 +000014422 cat >conftest.$ac_ext <<_ACEOF
14423#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014424#include "confdefs.h"
14425#include <stdio.h>
14426#ifdef HAVE_STDLIB
14427#include <stdlib.h>
14428#else
14429char *malloc(), *realloc();
14430int *free();
14431#endif
14432main() {
14433 char *p;
14434 p = malloc(0);
14435 if (p == NULL) exit(1);
14436 p = realloc(p, 0);
14437 if (p == NULL) exit(1);
14438 free(p);
14439 exit(0);
14440}
Martin v. Löwis11437992002-04-12 09:54:03 +000014441_ACEOF
14442rm -f conftest$ac_exeext
14443if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14444 (eval $ac_link) 2>&5
14445 ac_status=$?
14446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14447 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14449 (eval $ac_try) 2>&5
14450 ac_status=$?
14451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14452 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014453 ac_cv_malloc_zero=nonnull
14454else
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 echo "$as_me: program exited with status $ac_status" >&5
14456echo "$as_me: failed program was:" >&5
14457cat conftest.$ac_ext >&5
14458( exit $ac_status )
14459ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014460fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014461rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014462fi
Guido van Rossumad713701997-07-10 22:42:38 +000014463fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014464 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014465echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14466echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014467if test "$ac_cv_malloc_zero" = null
14468then
Martin v. Löwis11437992002-04-12 09:54:03 +000014469
14470cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014471#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014472_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014473
14474fi
14475
Guido van Rossumef2255b2000-03-10 22:30:29 +000014476# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014477if test "${ac_cv_header_wchar_h+set}" = set; then
14478 echo "$as_me:$LINENO: checking for wchar.h" >&5
14479echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14480if test "${ac_cv_header_wchar_h+set}" = set; then
14481 echo $ECHO_N "(cached) $ECHO_C" >&6
14482fi
14483echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14484echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014485else
Martin v. Löwis11437992002-04-12 09:54:03 +000014486 # Is the header compilable?
14487echo "$as_me:$LINENO: checking wchar.h usability" >&5
14488echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14489cat >conftest.$ac_ext <<_ACEOF
14490#line $LINENO "configure"
14491#include "confdefs.h"
14492$ac_includes_default
14493#include <wchar.h>
14494_ACEOF
14495rm -f conftest.$ac_objext
14496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14497 (eval $ac_compile) 2>&5
14498 ac_status=$?
14499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14500 (exit $ac_status); } &&
14501 { ac_try='test -s conftest.$ac_objext'
14502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14503 (eval $ac_try) 2>&5
14504 ac_status=$?
14505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14506 (exit $ac_status); }; }; then
14507 ac_header_compiler=yes
14508else
14509 echo "$as_me: failed program was:" >&5
14510cat conftest.$ac_ext >&5
14511ac_header_compiler=no
14512fi
14513rm -f conftest.$ac_objext conftest.$ac_ext
14514echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14515echo "${ECHO_T}$ac_header_compiler" >&6
14516
14517# Is the header present?
14518echo "$as_me:$LINENO: checking wchar.h presence" >&5
14519echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14520cat >conftest.$ac_ext <<_ACEOF
14521#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014522#include "confdefs.h"
14523#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014524_ACEOF
14525if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14526 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14527 ac_status=$?
14528 egrep -v '^ *\+' conftest.er1 >conftest.err
14529 rm -f conftest.er1
14530 cat conftest.err >&5
14531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14532 (exit $ac_status); } >/dev/null; then
14533 if test -s conftest.err; then
14534 ac_cpp_err=$ac_c_preproc_warn_flag
14535 else
14536 ac_cpp_err=
14537 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014538else
Martin v. Löwis11437992002-04-12 09:54:03 +000014539 ac_cpp_err=yes
14540fi
14541if test -z "$ac_cpp_err"; then
14542 ac_header_preproc=yes
14543else
14544 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014545 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014546 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014547fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014548rm -f conftest.err conftest.$ac_ext
14549echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14550echo "${ECHO_T}$ac_header_preproc" >&6
14551
14552# So? What about this header?
14553case $ac_header_compiler:$ac_header_preproc in
14554 yes:no )
14555 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14556echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14557 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14558echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14559 no:yes )
14560 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14561echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14562 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14563echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14564 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14565echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14566esac
14567echo "$as_me:$LINENO: checking for wchar.h" >&5
14568echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14569if test "${ac_cv_header_wchar_h+set}" = set; then
14570 echo $ECHO_N "(cached) $ECHO_C" >&6
14571else
14572 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014573fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014574echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14575echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14576
14577fi
14578if test $ac_cv_header_wchar_h = yes; then
14579
14580
14581cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014582#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014583_ACEOF
14584
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014585 wchar_h="yes"
14586
Guido van Rossumef2255b2000-03-10 22:30:29 +000014587else
Martin v. Löwis11437992002-04-12 09:54:03 +000014588 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014589
14590fi
14591
Michael W. Hudson54241132001-12-07 15:38:26 +000014592
Martin v. Löwis11437992002-04-12 09:54:03 +000014593
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014594# determine wchar_t size
14595if test "$wchar_h" = yes
14596then
Martin v. Löwis11437992002-04-12 09:54:03 +000014597 echo "$as_me:$LINENO: checking for wchar_t" >&5
14598echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14599if test "${ac_cv_type_wchar_t+set}" = set; then
14600 echo $ECHO_N "(cached) $ECHO_C" >&6
14601else
14602 cat >conftest.$ac_ext <<_ACEOF
14603#line $LINENO "configure"
14604#include "confdefs.h"
14605#include <wchar.h>
14606
14607#ifdef F77_DUMMY_MAIN
14608# ifdef __cplusplus
14609 extern "C"
14610# endif
14611 int F77_DUMMY_MAIN() { return 1; }
14612#endif
14613int
14614main ()
14615{
14616if ((wchar_t *) 0)
14617 return 0;
14618if (sizeof (wchar_t))
14619 return 0;
14620 ;
14621 return 0;
14622}
14623_ACEOF
14624rm -f conftest.$ac_objext
14625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14626 (eval $ac_compile) 2>&5
14627 ac_status=$?
14628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14629 (exit $ac_status); } &&
14630 { ac_try='test -s conftest.$ac_objext'
14631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14632 (eval $ac_try) 2>&5
14633 ac_status=$?
14634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14635 (exit $ac_status); }; }; then
14636 ac_cv_type_wchar_t=yes
14637else
14638 echo "$as_me: failed program was:" >&5
14639cat conftest.$ac_ext >&5
14640ac_cv_type_wchar_t=no
14641fi
14642rm -f conftest.$ac_objext conftest.$ac_ext
14643fi
14644echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14645echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14646
14647echo "$as_me:$LINENO: checking size of wchar_t" >&5
14648echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14649if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14650 echo $ECHO_N "(cached) $ECHO_C" >&6
14651else
14652 if test "$ac_cv_type_wchar_t" = yes; then
14653 # The cast to unsigned long works around a bug in the HP C Compiler
14654 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14655 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14656 # This bug is HP SR number 8606223364.
14657 if test "$cross_compiling" = yes; then
14658 # Depending upon the size, compute the lo and hi bounds.
14659cat >conftest.$ac_ext <<_ACEOF
14660#line $LINENO "configure"
14661#include "confdefs.h"
14662#include <wchar.h>
14663
14664#ifdef F77_DUMMY_MAIN
14665# ifdef __cplusplus
14666 extern "C"
14667# endif
14668 int F77_DUMMY_MAIN() { return 1; }
14669#endif
14670int
14671main ()
14672{
14673static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14674test_array [0] = 0
14675
14676 ;
14677 return 0;
14678}
14679_ACEOF
14680rm -f conftest.$ac_objext
14681if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14682 (eval $ac_compile) 2>&5
14683 ac_status=$?
14684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14685 (exit $ac_status); } &&
14686 { ac_try='test -s conftest.$ac_objext'
14687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14688 (eval $ac_try) 2>&5
14689 ac_status=$?
14690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14691 (exit $ac_status); }; }; then
14692 ac_lo=0 ac_mid=0
14693 while :; do
14694 cat >conftest.$ac_ext <<_ACEOF
14695#line $LINENO "configure"
14696#include "confdefs.h"
14697#include <wchar.h>
14698
14699#ifdef F77_DUMMY_MAIN
14700# ifdef __cplusplus
14701 extern "C"
14702# endif
14703 int F77_DUMMY_MAIN() { return 1; }
14704#endif
14705int
14706main ()
14707{
14708static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14709test_array [0] = 0
14710
14711 ;
14712 return 0;
14713}
14714_ACEOF
14715rm -f conftest.$ac_objext
14716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14717 (eval $ac_compile) 2>&5
14718 ac_status=$?
14719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14720 (exit $ac_status); } &&
14721 { ac_try='test -s conftest.$ac_objext'
14722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14723 (eval $ac_try) 2>&5
14724 ac_status=$?
14725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14726 (exit $ac_status); }; }; then
14727 ac_hi=$ac_mid; break
14728else
14729 echo "$as_me: failed program was:" >&5
14730cat conftest.$ac_ext >&5
14731ac_lo=`expr $ac_mid + 1`
14732 if test $ac_lo -le $ac_mid; then
14733 ac_lo= ac_hi=
14734 break
14735 fi
14736 ac_mid=`expr 2 '*' $ac_mid + 1`
14737fi
14738rm -f conftest.$ac_objext conftest.$ac_ext
14739 done
14740else
14741 echo "$as_me: failed program was:" >&5
14742cat conftest.$ac_ext >&5
14743cat >conftest.$ac_ext <<_ACEOF
14744#line $LINENO "configure"
14745#include "confdefs.h"
14746#include <wchar.h>
14747
14748#ifdef F77_DUMMY_MAIN
14749# ifdef __cplusplus
14750 extern "C"
14751# endif
14752 int F77_DUMMY_MAIN() { return 1; }
14753#endif
14754int
14755main ()
14756{
14757static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14758test_array [0] = 0
14759
14760 ;
14761 return 0;
14762}
14763_ACEOF
14764rm -f conftest.$ac_objext
14765if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14766 (eval $ac_compile) 2>&5
14767 ac_status=$?
14768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14769 (exit $ac_status); } &&
14770 { ac_try='test -s conftest.$ac_objext'
14771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14772 (eval $ac_try) 2>&5
14773 ac_status=$?
14774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14775 (exit $ac_status); }; }; then
14776 ac_hi=-1 ac_mid=-1
14777 while :; do
14778 cat >conftest.$ac_ext <<_ACEOF
14779#line $LINENO "configure"
14780#include "confdefs.h"
14781#include <wchar.h>
14782
14783#ifdef F77_DUMMY_MAIN
14784# ifdef __cplusplus
14785 extern "C"
14786# endif
14787 int F77_DUMMY_MAIN() { return 1; }
14788#endif
14789int
14790main ()
14791{
14792static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14793test_array [0] = 0
14794
14795 ;
14796 return 0;
14797}
14798_ACEOF
14799rm -f conftest.$ac_objext
14800if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14801 (eval $ac_compile) 2>&5
14802 ac_status=$?
14803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14804 (exit $ac_status); } &&
14805 { ac_try='test -s conftest.$ac_objext'
14806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14807 (eval $ac_try) 2>&5
14808 ac_status=$?
14809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14810 (exit $ac_status); }; }; then
14811 ac_lo=$ac_mid; break
14812else
14813 echo "$as_me: failed program was:" >&5
14814cat conftest.$ac_ext >&5
14815ac_hi=`expr '(' $ac_mid ')' - 1`
14816 if test $ac_mid -le $ac_hi; then
14817 ac_lo= ac_hi=
14818 break
14819 fi
14820 ac_mid=`expr 2 '*' $ac_mid`
14821fi
14822rm -f conftest.$ac_objext conftest.$ac_ext
14823 done
14824else
14825 echo "$as_me: failed program was:" >&5
14826cat conftest.$ac_ext >&5
14827ac_lo= ac_hi=
14828fi
14829rm -f conftest.$ac_objext conftest.$ac_ext
14830fi
14831rm -f conftest.$ac_objext conftest.$ac_ext
14832# Binary search between lo and hi bounds.
14833while test "x$ac_lo" != "x$ac_hi"; do
14834 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14835 cat >conftest.$ac_ext <<_ACEOF
14836#line $LINENO "configure"
14837#include "confdefs.h"
14838#include <wchar.h>
14839
14840#ifdef F77_DUMMY_MAIN
14841# ifdef __cplusplus
14842 extern "C"
14843# endif
14844 int F77_DUMMY_MAIN() { return 1; }
14845#endif
14846int
14847main ()
14848{
14849static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14850test_array [0] = 0
14851
14852 ;
14853 return 0;
14854}
14855_ACEOF
14856rm -f conftest.$ac_objext
14857if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14858 (eval $ac_compile) 2>&5
14859 ac_status=$?
14860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14861 (exit $ac_status); } &&
14862 { ac_try='test -s conftest.$ac_objext'
14863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14864 (eval $ac_try) 2>&5
14865 ac_status=$?
14866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14867 (exit $ac_status); }; }; then
14868 ac_hi=$ac_mid
14869else
14870 echo "$as_me: failed program was:" >&5
14871cat conftest.$ac_ext >&5
14872ac_lo=`expr '(' $ac_mid ')' + 1`
14873fi
14874rm -f conftest.$ac_objext conftest.$ac_ext
14875done
14876case $ac_lo in
14877?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14878'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14879echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14880 { (exit 1); exit 1; }; } ;;
14881esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014882else
14883 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014884 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14885echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14886 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014887else
Martin v. Löwis11437992002-04-12 09:54:03 +000014888 cat >conftest.$ac_ext <<_ACEOF
14889#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014890#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014891#include <wchar.h>
14892
14893long longval () { return (long) (sizeof (wchar_t)); }
14894unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000014895#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014896#include <stdlib.h>
14897#ifdef F77_DUMMY_MAIN
14898# ifdef __cplusplus
14899 extern "C"
14900# endif
14901 int F77_DUMMY_MAIN() { return 1; }
14902#endif
14903int
14904main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014905{
Martin v. Löwis11437992002-04-12 09:54:03 +000014906
14907 FILE *f = fopen ("conftest.val", "w");
14908 if (! f)
14909 exit (1);
14910 if (((long) (sizeof (wchar_t))) < 0)
14911 {
14912 long i = longval ();
14913 if (i != ((long) (sizeof (wchar_t))))
14914 exit (1);
14915 fprintf (f, "%ld\n", i);
14916 }
14917 else
14918 {
14919 unsigned long i = ulongval ();
14920 if (i != ((long) (sizeof (wchar_t))))
14921 exit (1);
14922 fprintf (f, "%lu\n", i);
14923 }
14924 exit (ferror (f) || fclose (f) != 0);
14925
14926 ;
14927 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014928}
Martin v. Löwis11437992002-04-12 09:54:03 +000014929_ACEOF
14930rm -f conftest$ac_exeext
14931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14932 (eval $ac_link) 2>&5
14933 ac_status=$?
14934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14935 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14937 (eval $ac_try) 2>&5
14938 ac_status=$?
14939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14940 (exit $ac_status); }; }; then
14941 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000014942else
Martin v. Löwis11437992002-04-12 09:54:03 +000014943 echo "$as_me: program exited with status $ac_status" >&5
14944echo "$as_me: failed program was:" >&5
14945cat conftest.$ac_ext >&5
14946( exit $ac_status )
14947{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14948echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14949 { (exit 1); exit 1; }; }
14950fi
14951rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14952fi
14953fi
14954rm -f conftest.val
14955else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014956 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000014957fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014958fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014959echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
14960echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
14961cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014962#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014963_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014964
Michael W. Hudson54241132001-12-07 15:38:26 +000014965
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014966fi
14967
Martin v. Löwis11437992002-04-12 09:54:03 +000014968echo "$as_me:$LINENO: checking what type to use for unicode" >&5
14969echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014970# Check whether --enable-unicode or --disable-unicode was given.
14971if test "${enable_unicode+set}" = set; then
14972 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000014973
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014974else
14975 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014976fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014977
14978if test $enable_unicode = yes
14979then
Martin v. Löwisfd917792001-06-27 20:22:04 +000014980 # Without any arguments, Py_UNICODE defaults to two-byte mode
14981 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014982fi
14983
Martin v. Löwis0036cba2002-04-12 09:58:45 +000014984
14985
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014986case "$enable_unicode" in
14987ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014989#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000014990_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014991
14992 ;;
14993ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000014994 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014995#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000014996_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014997
14998 ;;
14999esac
15000
Michael W. Hudson54241132001-12-07 15:38:26 +000015001
Martin v. Löwis11437992002-04-12 09:54:03 +000015002
15003
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015004
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015005if test "$enable_unicode" = "no"
15006then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015007 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 echo "$as_me:$LINENO: result: not used" >&5
15009echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015010else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015011 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015012
15013cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015014#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015015_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015016
15017 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15018 then
15019 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015020
Martin v. Löwis11437992002-04-12 09:54:03 +000015021cat >>confdefs.h <<\_ACEOF
15022#define HAVE_USABLE_WCHAR_T 1
15023_ACEOF
15024
15025 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015026#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015027_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015028
15029 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15030 then
15031 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015032 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015033#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015034_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015035
15036 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15037 then
15038 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015040#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015041_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015042
15043 else
15044 PY_UNICODE_TYPE="no type found"
15045 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15047echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015048fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015049
15050# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015051echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15052echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15053if test "${ac_cv_c_bigendian+set}" = set; then
15054 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015055else
Martin v. Löwis11437992002-04-12 09:54:03 +000015056 # See if sys/param.h defines the BYTE_ORDER macro.
15057cat >conftest.$ac_ext <<_ACEOF
15058#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015059#include "confdefs.h"
15060#include <sys/types.h>
15061#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015062
Martin v. Löwis11437992002-04-12 09:54:03 +000015063#ifdef F77_DUMMY_MAIN
15064# ifdef __cplusplus
15065 extern "C"
15066# endif
15067 int F77_DUMMY_MAIN() { return 1; }
15068#endif
15069int
15070main ()
15071{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015072#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15073 bogus endian macros
15074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015075
15076 ;
15077 return 0;
15078}
15079_ACEOF
15080rm -f conftest.$ac_objext
15081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15082 (eval $ac_compile) 2>&5
15083 ac_status=$?
15084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15085 (exit $ac_status); } &&
15086 { ac_try='test -s conftest.$ac_objext'
15087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15088 (eval $ac_try) 2>&5
15089 ac_status=$?
15090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15091 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015092 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015093cat >conftest.$ac_ext <<_ACEOF
15094#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015095#include "confdefs.h"
15096#include <sys/types.h>
15097#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015098
Martin v. Löwis11437992002-04-12 09:54:03 +000015099#ifdef F77_DUMMY_MAIN
15100# ifdef __cplusplus
15101 extern "C"
15102# endif
15103 int F77_DUMMY_MAIN() { return 1; }
15104#endif
15105int
15106main ()
15107{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015108#if BYTE_ORDER != BIG_ENDIAN
15109 not big endian
15110#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015111
15112 ;
15113 return 0;
15114}
15115_ACEOF
15116rm -f conftest.$ac_objext
15117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15118 (eval $ac_compile) 2>&5
15119 ac_status=$?
15120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15121 (exit $ac_status); } &&
15122 { ac_try='test -s conftest.$ac_objext'
15123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15124 (eval $ac_try) 2>&5
15125 ac_status=$?
15126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15127 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015128 ac_cv_c_bigendian=yes
15129else
Martin v. Löwis11437992002-04-12 09:54:03 +000015130 echo "$as_me: failed program was:" >&5
15131cat conftest.$ac_ext >&5
15132ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015133fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015134rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015135else
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 echo "$as_me: failed program was:" >&5
15137cat conftest.$ac_ext >&5
15138# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015139if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015140 # try to guess the endianess by grep'ing values into an object file
15141 ac_cv_c_bigendian=unknown
15142 cat >conftest.$ac_ext <<_ACEOF
15143#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015144#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015145short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15146short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15147void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15148short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15149short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15150void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15151#ifdef F77_DUMMY_MAIN
15152# ifdef __cplusplus
15153 extern "C"
15154# endif
15155 int F77_DUMMY_MAIN() { return 1; }
15156#endif
15157int
15158main ()
15159{
15160 _ascii (); _ebcdic ();
15161 ;
15162 return 0;
15163}
15164_ACEOF
15165rm -f conftest.$ac_objext
15166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15167 (eval $ac_compile) 2>&5
15168 ac_status=$?
15169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15170 (exit $ac_status); } &&
15171 { ac_try='test -s conftest.$ac_objext'
15172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15173 (eval $ac_try) 2>&5
15174 ac_status=$?
15175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15176 (exit $ac_status); }; }; then
15177 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15178 ac_cv_c_bigendian=yes
15179fi
15180if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15181 if test "$ac_cv_c_bigendian" = unknown; then
15182 ac_cv_c_bigendian=no
15183 else
15184 # finding both strings is unlikely to happen, but who knows?
15185 ac_cv_c_bigendian=unknown
15186 fi
15187fi
15188else
15189 echo "$as_me: failed program was:" >&5
15190cat conftest.$ac_ext >&5
15191fi
15192rm -f conftest.$ac_objext conftest.$ac_ext
15193else
15194 cat >conftest.$ac_ext <<_ACEOF
15195#line $LINENO "configure"
15196#include "confdefs.h"
15197int
15198main ()
15199{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015200 /* Are we little or big endian? From Harbison&Steele. */
15201 union
15202 {
15203 long l;
15204 char c[sizeof (long)];
15205 } u;
15206 u.l = 1;
15207 exit (u.c[sizeof (long) - 1] == 1);
15208}
Martin v. Löwis11437992002-04-12 09:54:03 +000015209_ACEOF
15210rm -f conftest$ac_exeext
15211if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15212 (eval $ac_link) 2>&5
15213 ac_status=$?
15214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15215 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15217 (eval $ac_try) 2>&5
15218 ac_status=$?
15219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15220 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015221 ac_cv_c_bigendian=no
15222else
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 echo "$as_me: program exited with status $ac_status" >&5
15224echo "$as_me: failed program was:" >&5
15225cat conftest.$ac_ext >&5
15226( exit $ac_status )
15227ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015228fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015229rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015231fi
15232rm -f conftest.$ac_objext conftest.$ac_ext
15233fi
15234echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15235echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15236case $ac_cv_c_bigendian in
15237 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015238
Martin v. Löwis11437992002-04-12 09:54:03 +000015239cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015240#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015241_ACEOF
15242 ;;
15243 no)
15244 ;;
15245 *)
15246 { { echo "$as_me:$LINENO: error: unknown endianess
15247presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15248echo "$as_me: error: unknown endianess
15249presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15250 { (exit 1); exit 1; }; } ;;
15251esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015252
Michael W. Hudson54241132001-12-07 15:38:26 +000015253
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015254# Check whether right shifting a negative integer extends the sign bit
15255# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015256echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15257echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15258if test "${ac_cv_rshift_extends_sign+set}" = set; then
15259 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015260else
Martin v. Löwis11437992002-04-12 09:54:03 +000015261
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015262if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015263 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015264else
Martin v. Löwis11437992002-04-12 09:54:03 +000015265 cat >conftest.$ac_ext <<_ACEOF
15266#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015267#include "confdefs.h"
15268
15269int main()
15270{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015271 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015272}
15273
Martin v. Löwis11437992002-04-12 09:54:03 +000015274_ACEOF
15275rm -f conftest$ac_exeext
15276if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15277 (eval $ac_link) 2>&5
15278 ac_status=$?
15279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15280 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15282 (eval $ac_try) 2>&5
15283 ac_status=$?
15284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15285 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015286 ac_cv_rshift_extends_sign=yes
15287else
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 echo "$as_me: program exited with status $ac_status" >&5
15289echo "$as_me: failed program was:" >&5
15290cat conftest.$ac_ext >&5
15291( exit $ac_status )
15292ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015293fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015294rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15295fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015296fi
15297
Martin v. Löwis11437992002-04-12 09:54:03 +000015298echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15299echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015300if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015301then
Martin v. Löwis11437992002-04-12 09:54:03 +000015302
15303cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015304#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015305_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015306
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015307fi
15308
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015309# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015310echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15311echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15312if test "${ac_cv_have_getc_unlocked+set}" = set; then
15313 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015314else
Martin v. Löwis11437992002-04-12 09:54:03 +000015315
15316cat >conftest.$ac_ext <<_ACEOF
15317#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015318#include "confdefs.h"
15319#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015320#ifdef F77_DUMMY_MAIN
15321# ifdef __cplusplus
15322 extern "C"
15323# endif
15324 int F77_DUMMY_MAIN() { return 1; }
15325#endif
15326int
15327main ()
15328{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015329
15330 FILE *f = fopen("/dev/null", "r");
15331 flockfile(f);
15332 getc_unlocked(f);
15333 funlockfile(f);
15334
Martin v. Löwis11437992002-04-12 09:54:03 +000015335 ;
15336 return 0;
15337}
15338_ACEOF
15339rm -f conftest.$ac_objext conftest$ac_exeext
15340if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15341 (eval $ac_link) 2>&5
15342 ac_status=$?
15343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15344 (exit $ac_status); } &&
15345 { ac_try='test -s conftest$ac_exeext'
15346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15347 (eval $ac_try) 2>&5
15348 ac_status=$?
15349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15350 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015351 ac_cv_have_getc_unlocked=yes
15352else
Martin v. Löwis11437992002-04-12 09:54:03 +000015353 echo "$as_me: failed program was:" >&5
15354cat conftest.$ac_ext >&5
15355ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015356fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015357rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015358fi
15359
Martin v. Löwis11437992002-04-12 09:54:03 +000015360echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15361echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015362if test "$ac_cv_have_getc_unlocked" = yes
15363then
Martin v. Löwis11437992002-04-12 09:54:03 +000015364
15365cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015366#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015367_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015368
15369fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015370
Martin v. Löwis0daad592001-09-30 21:09:59 +000015371# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015372echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15373echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15374if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15375 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015376else
Martin v. Löwis11437992002-04-12 09:54:03 +000015377 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015378LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015379cat >conftest.$ac_ext <<_ACEOF
15380#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015381#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015382
Guido van Rossum353ae582001-07-10 16:45:32 +000015383/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015384#ifdef __cplusplus
15385extern "C"
15386#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015387/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015388 builtin and then its argument prototype would still apply. */
15389char rl_pre_input_hook ();
15390#ifdef F77_DUMMY_MAIN
15391# ifdef __cplusplus
15392 extern "C"
15393# endif
15394 int F77_DUMMY_MAIN() { return 1; }
15395#endif
15396int
15397main ()
15398{
15399rl_pre_input_hook ();
15400 ;
15401 return 0;
15402}
15403_ACEOF
15404rm -f conftest.$ac_objext conftest$ac_exeext
15405if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15406 (eval $ac_link) 2>&5
15407 ac_status=$?
15408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15409 (exit $ac_status); } &&
15410 { ac_try='test -s conftest$ac_exeext'
15411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15412 (eval $ac_try) 2>&5
15413 ac_status=$?
15414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15415 (exit $ac_status); }; }; then
15416 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015417else
Martin v. Löwis11437992002-04-12 09:54:03 +000015418 echo "$as_me: failed program was:" >&5
15419cat conftest.$ac_ext >&5
15420ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015421fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015422rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15423LIBS=$ac_check_lib_save_LIBS
15424fi
15425echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15426echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15427if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015428
Martin v. Löwis11437992002-04-12 09:54:03 +000015429cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015430#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015431_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015432
Martin v. Löwis0daad592001-09-30 21:09:59 +000015433fi
15434
Michael W. Hudson54241132001-12-07 15:38:26 +000015435
Martin v. Löwis0daad592001-09-30 21:09:59 +000015436# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015437echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15438echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15439if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15440 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015441else
Martin v. Löwis11437992002-04-12 09:54:03 +000015442 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015443LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015444cat >conftest.$ac_ext <<_ACEOF
15445#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015446#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015447
Martin v. Löwis0daad592001-09-30 21:09:59 +000015448/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015449#ifdef __cplusplus
15450extern "C"
15451#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015452/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 builtin and then its argument prototype would still apply. */
15454char rl_completion_matches ();
15455#ifdef F77_DUMMY_MAIN
15456# ifdef __cplusplus
15457 extern "C"
15458# endif
15459 int F77_DUMMY_MAIN() { return 1; }
15460#endif
15461int
15462main ()
15463{
15464rl_completion_matches ();
15465 ;
15466 return 0;
15467}
15468_ACEOF
15469rm -f conftest.$ac_objext conftest$ac_exeext
15470if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15471 (eval $ac_link) 2>&5
15472 ac_status=$?
15473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15474 (exit $ac_status); } &&
15475 { ac_try='test -s conftest$ac_exeext'
15476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15477 (eval $ac_try) 2>&5
15478 ac_status=$?
15479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15480 (exit $ac_status); }; }; then
15481 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015482else
Martin v. Löwis11437992002-04-12 09:54:03 +000015483 echo "$as_me: failed program was:" >&5
15484cat conftest.$ac_ext >&5
15485ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015486fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015487rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15488LIBS=$ac_check_lib_save_LIBS
15489fi
15490echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15491echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15492if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015493
Martin v. Löwis11437992002-04-12 09:54:03 +000015494cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015495#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015496_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015497
Guido van Rossum353ae582001-07-10 16:45:32 +000015498fi
15499
Jack Jansendd19cf82001-12-06 22:36:17 +000015500
Martin v. Löwis11437992002-04-12 09:54:03 +000015501echo "$as_me:$LINENO: checking for broken nice()" >&5
15502echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15503if test "${ac_cv_broken_nice+set}" = set; then
15504 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015505else
Martin v. Löwis11437992002-04-12 09:54:03 +000015506
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015507if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015508 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015509else
Martin v. Löwis11437992002-04-12 09:54:03 +000015510 cat >conftest.$ac_ext <<_ACEOF
15511#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015512#include "confdefs.h"
15513
15514int main()
15515{
15516 int val1 = nice(1);
15517 if (val1 != -1 && val1 == nice(2))
15518 exit(0);
15519 exit(1);
15520}
15521
Martin v. Löwis11437992002-04-12 09:54:03 +000015522_ACEOF
15523rm -f conftest$ac_exeext
15524if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15525 (eval $ac_link) 2>&5
15526 ac_status=$?
15527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15528 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15530 (eval $ac_try) 2>&5
15531 ac_status=$?
15532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15533 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015534 ac_cv_broken_nice=yes
15535else
Martin v. Löwis11437992002-04-12 09:54:03 +000015536 echo "$as_me: program exited with status $ac_status" >&5
15537echo "$as_me: failed program was:" >&5
15538cat conftest.$ac_ext >&5
15539( exit $ac_status )
15540ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015541fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015542rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15543fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015544fi
15545
Martin v. Löwis11437992002-04-12 09:54:03 +000015546echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15547echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015548if test "$ac_cv_broken_nice" = yes
15549then
Martin v. Löwis11437992002-04-12 09:54:03 +000015550
15551cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015552#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015553_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015554
15555fi
15556
Jack Jansen666b1e72001-10-31 12:11:48 +000015557# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015558echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15559echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15560if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15561 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015562else
Martin v. Löwis11437992002-04-12 09:54:03 +000015563 cat >conftest.$ac_ext <<_ACEOF
15564#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015565#include "confdefs.h"
15566#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015567#ifdef F77_DUMMY_MAIN
15568# ifdef __cplusplus
15569 extern "C"
15570# endif
15571 int F77_DUMMY_MAIN() { return 1; }
15572#endif
15573int
15574main ()
15575{
Jack Jansen666b1e72001-10-31 12:11:48 +000015576
15577 int rtn;
15578 rtn = mvwdelch(0,0,0);
15579
Martin v. Löwis11437992002-04-12 09:54:03 +000015580 ;
15581 return 0;
15582}
15583_ACEOF
15584rm -f conftest.$ac_objext
15585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15586 (eval $ac_compile) 2>&5
15587 ac_status=$?
15588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15589 (exit $ac_status); } &&
15590 { ac_try='test -s conftest.$ac_objext'
15591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15592 (eval $ac_try) 2>&5
15593 ac_status=$?
15594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15595 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015596 ac_cv_mvwdelch_is_expression=yes
15597else
Martin v. Löwis11437992002-04-12 09:54:03 +000015598 echo "$as_me: failed program was:" >&5
15599cat conftest.$ac_ext >&5
15600ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015601fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015602rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015603fi
15604
Martin v. Löwis11437992002-04-12 09:54:03 +000015605echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15606echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015607
15608if test "$ac_cv_mvwdelch_is_expression" = yes
15609then
Martin v. Löwis11437992002-04-12 09:54:03 +000015610
15611cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015612#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015613_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015614
15615fi
15616
Martin v. Löwis11437992002-04-12 09:54:03 +000015617echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15618echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15619if test "${ac_cv_window_has_flags+set}" = set; then
15620 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015621else
Martin v. Löwis11437992002-04-12 09:54:03 +000015622 cat >conftest.$ac_ext <<_ACEOF
15623#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015624#include "confdefs.h"
15625#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015626#ifdef F77_DUMMY_MAIN
15627# ifdef __cplusplus
15628 extern "C"
15629# endif
15630 int F77_DUMMY_MAIN() { return 1; }
15631#endif
15632int
15633main ()
15634{
Jack Jansen666b1e72001-10-31 12:11:48 +000015635
15636 WINDOW *w;
15637 w->_flags = 0;
15638
Martin v. Löwis11437992002-04-12 09:54:03 +000015639 ;
15640 return 0;
15641}
15642_ACEOF
15643rm -f conftest.$ac_objext
15644if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15645 (eval $ac_compile) 2>&5
15646 ac_status=$?
15647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15648 (exit $ac_status); } &&
15649 { ac_try='test -s conftest.$ac_objext'
15650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15651 (eval $ac_try) 2>&5
15652 ac_status=$?
15653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15654 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015655 ac_cv_window_has_flags=yes
15656else
Martin v. Löwis11437992002-04-12 09:54:03 +000015657 echo "$as_me: failed program was:" >&5
15658cat conftest.$ac_ext >&5
15659ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015660fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015661rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015662fi
15663
Martin v. Löwis11437992002-04-12 09:54:03 +000015664echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15665echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015666
Jack Jansen666b1e72001-10-31 12:11:48 +000015667
15668if test "$ac_cv_window_has_flags" = yes
15669then
Martin v. Löwis11437992002-04-12 09:54:03 +000015670
15671cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015672#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015673_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015674
15675fi
15676
Guido van Rossum95713eb2000-05-18 20:53:31 +000015677# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15678# Add sys/socket.h to confdefs.h
15679cat >> confdefs.h <<\EOF
15680#ifdef HAVE_SYS_SOCKET_H
15681#include <sys/socket.h>
15682#endif
15683EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015684echo "$as_me:$LINENO: checking for socklen_t" >&5
15685echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15686if test "${ac_cv_type_socklen_t+set}" = set; then
15687 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015688else
Martin v. Löwis11437992002-04-12 09:54:03 +000015689 cat >conftest.$ac_ext <<_ACEOF
15690#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015691#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015692$ac_includes_default
15693#ifdef F77_DUMMY_MAIN
15694# ifdef __cplusplus
15695 extern "C"
15696# endif
15697 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015699int
15700main ()
15701{
15702if ((socklen_t *) 0)
15703 return 0;
15704if (sizeof (socklen_t))
15705 return 0;
15706 ;
15707 return 0;
15708}
15709_ACEOF
15710rm -f conftest.$ac_objext
15711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15712 (eval $ac_compile) 2>&5
15713 ac_status=$?
15714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15715 (exit $ac_status); } &&
15716 { ac_try='test -s conftest.$ac_objext'
15717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15718 (eval $ac_try) 2>&5
15719 ac_status=$?
15720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15721 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015722 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015723else
Martin v. Löwis11437992002-04-12 09:54:03 +000015724 echo "$as_me: failed program was:" >&5
15725cat conftest.$ac_ext >&5
15726ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015727fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015728rm -f conftest.$ac_objext conftest.$ac_ext
15729fi
15730echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15731echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15732if test $ac_cv_type_socklen_t = yes; then
15733 :
15734else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015735
Martin v. Löwis11437992002-04-12 09:54:03 +000015736cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015737#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015738_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015739
15740fi
15741
Michael W. Hudson54241132001-12-07 15:38:26 +000015742
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015743#AC_MSG_CHECKING(for Modules/Setup)
15744#if test ! -f Modules/Setup ; then
15745# if test ! -d Modules ; then
15746# mkdir Modules
15747# fi
15748# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15749# AC_MSG_RESULT(creating)
15750#else
15751# AC_MSG_RESULT(already exists)
15752#fi
15753
Michael W. Hudson54241132001-12-07 15:38:26 +000015754
15755
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015756for h in `(cd $srcdir;echo Python/thread_*.h)`
15757do
15758 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15759done
15760
Michael W. Hudson54241132001-12-07 15:38:26 +000015761
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +000015762SRCDIRS="Parser Grammar Objects Python Modules"
Martin v. Löwis11437992002-04-12 09:54:03 +000015763echo "$as_me:$LINENO: checking for build directories" >&5
15764echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015765for dir in $SRCDIRS; do
15766 if test ! -d $dir; then
15767 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015768 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015769done
Martin v. Löwis11437992002-04-12 09:54:03 +000015770echo "$as_me:$LINENO: result: done" >&5
15771echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015772
Guido van Rossum627b2d71993-12-24 10:39:16 +000015773# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015774ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15775cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015776# This file is a shell script that caches the results of configure
15777# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015778# scripts and configure runs, see configure's option --config-cache.
15779# It is not useful on other systems. If it contains results you don't
15780# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015781#
Martin v. Löwis11437992002-04-12 09:54:03 +000015782# config.status only pays attention to the cache file if you give it
15783# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015784#
Martin v. Löwis11437992002-04-12 09:54:03 +000015785# `ac_cv_env_foo' variables (set or unset) will be overriden when
15786# loading this file, other *unset* `ac_cv_foo' will be assigned the
15787# following values.
15788
15789_ACEOF
15790
Guido van Rossumf78abae1997-01-21 22:02:36 +000015791# The following way of writing the cache mishandles newlines in values,
15792# but we know of no workaround that is simple, portable, and efficient.
15793# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015794# Ultrix sh set writes to stderr and can't be redirected directly,
15795# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015796{
15797 (set) 2>&1 |
15798 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15799 *ac_space=\ *)
15800 # `set' does not quote correctly, so add quotes (double-quote
15801 # substitution turns \\\\ into \\, and sed turns \\ into \).
15802 sed -n \
15803 "s/'/'\\\\''/g;
15804 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15805 ;;
15806 *)
15807 # `set' quotes correctly as required by POSIX, so do not add quotes.
15808 sed -n \
15809 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15810 ;;
15811 esac;
15812} |
15813 sed '
15814 t clear
15815 : clear
15816 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15817 t end
15818 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15819 : end' >>confcache
15820if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015821 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015822 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15823 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015824 else
15825 echo "not updating unwritable cache $cache_file"
15826 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015827fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015828rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015829
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015830test "x$prefix" = xNONE && prefix=$ac_default_prefix
15831# Let make expand exec_prefix.
15832test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015833
Martin v. Löwis11437992002-04-12 09:54:03 +000015834# VPATH may cause trouble with some makes, so we remove $(srcdir),
15835# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15836# trailing colons and then remove the whole line if VPATH becomes empty
15837# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015838if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015839 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15840s/:*\$(srcdir):*/:/;
15841s/:*\${srcdir}:*/:/;
15842s/:*@srcdir@:*/:/;
15843s/^\([^=]*=[ ]*\):*/\1/;
15844s/:*$//;
15845s/^[^=]*=[ ]*$//;
15846}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015847fi
15848
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015849DEFS=-DHAVE_CONFIG_H
15850
Martin v. Löwis11437992002-04-12 09:54:03 +000015851
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015852: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015853ac_clean_files_save=$ac_clean_files
15854ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15855{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15856echo "$as_me: creating $CONFIG_STATUS" >&6;}
15857cat >$CONFIG_STATUS <<_ACEOF
15858#! $SHELL
15859# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015860# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015861# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015862# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015863
Martin v. Löwis11437992002-04-12 09:54:03 +000015864debug=false
15865SHELL=\${CONFIG_SHELL-$SHELL}
15866_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015867
Martin v. Löwis11437992002-04-12 09:54:03 +000015868cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015869
Martin v. Löwis11437992002-04-12 09:54:03 +000015870## --------------------- ##
15871## M4sh Initialization. ##
15872## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015873
Martin v. Löwis11437992002-04-12 09:54:03 +000015874# Be Bourne compatible
15875if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15876 emulate sh
15877 NULLCMD=:
15878elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15879 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000015880fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015881
Martin v. Löwis11437992002-04-12 09:54:03 +000015882# NLS nuisances.
15883# Support unset when possible.
15884if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15885 as_unset=unset
15886else
15887 as_unset=false
15888fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015889
Martin v. Löwis11437992002-04-12 09:54:03 +000015890(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
15891 { $as_unset LANG || test "${LANG+set}" != set; } ||
15892 { LANG=C; export LANG; }
15893(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
15894 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
15895 { LC_ALL=C; export LC_ALL; }
15896(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
15897 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
15898 { LC_TIME=C; export LC_TIME; }
15899(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
15900 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
15901 { LC_CTYPE=C; export LC_CTYPE; }
15902(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
15903 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
15904 { LANGUAGE=C; export LANGUAGE; }
15905(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
15906 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
15907 { LC_COLLATE=C; export LC_COLLATE; }
15908(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
15909 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
15910 { LC_NUMERIC=C; export LC_NUMERIC; }
15911(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
15912 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
15913 { LC_MESSAGES=C; export LC_MESSAGES; }
15914
15915
15916# Name of the executable.
15917as_me=`(basename "$0") 2>/dev/null ||
15918$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15919 X"$0" : 'X\(//\)$' \| \
15920 X"$0" : 'X\(/\)$' \| \
15921 . : '\(.\)' 2>/dev/null ||
15922echo X/"$0" |
15923 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15924 /^X\/\(\/\/\)$/{ s//\1/; q; }
15925 /^X\/\(\/\).*/{ s//\1/; q; }
15926 s/.*/./; q'`
15927
15928# PATH needs CR, and LINENO needs CR and PATH.
15929# Avoid depending upon Character Ranges.
15930as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15931as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15932as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15933as_cr_digits='0123456789'
15934as_cr_alnum=$as_cr_Letters$as_cr_digits
15935
15936# The user is always right.
15937if test "${PATH_SEPARATOR+set}" != set; then
15938 echo "#! /bin/sh" >conftest.sh
15939 echo "exit 0" >>conftest.sh
15940 chmod +x conftest.sh
15941 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
15942 PATH_SEPARATOR=';'
15943 else
15944 PATH_SEPARATOR=:
15945 fi
15946 rm -f conftest.sh
15947fi
15948
15949
15950 as_lineno_1=$LINENO
15951 as_lineno_2=$LINENO
15952 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15953 test "x$as_lineno_1" != "x$as_lineno_2" &&
15954 test "x$as_lineno_3" = "x$as_lineno_2" || {
15955 # Find who we are. Look in the path if we contain no path at all
15956 # relative or not.
15957 case $0 in
15958 *[\\/]* ) as_myself=$0 ;;
15959 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15960for as_dir in $PATH
15961do
15962 IFS=$as_save_IFS
15963 test -z "$as_dir" && as_dir=.
15964 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15965done
15966
15967 ;;
15968 esac
15969 # We did not find ourselves, most probably we were run as `sh COMMAND'
15970 # in which case we are not to be found in the path.
15971 if test "x$as_myself" = x; then
15972 as_myself=$0
15973 fi
15974 if test ! -f "$as_myself"; then
15975 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
15976echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
15977 { (exit 1); exit 1; }; }
15978 fi
15979 case $CONFIG_SHELL in
15980 '')
15981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15982for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
15983do
15984 IFS=$as_save_IFS
15985 test -z "$as_dir" && as_dir=.
15986 for as_base in sh bash ksh sh5; do
15987 case $as_dir in
15988 /*)
15989 if ("$as_dir/$as_base" -c '
15990 as_lineno_1=$LINENO
15991 as_lineno_2=$LINENO
15992 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15993 test "x$as_lineno_1" != "x$as_lineno_2" &&
15994 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
15995 CONFIG_SHELL=$as_dir/$as_base
15996 export CONFIG_SHELL
15997 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
15998 fi;;
15999 esac
16000 done
16001done
16002;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016003 esac
16004
Martin v. Löwis11437992002-04-12 09:54:03 +000016005 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16006 # uniformly replaced by the line number. The first 'sed' inserts a
16007 # line-number line before each line; the second 'sed' does the real
16008 # work. The second script uses 'N' to pair each line-number line
16009 # with the numbered line, and appends trailing '-' during
16010 # substitution so that $LINENO is not a special case at line end.
16011 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16012 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16013 sed '=' <$as_myself |
16014 sed '
16015 N
16016 s,$,-,
16017 : loop
16018 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16019 t loop
16020 s,-$,,
16021 s,^['$as_cr_digits']*\n,,
16022 ' >$as_me.lineno &&
16023 chmod +x $as_me.lineno ||
16024 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16025echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16026 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016027
Martin v. Löwis11437992002-04-12 09:54:03 +000016028 # Don't try to exec as it changes $[0], causing all sort of problems
16029 # (the dirname of $[0] is not the place where we might find the
16030 # original and so on. Autoconf is especially sensible to this).
16031 . ./$as_me.lineno
16032 # Exit status is that of the last command.
16033 exit
16034}
16035
16036
16037case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16038 *c*,-n*) ECHO_N= ECHO_C='
16039' ECHO_T=' ' ;;
16040 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16041 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16042esac
16043
16044if expr a : '\(a\)' >/dev/null 2>&1; then
16045 as_expr=expr
16046else
16047 as_expr=false
16048fi
16049
16050rm -f conf$$ conf$$.exe conf$$.file
16051echo >conf$$.file
16052if ln -s conf$$.file conf$$ 2>/dev/null; then
16053 # We could just check for DJGPP; but this test a) works b) is more generic
16054 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16055 if test -f conf$$.exe; then
16056 # Don't use ln at all; we don't have any links
16057 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016058 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016059 as_ln_s='ln -s'
16060 fi
16061elif ln conf$$.file conf$$ 2>/dev/null; then
16062 as_ln_s=ln
16063else
16064 as_ln_s='cp -p'
16065fi
16066rm -f conf$$ conf$$.exe conf$$.file
16067
16068as_executable_p="test -f"
16069
16070# Sed expression to map a string onto a valid CPP name.
16071as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16072
16073# Sed expression to map a string onto a valid variable name.
16074as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16075
16076
16077# IFS
16078# We need space, tab and new line, in precisely that order.
16079as_nl='
16080'
16081IFS=" $as_nl"
16082
16083# CDPATH.
16084$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16085
16086exec 6>&1
16087
16088# Open the log real soon, to keep \$[0] and so on meaningful, and to
16089# report actual input values of CONFIG_FILES etc. instead of their
16090# values after options handling. Logging --version etc. is OK.
16091exec 5>>config.log
16092{
16093 echo
16094 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16095## Running $as_me. ##
16096_ASBOX
16097} >&5
16098cat >&5 <<_CSEOF
16099
16100This file was extended by $as_me, which was
16101generated by GNU Autoconf 2.53. Invocation command line was
16102
16103 CONFIG_FILES = $CONFIG_FILES
16104 CONFIG_HEADERS = $CONFIG_HEADERS
16105 CONFIG_LINKS = $CONFIG_LINKS
16106 CONFIG_COMMANDS = $CONFIG_COMMANDS
16107 $ $0 $@
16108
16109_CSEOF
16110echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16111echo >&5
16112_ACEOF
16113
16114# Files that config.status was made for.
16115if test -n "$ac_config_files"; then
16116 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16117fi
16118
16119if test -n "$ac_config_headers"; then
16120 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16121fi
16122
16123if test -n "$ac_config_links"; then
16124 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16125fi
16126
16127if test -n "$ac_config_commands"; then
16128 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16129fi
16130
16131cat >>$CONFIG_STATUS <<\_ACEOF
16132
16133ac_cs_usage="\
16134\`$as_me' instantiates files from templates according to the
16135current configuration.
16136
16137Usage: $0 [OPTIONS] [FILE]...
16138
16139 -h, --help print this help, then exit
16140 -V, --version print version number, then exit
16141 -d, --debug don't remove temporary files
16142 --recheck update $as_me by reconfiguring in the same conditions
16143 --file=FILE[:TEMPLATE]
16144 instantiate the configuration file FILE
16145 --header=FILE[:TEMPLATE]
16146 instantiate the configuration header FILE
16147
16148Configuration files:
16149$config_files
16150
16151Configuration headers:
16152$config_headers
16153
16154Report bugs to <bug-autoconf@gnu.org>."
16155_ACEOF
16156
16157cat >>$CONFIG_STATUS <<_ACEOF
16158ac_cs_version="\\
16159config.status
16160configured by $0, generated by GNU Autoconf 2.53,
16161 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16162
16163Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16164Free Software Foundation, Inc.
16165This config.status script is free software; the Free Software Foundation
16166gives unlimited permission to copy, distribute and modify it."
16167srcdir=$srcdir
16168INSTALL="$INSTALL"
16169_ACEOF
16170
16171cat >>$CONFIG_STATUS <<\_ACEOF
16172# If no file are specified by the user, then we need to provide default
16173# value. By we need to know if files were specified by the user.
16174ac_need_defaults=:
16175while test $# != 0
16176do
16177 case $1 in
16178 --*=*)
16179 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16180 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16181 shift
16182 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16183 shift
16184 ;;
16185 -*);;
16186 *) # This is not an option, so the user has probably given explicit
16187 # arguments.
16188 ac_need_defaults=false;;
16189 esac
16190
16191 case $1 in
16192 # Handling of the options.
16193_ACEOF
16194cat >>$CONFIG_STATUS <<_ACEOF
16195 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16196 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16197 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16198_ACEOF
16199cat >>$CONFIG_STATUS <<\_ACEOF
16200 --version | --vers* | -V )
16201 echo "$ac_cs_version"; exit 0 ;;
16202 --he | --h)
16203 # Conflict between --help and --header
16204 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16205Try \`$0 --help' for more information." >&5
16206echo "$as_me: error: ambiguous option: $1
16207Try \`$0 --help' for more information." >&2;}
16208 { (exit 1); exit 1; }; };;
16209 --help | --hel | -h )
16210 echo "$ac_cs_usage"; exit 0 ;;
16211 --debug | --d* | -d )
16212 debug=: ;;
16213 --file | --fil | --fi | --f )
16214 shift
16215 CONFIG_FILES="$CONFIG_FILES $1"
16216 ac_need_defaults=false;;
16217 --header | --heade | --head | --hea )
16218 shift
16219 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16220 ac_need_defaults=false;;
16221
16222 # This is an error.
16223 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16224Try \`$0 --help' for more information." >&5
16225echo "$as_me: error: unrecognized option: $1
16226Try \`$0 --help' for more information." >&2;}
16227 { (exit 1); exit 1; }; } ;;
16228
16229 *) ac_config_targets="$ac_config_targets $1" ;;
16230
16231 esac
16232 shift
16233done
16234
16235_ACEOF
16236
16237
16238
16239
16240
16241cat >>$CONFIG_STATUS <<\_ACEOF
16242for ac_config_target in $ac_config_targets
16243do
16244 case "$ac_config_target" in
16245 # Handling of arguments.
16246 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16247 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16248 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16249 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16250echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16251 { (exit 1); exit 1; }; };;
16252 esac
16253done
16254
16255# If the user did not use the arguments to specify the items to instantiate,
16256# then the envvar interface is used. Set only those that are not.
16257# We use the long form for the default assignment because of an extremely
16258# bizarre bug on SunOS 4.1.3.
16259if $ac_need_defaults; then
16260 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16261 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16262fi
16263
16264# Create a temporary directory, and hook for its removal unless debugging.
16265$debug ||
16266{
16267 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16268 trap '{ (exit 1); exit 1; }' 1 2 13 15
16269}
16270
16271# Create a (secure) tmp directory for tmp files.
16272: ${TMPDIR=/tmp}
16273{
16274 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16275 test -n "$tmp" && test -d "$tmp"
16276} ||
16277{
16278 tmp=$TMPDIR/cs$$-$RANDOM
16279 (umask 077 && mkdir $tmp)
16280} ||
16281{
16282 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16283 { (exit 1); exit 1; }
16284}
16285
16286_ACEOF
16287
16288cat >>$CONFIG_STATUS <<_ACEOF
16289
16290#
16291# CONFIG_FILES section.
16292#
16293
16294# No need to generate the scripts if there are no CONFIG_FILES.
16295# This happens for instance when ./config.status config.h
16296if test -n "\$CONFIG_FILES"; then
16297 # Protect against being on the right side of a sed subst in config.status.
16298 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16299 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16300s,@SHELL@,$SHELL,;t t
16301s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16302s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16303s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16304s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16305s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16306s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16307s,@exec_prefix@,$exec_prefix,;t t
16308s,@prefix@,$prefix,;t t
16309s,@program_transform_name@,$program_transform_name,;t t
16310s,@bindir@,$bindir,;t t
16311s,@sbindir@,$sbindir,;t t
16312s,@libexecdir@,$libexecdir,;t t
16313s,@datadir@,$datadir,;t t
16314s,@sysconfdir@,$sysconfdir,;t t
16315s,@sharedstatedir@,$sharedstatedir,;t t
16316s,@localstatedir@,$localstatedir,;t t
16317s,@libdir@,$libdir,;t t
16318s,@includedir@,$includedir,;t t
16319s,@oldincludedir@,$oldincludedir,;t t
16320s,@infodir@,$infodir,;t t
16321s,@mandir@,$mandir,;t t
16322s,@build_alias@,$build_alias,;t t
16323s,@host_alias@,$host_alias,;t t
16324s,@target_alias@,$target_alias,;t t
16325s,@DEFS@,$DEFS,;t t
16326s,@ECHO_C@,$ECHO_C,;t t
16327s,@ECHO_N@,$ECHO_N,;t t
16328s,@ECHO_T@,$ECHO_T,;t t
16329s,@LIBS@,$LIBS,;t t
16330s,@VERSION@,$VERSION,;t t
16331s,@SOVERSION@,$SOVERSION,;t t
16332s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16333s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16334s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16335s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16336s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16337s,@MACHDEP@,$MACHDEP,;t t
16338s,@SGI_ABI@,$SGI_ABI,;t t
16339s,@CXX@,$CXX,;t t
16340s,@MAINOBJ@,$MAINOBJ,;t t
16341s,@EXEEXT@,$EXEEXT,;t t
16342s,@CC@,$CC,;t t
16343s,@CFLAGS@,$CFLAGS,;t t
16344s,@LDFLAGS@,$LDFLAGS,;t t
16345s,@CPPFLAGS@,$CPPFLAGS,;t t
16346s,@ac_ct_CC@,$ac_ct_CC,;t t
16347s,@OBJEXT@,$OBJEXT,;t t
16348s,@CPP@,$CPP,;t t
16349s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16350s,@LIBRARY@,$LIBRARY,;t t
16351s,@LDLIBRARY@,$LDLIBRARY,;t t
16352s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16353s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16354s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16355s,@INSTSONAME@,$INSTSONAME,;t t
16356s,@RUNSHARED@,$RUNSHARED,;t t
16357s,@LINKCC@,$LINKCC,;t t
16358s,@RANLIB@,$RANLIB,;t t
16359s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16360s,@AR@,$AR,;t t
16361s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16362s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16363s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16364s,@LN@,$LN,;t t
16365s,@OPT@,$OPT,;t t
16366s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16367s,@SO@,$SO,;t t
16368s,@LDSHARED@,$LDSHARED,;t t
16369s,@BLDSHARED@,$BLDSHARED,;t t
16370s,@CCSHARED@,$CCSHARED,;t t
16371s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16372s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
16373s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16374s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16375s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16376s,@LDLAST@,$LDLAST,;t t
16377s,@THREADOBJ@,$THREADOBJ,;t t
16378s,@DLINCLDIR@,$DLINCLDIR,;t t
16379s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16380s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16381s,@LIBOBJS@,$LIBOBJS,;t t
16382s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16383s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16384s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16385s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16386s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16387s,@LIBM@,$LIBM,;t t
16388s,@LIBC@,$LIBC,;t t
16389s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16390s,@THREADHEADERS@,$THREADHEADERS,;t t
16391s,@SRCDIRS@,$SRCDIRS,;t t
16392CEOF
16393
16394_ACEOF
16395
16396 cat >>$CONFIG_STATUS <<\_ACEOF
16397 # Split the substitutions into bite-sized pieces for seds with
16398 # small command number limits, like on Digital OSF/1 and HP-UX.
16399 ac_max_sed_lines=48
16400 ac_sed_frag=1 # Number of current file.
16401 ac_beg=1 # First line for current file.
16402 ac_end=$ac_max_sed_lines # Line after last line for current file.
16403 ac_more_lines=:
16404 ac_sed_cmds=
16405 while $ac_more_lines; do
16406 if test $ac_beg -gt 1; then
16407 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16408 else
16409 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16410 fi
16411 if test ! -s $tmp/subs.frag; then
16412 ac_more_lines=false
16413 else
16414 # The purpose of the label and of the branching condition is to
16415 # speed up the sed processing (if there are no `@' at all, there
16416 # is no need to browse any of the substitutions).
16417 # These are the two extra sed commands mentioned above.
16418 (echo ':t
16419 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16420 if test -z "$ac_sed_cmds"; then
16421 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16422 else
16423 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16424 fi
16425 ac_sed_frag=`expr $ac_sed_frag + 1`
16426 ac_beg=$ac_end
16427 ac_end=`expr $ac_end + $ac_max_sed_lines`
16428 fi
16429 done
16430 if test -z "$ac_sed_cmds"; then
16431 ac_sed_cmds=cat
16432 fi
16433fi # test -n "$CONFIG_FILES"
16434
16435_ACEOF
16436cat >>$CONFIG_STATUS <<\_ACEOF
16437for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16438 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16439 case $ac_file in
16440 - | *:- | *:-:* ) # input from stdin
16441 cat >$tmp/stdin
16442 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16443 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16444 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16445 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16446 * ) ac_file_in=$ac_file.in ;;
16447 esac
16448
16449 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16450 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16451$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16452 X"$ac_file" : 'X\(//\)[^/]' \| \
16453 X"$ac_file" : 'X\(//\)$' \| \
16454 X"$ac_file" : 'X\(/\)' \| \
16455 . : '\(.\)' 2>/dev/null ||
16456echo X"$ac_file" |
16457 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16458 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16459 /^X\(\/\/\)$/{ s//\1/; q; }
16460 /^X\(\/\).*/{ s//\1/; q; }
16461 s/.*/./; q'`
16462 { case "$ac_dir" in
16463 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16464 *) as_incr_dir=.;;
16465esac
16466as_dummy="$ac_dir"
16467for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16468 case $as_mkdir_dir in
16469 # Skip DOS drivespec
16470 ?:) as_incr_dir=$as_mkdir_dir ;;
16471 *)
16472 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16473 test -d "$as_incr_dir" ||
16474 mkdir "$as_incr_dir" ||
16475 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16476echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16477 { (exit 1); exit 1; }; }
16478 ;;
16479 esac
16480done; }
16481
16482 ac_builddir=.
16483
16484if test "$ac_dir" != .; then
16485 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16486 # A "../" for each directory in $ac_dir_suffix.
16487 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16488else
16489 ac_dir_suffix= ac_top_builddir=
16490fi
16491
16492case $srcdir in
16493 .) # No --srcdir option. We are building in place.
16494 ac_srcdir=.
16495 if test -z "$ac_top_builddir"; then
16496 ac_top_srcdir=.
16497 else
16498 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16499 fi ;;
16500 [\\/]* | ?:[\\/]* ) # Absolute path.
16501 ac_srcdir=$srcdir$ac_dir_suffix;
16502 ac_top_srcdir=$srcdir ;;
16503 *) # Relative path.
16504 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16505 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16506esac
16507# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16508# absolute.
16509ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16510ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16511ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16512ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16513
16514
16515 case $INSTALL in
16516 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16517 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16518 esac
16519
16520 if test x"$ac_file" != x-; then
16521 { echo "$as_me:$LINENO: creating $ac_file" >&5
16522echo "$as_me: creating $ac_file" >&6;}
16523 rm -f "$ac_file"
16524 fi
16525 # Let's still pretend it is `configure' which instantiates (i.e., don't
16526 # use $as_me), people would be surprised to read:
16527 # /* config.h. Generated by config.status. */
16528 if test x"$ac_file" = x-; then
16529 configure_input=
16530 else
16531 configure_input="$ac_file. "
16532 fi
16533 configure_input=$configure_input"Generated from `echo $ac_file_in |
16534 sed 's,.*/,,'` by configure."
16535
16536 # First look for the input files in the build tree, otherwise in the
16537 # src tree.
16538 ac_file_inputs=`IFS=:
16539 for f in $ac_file_in; do
16540 case $f in
16541 -) echo $tmp/stdin ;;
16542 [\\/$]*)
16543 # Absolute (can't be DOS-style, as IFS=:)
16544 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16545echo "$as_me: error: cannot find input file: $f" >&2;}
16546 { (exit 1); exit 1; }; }
16547 echo $f;;
16548 *) # Relative
16549 if test -f "$f"; then
16550 # Build tree
16551 echo $f
16552 elif test -f "$srcdir/$f"; then
16553 # Source tree
16554 echo $srcdir/$f
16555 else
16556 # /dev/null tree
16557 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16558echo "$as_me: error: cannot find input file: $f" >&2;}
16559 { (exit 1); exit 1; }; }
16560 fi;;
16561 esac
16562 done` || { (exit 1); exit 1; }
16563_ACEOF
16564cat >>$CONFIG_STATUS <<_ACEOF
16565 sed "$ac_vpsub
16566$extrasub
16567_ACEOF
16568cat >>$CONFIG_STATUS <<\_ACEOF
16569:t
16570/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16571s,@configure_input@,$configure_input,;t t
16572s,@srcdir@,$ac_srcdir,;t t
16573s,@abs_srcdir@,$ac_abs_srcdir,;t t
16574s,@top_srcdir@,$ac_top_srcdir,;t t
16575s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16576s,@builddir@,$ac_builddir,;t t
16577s,@abs_builddir@,$ac_abs_builddir,;t t
16578s,@top_builddir@,$ac_top_builddir,;t t
16579s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16580s,@INSTALL@,$ac_INSTALL,;t t
16581" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16582 rm -f $tmp/stdin
16583 if test x"$ac_file" != x-; then
16584 mv $tmp/out $ac_file
16585 else
16586 cat $tmp/out
16587 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016588 fi
16589
Martin v. Löwis11437992002-04-12 09:54:03 +000016590done
16591_ACEOF
16592cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016593
Martin v. Löwis11437992002-04-12 09:54:03 +000016594#
16595# CONFIG_HEADER section.
16596#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016597
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016598# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16599# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016600#
16601# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016602ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16603ac_dB='[ ].*$,\1#\2'
16604ac_dC=' '
16605ac_dD=',;t'
16606# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16607ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16608ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016609ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016610ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016611
Martin v. Löwis11437992002-04-12 09:54:03 +000016612for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016613 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016614 case $ac_file in
16615 - | *:- | *:-:* ) # input from stdin
16616 cat >$tmp/stdin
16617 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16618 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16619 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16620 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16621 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016622 esac
16623
Martin v. Löwis11437992002-04-12 09:54:03 +000016624 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16625echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016626
Martin v. Löwis11437992002-04-12 09:54:03 +000016627 # First look for the input files in the build tree, otherwise in the
16628 # src tree.
16629 ac_file_inputs=`IFS=:
16630 for f in $ac_file_in; do
16631 case $f in
16632 -) echo $tmp/stdin ;;
16633 [\\/$]*)
16634 # Absolute (can't be DOS-style, as IFS=:)
16635 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16636echo "$as_me: error: cannot find input file: $f" >&2;}
16637 { (exit 1); exit 1; }; }
16638 echo $f;;
16639 *) # Relative
16640 if test -f "$f"; then
16641 # Build tree
16642 echo $f
16643 elif test -f "$srcdir/$f"; then
16644 # Source tree
16645 echo $srcdir/$f
16646 else
16647 # /dev/null tree
16648 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16649echo "$as_me: error: cannot find input file: $f" >&2;}
16650 { (exit 1); exit 1; }; }
16651 fi;;
16652 esac
16653 done` || { (exit 1); exit 1; }
16654 # Remove the trailing spaces.
16655 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016656
Martin v. Löwis11437992002-04-12 09:54:03 +000016657_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016658
Martin v. Löwis11437992002-04-12 09:54:03 +000016659# Transform confdefs.h into two sed scripts, `conftest.defines' and
16660# `conftest.undefs', that substitutes the proper values into
16661# config.h.in to produce config.h. The first handles `#define'
16662# templates, and the second `#undef' templates.
16663# And first: Protect against being on the right side of a sed subst in
16664# config.status. Protect against being in an unquoted here document
16665# in config.status.
16666rm -f conftest.defines conftest.undefs
16667# Using a here document instead of a string reduces the quoting nightmare.
16668# Putting comments in sed scripts is not portable.
16669#
16670# `end' is used to avoid that the second main sed command (meant for
16671# 0-ary CPP macros) applies to n-ary macro definitions.
16672# See the Autoconf documentation for `clear'.
16673cat >confdef2sed.sed <<\_ACEOF
16674s/[\\&,]/\\&/g
16675s,[\\$`],\\&,g
16676t clear
16677: clear
16678s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16679t end
16680s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16681: end
16682_ACEOF
16683# If some macros were called several times there might be several times
16684# the same #defines, which is useless. Nevertheless, we may not want to
16685# sort them, since we want the *last* AC-DEFINE to be honored.
16686uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16687sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16688rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016689
16690# This sed command replaces #undef with comments. This is necessary, for
16691# example, in the case of _POSIX_SOURCE, which is predefined and required
16692# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016693cat >>conftest.undefs <<\_ACEOF
16694s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16695_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016696
Martin v. Löwis11437992002-04-12 09:54:03 +000016697# Break up conftest.defines because some shells have a limit on the size
16698# of here documents, and old seds have small limits too (100 cmds).
16699echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16700echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16701echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16702echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016703rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016704while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016705do
Martin v. Löwis11437992002-04-12 09:54:03 +000016706 # Write a limited-size here document to $tmp/defines.sed.
16707 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16708 # Speed up: don't consider the non `#define' lines.
16709 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16710 # Work around the forget-to-reset-the-flag bug.
16711 echo 't clr' >>$CONFIG_STATUS
16712 echo ': clr' >>$CONFIG_STATUS
16713 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016714 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016715 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16716 rm -f $tmp/in
16717 mv $tmp/out $tmp/in
16718' >>$CONFIG_STATUS
16719 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16720 rm -f conftest.defines
16721 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016722done
Martin v. Löwis11437992002-04-12 09:54:03 +000016723rm -f conftest.defines
16724echo ' fi # egrep' >>$CONFIG_STATUS
16725echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016726
Martin v. Löwis11437992002-04-12 09:54:03 +000016727# Break up conftest.undefs because some shells have a limit on the size
16728# of here documents, and old seds have small limits too (100 cmds).
16729echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16730rm -f conftest.tail
16731while grep . conftest.undefs >/dev/null
16732do
16733 # Write a limited-size here document to $tmp/undefs.sed.
16734 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16735 # Speed up: don't consider the non `#undef'
16736 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16737 # Work around the forget-to-reset-the-flag bug.
16738 echo 't clr' >>$CONFIG_STATUS
16739 echo ': clr' >>$CONFIG_STATUS
16740 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16741 echo 'CEOF
16742 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16743 rm -f $tmp/in
16744 mv $tmp/out $tmp/in
16745' >>$CONFIG_STATUS
16746 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16747 rm -f conftest.undefs
16748 mv conftest.tail conftest.undefs
16749done
16750rm -f conftest.undefs
16751
16752cat >>$CONFIG_STATUS <<\_ACEOF
16753 # Let's still pretend it is `configure' which instantiates (i.e., don't
16754 # use $as_me), people would be surprised to read:
16755 # /* config.h. Generated by config.status. */
16756 if test x"$ac_file" = x-; then
16757 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016758 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016759 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016760 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016761 cat $tmp/in >>$tmp/config.h
16762 rm -f $tmp/in
16763 if test x"$ac_file" != x-; then
16764 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16765 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16766echo "$as_me: $ac_file is unchanged" >&6;}
16767 else
16768 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16769$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16770 X"$ac_file" : 'X\(//\)[^/]' \| \
16771 X"$ac_file" : 'X\(//\)$' \| \
16772 X"$ac_file" : 'X\(/\)' \| \
16773 . : '\(.\)' 2>/dev/null ||
16774echo X"$ac_file" |
16775 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16776 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16777 /^X\(\/\/\)$/{ s//\1/; q; }
16778 /^X\(\/\).*/{ s//\1/; q; }
16779 s/.*/./; q'`
16780 { case "$ac_dir" in
16781 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16782 *) as_incr_dir=.;;
16783esac
16784as_dummy="$ac_dir"
16785for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16786 case $as_mkdir_dir in
16787 # Skip DOS drivespec
16788 ?:) as_incr_dir=$as_mkdir_dir ;;
16789 *)
16790 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16791 test -d "$as_incr_dir" ||
16792 mkdir "$as_incr_dir" ||
16793 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16794echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16795 { (exit 1); exit 1; }; }
16796 ;;
16797 esac
16798done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016799
Martin v. Löwis11437992002-04-12 09:54:03 +000016800 rm -f $ac_file
16801 mv $tmp/config.h $ac_file
16802 fi
16803 else
16804 cat $tmp/config.h
16805 rm -f $tmp/config.h
16806 fi
16807done
16808_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016809
Martin v. Löwis11437992002-04-12 09:54:03 +000016810cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016811
Martin v. Löwis11437992002-04-12 09:54:03 +000016812{ (exit 0); exit 0; }
16813_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016814chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016815ac_clean_files=$ac_clean_files_save
16816
16817
16818# configure is writing to config.log, and then calls config.status.
16819# config.status does its own redirection, appending to config.log.
16820# Unfortunately, on DOS this fails, as config.log is still kept open
16821# by configure, so config.status won't be able to write to it; its
16822# output is simply discarded. So we exec the FD to /dev/null,
16823# effectively closing config.log, so it can be properly (re)opened and
16824# appended to by config.status. When coming back to configure, we
16825# need to make the FD available again.
16826if test "$no_create" != yes; then
16827 ac_cs_success=:
16828 exec 5>/dev/null
16829 $SHELL $CONFIG_STATUS || ac_cs_success=false
16830 exec 5>>config.log
16831 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16832 # would make configure fail if this is the last instruction.
16833 $ac_cs_success || { (exit 1); exit 1; }
16834fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016835
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016836
16837echo "creating Setup"
16838if test ! -f Modules/Setup
16839then
16840 cp $srcdir/Modules/Setup.dist Modules/Setup
16841fi
16842
16843echo "creating Setup.local"
16844if test ! -f Modules/Setup.local
16845then
16846 echo "# Edit this file for local setup changes" >Modules/Setup.local
16847fi
16848
16849echo "creating Makefile"
16850$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16851 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016852 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016853mv config.c Modules