blob: cc8c4773385ece29e874ebaff8431b0db4e40148 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisa4548572002-04-18 14:51:36 +00002# From configure.in Revision: 1.311 .
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öwis1142de32002-03-29 16:28:31 +00003021INSTSONMAE='$(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öwis1142de32002-03-29 16:28:31 +00003073 enable_shared="no"
3074fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003075echo "$as_me:$LINENO: result: $enable_shared" >&5
3076echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003077
3078
Martin v. Löwis11437992002-04-12 09:54:03 +00003079echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3080echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003081
Guido van Rossumb8552162001-09-05 14:58:11 +00003082# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3083# library that we build, but we do not want to link against it (we
3084# will find it with a -framework option). For this reason there is an
3085# extra variable BLDLIBRARY against which Python and the extension
3086# modules are linked, BLDLIBRARY. This is normally the same as
3087# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003088if test "$enable_framework"
3089then
3090 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3091 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3092 BLDLIBRARY=''
3093else
3094 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003095fi
Jack Jansene578a632001-08-15 01:27:14 +00003096
Martin v. Löwis1142de32002-03-29 16:28:31 +00003097# Other platforms follow
3098if test $enable_shared = "yes"; then
3099 case $ac_sys_system in
3100 BeOS*)
3101 LDLIBRARY='libpython$(VERSION).so'
3102 ;;
3103 CYGWIN*)
3104 LDLIBRARY='libpython$(VERSION).dll.a'
3105 DLLLIBRARY='libpython$(VERSION).dll'
3106 ;;
3107 SunOS*)
3108 LDLIBRARY='libpython$(VERSION).so'
3109 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3110 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3111 ;;
3112 Linux*)
3113 LDLIBRARY='libpython$(VERSION).so'
3114 BLDLIBRARY='-L. -lpython$(VERSION)'
3115 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3116 INSTSONAME="$LDLIBRARY".$SOVERSION
3117 ;;
3118 hp*|HP*)
3119 LDLIBRARY='libpython$(VERSION).sl'
3120 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3121 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3122 ;;
3123 OSF*)
3124 LDLIBRARY='libpython$(VERSION).so'
3125 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3126 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3127 ;;
3128 esac
3129 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3130 case $MACHDEP in
3131 dguxR4)
3132 LDLIBRARY='libpython$(VERSION).so'
3133 OPT="$OPT -pic"
3134 ;;
3135 esac
3136fi
3137
Martin v. Löwis11437992002-04-12 09:54:03 +00003138echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3139echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003140
Martin v. Löwis11437992002-04-12 09:54:03 +00003141if test -n "$ac_tool_prefix"; then
3142 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3143set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3144echo "$as_me:$LINENO: checking for $ac_word" >&5
3145echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3146if test "${ac_cv_prog_RANLIB+set}" = set; then
3147 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003148else
3149 if test -n "$RANLIB"; then
3150 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3151else
Martin v. Löwis11437992002-04-12 09:54:03 +00003152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3153for as_dir in $PATH
3154do
3155 IFS=$as_save_IFS
3156 test -z "$as_dir" && as_dir=.
3157 for ac_exec_ext in '' $ac_executable_extensions; do
3158 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3159 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3160 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3161 break 2
3162 fi
3163done
3164done
3165
Guido van Rossum627b2d71993-12-24 10:39:16 +00003166fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003167fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003168RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003169if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003170 echo "$as_me:$LINENO: result: $RANLIB" >&5
3171echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003172else
Martin v. Löwis11437992002-04-12 09:54:03 +00003173 echo "$as_me:$LINENO: result: no" >&5
3174echo "${ECHO_T}no" >&6
3175fi
3176
3177fi
3178if test -z "$ac_cv_prog_RANLIB"; then
3179 ac_ct_RANLIB=$RANLIB
3180 # Extract the first word of "ranlib", so it can be a program name with args.
3181set dummy ranlib; ac_word=$2
3182echo "$as_me:$LINENO: checking for $ac_word" >&5
3183echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3184if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3185 echo $ECHO_N "(cached) $ECHO_C" >&6
3186else
3187 if test -n "$ac_ct_RANLIB"; then
3188 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3189else
3190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3191for as_dir in $PATH
3192do
3193 IFS=$as_save_IFS
3194 test -z "$as_dir" && as_dir=.
3195 for ac_exec_ext in '' $ac_executable_extensions; do
3196 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3197 ac_cv_prog_ac_ct_RANLIB="ranlib"
3198 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3199 break 2
3200 fi
3201done
3202done
3203
3204 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3205fi
3206fi
3207ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3208if test -n "$ac_ct_RANLIB"; then
3209 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3210echo "${ECHO_T}$ac_ct_RANLIB" >&6
3211else
3212 echo "$as_me:$LINENO: result: no" >&5
3213echo "${ECHO_T}no" >&6
3214fi
3215
3216 RANLIB=$ac_ct_RANLIB
3217else
3218 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003219fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003220
3221
Guido van Rossum7f43da71994-08-01 12:15:30 +00003222for ac_prog in ar aal
3223do
Martin v. Löwis11437992002-04-12 09:54:03 +00003224 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003225set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003226echo "$as_me:$LINENO: checking for $ac_word" >&5
3227echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3228if test "${ac_cv_prog_AR+set}" = set; then
3229 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003230else
3231 if test -n "$AR"; then
3232 ac_cv_prog_AR="$AR" # Let the user override the test.
3233else
Martin v. Löwis11437992002-04-12 09:54:03 +00003234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3235for as_dir in $PATH
3236do
3237 IFS=$as_save_IFS
3238 test -z "$as_dir" && as_dir=.
3239 for ac_exec_ext in '' $ac_executable_extensions; do
3240 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3241 ac_cv_prog_AR="$ac_prog"
3242 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3243 break 2
3244 fi
3245done
3246done
3247
Guido van Rossum7f43da71994-08-01 12:15:30 +00003248fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003249fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003250AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003251if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003252 echo "$as_me:$LINENO: result: $AR" >&5
3253echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003254else
Martin v. Löwis11437992002-04-12 09:54:03 +00003255 echo "$as_me:$LINENO: result: no" >&5
3256echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003257fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003258
Martin v. Löwis11437992002-04-12 09:54:03 +00003259 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003260done
3261test -n "$AR" || AR="ar"
3262
Michael W. Hudson54241132001-12-07 15:38:26 +00003263
Neil Schemenauera42c8272001-03-31 00:01:55 +00003264case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003265bsdos*|hp*|HP*)
3266 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003267 if test -z "$INSTALL"
3268 then
3269 INSTALL="${srcdir}/install-sh -c"
3270 fi
3271esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003272ac_aux_dir=
3273for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3274 if test -f $ac_dir/install-sh; then
3275 ac_aux_dir=$ac_dir
3276 ac_install_sh="$ac_aux_dir/install-sh -c"
3277 break
3278 elif test -f $ac_dir/install.sh; then
3279 ac_aux_dir=$ac_dir
3280 ac_install_sh="$ac_aux_dir/install.sh -c"
3281 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003282 elif test -f $ac_dir/shtool; then
3283 ac_aux_dir=$ac_dir
3284 ac_install_sh="$ac_aux_dir/shtool install -c"
3285 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003286 fi
3287done
3288if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003289 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3290echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3291 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003292fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003293ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3294ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3295ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003296
3297# Find a good install program. We prefer a C program (faster),
3298# so one script is as good as another. But avoid the broken or
3299# incompatible versions:
3300# SysV /etc/install, /usr/sbin/install
3301# SunOS /usr/etc/install
3302# IRIX /sbin/install
3303# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003304# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003305# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3306# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3307# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3308# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003309echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3310echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003311if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003312if test "${ac_cv_path_install+set}" = set; then
3313 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003314else
Martin v. Löwis11437992002-04-12 09:54:03 +00003315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3316for as_dir in $PATH
3317do
3318 IFS=$as_save_IFS
3319 test -z "$as_dir" && as_dir=.
3320 # Account for people who put trailing slashes in PATH elements.
3321case $as_dir/ in
3322 ./ | .// | /cC/* | \
3323 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3324 /usr/ucb/* ) ;;
3325 *)
3326 # OSF1 and SCO ODT 3.0 have their own names for install.
3327 # Don't use installbsd from OSF since it installs stuff as root
3328 # by default.
3329 for ac_prog in ginstall scoinst install; do
3330 for ac_exec_ext in '' $ac_executable_extensions; do
3331 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3332 if test $ac_prog = install &&
3333 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3334 # AIX install. It has an incompatible calling convention.
3335 :
3336 elif test $ac_prog = install &&
3337 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3338 # program-specific install script used by HP pwplus--don't use.
3339 :
3340 else
3341 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3342 break 3
3343 fi
3344 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003345 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003346 done
3347 ;;
3348esac
3349done
3350
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003351
3352fi
3353 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003354 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003355 else
3356 # As a last resort, use the slow shell script. We don't cache a
3357 # path for INSTALL within a source directory, because that will
3358 # break other packages using the cache if that directory is
3359 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003360 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003361 fi
3362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003363echo "$as_me:$LINENO: result: $INSTALL" >&5
3364echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003365
3366# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3367# It thinks the first close brace ends the variable substitution.
3368test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3369
Martin v. Löwis11437992002-04-12 09:54:03 +00003370test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003371
3372test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3373
Michael W. Hudson54241132001-12-07 15:38:26 +00003374
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003375# Not every filesystem supports hard links
3376
3377if test -z "$LN" ; then
3378 case $ac_sys_system in
3379 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003380 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003381 *) LN=ln;;
3382 esac
3383fi
3384
Fred Drake109d9862001-07-11 06:27:56 +00003385# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003386echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3387echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3388
Fred Drake109d9862001-07-11 06:27:56 +00003389# Check whether --with-pydebug or --without-pydebug was given.
3390if test "${with_pydebug+set}" = set; then
3391 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003392
Fred Drake109d9862001-07-11 06:27:56 +00003393if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003394then
3395
3396cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003397#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003398_ACEOF
3399
3400 echo "$as_me:$LINENO: result: yes" >&5
3401echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003402 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003403else echo "$as_me:$LINENO: result: no" >&5
3404echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003405fi
3406else
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 echo "$as_me:$LINENO: result: no" >&5
3408echo "${ECHO_T}no" >&6
3409fi;
Fred Drake109d9862001-07-11 06:27:56 +00003410
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003411# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003412
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003413if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003414then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003415 case $GCC in
3416 yes)
3417 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003418 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003419 if test "$Py_DEBUG" = 'true' ; then
3420 # Optimization messes up debuggers, so turn it off for
3421 # debug builds.
3422 OPT="-g -Wall -Wstrict-prototypes"
3423 else
3424 OPT="-g -O3 -Wall -Wstrict-prototypes"
3425 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003426 *)
Fred Drake109d9862001-07-11 06:27:56 +00003427 OPT="-O3 -Wall -Wstrict-prototypes";;
3428 esac
3429 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003430 *)
3431 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003432 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003433 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3434 *)
3435 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003436 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003437 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003438 case $ac_sys_system in
3439 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003440 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003441 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003442fi
3443
Fred Drakee1ceaa02001-12-04 20:55:47 +00003444if test "$Py_DEBUG" = 'true'; then
3445 :
3446else
3447 OPT="-DNDEBUG $OPT"
3448fi
3449
Trent Mick635f6fb2000-08-23 21:33:05 +00003450# The current (beta) Monterey compiler dies with optimizations
3451case $ac_sys_system in
3452Monterey*) OPT="";;
3453esac
3454
Guido van Rossum563e7081996-09-10 18:20:48 +00003455if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003456then
3457 OPT="$OPT $ac_arch_flags"
3458fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003459
Martin v. Löwis11437992002-04-12 09:54:03 +00003460echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3461echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3462if test "${ac_cv_opt_olimit_ok+set}" = set; then
3463 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003464else
3465 ac_save_cc="$CC"
3466CC="$CC -OPT:Olimit=0"
3467if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003468 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003469else
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 cat >conftest.$ac_ext <<_ACEOF
3471#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003472#include "confdefs.h"
3473int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003474_ACEOF
3475rm -f conftest$ac_exeext
3476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3477 (eval $ac_link) 2>&5
3478 ac_status=$?
3479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3482 (eval $ac_try) 2>&5
3483 ac_status=$?
3484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3485 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003486 ac_cv_opt_olimit_ok=yes
3487else
Martin v. Löwis11437992002-04-12 09:54:03 +00003488 echo "$as_me: program exited with status $ac_status" >&5
3489echo "$as_me: failed program was:" >&5
3490cat conftest.$ac_ext >&5
3491( exit $ac_status )
3492ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003494rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003495fi
Guido van Rossum91922671997-10-09 20:24:13 +00003496CC="$ac_save_cc"
3497fi
3498
Martin v. Löwis11437992002-04-12 09:54:03 +00003499echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3500echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003501if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003502 case $ac_sys_system in
3503 Darwin*) OPT="$OPT" ;;
3504 *) OPT="$OPT -OPT:Olimit=0";;
3505 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003506else
Martin v. Löwis11437992002-04-12 09:54:03 +00003507 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3508echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3509 if test "${ac_cv_olimit_ok+set}" = set; then
3510 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003511else
3512 ac_save_cc="$CC"
3513 CC="$CC -Olimit 1500"
3514 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003515 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003516else
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 cat >conftest.$ac_ext <<_ACEOF
3518#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003519#include "confdefs.h"
3520int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003521_ACEOF
3522rm -f conftest$ac_exeext
3523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3524 (eval $ac_link) 2>&5
3525 ac_status=$?
3526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3529 (eval $ac_try) 2>&5
3530 ac_status=$?
3531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3532 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003533 ac_cv_olimit_ok=yes
3534else
Martin v. Löwis11437992002-04-12 09:54:03 +00003535 echo "$as_me: program exited with status $ac_status" >&5
3536echo "$as_me: failed program was:" >&5
3537cat conftest.$ac_ext >&5
3538( exit $ac_status )
3539ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003540fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003541rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003542fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003543 CC="$ac_save_cc"
3544fi
3545
Martin v. Löwis11437992002-04-12 09:54:03 +00003546 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3547echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003548 if test $ac_cv_olimit_ok = yes; then
3549 OPT="$OPT -Olimit 1500"
3550 fi
3551fi
3552
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003553# On some compilers, pthreads are available without further options
3554# (e.g. MacOS X). On some of these systems, the compiler will not
3555# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3556# So we have to see first whether pthreads are available without
3557# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003558echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3559echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3560if test "${ac_cv_pthread_is_default+set}" = set; then
3561 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003562else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003563 if test "$cross_compiling" = yes; then
3564 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003565else
Martin v. Löwis11437992002-04-12 09:54:03 +00003566 cat >conftest.$ac_ext <<_ACEOF
3567#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003568#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003569
Martin v. Löwis130fb172001-07-19 11:00:41 +00003570#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003571
3572void* routine(void* p){return NULL;}
3573
3574int main(){
3575 pthread_t p;
3576 if(pthread_create(&p,NULL,routine,NULL)!=0)
3577 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003578 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003579 return 0;
3580}
3581
Martin v. Löwis11437992002-04-12 09:54:03 +00003582_ACEOF
3583rm -f conftest$ac_exeext
3584if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3585 (eval $ac_link) 2>&5
3586 ac_status=$?
3587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3588 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3590 (eval $ac_try) 2>&5
3591 ac_status=$?
3592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3593 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003594 ac_cv_pthread_is_default=yes
3595else
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 echo "$as_me: program exited with status $ac_status" >&5
3597echo "$as_me: failed program was:" >&5
3598cat conftest.$ac_ext >&5
3599( exit $ac_status )
3600ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003601fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003602rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003603fi
3604
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003605fi
3606
Martin v. Löwis11437992002-04-12 09:54:03 +00003607echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3608echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003609
Michael W. Hudson54241132001-12-07 15:38:26 +00003610
Martin v. Löwis11437992002-04-12 09:54:03 +00003611if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003612then
3613 ac_cv_kpthread=no
3614else
3615# -Kpthread, if available, provides the right #defines
3616# and linker options to make pthread_create available
3617# Some compilers won't report that they do not support -Kpthread,
3618# so we need to run a program to see whether it really made the
3619# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003620echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3621echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3622if test "${ac_cv_kpthread+set}" = set; then
3623 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003624else
3625 ac_save_cc="$CC"
3626CC="$CC -Kpthread"
3627if test "$cross_compiling" = yes; then
3628 ac_cv_kpthread=no
3629else
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 cat >conftest.$ac_ext <<_ACEOF
3631#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003632#include "confdefs.h"
3633
3634#include <pthread.h>
3635
3636void* routine(void* p){return NULL;}
3637
3638int main(){
3639 pthread_t p;
3640 if(pthread_create(&p,NULL,routine,NULL)!=0)
3641 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003642 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003643 return 0;
3644}
3645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646_ACEOF
3647rm -f conftest$ac_exeext
3648if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3649 (eval $ac_link) 2>&5
3650 ac_status=$?
3651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3652 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3654 (eval $ac_try) 2>&5
3655 ac_status=$?
3656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3657 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003658 ac_cv_kpthread=yes
3659else
Martin v. Löwis11437992002-04-12 09:54:03 +00003660 echo "$as_me: program exited with status $ac_status" >&5
3661echo "$as_me: failed program was:" >&5
3662cat conftest.$ac_ext >&5
3663( exit $ac_status )
3664ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003665fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003666rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003667fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003668CC="$ac_save_cc"
3669fi
3670
Martin v. Löwis11437992002-04-12 09:54:03 +00003671echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3672echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003673fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003674
Michael W. Hudson54241132001-12-07 15:38:26 +00003675
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003676# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003677echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3678echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3679if test "${ac_cv_header_stdc+set}" = set; then
3680 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003681else
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 cat >conftest.$ac_ext <<_ACEOF
3683#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003684#include "confdefs.h"
3685#include <stdlib.h>
3686#include <stdarg.h>
3687#include <string.h>
3688#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003689
3690_ACEOF
3691if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3692 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3693 ac_status=$?
3694 egrep -v '^ *\+' conftest.er1 >conftest.err
3695 rm -f conftest.er1
3696 cat conftest.err >&5
3697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3698 (exit $ac_status); } >/dev/null; then
3699 if test -s conftest.err; then
3700 ac_cpp_err=$ac_c_preproc_warn_flag
3701 else
3702 ac_cpp_err=
3703 fi
3704else
3705 ac_cpp_err=yes
3706fi
3707if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003708 ac_cv_header_stdc=yes
3709else
Martin v. Löwis11437992002-04-12 09:54:03 +00003710 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003711 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003712 ac_cv_header_stdc=no
3713fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003714rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003715
3716if test $ac_cv_header_stdc = yes; then
3717 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003718 cat >conftest.$ac_ext <<_ACEOF
3719#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003720#include "confdefs.h"
3721#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003722
3723_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003724if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3725 egrep "memchr" >/dev/null 2>&1; then
3726 :
3727else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003728 ac_cv_header_stdc=no
3729fi
3730rm -f conftest*
3731
3732fi
3733
3734if test $ac_cv_header_stdc = yes; then
3735 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 cat >conftest.$ac_ext <<_ACEOF
3737#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003738#include "confdefs.h"
3739#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003740
3741_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3743 egrep "free" >/dev/null 2>&1; then
3744 :
3745else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003746 ac_cv_header_stdc=no
3747fi
3748rm -f conftest*
3749
3750fi
3751
3752if test $ac_cv_header_stdc = yes; then
3753 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003754 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003755 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003756else
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 cat >conftest.$ac_ext <<_ACEOF
3758#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003759#include "confdefs.h"
3760#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003761#if ((' ' & 0x0FF) == 0x020)
3762# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3763# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3764#else
3765# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3766 || ('j' <= (c) && (c) <= 'r') \
3767 || ('s' <= (c) && (c) <= 'z'))
3768# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3769#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003770
Martin v. Löwis11437992002-04-12 09:54:03 +00003771#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3772int
3773main ()
3774{
3775 int i;
3776 for (i = 0; i < 256; i++)
3777 if (XOR (islower (i), ISLOWER (i))
3778 || toupper (i) != TOUPPER (i))
3779 exit(2);
3780 exit (0);
3781}
3782_ACEOF
3783rm -f conftest$ac_exeext
3784if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3785 (eval $ac_link) 2>&5
3786 ac_status=$?
3787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3788 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3790 (eval $ac_try) 2>&5
3791 ac_status=$?
3792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3793 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003794 :
3795else
Martin v. Löwis11437992002-04-12 09:54:03 +00003796 echo "$as_me: program exited with status $ac_status" >&5
3797echo "$as_me: failed program was:" >&5
3798cat conftest.$ac_ext >&5
3799( exit $ac_status )
3800ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003801fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003802rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003803fi
3804fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003805fi
3806echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3807echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003808if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003809
3810cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003811#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003812_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003813
3814fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003815
Martin v. Löwis11437992002-04-12 09:54:03 +00003816
3817
3818
3819
3820
3821
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
Neal Norwitz3d949422002-04-20 13:46:43 +00003857
Martin v. Löwis11437992002-04-12 09:54:03 +00003858for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003859libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003860signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Neal Norwitz3d949422002-04-20 13:46:43 +00003861sys/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 +00003862sys/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 +00003863sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00003864ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003865do
Martin v. Löwis11437992002-04-12 09:54:03 +00003866as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3867if eval "test \"\${$as_ac_Header+set}\" = set"; then
3868 echo "$as_me:$LINENO: checking for $ac_header" >&5
3869echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3870if eval "test \"\${$as_ac_Header+set}\" = set"; then
3871 echo $ECHO_N "(cached) $ECHO_C" >&6
3872fi
3873echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3874echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003875else
Martin v. Löwis11437992002-04-12 09:54:03 +00003876 # Is the header compilable?
3877echo "$as_me:$LINENO: checking $ac_header usability" >&5
3878echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3879cat >conftest.$ac_ext <<_ACEOF
3880#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003881#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003882$ac_includes_default
3883#include <$ac_header>
3884_ACEOF
3885rm -f conftest.$ac_objext
3886if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3887 (eval $ac_compile) 2>&5
3888 ac_status=$?
3889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3890 (exit $ac_status); } &&
3891 { ac_try='test -s conftest.$ac_objext'
3892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3893 (eval $ac_try) 2>&5
3894 ac_status=$?
3895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3896 (exit $ac_status); }; }; then
3897 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003898else
Martin v. Löwis11437992002-04-12 09:54:03 +00003899 echo "$as_me: failed program was:" >&5
3900cat conftest.$ac_ext >&5
3901ac_header_compiler=no
3902fi
3903rm -f conftest.$ac_objext conftest.$ac_ext
3904echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3905echo "${ECHO_T}$ac_header_compiler" >&6
3906
3907# Is the header present?
3908echo "$as_me:$LINENO: checking $ac_header presence" >&5
3909echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3910cat >conftest.$ac_ext <<_ACEOF
3911#line $LINENO "configure"
3912#include "confdefs.h"
3913#include <$ac_header>
3914_ACEOF
3915if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3916 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3917 ac_status=$?
3918 egrep -v '^ *\+' conftest.er1 >conftest.err
3919 rm -f conftest.er1
3920 cat conftest.err >&5
3921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3922 (exit $ac_status); } >/dev/null; then
3923 if test -s conftest.err; then
3924 ac_cpp_err=$ac_c_preproc_warn_flag
3925 else
3926 ac_cpp_err=
3927 fi
3928else
3929 ac_cpp_err=yes
3930fi
3931if test -z "$ac_cpp_err"; then
3932 ac_header_preproc=yes
3933else
3934 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003935 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003936 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003937fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003938rm -f conftest.err conftest.$ac_ext
3939echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3940echo "${ECHO_T}$ac_header_preproc" >&6
3941
3942# So? What about this header?
3943case $ac_header_compiler:$ac_header_preproc in
3944 yes:no )
3945 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3946echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3947 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3948echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3949 no:yes )
3950 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3951echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3952 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3953echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3954 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3955echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3956esac
3957echo "$as_me:$LINENO: checking for $ac_header" >&5
3958echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3959if eval "test \"\${$as_ac_Header+set}\" = set"; then
3960 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003961else
Martin v. Löwis11437992002-04-12 09:54:03 +00003962 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003963fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003964echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3965echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3966
3967fi
3968if test `eval echo '${'$as_ac_Header'}'` = yes; then
3969 cat >>confdefs.h <<_ACEOF
3970#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3971_ACEOF
3972
3973fi
3974
Guido van Rossum627b2d71993-12-24 10:39:16 +00003975done
3976
Martin v. Löwis11437992002-04-12 09:54:03 +00003977
3978
3979
3980
3981
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003982ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003983for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3984 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3985echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3986echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3987if eval "test \"\${$as_ac_Header+set}\" = set"; then
3988 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003989else
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 cat >conftest.$ac_ext <<_ACEOF
3991#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003992#include "confdefs.h"
3993#include <sys/types.h>
3994#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00003995
3996#ifdef F77_DUMMY_MAIN
3997# ifdef __cplusplus
3998 extern "C"
3999# endif
4000 int F77_DUMMY_MAIN() { return 1; }
4001#endif
4002int
4003main ()
4004{
4005if ((DIR *) 0)
4006return 0;
4007 ;
4008 return 0;
4009}
4010_ACEOF
4011rm -f conftest.$ac_objext
4012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4013 (eval $ac_compile) 2>&5
4014 ac_status=$?
4015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4016 (exit $ac_status); } &&
4017 { ac_try='test -s conftest.$ac_objext'
4018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4019 (eval $ac_try) 2>&5
4020 ac_status=$?
4021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4022 (exit $ac_status); }; }; then
4023 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004024else
Martin v. Löwis11437992002-04-12 09:54:03 +00004025 echo "$as_me: failed program was:" >&5
4026cat conftest.$ac_ext >&5
4027eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004028fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004029rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004030fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004031echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4032echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4033if test `eval echo '${'$as_ac_Header'}'` = yes; then
4034 cat >>confdefs.h <<_ACEOF
4035#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4036_ACEOF
4037
4038ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004039fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004040
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004041done
4042# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4043if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004044 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4045echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4046if test "${ac_cv_search_opendir+set}" = set; then
4047 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004048else
Martin v. Löwis11437992002-04-12 09:54:03 +00004049 ac_func_search_save_LIBS=$LIBS
4050ac_cv_search_opendir=no
4051cat >conftest.$ac_ext <<_ACEOF
4052#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004053#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004054
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004055/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004056#ifdef __cplusplus
4057extern "C"
4058#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004059/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004060 builtin and then its argument prototype would still apply. */
4061char opendir ();
4062#ifdef F77_DUMMY_MAIN
4063# ifdef __cplusplus
4064 extern "C"
4065# endif
4066 int F77_DUMMY_MAIN() { return 1; }
4067#endif
4068int
4069main ()
4070{
4071opendir ();
4072 ;
4073 return 0;
4074}
4075_ACEOF
4076rm -f conftest.$ac_objext conftest$ac_exeext
4077if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4078 (eval $ac_link) 2>&5
4079 ac_status=$?
4080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4081 (exit $ac_status); } &&
4082 { ac_try='test -s conftest$ac_exeext'
4083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4084 (eval $ac_try) 2>&5
4085 ac_status=$?
4086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4087 (exit $ac_status); }; }; then
4088 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004089else
Martin v. Löwis11437992002-04-12 09:54:03 +00004090 echo "$as_me: failed program was:" >&5
4091cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004092fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004093rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4094if test "$ac_cv_search_opendir" = no; then
4095 for ac_lib in dir; do
4096 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4097 cat >conftest.$ac_ext <<_ACEOF
4098#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004099#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004100
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004101/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004102#ifdef __cplusplus
4103extern "C"
4104#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004105/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004106 builtin and then its argument prototype would still apply. */
4107char opendir ();
4108#ifdef F77_DUMMY_MAIN
4109# ifdef __cplusplus
4110 extern "C"
4111# endif
4112 int F77_DUMMY_MAIN() { return 1; }
4113#endif
4114int
4115main ()
4116{
4117opendir ();
4118 ;
4119 return 0;
4120}
4121_ACEOF
4122rm -f conftest.$ac_objext conftest$ac_exeext
4123if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4124 (eval $ac_link) 2>&5
4125 ac_status=$?
4126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4127 (exit $ac_status); } &&
4128 { ac_try='test -s conftest$ac_exeext'
4129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4130 (eval $ac_try) 2>&5
4131 ac_status=$?
4132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4133 (exit $ac_status); }; }; then
4134 ac_cv_search_opendir="-l$ac_lib"
4135break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004136else
Martin v. Löwis11437992002-04-12 09:54:03 +00004137 echo "$as_me: failed program was:" >&5
4138cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004139fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004140rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4141 done
4142fi
4143LIBS=$ac_func_search_save_LIBS
4144fi
4145echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4146echo "${ECHO_T}$ac_cv_search_opendir" >&6
4147if test "$ac_cv_search_opendir" != no; then
4148 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004149
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004150fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004151
Michael W. Hudson54241132001-12-07 15:38:26 +00004152else
Martin v. Löwis11437992002-04-12 09:54:03 +00004153 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4154echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4155if test "${ac_cv_search_opendir+set}" = set; then
4156 echo $ECHO_N "(cached) $ECHO_C" >&6
4157else
4158 ac_func_search_save_LIBS=$LIBS
4159ac_cv_search_opendir=no
4160cat >conftest.$ac_ext <<_ACEOF
4161#line $LINENO "configure"
4162#include "confdefs.h"
4163
4164/* Override any gcc2 internal prototype to avoid an error. */
4165#ifdef __cplusplus
4166extern "C"
4167#endif
4168/* We use char because int might match the return type of a gcc2
4169 builtin and then its argument prototype would still apply. */
4170char opendir ();
4171#ifdef F77_DUMMY_MAIN
4172# ifdef __cplusplus
4173 extern "C"
4174# endif
4175 int F77_DUMMY_MAIN() { return 1; }
4176#endif
4177int
4178main ()
4179{
4180opendir ();
4181 ;
4182 return 0;
4183}
4184_ACEOF
4185rm -f conftest.$ac_objext conftest$ac_exeext
4186if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4187 (eval $ac_link) 2>&5
4188 ac_status=$?
4189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4190 (exit $ac_status); } &&
4191 { ac_try='test -s conftest$ac_exeext'
4192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4193 (eval $ac_try) 2>&5
4194 ac_status=$?
4195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4196 (exit $ac_status); }; }; then
4197 ac_cv_search_opendir="none required"
4198else
4199 echo "$as_me: failed program was:" >&5
4200cat conftest.$ac_ext >&5
4201fi
4202rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4203if test "$ac_cv_search_opendir" = no; then
4204 for ac_lib in x; do
4205 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4206 cat >conftest.$ac_ext <<_ACEOF
4207#line $LINENO "configure"
4208#include "confdefs.h"
4209
4210/* Override any gcc2 internal prototype to avoid an error. */
4211#ifdef __cplusplus
4212extern "C"
4213#endif
4214/* We use char because int might match the return type of a gcc2
4215 builtin and then its argument prototype would still apply. */
4216char opendir ();
4217#ifdef F77_DUMMY_MAIN
4218# ifdef __cplusplus
4219 extern "C"
4220# endif
4221 int F77_DUMMY_MAIN() { return 1; }
4222#endif
4223int
4224main ()
4225{
4226opendir ();
4227 ;
4228 return 0;
4229}
4230_ACEOF
4231rm -f conftest.$ac_objext conftest$ac_exeext
4232if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4233 (eval $ac_link) 2>&5
4234 ac_status=$?
4235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4236 (exit $ac_status); } &&
4237 { ac_try='test -s conftest$ac_exeext'
4238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4239 (eval $ac_try) 2>&5
4240 ac_status=$?
4241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4242 (exit $ac_status); }; }; then
4243 ac_cv_search_opendir="-l$ac_lib"
4244break
4245else
4246 echo "$as_me: failed program was:" >&5
4247cat conftest.$ac_ext >&5
4248fi
4249rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4250 done
4251fi
4252LIBS=$ac_func_search_save_LIBS
4253fi
4254echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4255echo "${ECHO_T}$ac_cv_search_opendir" >&6
4256if test "$ac_cv_search_opendir" != no; then
4257 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4258
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004259fi
4260
4261fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004262
Michael W. Hudson54241132001-12-07 15:38:26 +00004263
Guido van Rossum627b2d71993-12-24 10:39:16 +00004264# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004265was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004266echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4267echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4268cat >conftest.$ac_ext <<_ACEOF
4269#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270#include "confdefs.h"
4271#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004272
4273_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4275 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004276 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004277else
Martin v. Löwis11437992002-04-12 09:54:03 +00004278
4279
4280cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004282_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004283
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004284
Guido van Rossum627b2d71993-12-24 10:39:16 +00004285fi
4286rm -f conftest*
4287
Martin v. Löwis11437992002-04-12 09:54:03 +00004288echo "$as_me:$LINENO: result: $was_it_defined" >&5
4289echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004290
Guido van Rossum810cc512001-09-09 23:51:39 +00004291# Two defines needed to enable largefile support on various platforms
4292# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004293
Martin v. Löwis11437992002-04-12 09:54:03 +00004294cat >>confdefs.h <<\_ACEOF
4295#define _LARGEFILE_SOURCE 1
4296_ACEOF
4297
4298
4299cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004300#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004301_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004302
Michael W. Hudson54241132001-12-07 15:38:26 +00004303
Guido van Rossum84e7b241996-08-19 21:59:00 +00004304# Add some code to confdefs.h so that the test for off_t works on SCO
4305cat >> confdefs.h <<\EOF
4306#if defined(SCO_DS)
4307#undef _OFF_T
4308#endif
4309EOF
4310
Guido van Rossumef2255b2000-03-10 22:30:29 +00004311# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004312echo "$as_me:$LINENO: checking for mode_t" >&5
4313echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4314if test "${ac_cv_type_mode_t+set}" = set; then
4315 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004316else
Martin v. Löwis11437992002-04-12 09:54:03 +00004317 cat >conftest.$ac_ext <<_ACEOF
4318#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004319#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004320$ac_includes_default
4321#ifdef F77_DUMMY_MAIN
4322# ifdef __cplusplus
4323 extern "C"
4324# endif
4325 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004326#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004327int
4328main ()
4329{
4330if ((mode_t *) 0)
4331 return 0;
4332if (sizeof (mode_t))
4333 return 0;
4334 ;
4335 return 0;
4336}
4337_ACEOF
4338rm -f conftest.$ac_objext
4339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4340 (eval $ac_compile) 2>&5
4341 ac_status=$?
4342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4343 (exit $ac_status); } &&
4344 { ac_try='test -s conftest.$ac_objext'
4345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4346 (eval $ac_try) 2>&5
4347 ac_status=$?
4348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4349 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004350 ac_cv_type_mode_t=yes
4351else
Martin v. Löwis11437992002-04-12 09:54:03 +00004352 echo "$as_me: failed program was:" >&5
4353cat conftest.$ac_ext >&5
4354ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004355fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004356rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004358echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4359echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4360if test $ac_cv_type_mode_t = yes; then
4361 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004362else
Martin v. Löwis11437992002-04-12 09:54:03 +00004363
4364cat >>confdefs.h <<_ACEOF
4365#define mode_t int
4366_ACEOF
4367
4368fi
4369
4370echo "$as_me:$LINENO: checking for off_t" >&5
4371echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4372if test "${ac_cv_type_off_t+set}" = set; then
4373 echo $ECHO_N "(cached) $ECHO_C" >&6
4374else
4375 cat >conftest.$ac_ext <<_ACEOF
4376#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004377#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004378$ac_includes_default
4379#ifdef F77_DUMMY_MAIN
4380# ifdef __cplusplus
4381 extern "C"
4382# endif
4383 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004384#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004385int
4386main ()
4387{
4388if ((off_t *) 0)
4389 return 0;
4390if (sizeof (off_t))
4391 return 0;
4392 ;
4393 return 0;
4394}
4395_ACEOF
4396rm -f conftest.$ac_objext
4397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4398 (eval $ac_compile) 2>&5
4399 ac_status=$?
4400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4401 (exit $ac_status); } &&
4402 { ac_try='test -s conftest.$ac_objext'
4403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4404 (eval $ac_try) 2>&5
4405 ac_status=$?
4406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4407 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004408 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004409else
Martin v. Löwis11437992002-04-12 09:54:03 +00004410 echo "$as_me: failed program was:" >&5
4411cat conftest.$ac_ext >&5
4412ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004413fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004414rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004415fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004416echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4417echo "${ECHO_T}$ac_cv_type_off_t" >&6
4418if test $ac_cv_type_off_t = yes; then
4419 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004420else
Martin v. Löwis11437992002-04-12 09:54:03 +00004421
4422cat >>confdefs.h <<_ACEOF
4423#define off_t long
4424_ACEOF
4425
4426fi
4427
4428echo "$as_me:$LINENO: checking for pid_t" >&5
4429echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4430if test "${ac_cv_type_pid_t+set}" = set; then
4431 echo $ECHO_N "(cached) $ECHO_C" >&6
4432else
4433 cat >conftest.$ac_ext <<_ACEOF
4434#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004435#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004436$ac_includes_default
4437#ifdef F77_DUMMY_MAIN
4438# ifdef __cplusplus
4439 extern "C"
4440# endif
4441 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004442#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004443int
4444main ()
4445{
4446if ((pid_t *) 0)
4447 return 0;
4448if (sizeof (pid_t))
4449 return 0;
4450 ;
4451 return 0;
4452}
4453_ACEOF
4454rm -f conftest.$ac_objext
4455if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4456 (eval $ac_compile) 2>&5
4457 ac_status=$?
4458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4459 (exit $ac_status); } &&
4460 { ac_try='test -s conftest.$ac_objext'
4461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4462 (eval $ac_try) 2>&5
4463 ac_status=$?
4464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4465 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004466 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004467else
Martin v. Löwis11437992002-04-12 09:54:03 +00004468 echo "$as_me: failed program was:" >&5
4469cat conftest.$ac_ext >&5
4470ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004471fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004472rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004473fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004474echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4475echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4476if test $ac_cv_type_pid_t = yes; then
4477 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004478else
Martin v. Löwis11437992002-04-12 09:54:03 +00004479
4480cat >>confdefs.h <<_ACEOF
4481#define pid_t int
4482_ACEOF
4483
4484fi
4485
4486echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4487echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4488if test "${ac_cv_type_signal+set}" = set; then
4489 echo $ECHO_N "(cached) $ECHO_C" >&6
4490else
4491 cat >conftest.$ac_ext <<_ACEOF
4492#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004493#include "confdefs.h"
4494#include <sys/types.h>
4495#include <signal.h>
4496#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004497# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004498#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004499#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004500extern "C" void (*signal (int, void (*)(int)))(int);
4501#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004502void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004503#endif
4504
Martin v. Löwis11437992002-04-12 09:54:03 +00004505#ifdef F77_DUMMY_MAIN
4506# ifdef __cplusplus
4507 extern "C"
4508# endif
4509 int F77_DUMMY_MAIN() { return 1; }
4510#endif
4511int
4512main ()
4513{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004514int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004515 ;
4516 return 0;
4517}
4518_ACEOF
4519rm -f conftest.$ac_objext
4520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4521 (eval $ac_compile) 2>&5
4522 ac_status=$?
4523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4524 (exit $ac_status); } &&
4525 { ac_try='test -s conftest.$ac_objext'
4526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4527 (eval $ac_try) 2>&5
4528 ac_status=$?
4529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4530 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004531 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004532else
Martin v. Löwis11437992002-04-12 09:54:03 +00004533 echo "$as_me: failed program was:" >&5
4534cat conftest.$ac_ext >&5
4535ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004536fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004537rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004538fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004539echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4540echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004541
Martin v. Löwis11437992002-04-12 09:54:03 +00004542cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004543#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004544_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004545
Michael W. Hudson54241132001-12-07 15:38:26 +00004546
Martin v. Löwis11437992002-04-12 09:54:03 +00004547echo "$as_me:$LINENO: checking for size_t" >&5
4548echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4549if test "${ac_cv_type_size_t+set}" = set; then
4550 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004551else
Martin v. Löwis11437992002-04-12 09:54:03 +00004552 cat >conftest.$ac_ext <<_ACEOF
4553#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004554#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004555$ac_includes_default
4556#ifdef F77_DUMMY_MAIN
4557# ifdef __cplusplus
4558 extern "C"
4559# endif
4560 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004562int
4563main ()
4564{
4565if ((size_t *) 0)
4566 return 0;
4567if (sizeof (size_t))
4568 return 0;
4569 ;
4570 return 0;
4571}
4572_ACEOF
4573rm -f conftest.$ac_objext
4574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4575 (eval $ac_compile) 2>&5
4576 ac_status=$?
4577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4578 (exit $ac_status); } &&
4579 { ac_try='test -s conftest.$ac_objext'
4580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4581 (eval $ac_try) 2>&5
4582 ac_status=$?
4583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4584 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004585 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004586else
Martin v. Löwis11437992002-04-12 09:54:03 +00004587 echo "$as_me: failed program was:" >&5
4588cat conftest.$ac_ext >&5
4589ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004590fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004591rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004592fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004593echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4594echo "${ECHO_T}$ac_cv_type_size_t" >&6
4595if test $ac_cv_type_size_t = yes; then
4596 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004597else
Martin v. Löwis11437992002-04-12 09:54:03 +00004598
4599cat >>confdefs.h <<_ACEOF
4600#define size_t unsigned
4601_ACEOF
4602
4603fi
4604
4605echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4606echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4607if test "${ac_cv_type_uid_t+set}" = set; then
4608 echo $ECHO_N "(cached) $ECHO_C" >&6
4609else
4610 cat >conftest.$ac_ext <<_ACEOF
4611#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004612#include "confdefs.h"
4613#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004614
4615_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004616if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4617 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004618 ac_cv_type_uid_t=yes
4619else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004620 ac_cv_type_uid_t=no
4621fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004622rm -f conftest*
4623
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004624fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004625echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4626echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004627if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004628
Martin v. Löwis11437992002-04-12 09:54:03 +00004629cat >>confdefs.h <<\_ACEOF
4630#define uid_t int
4631_ACEOF
4632
4633
4634cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004635#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004636_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004637
4638fi
4639
Jack Jansendd19cf82001-12-06 22:36:17 +00004640
Michael W. Hudson54241132001-12-07 15:38:26 +00004641# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004642echo "$as_me:$LINENO: checking for int" >&5
4643echo $ECHO_N "checking for int... $ECHO_C" >&6
4644if test "${ac_cv_type_int+set}" = set; then
4645 echo $ECHO_N "(cached) $ECHO_C" >&6
4646else
4647 cat >conftest.$ac_ext <<_ACEOF
4648#line $LINENO "configure"
4649#include "confdefs.h"
4650$ac_includes_default
4651#ifdef F77_DUMMY_MAIN
4652# ifdef __cplusplus
4653 extern "C"
4654# endif
4655 int F77_DUMMY_MAIN() { return 1; }
4656#endif
4657int
4658main ()
4659{
4660if ((int *) 0)
4661 return 0;
4662if (sizeof (int))
4663 return 0;
4664 ;
4665 return 0;
4666}
4667_ACEOF
4668rm -f conftest.$ac_objext
4669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4670 (eval $ac_compile) 2>&5
4671 ac_status=$?
4672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4673 (exit $ac_status); } &&
4674 { ac_try='test -s conftest.$ac_objext'
4675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4676 (eval $ac_try) 2>&5
4677 ac_status=$?
4678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4679 (exit $ac_status); }; }; then
4680 ac_cv_type_int=yes
4681else
4682 echo "$as_me: failed program was:" >&5
4683cat conftest.$ac_ext >&5
4684ac_cv_type_int=no
4685fi
4686rm -f conftest.$ac_objext conftest.$ac_ext
4687fi
4688echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4689echo "${ECHO_T}$ac_cv_type_int" >&6
4690
4691echo "$as_me:$LINENO: checking size of int" >&5
4692echo $ECHO_N "checking size of int... $ECHO_C" >&6
4693if test "${ac_cv_sizeof_int+set}" = set; then
4694 echo $ECHO_N "(cached) $ECHO_C" >&6
4695else
4696 if test "$ac_cv_type_int" = yes; then
4697 # The cast to unsigned long works around a bug in the HP C Compiler
4698 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4699 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4700 # This bug is HP SR number 8606223364.
4701 if test "$cross_compiling" = yes; then
4702 # Depending upon the size, compute the lo and hi bounds.
4703cat >conftest.$ac_ext <<_ACEOF
4704#line $LINENO "configure"
4705#include "confdefs.h"
4706$ac_includes_default
4707#ifdef F77_DUMMY_MAIN
4708# ifdef __cplusplus
4709 extern "C"
4710# endif
4711 int F77_DUMMY_MAIN() { return 1; }
4712#endif
4713int
4714main ()
4715{
4716static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4717test_array [0] = 0
4718
4719 ;
4720 return 0;
4721}
4722_ACEOF
4723rm -f conftest.$ac_objext
4724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4725 (eval $ac_compile) 2>&5
4726 ac_status=$?
4727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4728 (exit $ac_status); } &&
4729 { ac_try='test -s conftest.$ac_objext'
4730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4731 (eval $ac_try) 2>&5
4732 ac_status=$?
4733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4734 (exit $ac_status); }; }; then
4735 ac_lo=0 ac_mid=0
4736 while :; do
4737 cat >conftest.$ac_ext <<_ACEOF
4738#line $LINENO "configure"
4739#include "confdefs.h"
4740$ac_includes_default
4741#ifdef F77_DUMMY_MAIN
4742# ifdef __cplusplus
4743 extern "C"
4744# endif
4745 int F77_DUMMY_MAIN() { return 1; }
4746#endif
4747int
4748main ()
4749{
4750static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4751test_array [0] = 0
4752
4753 ;
4754 return 0;
4755}
4756_ACEOF
4757rm -f conftest.$ac_objext
4758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4759 (eval $ac_compile) 2>&5
4760 ac_status=$?
4761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4762 (exit $ac_status); } &&
4763 { ac_try='test -s conftest.$ac_objext'
4764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4765 (eval $ac_try) 2>&5
4766 ac_status=$?
4767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4768 (exit $ac_status); }; }; then
4769 ac_hi=$ac_mid; break
4770else
4771 echo "$as_me: failed program was:" >&5
4772cat conftest.$ac_ext >&5
4773ac_lo=`expr $ac_mid + 1`
4774 if test $ac_lo -le $ac_mid; then
4775 ac_lo= ac_hi=
4776 break
4777 fi
4778 ac_mid=`expr 2 '*' $ac_mid + 1`
4779fi
4780rm -f conftest.$ac_objext conftest.$ac_ext
4781 done
4782else
4783 echo "$as_me: failed program was:" >&5
4784cat conftest.$ac_ext >&5
4785cat >conftest.$ac_ext <<_ACEOF
4786#line $LINENO "configure"
4787#include "confdefs.h"
4788$ac_includes_default
4789#ifdef F77_DUMMY_MAIN
4790# ifdef __cplusplus
4791 extern "C"
4792# endif
4793 int F77_DUMMY_MAIN() { return 1; }
4794#endif
4795int
4796main ()
4797{
4798static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4799test_array [0] = 0
4800
4801 ;
4802 return 0;
4803}
4804_ACEOF
4805rm -f conftest.$ac_objext
4806if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4807 (eval $ac_compile) 2>&5
4808 ac_status=$?
4809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4810 (exit $ac_status); } &&
4811 { ac_try='test -s conftest.$ac_objext'
4812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4813 (eval $ac_try) 2>&5
4814 ac_status=$?
4815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4816 (exit $ac_status); }; }; then
4817 ac_hi=-1 ac_mid=-1
4818 while :; do
4819 cat >conftest.$ac_ext <<_ACEOF
4820#line $LINENO "configure"
4821#include "confdefs.h"
4822$ac_includes_default
4823#ifdef F77_DUMMY_MAIN
4824# ifdef __cplusplus
4825 extern "C"
4826# endif
4827 int F77_DUMMY_MAIN() { return 1; }
4828#endif
4829int
4830main ()
4831{
4832static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4833test_array [0] = 0
4834
4835 ;
4836 return 0;
4837}
4838_ACEOF
4839rm -f conftest.$ac_objext
4840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4841 (eval $ac_compile) 2>&5
4842 ac_status=$?
4843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4844 (exit $ac_status); } &&
4845 { ac_try='test -s conftest.$ac_objext'
4846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4847 (eval $ac_try) 2>&5
4848 ac_status=$?
4849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4850 (exit $ac_status); }; }; then
4851 ac_lo=$ac_mid; break
4852else
4853 echo "$as_me: failed program was:" >&5
4854cat conftest.$ac_ext >&5
4855ac_hi=`expr '(' $ac_mid ')' - 1`
4856 if test $ac_mid -le $ac_hi; then
4857 ac_lo= ac_hi=
4858 break
4859 fi
4860 ac_mid=`expr 2 '*' $ac_mid`
4861fi
4862rm -f conftest.$ac_objext conftest.$ac_ext
4863 done
4864else
4865 echo "$as_me: failed program was:" >&5
4866cat conftest.$ac_ext >&5
4867ac_lo= ac_hi=
4868fi
4869rm -f conftest.$ac_objext conftest.$ac_ext
4870fi
4871rm -f conftest.$ac_objext conftest.$ac_ext
4872# Binary search between lo and hi bounds.
4873while test "x$ac_lo" != "x$ac_hi"; do
4874 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4875 cat >conftest.$ac_ext <<_ACEOF
4876#line $LINENO "configure"
4877#include "confdefs.h"
4878$ac_includes_default
4879#ifdef F77_DUMMY_MAIN
4880# ifdef __cplusplus
4881 extern "C"
4882# endif
4883 int F77_DUMMY_MAIN() { return 1; }
4884#endif
4885int
4886main ()
4887{
4888static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4889test_array [0] = 0
4890
4891 ;
4892 return 0;
4893}
4894_ACEOF
4895rm -f conftest.$ac_objext
4896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4897 (eval $ac_compile) 2>&5
4898 ac_status=$?
4899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4900 (exit $ac_status); } &&
4901 { ac_try='test -s conftest.$ac_objext'
4902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4903 (eval $ac_try) 2>&5
4904 ac_status=$?
4905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4906 (exit $ac_status); }; }; then
4907 ac_hi=$ac_mid
4908else
4909 echo "$as_me: failed program was:" >&5
4910cat conftest.$ac_ext >&5
4911ac_lo=`expr '(' $ac_mid ')' + 1`
4912fi
4913rm -f conftest.$ac_objext conftest.$ac_ext
4914done
4915case $ac_lo in
4916?*) ac_cv_sizeof_int=$ac_lo;;
4917'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4918echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4919 { (exit 1); exit 1; }; } ;;
4920esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004921else
4922 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004923 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4924echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4925 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004926else
Martin v. Löwis11437992002-04-12 09:54:03 +00004927 cat >conftest.$ac_ext <<_ACEOF
4928#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004929#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004930$ac_includes_default
4931long longval () { return (long) (sizeof (int)); }
4932unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004933#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004934#include <stdlib.h>
4935#ifdef F77_DUMMY_MAIN
4936# ifdef __cplusplus
4937 extern "C"
4938# endif
4939 int F77_DUMMY_MAIN() { return 1; }
4940#endif
4941int
4942main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004943{
Martin v. Löwis11437992002-04-12 09:54:03 +00004944
4945 FILE *f = fopen ("conftest.val", "w");
4946 if (! f)
4947 exit (1);
4948 if (((long) (sizeof (int))) < 0)
4949 {
4950 long i = longval ();
4951 if (i != ((long) (sizeof (int))))
4952 exit (1);
4953 fprintf (f, "%ld\n", i);
4954 }
4955 else
4956 {
4957 unsigned long i = ulongval ();
4958 if (i != ((long) (sizeof (int))))
4959 exit (1);
4960 fprintf (f, "%lu\n", i);
4961 }
4962 exit (ferror (f) || fclose (f) != 0);
4963
4964 ;
4965 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004966}
Martin v. Löwis11437992002-04-12 09:54:03 +00004967_ACEOF
4968rm -f conftest$ac_exeext
4969if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4970 (eval $ac_link) 2>&5
4971 ac_status=$?
4972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4973 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4975 (eval $ac_try) 2>&5
4976 ac_status=$?
4977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4978 (exit $ac_status); }; }; then
4979 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004980else
Martin v. Löwis11437992002-04-12 09:54:03 +00004981 echo "$as_me: program exited with status $ac_status" >&5
4982echo "$as_me: failed program was:" >&5
4983cat conftest.$ac_ext >&5
4984( exit $ac_status )
4985{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4986echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4987 { (exit 1); exit 1; }; }
4988fi
4989rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4990fi
4991fi
4992rm -f conftest.val
4993else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004994 ac_cv_sizeof_int=0
4995fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004996fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004997echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4998echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4999cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005000#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005001_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005002
5003
Martin v. Löwis11437992002-04-12 09:54:03 +00005004echo "$as_me:$LINENO: checking for long" >&5
5005echo $ECHO_N "checking for long... $ECHO_C" >&6
5006if test "${ac_cv_type_long+set}" = set; then
5007 echo $ECHO_N "(cached) $ECHO_C" >&6
5008else
5009 cat >conftest.$ac_ext <<_ACEOF
5010#line $LINENO "configure"
5011#include "confdefs.h"
5012$ac_includes_default
5013#ifdef F77_DUMMY_MAIN
5014# ifdef __cplusplus
5015 extern "C"
5016# endif
5017 int F77_DUMMY_MAIN() { return 1; }
5018#endif
5019int
5020main ()
5021{
5022if ((long *) 0)
5023 return 0;
5024if (sizeof (long))
5025 return 0;
5026 ;
5027 return 0;
5028}
5029_ACEOF
5030rm -f conftest.$ac_objext
5031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5032 (eval $ac_compile) 2>&5
5033 ac_status=$?
5034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5035 (exit $ac_status); } &&
5036 { ac_try='test -s conftest.$ac_objext'
5037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5038 (eval $ac_try) 2>&5
5039 ac_status=$?
5040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5041 (exit $ac_status); }; }; then
5042 ac_cv_type_long=yes
5043else
5044 echo "$as_me: failed program was:" >&5
5045cat conftest.$ac_ext >&5
5046ac_cv_type_long=no
5047fi
5048rm -f conftest.$ac_objext conftest.$ac_ext
5049fi
5050echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5051echo "${ECHO_T}$ac_cv_type_long" >&6
5052
5053echo "$as_me:$LINENO: checking size of long" >&5
5054echo $ECHO_N "checking size of long... $ECHO_C" >&6
5055if test "${ac_cv_sizeof_long+set}" = set; then
5056 echo $ECHO_N "(cached) $ECHO_C" >&6
5057else
5058 if test "$ac_cv_type_long" = yes; then
5059 # The cast to unsigned long works around a bug in the HP C Compiler
5060 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5061 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5062 # This bug is HP SR number 8606223364.
5063 if test "$cross_compiling" = yes; then
5064 # Depending upon the size, compute the lo and hi bounds.
5065cat >conftest.$ac_ext <<_ACEOF
5066#line $LINENO "configure"
5067#include "confdefs.h"
5068$ac_includes_default
5069#ifdef F77_DUMMY_MAIN
5070# ifdef __cplusplus
5071 extern "C"
5072# endif
5073 int F77_DUMMY_MAIN() { return 1; }
5074#endif
5075int
5076main ()
5077{
5078static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5079test_array [0] = 0
5080
5081 ;
5082 return 0;
5083}
5084_ACEOF
5085rm -f conftest.$ac_objext
5086if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5087 (eval $ac_compile) 2>&5
5088 ac_status=$?
5089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5090 (exit $ac_status); } &&
5091 { ac_try='test -s conftest.$ac_objext'
5092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5093 (eval $ac_try) 2>&5
5094 ac_status=$?
5095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5096 (exit $ac_status); }; }; then
5097 ac_lo=0 ac_mid=0
5098 while :; do
5099 cat >conftest.$ac_ext <<_ACEOF
5100#line $LINENO "configure"
5101#include "confdefs.h"
5102$ac_includes_default
5103#ifdef F77_DUMMY_MAIN
5104# ifdef __cplusplus
5105 extern "C"
5106# endif
5107 int F77_DUMMY_MAIN() { return 1; }
5108#endif
5109int
5110main ()
5111{
5112static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5113test_array [0] = 0
5114
5115 ;
5116 return 0;
5117}
5118_ACEOF
5119rm -f conftest.$ac_objext
5120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5121 (eval $ac_compile) 2>&5
5122 ac_status=$?
5123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5124 (exit $ac_status); } &&
5125 { ac_try='test -s conftest.$ac_objext'
5126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5127 (eval $ac_try) 2>&5
5128 ac_status=$?
5129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5130 (exit $ac_status); }; }; then
5131 ac_hi=$ac_mid; break
5132else
5133 echo "$as_me: failed program was:" >&5
5134cat conftest.$ac_ext >&5
5135ac_lo=`expr $ac_mid + 1`
5136 if test $ac_lo -le $ac_mid; then
5137 ac_lo= ac_hi=
5138 break
5139 fi
5140 ac_mid=`expr 2 '*' $ac_mid + 1`
5141fi
5142rm -f conftest.$ac_objext conftest.$ac_ext
5143 done
5144else
5145 echo "$as_me: failed program was:" >&5
5146cat conftest.$ac_ext >&5
5147cat >conftest.$ac_ext <<_ACEOF
5148#line $LINENO "configure"
5149#include "confdefs.h"
5150$ac_includes_default
5151#ifdef F77_DUMMY_MAIN
5152# ifdef __cplusplus
5153 extern "C"
5154# endif
5155 int F77_DUMMY_MAIN() { return 1; }
5156#endif
5157int
5158main ()
5159{
5160static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5161test_array [0] = 0
5162
5163 ;
5164 return 0;
5165}
5166_ACEOF
5167rm -f conftest.$ac_objext
5168if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5169 (eval $ac_compile) 2>&5
5170 ac_status=$?
5171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5172 (exit $ac_status); } &&
5173 { ac_try='test -s conftest.$ac_objext'
5174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5175 (eval $ac_try) 2>&5
5176 ac_status=$?
5177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5178 (exit $ac_status); }; }; then
5179 ac_hi=-1 ac_mid=-1
5180 while :; do
5181 cat >conftest.$ac_ext <<_ACEOF
5182#line $LINENO "configure"
5183#include "confdefs.h"
5184$ac_includes_default
5185#ifdef F77_DUMMY_MAIN
5186# ifdef __cplusplus
5187 extern "C"
5188# endif
5189 int F77_DUMMY_MAIN() { return 1; }
5190#endif
5191int
5192main ()
5193{
5194static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5195test_array [0] = 0
5196
5197 ;
5198 return 0;
5199}
5200_ACEOF
5201rm -f conftest.$ac_objext
5202if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5203 (eval $ac_compile) 2>&5
5204 ac_status=$?
5205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5206 (exit $ac_status); } &&
5207 { ac_try='test -s conftest.$ac_objext'
5208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5209 (eval $ac_try) 2>&5
5210 ac_status=$?
5211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5212 (exit $ac_status); }; }; then
5213 ac_lo=$ac_mid; break
5214else
5215 echo "$as_me: failed program was:" >&5
5216cat conftest.$ac_ext >&5
5217ac_hi=`expr '(' $ac_mid ')' - 1`
5218 if test $ac_mid -le $ac_hi; then
5219 ac_lo= ac_hi=
5220 break
5221 fi
5222 ac_mid=`expr 2 '*' $ac_mid`
5223fi
5224rm -f conftest.$ac_objext conftest.$ac_ext
5225 done
5226else
5227 echo "$as_me: failed program was:" >&5
5228cat conftest.$ac_ext >&5
5229ac_lo= ac_hi=
5230fi
5231rm -f conftest.$ac_objext conftest.$ac_ext
5232fi
5233rm -f conftest.$ac_objext conftest.$ac_ext
5234# Binary search between lo and hi bounds.
5235while test "x$ac_lo" != "x$ac_hi"; do
5236 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5237 cat >conftest.$ac_ext <<_ACEOF
5238#line $LINENO "configure"
5239#include "confdefs.h"
5240$ac_includes_default
5241#ifdef F77_DUMMY_MAIN
5242# ifdef __cplusplus
5243 extern "C"
5244# endif
5245 int F77_DUMMY_MAIN() { return 1; }
5246#endif
5247int
5248main ()
5249{
5250static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5251test_array [0] = 0
5252
5253 ;
5254 return 0;
5255}
5256_ACEOF
5257rm -f conftest.$ac_objext
5258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5259 (eval $ac_compile) 2>&5
5260 ac_status=$?
5261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5262 (exit $ac_status); } &&
5263 { ac_try='test -s conftest.$ac_objext'
5264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5265 (eval $ac_try) 2>&5
5266 ac_status=$?
5267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5268 (exit $ac_status); }; }; then
5269 ac_hi=$ac_mid
5270else
5271 echo "$as_me: failed program was:" >&5
5272cat conftest.$ac_ext >&5
5273ac_lo=`expr '(' $ac_mid ')' + 1`
5274fi
5275rm -f conftest.$ac_objext conftest.$ac_ext
5276done
5277case $ac_lo in
5278?*) ac_cv_sizeof_long=$ac_lo;;
5279'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5280echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5281 { (exit 1); exit 1; }; } ;;
5282esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005283else
5284 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005285 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5286echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5287 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005288else
Martin v. Löwis11437992002-04-12 09:54:03 +00005289 cat >conftest.$ac_ext <<_ACEOF
5290#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005291#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005292$ac_includes_default
5293long longval () { return (long) (sizeof (long)); }
5294unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005295#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005296#include <stdlib.h>
5297#ifdef F77_DUMMY_MAIN
5298# ifdef __cplusplus
5299 extern "C"
5300# endif
5301 int F77_DUMMY_MAIN() { return 1; }
5302#endif
5303int
5304main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005305{
Martin v. Löwis11437992002-04-12 09:54:03 +00005306
5307 FILE *f = fopen ("conftest.val", "w");
5308 if (! f)
5309 exit (1);
5310 if (((long) (sizeof (long))) < 0)
5311 {
5312 long i = longval ();
5313 if (i != ((long) (sizeof (long))))
5314 exit (1);
5315 fprintf (f, "%ld\n", i);
5316 }
5317 else
5318 {
5319 unsigned long i = ulongval ();
5320 if (i != ((long) (sizeof (long))))
5321 exit (1);
5322 fprintf (f, "%lu\n", i);
5323 }
5324 exit (ferror (f) || fclose (f) != 0);
5325
5326 ;
5327 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005328}
Martin v. Löwis11437992002-04-12 09:54:03 +00005329_ACEOF
5330rm -f conftest$ac_exeext
5331if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5332 (eval $ac_link) 2>&5
5333 ac_status=$?
5334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5335 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5337 (eval $ac_try) 2>&5
5338 ac_status=$?
5339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5340 (exit $ac_status); }; }; then
5341 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005342else
Martin v. Löwis11437992002-04-12 09:54:03 +00005343 echo "$as_me: program exited with status $ac_status" >&5
5344echo "$as_me: failed program was:" >&5
5345cat conftest.$ac_ext >&5
5346( exit $ac_status )
5347{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5348echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5349 { (exit 1); exit 1; }; }
5350fi
5351rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5352fi
5353fi
5354rm -f conftest.val
5355else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005356 ac_cv_sizeof_long=0
5357fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005358fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005359echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5360echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5361cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005362#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005363_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005364
5365
Martin v. Löwis11437992002-04-12 09:54:03 +00005366echo "$as_me:$LINENO: checking for void *" >&5
5367echo $ECHO_N "checking for void *... $ECHO_C" >&6
5368if test "${ac_cv_type_void_p+set}" = set; then
5369 echo $ECHO_N "(cached) $ECHO_C" >&6
5370else
5371 cat >conftest.$ac_ext <<_ACEOF
5372#line $LINENO "configure"
5373#include "confdefs.h"
5374$ac_includes_default
5375#ifdef F77_DUMMY_MAIN
5376# ifdef __cplusplus
5377 extern "C"
5378# endif
5379 int F77_DUMMY_MAIN() { return 1; }
5380#endif
5381int
5382main ()
5383{
5384if ((void * *) 0)
5385 return 0;
5386if (sizeof (void *))
5387 return 0;
5388 ;
5389 return 0;
5390}
5391_ACEOF
5392rm -f conftest.$ac_objext
5393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5394 (eval $ac_compile) 2>&5
5395 ac_status=$?
5396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5397 (exit $ac_status); } &&
5398 { ac_try='test -s conftest.$ac_objext'
5399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5400 (eval $ac_try) 2>&5
5401 ac_status=$?
5402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5403 (exit $ac_status); }; }; then
5404 ac_cv_type_void_p=yes
5405else
5406 echo "$as_me: failed program was:" >&5
5407cat conftest.$ac_ext >&5
5408ac_cv_type_void_p=no
5409fi
5410rm -f conftest.$ac_objext conftest.$ac_ext
5411fi
5412echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5413echo "${ECHO_T}$ac_cv_type_void_p" >&6
5414
5415echo "$as_me:$LINENO: checking size of void *" >&5
5416echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5417if test "${ac_cv_sizeof_void_p+set}" = set; then
5418 echo $ECHO_N "(cached) $ECHO_C" >&6
5419else
5420 if test "$ac_cv_type_void_p" = yes; then
5421 # The cast to unsigned long works around a bug in the HP C Compiler
5422 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5423 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5424 # This bug is HP SR number 8606223364.
5425 if test "$cross_compiling" = yes; then
5426 # Depending upon the size, compute the lo and hi bounds.
5427cat >conftest.$ac_ext <<_ACEOF
5428#line $LINENO "configure"
5429#include "confdefs.h"
5430$ac_includes_default
5431#ifdef F77_DUMMY_MAIN
5432# ifdef __cplusplus
5433 extern "C"
5434# endif
5435 int F77_DUMMY_MAIN() { return 1; }
5436#endif
5437int
5438main ()
5439{
5440static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5441test_array [0] = 0
5442
5443 ;
5444 return 0;
5445}
5446_ACEOF
5447rm -f conftest.$ac_objext
5448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5449 (eval $ac_compile) 2>&5
5450 ac_status=$?
5451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5452 (exit $ac_status); } &&
5453 { ac_try='test -s conftest.$ac_objext'
5454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5455 (eval $ac_try) 2>&5
5456 ac_status=$?
5457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5458 (exit $ac_status); }; }; then
5459 ac_lo=0 ac_mid=0
5460 while :; do
5461 cat >conftest.$ac_ext <<_ACEOF
5462#line $LINENO "configure"
5463#include "confdefs.h"
5464$ac_includes_default
5465#ifdef F77_DUMMY_MAIN
5466# ifdef __cplusplus
5467 extern "C"
5468# endif
5469 int F77_DUMMY_MAIN() { return 1; }
5470#endif
5471int
5472main ()
5473{
5474static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5475test_array [0] = 0
5476
5477 ;
5478 return 0;
5479}
5480_ACEOF
5481rm -f conftest.$ac_objext
5482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5483 (eval $ac_compile) 2>&5
5484 ac_status=$?
5485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5486 (exit $ac_status); } &&
5487 { ac_try='test -s conftest.$ac_objext'
5488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5489 (eval $ac_try) 2>&5
5490 ac_status=$?
5491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5492 (exit $ac_status); }; }; then
5493 ac_hi=$ac_mid; break
5494else
5495 echo "$as_me: failed program was:" >&5
5496cat conftest.$ac_ext >&5
5497ac_lo=`expr $ac_mid + 1`
5498 if test $ac_lo -le $ac_mid; then
5499 ac_lo= ac_hi=
5500 break
5501 fi
5502 ac_mid=`expr 2 '*' $ac_mid + 1`
5503fi
5504rm -f conftest.$ac_objext conftest.$ac_ext
5505 done
5506else
5507 echo "$as_me: failed program was:" >&5
5508cat conftest.$ac_ext >&5
5509cat >conftest.$ac_ext <<_ACEOF
5510#line $LINENO "configure"
5511#include "confdefs.h"
5512$ac_includes_default
5513#ifdef F77_DUMMY_MAIN
5514# ifdef __cplusplus
5515 extern "C"
5516# endif
5517 int F77_DUMMY_MAIN() { return 1; }
5518#endif
5519int
5520main ()
5521{
5522static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5523test_array [0] = 0
5524
5525 ;
5526 return 0;
5527}
5528_ACEOF
5529rm -f conftest.$ac_objext
5530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5531 (eval $ac_compile) 2>&5
5532 ac_status=$?
5533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5534 (exit $ac_status); } &&
5535 { ac_try='test -s conftest.$ac_objext'
5536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5537 (eval $ac_try) 2>&5
5538 ac_status=$?
5539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5540 (exit $ac_status); }; }; then
5541 ac_hi=-1 ac_mid=-1
5542 while :; do
5543 cat >conftest.$ac_ext <<_ACEOF
5544#line $LINENO "configure"
5545#include "confdefs.h"
5546$ac_includes_default
5547#ifdef F77_DUMMY_MAIN
5548# ifdef __cplusplus
5549 extern "C"
5550# endif
5551 int F77_DUMMY_MAIN() { return 1; }
5552#endif
5553int
5554main ()
5555{
5556static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5557test_array [0] = 0
5558
5559 ;
5560 return 0;
5561}
5562_ACEOF
5563rm -f conftest.$ac_objext
5564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5565 (eval $ac_compile) 2>&5
5566 ac_status=$?
5567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5568 (exit $ac_status); } &&
5569 { ac_try='test -s conftest.$ac_objext'
5570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5571 (eval $ac_try) 2>&5
5572 ac_status=$?
5573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5574 (exit $ac_status); }; }; then
5575 ac_lo=$ac_mid; break
5576else
5577 echo "$as_me: failed program was:" >&5
5578cat conftest.$ac_ext >&5
5579ac_hi=`expr '(' $ac_mid ')' - 1`
5580 if test $ac_mid -le $ac_hi; then
5581 ac_lo= ac_hi=
5582 break
5583 fi
5584 ac_mid=`expr 2 '*' $ac_mid`
5585fi
5586rm -f conftest.$ac_objext conftest.$ac_ext
5587 done
5588else
5589 echo "$as_me: failed program was:" >&5
5590cat conftest.$ac_ext >&5
5591ac_lo= ac_hi=
5592fi
5593rm -f conftest.$ac_objext conftest.$ac_ext
5594fi
5595rm -f conftest.$ac_objext conftest.$ac_ext
5596# Binary search between lo and hi bounds.
5597while test "x$ac_lo" != "x$ac_hi"; do
5598 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5599 cat >conftest.$ac_ext <<_ACEOF
5600#line $LINENO "configure"
5601#include "confdefs.h"
5602$ac_includes_default
5603#ifdef F77_DUMMY_MAIN
5604# ifdef __cplusplus
5605 extern "C"
5606# endif
5607 int F77_DUMMY_MAIN() { return 1; }
5608#endif
5609int
5610main ()
5611{
5612static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5613test_array [0] = 0
5614
5615 ;
5616 return 0;
5617}
5618_ACEOF
5619rm -f conftest.$ac_objext
5620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5621 (eval $ac_compile) 2>&5
5622 ac_status=$?
5623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5624 (exit $ac_status); } &&
5625 { ac_try='test -s conftest.$ac_objext'
5626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5627 (eval $ac_try) 2>&5
5628 ac_status=$?
5629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5630 (exit $ac_status); }; }; then
5631 ac_hi=$ac_mid
5632else
5633 echo "$as_me: failed program was:" >&5
5634cat conftest.$ac_ext >&5
5635ac_lo=`expr '(' $ac_mid ')' + 1`
5636fi
5637rm -f conftest.$ac_objext conftest.$ac_ext
5638done
5639case $ac_lo in
5640?*) ac_cv_sizeof_void_p=$ac_lo;;
5641'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5642echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5643 { (exit 1); exit 1; }; } ;;
5644esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005645else
5646 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005647 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5648echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5649 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005650else
Martin v. Löwis11437992002-04-12 09:54:03 +00005651 cat >conftest.$ac_ext <<_ACEOF
5652#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005653#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005654$ac_includes_default
5655long longval () { return (long) (sizeof (void *)); }
5656unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005657#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005658#include <stdlib.h>
5659#ifdef F77_DUMMY_MAIN
5660# ifdef __cplusplus
5661 extern "C"
5662# endif
5663 int F77_DUMMY_MAIN() { return 1; }
5664#endif
5665int
5666main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005667{
Martin v. Löwis11437992002-04-12 09:54:03 +00005668
5669 FILE *f = fopen ("conftest.val", "w");
5670 if (! f)
5671 exit (1);
5672 if (((long) (sizeof (void *))) < 0)
5673 {
5674 long i = longval ();
5675 if (i != ((long) (sizeof (void *))))
5676 exit (1);
5677 fprintf (f, "%ld\n", i);
5678 }
5679 else
5680 {
5681 unsigned long i = ulongval ();
5682 if (i != ((long) (sizeof (void *))))
5683 exit (1);
5684 fprintf (f, "%lu\n", i);
5685 }
5686 exit (ferror (f) || fclose (f) != 0);
5687
5688 ;
5689 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005690}
Martin v. Löwis11437992002-04-12 09:54:03 +00005691_ACEOF
5692rm -f conftest$ac_exeext
5693if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5694 (eval $ac_link) 2>&5
5695 ac_status=$?
5696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5697 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5699 (eval $ac_try) 2>&5
5700 ac_status=$?
5701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5702 (exit $ac_status); }; }; then
5703 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005704else
Martin v. Löwis11437992002-04-12 09:54:03 +00005705 echo "$as_me: program exited with status $ac_status" >&5
5706echo "$as_me: failed program was:" >&5
5707cat conftest.$ac_ext >&5
5708( exit $ac_status )
5709{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5710echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5711 { (exit 1); exit 1; }; }
5712fi
5713rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5714fi
5715fi
5716rm -f conftest.val
5717else
Guido van Rossumad678af1998-10-02 14:42:15 +00005718 ac_cv_sizeof_void_p=0
5719fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005720fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005721echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5722echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5723cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005724#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005725_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005726
5727
Martin v. Löwis11437992002-04-12 09:54:03 +00005728echo "$as_me:$LINENO: checking for char" >&5
5729echo $ECHO_N "checking for char... $ECHO_C" >&6
5730if test "${ac_cv_type_char+set}" = set; then
5731 echo $ECHO_N "(cached) $ECHO_C" >&6
5732else
5733 cat >conftest.$ac_ext <<_ACEOF
5734#line $LINENO "configure"
5735#include "confdefs.h"
5736$ac_includes_default
5737#ifdef F77_DUMMY_MAIN
5738# ifdef __cplusplus
5739 extern "C"
5740# endif
5741 int F77_DUMMY_MAIN() { return 1; }
5742#endif
5743int
5744main ()
5745{
5746if ((char *) 0)
5747 return 0;
5748if (sizeof (char))
5749 return 0;
5750 ;
5751 return 0;
5752}
5753_ACEOF
5754rm -f conftest.$ac_objext
5755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5756 (eval $ac_compile) 2>&5
5757 ac_status=$?
5758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5759 (exit $ac_status); } &&
5760 { ac_try='test -s conftest.$ac_objext'
5761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5762 (eval $ac_try) 2>&5
5763 ac_status=$?
5764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5765 (exit $ac_status); }; }; then
5766 ac_cv_type_char=yes
5767else
5768 echo "$as_me: failed program was:" >&5
5769cat conftest.$ac_ext >&5
5770ac_cv_type_char=no
5771fi
5772rm -f conftest.$ac_objext conftest.$ac_ext
5773fi
5774echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5775echo "${ECHO_T}$ac_cv_type_char" >&6
5776
5777echo "$as_me:$LINENO: checking size of char" >&5
5778echo $ECHO_N "checking size of char... $ECHO_C" >&6
5779if test "${ac_cv_sizeof_char+set}" = set; then
5780 echo $ECHO_N "(cached) $ECHO_C" >&6
5781else
5782 if test "$ac_cv_type_char" = yes; then
5783 # The cast to unsigned long works around a bug in the HP C Compiler
5784 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5785 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5786 # This bug is HP SR number 8606223364.
5787 if test "$cross_compiling" = yes; then
5788 # Depending upon the size, compute the lo and hi bounds.
5789cat >conftest.$ac_ext <<_ACEOF
5790#line $LINENO "configure"
5791#include "confdefs.h"
5792$ac_includes_default
5793#ifdef F77_DUMMY_MAIN
5794# ifdef __cplusplus
5795 extern "C"
5796# endif
5797 int F77_DUMMY_MAIN() { return 1; }
5798#endif
5799int
5800main ()
5801{
5802static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5803test_array [0] = 0
5804
5805 ;
5806 return 0;
5807}
5808_ACEOF
5809rm -f conftest.$ac_objext
5810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5811 (eval $ac_compile) 2>&5
5812 ac_status=$?
5813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5814 (exit $ac_status); } &&
5815 { ac_try='test -s conftest.$ac_objext'
5816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5817 (eval $ac_try) 2>&5
5818 ac_status=$?
5819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820 (exit $ac_status); }; }; then
5821 ac_lo=0 ac_mid=0
5822 while :; do
5823 cat >conftest.$ac_ext <<_ACEOF
5824#line $LINENO "configure"
5825#include "confdefs.h"
5826$ac_includes_default
5827#ifdef F77_DUMMY_MAIN
5828# ifdef __cplusplus
5829 extern "C"
5830# endif
5831 int F77_DUMMY_MAIN() { return 1; }
5832#endif
5833int
5834main ()
5835{
5836static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5837test_array [0] = 0
5838
5839 ;
5840 return 0;
5841}
5842_ACEOF
5843rm -f conftest.$ac_objext
5844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5845 (eval $ac_compile) 2>&5
5846 ac_status=$?
5847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5848 (exit $ac_status); } &&
5849 { ac_try='test -s conftest.$ac_objext'
5850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5851 (eval $ac_try) 2>&5
5852 ac_status=$?
5853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5854 (exit $ac_status); }; }; then
5855 ac_hi=$ac_mid; break
5856else
5857 echo "$as_me: failed program was:" >&5
5858cat conftest.$ac_ext >&5
5859ac_lo=`expr $ac_mid + 1`
5860 if test $ac_lo -le $ac_mid; then
5861 ac_lo= ac_hi=
5862 break
5863 fi
5864 ac_mid=`expr 2 '*' $ac_mid + 1`
5865fi
5866rm -f conftest.$ac_objext conftest.$ac_ext
5867 done
5868else
5869 echo "$as_me: failed program was:" >&5
5870cat conftest.$ac_ext >&5
5871cat >conftest.$ac_ext <<_ACEOF
5872#line $LINENO "configure"
5873#include "confdefs.h"
5874$ac_includes_default
5875#ifdef F77_DUMMY_MAIN
5876# ifdef __cplusplus
5877 extern "C"
5878# endif
5879 int F77_DUMMY_MAIN() { return 1; }
5880#endif
5881int
5882main ()
5883{
5884static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5885test_array [0] = 0
5886
5887 ;
5888 return 0;
5889}
5890_ACEOF
5891rm -f conftest.$ac_objext
5892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5893 (eval $ac_compile) 2>&5
5894 ac_status=$?
5895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5896 (exit $ac_status); } &&
5897 { ac_try='test -s conftest.$ac_objext'
5898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5899 (eval $ac_try) 2>&5
5900 ac_status=$?
5901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5902 (exit $ac_status); }; }; then
5903 ac_hi=-1 ac_mid=-1
5904 while :; do
5905 cat >conftest.$ac_ext <<_ACEOF
5906#line $LINENO "configure"
5907#include "confdefs.h"
5908$ac_includes_default
5909#ifdef F77_DUMMY_MAIN
5910# ifdef __cplusplus
5911 extern "C"
5912# endif
5913 int F77_DUMMY_MAIN() { return 1; }
5914#endif
5915int
5916main ()
5917{
5918static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5919test_array [0] = 0
5920
5921 ;
5922 return 0;
5923}
5924_ACEOF
5925rm -f conftest.$ac_objext
5926if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5927 (eval $ac_compile) 2>&5
5928 ac_status=$?
5929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5930 (exit $ac_status); } &&
5931 { ac_try='test -s conftest.$ac_objext'
5932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5933 (eval $ac_try) 2>&5
5934 ac_status=$?
5935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5936 (exit $ac_status); }; }; then
5937 ac_lo=$ac_mid; break
5938else
5939 echo "$as_me: failed program was:" >&5
5940cat conftest.$ac_ext >&5
5941ac_hi=`expr '(' $ac_mid ')' - 1`
5942 if test $ac_mid -le $ac_hi; then
5943 ac_lo= ac_hi=
5944 break
5945 fi
5946 ac_mid=`expr 2 '*' $ac_mid`
5947fi
5948rm -f conftest.$ac_objext conftest.$ac_ext
5949 done
5950else
5951 echo "$as_me: failed program was:" >&5
5952cat conftest.$ac_ext >&5
5953ac_lo= ac_hi=
5954fi
5955rm -f conftest.$ac_objext conftest.$ac_ext
5956fi
5957rm -f conftest.$ac_objext conftest.$ac_ext
5958# Binary search between lo and hi bounds.
5959while test "x$ac_lo" != "x$ac_hi"; do
5960 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5961 cat >conftest.$ac_ext <<_ACEOF
5962#line $LINENO "configure"
5963#include "confdefs.h"
5964$ac_includes_default
5965#ifdef F77_DUMMY_MAIN
5966# ifdef __cplusplus
5967 extern "C"
5968# endif
5969 int F77_DUMMY_MAIN() { return 1; }
5970#endif
5971int
5972main ()
5973{
5974static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5975test_array [0] = 0
5976
5977 ;
5978 return 0;
5979}
5980_ACEOF
5981rm -f conftest.$ac_objext
5982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5983 (eval $ac_compile) 2>&5
5984 ac_status=$?
5985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5986 (exit $ac_status); } &&
5987 { ac_try='test -s conftest.$ac_objext'
5988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5989 (eval $ac_try) 2>&5
5990 ac_status=$?
5991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5992 (exit $ac_status); }; }; then
5993 ac_hi=$ac_mid
5994else
5995 echo "$as_me: failed program was:" >&5
5996cat conftest.$ac_ext >&5
5997ac_lo=`expr '(' $ac_mid ')' + 1`
5998fi
5999rm -f conftest.$ac_objext conftest.$ac_ext
6000done
6001case $ac_lo in
6002?*) ac_cv_sizeof_char=$ac_lo;;
6003'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6004echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6005 { (exit 1); exit 1; }; } ;;
6006esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006007else
6008 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006009 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6010echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6011 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006012else
Martin v. Löwis11437992002-04-12 09:54:03 +00006013 cat >conftest.$ac_ext <<_ACEOF
6014#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006015#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006016$ac_includes_default
6017long longval () { return (long) (sizeof (char)); }
6018unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006019#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006020#include <stdlib.h>
6021#ifdef F77_DUMMY_MAIN
6022# ifdef __cplusplus
6023 extern "C"
6024# endif
6025 int F77_DUMMY_MAIN() { return 1; }
6026#endif
6027int
6028main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006029{
Martin v. Löwis11437992002-04-12 09:54:03 +00006030
6031 FILE *f = fopen ("conftest.val", "w");
6032 if (! f)
6033 exit (1);
6034 if (((long) (sizeof (char))) < 0)
6035 {
6036 long i = longval ();
6037 if (i != ((long) (sizeof (char))))
6038 exit (1);
6039 fprintf (f, "%ld\n", i);
6040 }
6041 else
6042 {
6043 unsigned long i = ulongval ();
6044 if (i != ((long) (sizeof (char))))
6045 exit (1);
6046 fprintf (f, "%lu\n", i);
6047 }
6048 exit (ferror (f) || fclose (f) != 0);
6049
6050 ;
6051 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006052}
Martin v. Löwis11437992002-04-12 09:54:03 +00006053_ACEOF
6054rm -f conftest$ac_exeext
6055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6056 (eval $ac_link) 2>&5
6057 ac_status=$?
6058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6059 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6061 (eval $ac_try) 2>&5
6062 ac_status=$?
6063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6064 (exit $ac_status); }; }; then
6065 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006066else
Martin v. Löwis11437992002-04-12 09:54:03 +00006067 echo "$as_me: program exited with status $ac_status" >&5
6068echo "$as_me: failed program was:" >&5
6069cat conftest.$ac_ext >&5
6070( exit $ac_status )
6071{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6072echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6073 { (exit 1); exit 1; }; }
6074fi
6075rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6076fi
6077fi
6078rm -f conftest.val
6079else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006080 ac_cv_sizeof_char=0
6081fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006082fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006083echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6084echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6085cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006086#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006087_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006088
6089
Martin v. Löwis11437992002-04-12 09:54:03 +00006090echo "$as_me:$LINENO: checking for short" >&5
6091echo $ECHO_N "checking for short... $ECHO_C" >&6
6092if test "${ac_cv_type_short+set}" = set; then
6093 echo $ECHO_N "(cached) $ECHO_C" >&6
6094else
6095 cat >conftest.$ac_ext <<_ACEOF
6096#line $LINENO "configure"
6097#include "confdefs.h"
6098$ac_includes_default
6099#ifdef F77_DUMMY_MAIN
6100# ifdef __cplusplus
6101 extern "C"
6102# endif
6103 int F77_DUMMY_MAIN() { return 1; }
6104#endif
6105int
6106main ()
6107{
6108if ((short *) 0)
6109 return 0;
6110if (sizeof (short))
6111 return 0;
6112 ;
6113 return 0;
6114}
6115_ACEOF
6116rm -f conftest.$ac_objext
6117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6118 (eval $ac_compile) 2>&5
6119 ac_status=$?
6120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6121 (exit $ac_status); } &&
6122 { ac_try='test -s conftest.$ac_objext'
6123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6124 (eval $ac_try) 2>&5
6125 ac_status=$?
6126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6127 (exit $ac_status); }; }; then
6128 ac_cv_type_short=yes
6129else
6130 echo "$as_me: failed program was:" >&5
6131cat conftest.$ac_ext >&5
6132ac_cv_type_short=no
6133fi
6134rm -f conftest.$ac_objext conftest.$ac_ext
6135fi
6136echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6137echo "${ECHO_T}$ac_cv_type_short" >&6
6138
6139echo "$as_me:$LINENO: checking size of short" >&5
6140echo $ECHO_N "checking size of short... $ECHO_C" >&6
6141if test "${ac_cv_sizeof_short+set}" = set; then
6142 echo $ECHO_N "(cached) $ECHO_C" >&6
6143else
6144 if test "$ac_cv_type_short" = yes; then
6145 # The cast to unsigned long works around a bug in the HP C Compiler
6146 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6147 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6148 # This bug is HP SR number 8606223364.
6149 if test "$cross_compiling" = yes; then
6150 # Depending upon the size, compute the lo and hi bounds.
6151cat >conftest.$ac_ext <<_ACEOF
6152#line $LINENO "configure"
6153#include "confdefs.h"
6154$ac_includes_default
6155#ifdef F77_DUMMY_MAIN
6156# ifdef __cplusplus
6157 extern "C"
6158# endif
6159 int F77_DUMMY_MAIN() { return 1; }
6160#endif
6161int
6162main ()
6163{
6164static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6165test_array [0] = 0
6166
6167 ;
6168 return 0;
6169}
6170_ACEOF
6171rm -f conftest.$ac_objext
6172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6173 (eval $ac_compile) 2>&5
6174 ac_status=$?
6175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6176 (exit $ac_status); } &&
6177 { ac_try='test -s conftest.$ac_objext'
6178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6179 (eval $ac_try) 2>&5
6180 ac_status=$?
6181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6182 (exit $ac_status); }; }; then
6183 ac_lo=0 ac_mid=0
6184 while :; do
6185 cat >conftest.$ac_ext <<_ACEOF
6186#line $LINENO "configure"
6187#include "confdefs.h"
6188$ac_includes_default
6189#ifdef F77_DUMMY_MAIN
6190# ifdef __cplusplus
6191 extern "C"
6192# endif
6193 int F77_DUMMY_MAIN() { return 1; }
6194#endif
6195int
6196main ()
6197{
6198static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6199test_array [0] = 0
6200
6201 ;
6202 return 0;
6203}
6204_ACEOF
6205rm -f conftest.$ac_objext
6206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6207 (eval $ac_compile) 2>&5
6208 ac_status=$?
6209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6210 (exit $ac_status); } &&
6211 { ac_try='test -s conftest.$ac_objext'
6212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6213 (eval $ac_try) 2>&5
6214 ac_status=$?
6215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6216 (exit $ac_status); }; }; then
6217 ac_hi=$ac_mid; break
6218else
6219 echo "$as_me: failed program was:" >&5
6220cat conftest.$ac_ext >&5
6221ac_lo=`expr $ac_mid + 1`
6222 if test $ac_lo -le $ac_mid; then
6223 ac_lo= ac_hi=
6224 break
6225 fi
6226 ac_mid=`expr 2 '*' $ac_mid + 1`
6227fi
6228rm -f conftest.$ac_objext conftest.$ac_ext
6229 done
6230else
6231 echo "$as_me: failed program was:" >&5
6232cat conftest.$ac_ext >&5
6233cat >conftest.$ac_ext <<_ACEOF
6234#line $LINENO "configure"
6235#include "confdefs.h"
6236$ac_includes_default
6237#ifdef F77_DUMMY_MAIN
6238# ifdef __cplusplus
6239 extern "C"
6240# endif
6241 int F77_DUMMY_MAIN() { return 1; }
6242#endif
6243int
6244main ()
6245{
6246static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6247test_array [0] = 0
6248
6249 ;
6250 return 0;
6251}
6252_ACEOF
6253rm -f conftest.$ac_objext
6254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6255 (eval $ac_compile) 2>&5
6256 ac_status=$?
6257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6258 (exit $ac_status); } &&
6259 { ac_try='test -s conftest.$ac_objext'
6260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6261 (eval $ac_try) 2>&5
6262 ac_status=$?
6263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6264 (exit $ac_status); }; }; then
6265 ac_hi=-1 ac_mid=-1
6266 while :; do
6267 cat >conftest.$ac_ext <<_ACEOF
6268#line $LINENO "configure"
6269#include "confdefs.h"
6270$ac_includes_default
6271#ifdef F77_DUMMY_MAIN
6272# ifdef __cplusplus
6273 extern "C"
6274# endif
6275 int F77_DUMMY_MAIN() { return 1; }
6276#endif
6277int
6278main ()
6279{
6280static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6281test_array [0] = 0
6282
6283 ;
6284 return 0;
6285}
6286_ACEOF
6287rm -f conftest.$ac_objext
6288if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6289 (eval $ac_compile) 2>&5
6290 ac_status=$?
6291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6292 (exit $ac_status); } &&
6293 { ac_try='test -s conftest.$ac_objext'
6294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6295 (eval $ac_try) 2>&5
6296 ac_status=$?
6297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6298 (exit $ac_status); }; }; then
6299 ac_lo=$ac_mid; break
6300else
6301 echo "$as_me: failed program was:" >&5
6302cat conftest.$ac_ext >&5
6303ac_hi=`expr '(' $ac_mid ')' - 1`
6304 if test $ac_mid -le $ac_hi; then
6305 ac_lo= ac_hi=
6306 break
6307 fi
6308 ac_mid=`expr 2 '*' $ac_mid`
6309fi
6310rm -f conftest.$ac_objext conftest.$ac_ext
6311 done
6312else
6313 echo "$as_me: failed program was:" >&5
6314cat conftest.$ac_ext >&5
6315ac_lo= ac_hi=
6316fi
6317rm -f conftest.$ac_objext conftest.$ac_ext
6318fi
6319rm -f conftest.$ac_objext conftest.$ac_ext
6320# Binary search between lo and hi bounds.
6321while test "x$ac_lo" != "x$ac_hi"; do
6322 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6323 cat >conftest.$ac_ext <<_ACEOF
6324#line $LINENO "configure"
6325#include "confdefs.h"
6326$ac_includes_default
6327#ifdef F77_DUMMY_MAIN
6328# ifdef __cplusplus
6329 extern "C"
6330# endif
6331 int F77_DUMMY_MAIN() { return 1; }
6332#endif
6333int
6334main ()
6335{
6336static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6337test_array [0] = 0
6338
6339 ;
6340 return 0;
6341}
6342_ACEOF
6343rm -f conftest.$ac_objext
6344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6345 (eval $ac_compile) 2>&5
6346 ac_status=$?
6347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6348 (exit $ac_status); } &&
6349 { ac_try='test -s conftest.$ac_objext'
6350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6351 (eval $ac_try) 2>&5
6352 ac_status=$?
6353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6354 (exit $ac_status); }; }; then
6355 ac_hi=$ac_mid
6356else
6357 echo "$as_me: failed program was:" >&5
6358cat conftest.$ac_ext >&5
6359ac_lo=`expr '(' $ac_mid ')' + 1`
6360fi
6361rm -f conftest.$ac_objext conftest.$ac_ext
6362done
6363case $ac_lo in
6364?*) ac_cv_sizeof_short=$ac_lo;;
6365'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6366echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6367 { (exit 1); exit 1; }; } ;;
6368esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006369else
6370 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006371 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6372echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6373 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006374else
Martin v. Löwis11437992002-04-12 09:54:03 +00006375 cat >conftest.$ac_ext <<_ACEOF
6376#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006377#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006378$ac_includes_default
6379long longval () { return (long) (sizeof (short)); }
6380unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006381#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006382#include <stdlib.h>
6383#ifdef F77_DUMMY_MAIN
6384# ifdef __cplusplus
6385 extern "C"
6386# endif
6387 int F77_DUMMY_MAIN() { return 1; }
6388#endif
6389int
6390main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006391{
Martin v. Löwis11437992002-04-12 09:54:03 +00006392
6393 FILE *f = fopen ("conftest.val", "w");
6394 if (! f)
6395 exit (1);
6396 if (((long) (sizeof (short))) < 0)
6397 {
6398 long i = longval ();
6399 if (i != ((long) (sizeof (short))))
6400 exit (1);
6401 fprintf (f, "%ld\n", i);
6402 }
6403 else
6404 {
6405 unsigned long i = ulongval ();
6406 if (i != ((long) (sizeof (short))))
6407 exit (1);
6408 fprintf (f, "%lu\n", i);
6409 }
6410 exit (ferror (f) || fclose (f) != 0);
6411
6412 ;
6413 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006414}
Martin v. Löwis11437992002-04-12 09:54:03 +00006415_ACEOF
6416rm -f conftest$ac_exeext
6417if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6418 (eval $ac_link) 2>&5
6419 ac_status=$?
6420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6421 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6423 (eval $ac_try) 2>&5
6424 ac_status=$?
6425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6426 (exit $ac_status); }; }; then
6427 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006428else
Martin v. Löwis11437992002-04-12 09:54:03 +00006429 echo "$as_me: program exited with status $ac_status" >&5
6430echo "$as_me: failed program was:" >&5
6431cat conftest.$ac_ext >&5
6432( exit $ac_status )
6433{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6434echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6435 { (exit 1); exit 1; }; }
6436fi
6437rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6438fi
6439fi
6440rm -f conftest.val
6441else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006442 ac_cv_sizeof_short=0
6443fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006444fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006445echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6446echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6447cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006448#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006449_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006450
6451
Martin v. Löwis11437992002-04-12 09:54:03 +00006452echo "$as_me:$LINENO: checking for float" >&5
6453echo $ECHO_N "checking for float... $ECHO_C" >&6
6454if test "${ac_cv_type_float+set}" = set; then
6455 echo $ECHO_N "(cached) $ECHO_C" >&6
6456else
6457 cat >conftest.$ac_ext <<_ACEOF
6458#line $LINENO "configure"
6459#include "confdefs.h"
6460$ac_includes_default
6461#ifdef F77_DUMMY_MAIN
6462# ifdef __cplusplus
6463 extern "C"
6464# endif
6465 int F77_DUMMY_MAIN() { return 1; }
6466#endif
6467int
6468main ()
6469{
6470if ((float *) 0)
6471 return 0;
6472if (sizeof (float))
6473 return 0;
6474 ;
6475 return 0;
6476}
6477_ACEOF
6478rm -f conftest.$ac_objext
6479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6480 (eval $ac_compile) 2>&5
6481 ac_status=$?
6482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6483 (exit $ac_status); } &&
6484 { ac_try='test -s conftest.$ac_objext'
6485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6486 (eval $ac_try) 2>&5
6487 ac_status=$?
6488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6489 (exit $ac_status); }; }; then
6490 ac_cv_type_float=yes
6491else
6492 echo "$as_me: failed program was:" >&5
6493cat conftest.$ac_ext >&5
6494ac_cv_type_float=no
6495fi
6496rm -f conftest.$ac_objext conftest.$ac_ext
6497fi
6498echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6499echo "${ECHO_T}$ac_cv_type_float" >&6
6500
6501echo "$as_me:$LINENO: checking size of float" >&5
6502echo $ECHO_N "checking size of float... $ECHO_C" >&6
6503if test "${ac_cv_sizeof_float+set}" = set; then
6504 echo $ECHO_N "(cached) $ECHO_C" >&6
6505else
6506 if test "$ac_cv_type_float" = yes; then
6507 # The cast to unsigned long works around a bug in the HP C Compiler
6508 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6509 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6510 # This bug is HP SR number 8606223364.
6511 if test "$cross_compiling" = yes; then
6512 # Depending upon the size, compute the lo and hi bounds.
6513cat >conftest.$ac_ext <<_ACEOF
6514#line $LINENO "configure"
6515#include "confdefs.h"
6516$ac_includes_default
6517#ifdef F77_DUMMY_MAIN
6518# ifdef __cplusplus
6519 extern "C"
6520# endif
6521 int F77_DUMMY_MAIN() { return 1; }
6522#endif
6523int
6524main ()
6525{
6526static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6527test_array [0] = 0
6528
6529 ;
6530 return 0;
6531}
6532_ACEOF
6533rm -f conftest.$ac_objext
6534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6535 (eval $ac_compile) 2>&5
6536 ac_status=$?
6537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6538 (exit $ac_status); } &&
6539 { ac_try='test -s conftest.$ac_objext'
6540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6541 (eval $ac_try) 2>&5
6542 ac_status=$?
6543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6544 (exit $ac_status); }; }; then
6545 ac_lo=0 ac_mid=0
6546 while :; do
6547 cat >conftest.$ac_ext <<_ACEOF
6548#line $LINENO "configure"
6549#include "confdefs.h"
6550$ac_includes_default
6551#ifdef F77_DUMMY_MAIN
6552# ifdef __cplusplus
6553 extern "C"
6554# endif
6555 int F77_DUMMY_MAIN() { return 1; }
6556#endif
6557int
6558main ()
6559{
6560static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6561test_array [0] = 0
6562
6563 ;
6564 return 0;
6565}
6566_ACEOF
6567rm -f conftest.$ac_objext
6568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6569 (eval $ac_compile) 2>&5
6570 ac_status=$?
6571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6572 (exit $ac_status); } &&
6573 { ac_try='test -s conftest.$ac_objext'
6574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6575 (eval $ac_try) 2>&5
6576 ac_status=$?
6577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6578 (exit $ac_status); }; }; then
6579 ac_hi=$ac_mid; break
6580else
6581 echo "$as_me: failed program was:" >&5
6582cat conftest.$ac_ext >&5
6583ac_lo=`expr $ac_mid + 1`
6584 if test $ac_lo -le $ac_mid; then
6585 ac_lo= ac_hi=
6586 break
6587 fi
6588 ac_mid=`expr 2 '*' $ac_mid + 1`
6589fi
6590rm -f conftest.$ac_objext conftest.$ac_ext
6591 done
6592else
6593 echo "$as_me: failed program was:" >&5
6594cat conftest.$ac_ext >&5
6595cat >conftest.$ac_ext <<_ACEOF
6596#line $LINENO "configure"
6597#include "confdefs.h"
6598$ac_includes_default
6599#ifdef F77_DUMMY_MAIN
6600# ifdef __cplusplus
6601 extern "C"
6602# endif
6603 int F77_DUMMY_MAIN() { return 1; }
6604#endif
6605int
6606main ()
6607{
6608static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6609test_array [0] = 0
6610
6611 ;
6612 return 0;
6613}
6614_ACEOF
6615rm -f conftest.$ac_objext
6616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6617 (eval $ac_compile) 2>&5
6618 ac_status=$?
6619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6620 (exit $ac_status); } &&
6621 { ac_try='test -s conftest.$ac_objext'
6622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6623 (eval $ac_try) 2>&5
6624 ac_status=$?
6625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6626 (exit $ac_status); }; }; then
6627 ac_hi=-1 ac_mid=-1
6628 while :; do
6629 cat >conftest.$ac_ext <<_ACEOF
6630#line $LINENO "configure"
6631#include "confdefs.h"
6632$ac_includes_default
6633#ifdef F77_DUMMY_MAIN
6634# ifdef __cplusplus
6635 extern "C"
6636# endif
6637 int F77_DUMMY_MAIN() { return 1; }
6638#endif
6639int
6640main ()
6641{
6642static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6643test_array [0] = 0
6644
6645 ;
6646 return 0;
6647}
6648_ACEOF
6649rm -f conftest.$ac_objext
6650if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6651 (eval $ac_compile) 2>&5
6652 ac_status=$?
6653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6654 (exit $ac_status); } &&
6655 { ac_try='test -s conftest.$ac_objext'
6656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6657 (eval $ac_try) 2>&5
6658 ac_status=$?
6659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6660 (exit $ac_status); }; }; then
6661 ac_lo=$ac_mid; break
6662else
6663 echo "$as_me: failed program was:" >&5
6664cat conftest.$ac_ext >&5
6665ac_hi=`expr '(' $ac_mid ')' - 1`
6666 if test $ac_mid -le $ac_hi; then
6667 ac_lo= ac_hi=
6668 break
6669 fi
6670 ac_mid=`expr 2 '*' $ac_mid`
6671fi
6672rm -f conftest.$ac_objext conftest.$ac_ext
6673 done
6674else
6675 echo "$as_me: failed program was:" >&5
6676cat conftest.$ac_ext >&5
6677ac_lo= ac_hi=
6678fi
6679rm -f conftest.$ac_objext conftest.$ac_ext
6680fi
6681rm -f conftest.$ac_objext conftest.$ac_ext
6682# Binary search between lo and hi bounds.
6683while test "x$ac_lo" != "x$ac_hi"; do
6684 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6685 cat >conftest.$ac_ext <<_ACEOF
6686#line $LINENO "configure"
6687#include "confdefs.h"
6688$ac_includes_default
6689#ifdef F77_DUMMY_MAIN
6690# ifdef __cplusplus
6691 extern "C"
6692# endif
6693 int F77_DUMMY_MAIN() { return 1; }
6694#endif
6695int
6696main ()
6697{
6698static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6699test_array [0] = 0
6700
6701 ;
6702 return 0;
6703}
6704_ACEOF
6705rm -f conftest.$ac_objext
6706if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6707 (eval $ac_compile) 2>&5
6708 ac_status=$?
6709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6710 (exit $ac_status); } &&
6711 { ac_try='test -s conftest.$ac_objext'
6712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6713 (eval $ac_try) 2>&5
6714 ac_status=$?
6715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6716 (exit $ac_status); }; }; then
6717 ac_hi=$ac_mid
6718else
6719 echo "$as_me: failed program was:" >&5
6720cat conftest.$ac_ext >&5
6721ac_lo=`expr '(' $ac_mid ')' + 1`
6722fi
6723rm -f conftest.$ac_objext conftest.$ac_ext
6724done
6725case $ac_lo in
6726?*) ac_cv_sizeof_float=$ac_lo;;
6727'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6728echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6729 { (exit 1); exit 1; }; } ;;
6730esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006731else
6732 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006733 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6734echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6735 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006736else
Martin v. Löwis11437992002-04-12 09:54:03 +00006737 cat >conftest.$ac_ext <<_ACEOF
6738#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006739#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006740$ac_includes_default
6741long longval () { return (long) (sizeof (float)); }
6742unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006743#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006744#include <stdlib.h>
6745#ifdef F77_DUMMY_MAIN
6746# ifdef __cplusplus
6747 extern "C"
6748# endif
6749 int F77_DUMMY_MAIN() { return 1; }
6750#endif
6751int
6752main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006753{
Martin v. Löwis11437992002-04-12 09:54:03 +00006754
6755 FILE *f = fopen ("conftest.val", "w");
6756 if (! f)
6757 exit (1);
6758 if (((long) (sizeof (float))) < 0)
6759 {
6760 long i = longval ();
6761 if (i != ((long) (sizeof (float))))
6762 exit (1);
6763 fprintf (f, "%ld\n", i);
6764 }
6765 else
6766 {
6767 unsigned long i = ulongval ();
6768 if (i != ((long) (sizeof (float))))
6769 exit (1);
6770 fprintf (f, "%lu\n", i);
6771 }
6772 exit (ferror (f) || fclose (f) != 0);
6773
6774 ;
6775 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006776}
Martin v. Löwis11437992002-04-12 09:54:03 +00006777_ACEOF
6778rm -f conftest$ac_exeext
6779if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6780 (eval $ac_link) 2>&5
6781 ac_status=$?
6782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6783 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6785 (eval $ac_try) 2>&5
6786 ac_status=$?
6787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6788 (exit $ac_status); }; }; then
6789 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006790else
Martin v. Löwis11437992002-04-12 09:54:03 +00006791 echo "$as_me: program exited with status $ac_status" >&5
6792echo "$as_me: failed program was:" >&5
6793cat conftest.$ac_ext >&5
6794( exit $ac_status )
6795{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6796echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6797 { (exit 1); exit 1; }; }
6798fi
6799rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6800fi
6801fi
6802rm -f conftest.val
6803else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006804 ac_cv_sizeof_float=0
6805fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006806fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006807echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6808echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6809cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006810#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006811_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006812
6813
Martin v. Löwis11437992002-04-12 09:54:03 +00006814echo "$as_me:$LINENO: checking for double" >&5
6815echo $ECHO_N "checking for double... $ECHO_C" >&6
6816if test "${ac_cv_type_double+set}" = set; then
6817 echo $ECHO_N "(cached) $ECHO_C" >&6
6818else
6819 cat >conftest.$ac_ext <<_ACEOF
6820#line $LINENO "configure"
6821#include "confdefs.h"
6822$ac_includes_default
6823#ifdef F77_DUMMY_MAIN
6824# ifdef __cplusplus
6825 extern "C"
6826# endif
6827 int F77_DUMMY_MAIN() { return 1; }
6828#endif
6829int
6830main ()
6831{
6832if ((double *) 0)
6833 return 0;
6834if (sizeof (double))
6835 return 0;
6836 ;
6837 return 0;
6838}
6839_ACEOF
6840rm -f conftest.$ac_objext
6841if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6842 (eval $ac_compile) 2>&5
6843 ac_status=$?
6844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6845 (exit $ac_status); } &&
6846 { ac_try='test -s conftest.$ac_objext'
6847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6848 (eval $ac_try) 2>&5
6849 ac_status=$?
6850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6851 (exit $ac_status); }; }; then
6852 ac_cv_type_double=yes
6853else
6854 echo "$as_me: failed program was:" >&5
6855cat conftest.$ac_ext >&5
6856ac_cv_type_double=no
6857fi
6858rm -f conftest.$ac_objext conftest.$ac_ext
6859fi
6860echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6861echo "${ECHO_T}$ac_cv_type_double" >&6
6862
6863echo "$as_me:$LINENO: checking size of double" >&5
6864echo $ECHO_N "checking size of double... $ECHO_C" >&6
6865if test "${ac_cv_sizeof_double+set}" = set; then
6866 echo $ECHO_N "(cached) $ECHO_C" >&6
6867else
6868 if test "$ac_cv_type_double" = yes; then
6869 # The cast to unsigned long works around a bug in the HP C Compiler
6870 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6871 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6872 # This bug is HP SR number 8606223364.
6873 if test "$cross_compiling" = yes; then
6874 # Depending upon the size, compute the lo and hi bounds.
6875cat >conftest.$ac_ext <<_ACEOF
6876#line $LINENO "configure"
6877#include "confdefs.h"
6878$ac_includes_default
6879#ifdef F77_DUMMY_MAIN
6880# ifdef __cplusplus
6881 extern "C"
6882# endif
6883 int F77_DUMMY_MAIN() { return 1; }
6884#endif
6885int
6886main ()
6887{
6888static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6889test_array [0] = 0
6890
6891 ;
6892 return 0;
6893}
6894_ACEOF
6895rm -f conftest.$ac_objext
6896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6897 (eval $ac_compile) 2>&5
6898 ac_status=$?
6899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6900 (exit $ac_status); } &&
6901 { ac_try='test -s conftest.$ac_objext'
6902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6903 (eval $ac_try) 2>&5
6904 ac_status=$?
6905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6906 (exit $ac_status); }; }; then
6907 ac_lo=0 ac_mid=0
6908 while :; do
6909 cat >conftest.$ac_ext <<_ACEOF
6910#line $LINENO "configure"
6911#include "confdefs.h"
6912$ac_includes_default
6913#ifdef F77_DUMMY_MAIN
6914# ifdef __cplusplus
6915 extern "C"
6916# endif
6917 int F77_DUMMY_MAIN() { return 1; }
6918#endif
6919int
6920main ()
6921{
6922static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6923test_array [0] = 0
6924
6925 ;
6926 return 0;
6927}
6928_ACEOF
6929rm -f conftest.$ac_objext
6930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6931 (eval $ac_compile) 2>&5
6932 ac_status=$?
6933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6934 (exit $ac_status); } &&
6935 { ac_try='test -s conftest.$ac_objext'
6936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6937 (eval $ac_try) 2>&5
6938 ac_status=$?
6939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6940 (exit $ac_status); }; }; then
6941 ac_hi=$ac_mid; break
6942else
6943 echo "$as_me: failed program was:" >&5
6944cat conftest.$ac_ext >&5
6945ac_lo=`expr $ac_mid + 1`
6946 if test $ac_lo -le $ac_mid; then
6947 ac_lo= ac_hi=
6948 break
6949 fi
6950 ac_mid=`expr 2 '*' $ac_mid + 1`
6951fi
6952rm -f conftest.$ac_objext conftest.$ac_ext
6953 done
6954else
6955 echo "$as_me: failed program was:" >&5
6956cat conftest.$ac_ext >&5
6957cat >conftest.$ac_ext <<_ACEOF
6958#line $LINENO "configure"
6959#include "confdefs.h"
6960$ac_includes_default
6961#ifdef F77_DUMMY_MAIN
6962# ifdef __cplusplus
6963 extern "C"
6964# endif
6965 int F77_DUMMY_MAIN() { return 1; }
6966#endif
6967int
6968main ()
6969{
6970static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6971test_array [0] = 0
6972
6973 ;
6974 return 0;
6975}
6976_ACEOF
6977rm -f conftest.$ac_objext
6978if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6979 (eval $ac_compile) 2>&5
6980 ac_status=$?
6981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6982 (exit $ac_status); } &&
6983 { ac_try='test -s conftest.$ac_objext'
6984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6985 (eval $ac_try) 2>&5
6986 ac_status=$?
6987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6988 (exit $ac_status); }; }; then
6989 ac_hi=-1 ac_mid=-1
6990 while :; do
6991 cat >conftest.$ac_ext <<_ACEOF
6992#line $LINENO "configure"
6993#include "confdefs.h"
6994$ac_includes_default
6995#ifdef F77_DUMMY_MAIN
6996# ifdef __cplusplus
6997 extern "C"
6998# endif
6999 int F77_DUMMY_MAIN() { return 1; }
7000#endif
7001int
7002main ()
7003{
7004static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7005test_array [0] = 0
7006
7007 ;
7008 return 0;
7009}
7010_ACEOF
7011rm -f conftest.$ac_objext
7012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7013 (eval $ac_compile) 2>&5
7014 ac_status=$?
7015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7016 (exit $ac_status); } &&
7017 { ac_try='test -s conftest.$ac_objext'
7018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7019 (eval $ac_try) 2>&5
7020 ac_status=$?
7021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7022 (exit $ac_status); }; }; then
7023 ac_lo=$ac_mid; break
7024else
7025 echo "$as_me: failed program was:" >&5
7026cat conftest.$ac_ext >&5
7027ac_hi=`expr '(' $ac_mid ')' - 1`
7028 if test $ac_mid -le $ac_hi; then
7029 ac_lo= ac_hi=
7030 break
7031 fi
7032 ac_mid=`expr 2 '*' $ac_mid`
7033fi
7034rm -f conftest.$ac_objext conftest.$ac_ext
7035 done
7036else
7037 echo "$as_me: failed program was:" >&5
7038cat conftest.$ac_ext >&5
7039ac_lo= ac_hi=
7040fi
7041rm -f conftest.$ac_objext conftest.$ac_ext
7042fi
7043rm -f conftest.$ac_objext conftest.$ac_ext
7044# Binary search between lo and hi bounds.
7045while test "x$ac_lo" != "x$ac_hi"; do
7046 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7047 cat >conftest.$ac_ext <<_ACEOF
7048#line $LINENO "configure"
7049#include "confdefs.h"
7050$ac_includes_default
7051#ifdef F77_DUMMY_MAIN
7052# ifdef __cplusplus
7053 extern "C"
7054# endif
7055 int F77_DUMMY_MAIN() { return 1; }
7056#endif
7057int
7058main ()
7059{
7060static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7061test_array [0] = 0
7062
7063 ;
7064 return 0;
7065}
7066_ACEOF
7067rm -f conftest.$ac_objext
7068if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7069 (eval $ac_compile) 2>&5
7070 ac_status=$?
7071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7072 (exit $ac_status); } &&
7073 { ac_try='test -s conftest.$ac_objext'
7074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7075 (eval $ac_try) 2>&5
7076 ac_status=$?
7077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7078 (exit $ac_status); }; }; then
7079 ac_hi=$ac_mid
7080else
7081 echo "$as_me: failed program was:" >&5
7082cat conftest.$ac_ext >&5
7083ac_lo=`expr '(' $ac_mid ')' + 1`
7084fi
7085rm -f conftest.$ac_objext conftest.$ac_ext
7086done
7087case $ac_lo in
7088?*) ac_cv_sizeof_double=$ac_lo;;
7089'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7090echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7091 { (exit 1); exit 1; }; } ;;
7092esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007093else
7094 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007095 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7096echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7097 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007098else
Martin v. Löwis11437992002-04-12 09:54:03 +00007099 cat >conftest.$ac_ext <<_ACEOF
7100#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007101#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007102$ac_includes_default
7103long longval () { return (long) (sizeof (double)); }
7104unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007105#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007106#include <stdlib.h>
7107#ifdef F77_DUMMY_MAIN
7108# ifdef __cplusplus
7109 extern "C"
7110# endif
7111 int F77_DUMMY_MAIN() { return 1; }
7112#endif
7113int
7114main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007115{
Martin v. Löwis11437992002-04-12 09:54:03 +00007116
7117 FILE *f = fopen ("conftest.val", "w");
7118 if (! f)
7119 exit (1);
7120 if (((long) (sizeof (double))) < 0)
7121 {
7122 long i = longval ();
7123 if (i != ((long) (sizeof (double))))
7124 exit (1);
7125 fprintf (f, "%ld\n", i);
7126 }
7127 else
7128 {
7129 unsigned long i = ulongval ();
7130 if (i != ((long) (sizeof (double))))
7131 exit (1);
7132 fprintf (f, "%lu\n", i);
7133 }
7134 exit (ferror (f) || fclose (f) != 0);
7135
7136 ;
7137 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007138}
Martin v. Löwis11437992002-04-12 09:54:03 +00007139_ACEOF
7140rm -f conftest$ac_exeext
7141if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7142 (eval $ac_link) 2>&5
7143 ac_status=$?
7144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7145 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7147 (eval $ac_try) 2>&5
7148 ac_status=$?
7149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7150 (exit $ac_status); }; }; then
7151 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007152else
Martin v. Löwis11437992002-04-12 09:54:03 +00007153 echo "$as_me: program exited with status $ac_status" >&5
7154echo "$as_me: failed program was:" >&5
7155cat conftest.$ac_ext >&5
7156( exit $ac_status )
7157{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7158echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7159 { (exit 1); exit 1; }; }
7160fi
7161rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7162fi
7163fi
7164rm -f conftest.val
7165else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007166 ac_cv_sizeof_double=0
7167fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007168fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007169echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7170echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7171cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007172#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007173_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007174
7175
Martin v. Löwis11437992002-04-12 09:54:03 +00007176echo "$as_me:$LINENO: checking for fpos_t" >&5
7177echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7178if test "${ac_cv_type_fpos_t+set}" = set; then
7179 echo $ECHO_N "(cached) $ECHO_C" >&6
7180else
7181 cat >conftest.$ac_ext <<_ACEOF
7182#line $LINENO "configure"
7183#include "confdefs.h"
7184$ac_includes_default
7185#ifdef F77_DUMMY_MAIN
7186# ifdef __cplusplus
7187 extern "C"
7188# endif
7189 int F77_DUMMY_MAIN() { return 1; }
7190#endif
7191int
7192main ()
7193{
7194if ((fpos_t *) 0)
7195 return 0;
7196if (sizeof (fpos_t))
7197 return 0;
7198 ;
7199 return 0;
7200}
7201_ACEOF
7202rm -f conftest.$ac_objext
7203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7204 (eval $ac_compile) 2>&5
7205 ac_status=$?
7206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7207 (exit $ac_status); } &&
7208 { ac_try='test -s conftest.$ac_objext'
7209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7210 (eval $ac_try) 2>&5
7211 ac_status=$?
7212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7213 (exit $ac_status); }; }; then
7214 ac_cv_type_fpos_t=yes
7215else
7216 echo "$as_me: failed program was:" >&5
7217cat conftest.$ac_ext >&5
7218ac_cv_type_fpos_t=no
7219fi
7220rm -f conftest.$ac_objext conftest.$ac_ext
7221fi
7222echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7223echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7224
7225echo "$as_me:$LINENO: checking size of fpos_t" >&5
7226echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7227if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7228 echo $ECHO_N "(cached) $ECHO_C" >&6
7229else
7230 if test "$ac_cv_type_fpos_t" = yes; then
7231 # The cast to unsigned long works around a bug in the HP C Compiler
7232 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7233 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7234 # This bug is HP SR number 8606223364.
7235 if test "$cross_compiling" = yes; then
7236 # Depending upon the size, compute the lo and hi bounds.
7237cat >conftest.$ac_ext <<_ACEOF
7238#line $LINENO "configure"
7239#include "confdefs.h"
7240$ac_includes_default
7241#ifdef F77_DUMMY_MAIN
7242# ifdef __cplusplus
7243 extern "C"
7244# endif
7245 int F77_DUMMY_MAIN() { return 1; }
7246#endif
7247int
7248main ()
7249{
7250static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7251test_array [0] = 0
7252
7253 ;
7254 return 0;
7255}
7256_ACEOF
7257rm -f conftest.$ac_objext
7258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7259 (eval $ac_compile) 2>&5
7260 ac_status=$?
7261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7262 (exit $ac_status); } &&
7263 { ac_try='test -s conftest.$ac_objext'
7264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7265 (eval $ac_try) 2>&5
7266 ac_status=$?
7267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7268 (exit $ac_status); }; }; then
7269 ac_lo=0 ac_mid=0
7270 while :; do
7271 cat >conftest.$ac_ext <<_ACEOF
7272#line $LINENO "configure"
7273#include "confdefs.h"
7274$ac_includes_default
7275#ifdef F77_DUMMY_MAIN
7276# ifdef __cplusplus
7277 extern "C"
7278# endif
7279 int F77_DUMMY_MAIN() { return 1; }
7280#endif
7281int
7282main ()
7283{
7284static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7285test_array [0] = 0
7286
7287 ;
7288 return 0;
7289}
7290_ACEOF
7291rm -f conftest.$ac_objext
7292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7293 (eval $ac_compile) 2>&5
7294 ac_status=$?
7295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7296 (exit $ac_status); } &&
7297 { ac_try='test -s conftest.$ac_objext'
7298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7299 (eval $ac_try) 2>&5
7300 ac_status=$?
7301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7302 (exit $ac_status); }; }; then
7303 ac_hi=$ac_mid; break
7304else
7305 echo "$as_me: failed program was:" >&5
7306cat conftest.$ac_ext >&5
7307ac_lo=`expr $ac_mid + 1`
7308 if test $ac_lo -le $ac_mid; then
7309 ac_lo= ac_hi=
7310 break
7311 fi
7312 ac_mid=`expr 2 '*' $ac_mid + 1`
7313fi
7314rm -f conftest.$ac_objext conftest.$ac_ext
7315 done
7316else
7317 echo "$as_me: failed program was:" >&5
7318cat conftest.$ac_ext >&5
7319cat >conftest.$ac_ext <<_ACEOF
7320#line $LINENO "configure"
7321#include "confdefs.h"
7322$ac_includes_default
7323#ifdef F77_DUMMY_MAIN
7324# ifdef __cplusplus
7325 extern "C"
7326# endif
7327 int F77_DUMMY_MAIN() { return 1; }
7328#endif
7329int
7330main ()
7331{
7332static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7333test_array [0] = 0
7334
7335 ;
7336 return 0;
7337}
7338_ACEOF
7339rm -f conftest.$ac_objext
7340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7341 (eval $ac_compile) 2>&5
7342 ac_status=$?
7343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7344 (exit $ac_status); } &&
7345 { ac_try='test -s conftest.$ac_objext'
7346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7347 (eval $ac_try) 2>&5
7348 ac_status=$?
7349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7350 (exit $ac_status); }; }; then
7351 ac_hi=-1 ac_mid=-1
7352 while :; do
7353 cat >conftest.$ac_ext <<_ACEOF
7354#line $LINENO "configure"
7355#include "confdefs.h"
7356$ac_includes_default
7357#ifdef F77_DUMMY_MAIN
7358# ifdef __cplusplus
7359 extern "C"
7360# endif
7361 int F77_DUMMY_MAIN() { return 1; }
7362#endif
7363int
7364main ()
7365{
7366static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7367test_array [0] = 0
7368
7369 ;
7370 return 0;
7371}
7372_ACEOF
7373rm -f conftest.$ac_objext
7374if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7375 (eval $ac_compile) 2>&5
7376 ac_status=$?
7377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7378 (exit $ac_status); } &&
7379 { ac_try='test -s conftest.$ac_objext'
7380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7381 (eval $ac_try) 2>&5
7382 ac_status=$?
7383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7384 (exit $ac_status); }; }; then
7385 ac_lo=$ac_mid; break
7386else
7387 echo "$as_me: failed program was:" >&5
7388cat conftest.$ac_ext >&5
7389ac_hi=`expr '(' $ac_mid ')' - 1`
7390 if test $ac_mid -le $ac_hi; then
7391 ac_lo= ac_hi=
7392 break
7393 fi
7394 ac_mid=`expr 2 '*' $ac_mid`
7395fi
7396rm -f conftest.$ac_objext conftest.$ac_ext
7397 done
7398else
7399 echo "$as_me: failed program was:" >&5
7400cat conftest.$ac_ext >&5
7401ac_lo= ac_hi=
7402fi
7403rm -f conftest.$ac_objext conftest.$ac_ext
7404fi
7405rm -f conftest.$ac_objext conftest.$ac_ext
7406# Binary search between lo and hi bounds.
7407while test "x$ac_lo" != "x$ac_hi"; do
7408 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7409 cat >conftest.$ac_ext <<_ACEOF
7410#line $LINENO "configure"
7411#include "confdefs.h"
7412$ac_includes_default
7413#ifdef F77_DUMMY_MAIN
7414# ifdef __cplusplus
7415 extern "C"
7416# endif
7417 int F77_DUMMY_MAIN() { return 1; }
7418#endif
7419int
7420main ()
7421{
7422static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7423test_array [0] = 0
7424
7425 ;
7426 return 0;
7427}
7428_ACEOF
7429rm -f conftest.$ac_objext
7430if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7431 (eval $ac_compile) 2>&5
7432 ac_status=$?
7433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7434 (exit $ac_status); } &&
7435 { ac_try='test -s conftest.$ac_objext'
7436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7437 (eval $ac_try) 2>&5
7438 ac_status=$?
7439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7440 (exit $ac_status); }; }; then
7441 ac_hi=$ac_mid
7442else
7443 echo "$as_me: failed program was:" >&5
7444cat conftest.$ac_ext >&5
7445ac_lo=`expr '(' $ac_mid ')' + 1`
7446fi
7447rm -f conftest.$ac_objext conftest.$ac_ext
7448done
7449case $ac_lo in
7450?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7451'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7452echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7453 { (exit 1); exit 1; }; } ;;
7454esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007455else
7456 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007457 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7458echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7459 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007460else
Martin v. Löwis11437992002-04-12 09:54:03 +00007461 cat >conftest.$ac_ext <<_ACEOF
7462#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007463#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007464$ac_includes_default
7465long longval () { return (long) (sizeof (fpos_t)); }
7466unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007467#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007468#include <stdlib.h>
7469#ifdef F77_DUMMY_MAIN
7470# ifdef __cplusplus
7471 extern "C"
7472# endif
7473 int F77_DUMMY_MAIN() { return 1; }
7474#endif
7475int
7476main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007477{
Martin v. Löwis11437992002-04-12 09:54:03 +00007478
7479 FILE *f = fopen ("conftest.val", "w");
7480 if (! f)
7481 exit (1);
7482 if (((long) (sizeof (fpos_t))) < 0)
7483 {
7484 long i = longval ();
7485 if (i != ((long) (sizeof (fpos_t))))
7486 exit (1);
7487 fprintf (f, "%ld\n", i);
7488 }
7489 else
7490 {
7491 unsigned long i = ulongval ();
7492 if (i != ((long) (sizeof (fpos_t))))
7493 exit (1);
7494 fprintf (f, "%lu\n", i);
7495 }
7496 exit (ferror (f) || fclose (f) != 0);
7497
7498 ;
7499 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007500}
Martin v. Löwis11437992002-04-12 09:54:03 +00007501_ACEOF
7502rm -f conftest$ac_exeext
7503if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7504 (eval $ac_link) 2>&5
7505 ac_status=$?
7506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7507 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7509 (eval $ac_try) 2>&5
7510 ac_status=$?
7511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7512 (exit $ac_status); }; }; then
7513 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007514else
Martin v. Löwis11437992002-04-12 09:54:03 +00007515 echo "$as_me: program exited with status $ac_status" >&5
7516echo "$as_me: failed program was:" >&5
7517cat conftest.$ac_ext >&5
7518( exit $ac_status )
7519{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7520echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7521 { (exit 1); exit 1; }; }
7522fi
7523rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7524fi
7525fi
7526rm -f conftest.val
7527else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007528 ac_cv_sizeof_fpos_t=0
7529fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007530fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007531echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7532echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7533cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007534#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007535_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007536
Michael W. Hudson54241132001-12-07 15:38:26 +00007537
7538
Martin v. Löwis11437992002-04-12 09:54:03 +00007539echo "$as_me:$LINENO: checking for long long support" >&5
7540echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007541have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007542cat >conftest.$ac_ext <<_ACEOF
7543#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007544#include "confdefs.h"
7545
Martin v. Löwis11437992002-04-12 09:54:03 +00007546#ifdef F77_DUMMY_MAIN
7547# ifdef __cplusplus
7548 extern "C"
7549# endif
7550 int F77_DUMMY_MAIN() { return 1; }
7551#endif
7552int
7553main ()
7554{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007555long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007556 ;
7557 return 0;
7558}
7559_ACEOF
7560rm -f conftest.$ac_objext
7561if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7562 (eval $ac_compile) 2>&5
7563 ac_status=$?
7564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7565 (exit $ac_status); } &&
7566 { ac_try='test -s conftest.$ac_objext'
7567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7568 (eval $ac_try) 2>&5
7569 ac_status=$?
7570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7571 (exit $ac_status); }; }; then
7572
7573
7574cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007575#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007576_ACEOF
7577
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007578 have_long_long=yes
7579
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007580else
Martin v. Löwis11437992002-04-12 09:54:03 +00007581 echo "$as_me: failed program was:" >&5
7582cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007583fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007584rm -f conftest.$ac_objext conftest.$ac_ext
7585echo "$as_me:$LINENO: result: $have_long_long" >&5
7586echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007587if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007588echo "$as_me:$LINENO: checking for long long" >&5
7589echo $ECHO_N "checking for long long... $ECHO_C" >&6
7590if test "${ac_cv_type_long_long+set}" = set; then
7591 echo $ECHO_N "(cached) $ECHO_C" >&6
7592else
7593 cat >conftest.$ac_ext <<_ACEOF
7594#line $LINENO "configure"
7595#include "confdefs.h"
7596$ac_includes_default
7597#ifdef F77_DUMMY_MAIN
7598# ifdef __cplusplus
7599 extern "C"
7600# endif
7601 int F77_DUMMY_MAIN() { return 1; }
7602#endif
7603int
7604main ()
7605{
7606if ((long long *) 0)
7607 return 0;
7608if (sizeof (long long))
7609 return 0;
7610 ;
7611 return 0;
7612}
7613_ACEOF
7614rm -f conftest.$ac_objext
7615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7616 (eval $ac_compile) 2>&5
7617 ac_status=$?
7618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7619 (exit $ac_status); } &&
7620 { ac_try='test -s conftest.$ac_objext'
7621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7622 (eval $ac_try) 2>&5
7623 ac_status=$?
7624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7625 (exit $ac_status); }; }; then
7626 ac_cv_type_long_long=yes
7627else
7628 echo "$as_me: failed program was:" >&5
7629cat conftest.$ac_ext >&5
7630ac_cv_type_long_long=no
7631fi
7632rm -f conftest.$ac_objext conftest.$ac_ext
7633fi
7634echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7635echo "${ECHO_T}$ac_cv_type_long_long" >&6
7636
7637echo "$as_me:$LINENO: checking size of long long" >&5
7638echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7639if test "${ac_cv_sizeof_long_long+set}" = set; then
7640 echo $ECHO_N "(cached) $ECHO_C" >&6
7641else
7642 if test "$ac_cv_type_long_long" = yes; then
7643 # The cast to unsigned long works around a bug in the HP C Compiler
7644 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7645 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7646 # This bug is HP SR number 8606223364.
7647 if test "$cross_compiling" = yes; then
7648 # Depending upon the size, compute the lo and hi bounds.
7649cat >conftest.$ac_ext <<_ACEOF
7650#line $LINENO "configure"
7651#include "confdefs.h"
7652$ac_includes_default
7653#ifdef F77_DUMMY_MAIN
7654# ifdef __cplusplus
7655 extern "C"
7656# endif
7657 int F77_DUMMY_MAIN() { return 1; }
7658#endif
7659int
7660main ()
7661{
7662static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7663test_array [0] = 0
7664
7665 ;
7666 return 0;
7667}
7668_ACEOF
7669rm -f conftest.$ac_objext
7670if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7671 (eval $ac_compile) 2>&5
7672 ac_status=$?
7673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7674 (exit $ac_status); } &&
7675 { ac_try='test -s conftest.$ac_objext'
7676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7677 (eval $ac_try) 2>&5
7678 ac_status=$?
7679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7680 (exit $ac_status); }; }; then
7681 ac_lo=0 ac_mid=0
7682 while :; do
7683 cat >conftest.$ac_ext <<_ACEOF
7684#line $LINENO "configure"
7685#include "confdefs.h"
7686$ac_includes_default
7687#ifdef F77_DUMMY_MAIN
7688# ifdef __cplusplus
7689 extern "C"
7690# endif
7691 int F77_DUMMY_MAIN() { return 1; }
7692#endif
7693int
7694main ()
7695{
7696static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7697test_array [0] = 0
7698
7699 ;
7700 return 0;
7701}
7702_ACEOF
7703rm -f conftest.$ac_objext
7704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7705 (eval $ac_compile) 2>&5
7706 ac_status=$?
7707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7708 (exit $ac_status); } &&
7709 { ac_try='test -s conftest.$ac_objext'
7710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7711 (eval $ac_try) 2>&5
7712 ac_status=$?
7713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7714 (exit $ac_status); }; }; then
7715 ac_hi=$ac_mid; break
7716else
7717 echo "$as_me: failed program was:" >&5
7718cat conftest.$ac_ext >&5
7719ac_lo=`expr $ac_mid + 1`
7720 if test $ac_lo -le $ac_mid; then
7721 ac_lo= ac_hi=
7722 break
7723 fi
7724 ac_mid=`expr 2 '*' $ac_mid + 1`
7725fi
7726rm -f conftest.$ac_objext conftest.$ac_ext
7727 done
7728else
7729 echo "$as_me: failed program was:" >&5
7730cat conftest.$ac_ext >&5
7731cat >conftest.$ac_ext <<_ACEOF
7732#line $LINENO "configure"
7733#include "confdefs.h"
7734$ac_includes_default
7735#ifdef F77_DUMMY_MAIN
7736# ifdef __cplusplus
7737 extern "C"
7738# endif
7739 int F77_DUMMY_MAIN() { return 1; }
7740#endif
7741int
7742main ()
7743{
7744static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7745test_array [0] = 0
7746
7747 ;
7748 return 0;
7749}
7750_ACEOF
7751rm -f conftest.$ac_objext
7752if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7753 (eval $ac_compile) 2>&5
7754 ac_status=$?
7755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7756 (exit $ac_status); } &&
7757 { ac_try='test -s conftest.$ac_objext'
7758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7759 (eval $ac_try) 2>&5
7760 ac_status=$?
7761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7762 (exit $ac_status); }; }; then
7763 ac_hi=-1 ac_mid=-1
7764 while :; do
7765 cat >conftest.$ac_ext <<_ACEOF
7766#line $LINENO "configure"
7767#include "confdefs.h"
7768$ac_includes_default
7769#ifdef F77_DUMMY_MAIN
7770# ifdef __cplusplus
7771 extern "C"
7772# endif
7773 int F77_DUMMY_MAIN() { return 1; }
7774#endif
7775int
7776main ()
7777{
7778static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7779test_array [0] = 0
7780
7781 ;
7782 return 0;
7783}
7784_ACEOF
7785rm -f conftest.$ac_objext
7786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7787 (eval $ac_compile) 2>&5
7788 ac_status=$?
7789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7790 (exit $ac_status); } &&
7791 { ac_try='test -s conftest.$ac_objext'
7792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7793 (eval $ac_try) 2>&5
7794 ac_status=$?
7795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7796 (exit $ac_status); }; }; then
7797 ac_lo=$ac_mid; break
7798else
7799 echo "$as_me: failed program was:" >&5
7800cat conftest.$ac_ext >&5
7801ac_hi=`expr '(' $ac_mid ')' - 1`
7802 if test $ac_mid -le $ac_hi; then
7803 ac_lo= ac_hi=
7804 break
7805 fi
7806 ac_mid=`expr 2 '*' $ac_mid`
7807fi
7808rm -f conftest.$ac_objext conftest.$ac_ext
7809 done
7810else
7811 echo "$as_me: failed program was:" >&5
7812cat conftest.$ac_ext >&5
7813ac_lo= ac_hi=
7814fi
7815rm -f conftest.$ac_objext conftest.$ac_ext
7816fi
7817rm -f conftest.$ac_objext conftest.$ac_ext
7818# Binary search between lo and hi bounds.
7819while test "x$ac_lo" != "x$ac_hi"; do
7820 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7821 cat >conftest.$ac_ext <<_ACEOF
7822#line $LINENO "configure"
7823#include "confdefs.h"
7824$ac_includes_default
7825#ifdef F77_DUMMY_MAIN
7826# ifdef __cplusplus
7827 extern "C"
7828# endif
7829 int F77_DUMMY_MAIN() { return 1; }
7830#endif
7831int
7832main ()
7833{
7834static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7835test_array [0] = 0
7836
7837 ;
7838 return 0;
7839}
7840_ACEOF
7841rm -f conftest.$ac_objext
7842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7843 (eval $ac_compile) 2>&5
7844 ac_status=$?
7845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7846 (exit $ac_status); } &&
7847 { ac_try='test -s conftest.$ac_objext'
7848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7849 (eval $ac_try) 2>&5
7850 ac_status=$?
7851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7852 (exit $ac_status); }; }; then
7853 ac_hi=$ac_mid
7854else
7855 echo "$as_me: failed program was:" >&5
7856cat conftest.$ac_ext >&5
7857ac_lo=`expr '(' $ac_mid ')' + 1`
7858fi
7859rm -f conftest.$ac_objext conftest.$ac_ext
7860done
7861case $ac_lo in
7862?*) ac_cv_sizeof_long_long=$ac_lo;;
7863'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7864echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7865 { (exit 1); exit 1; }; } ;;
7866esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007867else
7868 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7870echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7871 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007872else
Martin v. Löwis11437992002-04-12 09:54:03 +00007873 cat >conftest.$ac_ext <<_ACEOF
7874#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007875#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007876$ac_includes_default
7877long longval () { return (long) (sizeof (long long)); }
7878unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007879#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007880#include <stdlib.h>
7881#ifdef F77_DUMMY_MAIN
7882# ifdef __cplusplus
7883 extern "C"
7884# endif
7885 int F77_DUMMY_MAIN() { return 1; }
7886#endif
7887int
7888main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007889{
Martin v. Löwis11437992002-04-12 09:54:03 +00007890
7891 FILE *f = fopen ("conftest.val", "w");
7892 if (! f)
7893 exit (1);
7894 if (((long) (sizeof (long long))) < 0)
7895 {
7896 long i = longval ();
7897 if (i != ((long) (sizeof (long long))))
7898 exit (1);
7899 fprintf (f, "%ld\n", i);
7900 }
7901 else
7902 {
7903 unsigned long i = ulongval ();
7904 if (i != ((long) (sizeof (long long))))
7905 exit (1);
7906 fprintf (f, "%lu\n", i);
7907 }
7908 exit (ferror (f) || fclose (f) != 0);
7909
7910 ;
7911 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007912}
Martin v. Löwis11437992002-04-12 09:54:03 +00007913_ACEOF
7914rm -f conftest$ac_exeext
7915if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7916 (eval $ac_link) 2>&5
7917 ac_status=$?
7918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7919 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7921 (eval $ac_try) 2>&5
7922 ac_status=$?
7923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7924 (exit $ac_status); }; }; then
7925 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007926else
Martin v. Löwis11437992002-04-12 09:54:03 +00007927 echo "$as_me: program exited with status $ac_status" >&5
7928echo "$as_me: failed program was:" >&5
7929cat conftest.$ac_ext >&5
7930( exit $ac_status )
7931{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7932echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7933 { (exit 1); exit 1; }; }
7934fi
7935rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7936fi
7937fi
7938rm -f conftest.val
7939else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007940 ac_cv_sizeof_long_long=0
7941fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007942fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007943echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7944echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7945cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007946#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007947_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007948
Michael W. Hudson54241132001-12-07 15:38:26 +00007949
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007950fi
7951
Martin v. Löwis11437992002-04-12 09:54:03 +00007952echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7953echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007954have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007955cat >conftest.$ac_ext <<_ACEOF
7956#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007957#include "confdefs.h"
7958
Martin v. Löwis11437992002-04-12 09:54:03 +00007959#ifdef F77_DUMMY_MAIN
7960# ifdef __cplusplus
7961 extern "C"
7962# endif
7963 int F77_DUMMY_MAIN() { return 1; }
7964#endif
7965int
7966main ()
7967{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007968uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007969 ;
7970 return 0;
7971}
7972_ACEOF
7973rm -f conftest.$ac_objext
7974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7975 (eval $ac_compile) 2>&5
7976 ac_status=$?
7977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7978 (exit $ac_status); } &&
7979 { ac_try='test -s conftest.$ac_objext'
7980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7981 (eval $ac_try) 2>&5
7982 ac_status=$?
7983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7984 (exit $ac_status); }; }; then
7985
7986
7987cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007988#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007989_ACEOF
7990
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007991 have_uintptr_t=yes
7992
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007993else
Martin v. Löwis11437992002-04-12 09:54:03 +00007994 echo "$as_me: failed program was:" >&5
7995cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007996fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007997rm -f conftest.$ac_objext conftest.$ac_ext
7998echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
7999echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008000if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008001echo "$as_me:$LINENO: checking for uintptr_t" >&5
8002echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8003if test "${ac_cv_type_uintptr_t+set}" = set; then
8004 echo $ECHO_N "(cached) $ECHO_C" >&6
8005else
8006 cat >conftest.$ac_ext <<_ACEOF
8007#line $LINENO "configure"
8008#include "confdefs.h"
8009$ac_includes_default
8010#ifdef F77_DUMMY_MAIN
8011# ifdef __cplusplus
8012 extern "C"
8013# endif
8014 int F77_DUMMY_MAIN() { return 1; }
8015#endif
8016int
8017main ()
8018{
8019if ((uintptr_t *) 0)
8020 return 0;
8021if (sizeof (uintptr_t))
8022 return 0;
8023 ;
8024 return 0;
8025}
8026_ACEOF
8027rm -f conftest.$ac_objext
8028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8029 (eval $ac_compile) 2>&5
8030 ac_status=$?
8031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8032 (exit $ac_status); } &&
8033 { ac_try='test -s conftest.$ac_objext'
8034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8035 (eval $ac_try) 2>&5
8036 ac_status=$?
8037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8038 (exit $ac_status); }; }; then
8039 ac_cv_type_uintptr_t=yes
8040else
8041 echo "$as_me: failed program was:" >&5
8042cat conftest.$ac_ext >&5
8043ac_cv_type_uintptr_t=no
8044fi
8045rm -f conftest.$ac_objext conftest.$ac_ext
8046fi
8047echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8048echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8049
8050echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8051echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8052if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8053 echo $ECHO_N "(cached) $ECHO_C" >&6
8054else
8055 if test "$ac_cv_type_uintptr_t" = yes; then
8056 # The cast to unsigned long works around a bug in the HP C Compiler
8057 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8058 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8059 # This bug is HP SR number 8606223364.
8060 if test "$cross_compiling" = yes; then
8061 # Depending upon the size, compute the lo and hi bounds.
8062cat >conftest.$ac_ext <<_ACEOF
8063#line $LINENO "configure"
8064#include "confdefs.h"
8065$ac_includes_default
8066#ifdef F77_DUMMY_MAIN
8067# ifdef __cplusplus
8068 extern "C"
8069# endif
8070 int F77_DUMMY_MAIN() { return 1; }
8071#endif
8072int
8073main ()
8074{
8075static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8076test_array [0] = 0
8077
8078 ;
8079 return 0;
8080}
8081_ACEOF
8082rm -f conftest.$ac_objext
8083if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8084 (eval $ac_compile) 2>&5
8085 ac_status=$?
8086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8087 (exit $ac_status); } &&
8088 { ac_try='test -s conftest.$ac_objext'
8089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8090 (eval $ac_try) 2>&5
8091 ac_status=$?
8092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8093 (exit $ac_status); }; }; then
8094 ac_lo=0 ac_mid=0
8095 while :; do
8096 cat >conftest.$ac_ext <<_ACEOF
8097#line $LINENO "configure"
8098#include "confdefs.h"
8099$ac_includes_default
8100#ifdef F77_DUMMY_MAIN
8101# ifdef __cplusplus
8102 extern "C"
8103# endif
8104 int F77_DUMMY_MAIN() { return 1; }
8105#endif
8106int
8107main ()
8108{
8109static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8110test_array [0] = 0
8111
8112 ;
8113 return 0;
8114}
8115_ACEOF
8116rm -f conftest.$ac_objext
8117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8118 (eval $ac_compile) 2>&5
8119 ac_status=$?
8120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8121 (exit $ac_status); } &&
8122 { ac_try='test -s conftest.$ac_objext'
8123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8124 (eval $ac_try) 2>&5
8125 ac_status=$?
8126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8127 (exit $ac_status); }; }; then
8128 ac_hi=$ac_mid; break
8129else
8130 echo "$as_me: failed program was:" >&5
8131cat conftest.$ac_ext >&5
8132ac_lo=`expr $ac_mid + 1`
8133 if test $ac_lo -le $ac_mid; then
8134 ac_lo= ac_hi=
8135 break
8136 fi
8137 ac_mid=`expr 2 '*' $ac_mid + 1`
8138fi
8139rm -f conftest.$ac_objext conftest.$ac_ext
8140 done
8141else
8142 echo "$as_me: failed program was:" >&5
8143cat conftest.$ac_ext >&5
8144cat >conftest.$ac_ext <<_ACEOF
8145#line $LINENO "configure"
8146#include "confdefs.h"
8147$ac_includes_default
8148#ifdef F77_DUMMY_MAIN
8149# ifdef __cplusplus
8150 extern "C"
8151# endif
8152 int F77_DUMMY_MAIN() { return 1; }
8153#endif
8154int
8155main ()
8156{
8157static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8158test_array [0] = 0
8159
8160 ;
8161 return 0;
8162}
8163_ACEOF
8164rm -f conftest.$ac_objext
8165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8166 (eval $ac_compile) 2>&5
8167 ac_status=$?
8168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8169 (exit $ac_status); } &&
8170 { ac_try='test -s conftest.$ac_objext'
8171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8172 (eval $ac_try) 2>&5
8173 ac_status=$?
8174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8175 (exit $ac_status); }; }; then
8176 ac_hi=-1 ac_mid=-1
8177 while :; do
8178 cat >conftest.$ac_ext <<_ACEOF
8179#line $LINENO "configure"
8180#include "confdefs.h"
8181$ac_includes_default
8182#ifdef F77_DUMMY_MAIN
8183# ifdef __cplusplus
8184 extern "C"
8185# endif
8186 int F77_DUMMY_MAIN() { return 1; }
8187#endif
8188int
8189main ()
8190{
8191static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8192test_array [0] = 0
8193
8194 ;
8195 return 0;
8196}
8197_ACEOF
8198rm -f conftest.$ac_objext
8199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8200 (eval $ac_compile) 2>&5
8201 ac_status=$?
8202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8203 (exit $ac_status); } &&
8204 { ac_try='test -s conftest.$ac_objext'
8205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8206 (eval $ac_try) 2>&5
8207 ac_status=$?
8208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8209 (exit $ac_status); }; }; then
8210 ac_lo=$ac_mid; break
8211else
8212 echo "$as_me: failed program was:" >&5
8213cat conftest.$ac_ext >&5
8214ac_hi=`expr '(' $ac_mid ')' - 1`
8215 if test $ac_mid -le $ac_hi; then
8216 ac_lo= ac_hi=
8217 break
8218 fi
8219 ac_mid=`expr 2 '*' $ac_mid`
8220fi
8221rm -f conftest.$ac_objext conftest.$ac_ext
8222 done
8223else
8224 echo "$as_me: failed program was:" >&5
8225cat conftest.$ac_ext >&5
8226ac_lo= ac_hi=
8227fi
8228rm -f conftest.$ac_objext conftest.$ac_ext
8229fi
8230rm -f conftest.$ac_objext conftest.$ac_ext
8231# Binary search between lo and hi bounds.
8232while test "x$ac_lo" != "x$ac_hi"; do
8233 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8234 cat >conftest.$ac_ext <<_ACEOF
8235#line $LINENO "configure"
8236#include "confdefs.h"
8237$ac_includes_default
8238#ifdef F77_DUMMY_MAIN
8239# ifdef __cplusplus
8240 extern "C"
8241# endif
8242 int F77_DUMMY_MAIN() { return 1; }
8243#endif
8244int
8245main ()
8246{
8247static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8248test_array [0] = 0
8249
8250 ;
8251 return 0;
8252}
8253_ACEOF
8254rm -f conftest.$ac_objext
8255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8256 (eval $ac_compile) 2>&5
8257 ac_status=$?
8258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8259 (exit $ac_status); } &&
8260 { ac_try='test -s conftest.$ac_objext'
8261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8262 (eval $ac_try) 2>&5
8263 ac_status=$?
8264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8265 (exit $ac_status); }; }; then
8266 ac_hi=$ac_mid
8267else
8268 echo "$as_me: failed program was:" >&5
8269cat conftest.$ac_ext >&5
8270ac_lo=`expr '(' $ac_mid ')' + 1`
8271fi
8272rm -f conftest.$ac_objext conftest.$ac_ext
8273done
8274case $ac_lo in
8275?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8276'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8277echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8278 { (exit 1); exit 1; }; } ;;
8279esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008280else
8281 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008282 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8283echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8284 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008285else
Martin v. Löwis11437992002-04-12 09:54:03 +00008286 cat >conftest.$ac_ext <<_ACEOF
8287#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008288#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008289$ac_includes_default
8290long longval () { return (long) (sizeof (uintptr_t)); }
8291unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008292#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008293#include <stdlib.h>
8294#ifdef F77_DUMMY_MAIN
8295# ifdef __cplusplus
8296 extern "C"
8297# endif
8298 int F77_DUMMY_MAIN() { return 1; }
8299#endif
8300int
8301main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008302{
Martin v. Löwis11437992002-04-12 09:54:03 +00008303
8304 FILE *f = fopen ("conftest.val", "w");
8305 if (! f)
8306 exit (1);
8307 if (((long) (sizeof (uintptr_t))) < 0)
8308 {
8309 long i = longval ();
8310 if (i != ((long) (sizeof (uintptr_t))))
8311 exit (1);
8312 fprintf (f, "%ld\n", i);
8313 }
8314 else
8315 {
8316 unsigned long i = ulongval ();
8317 if (i != ((long) (sizeof (uintptr_t))))
8318 exit (1);
8319 fprintf (f, "%lu\n", i);
8320 }
8321 exit (ferror (f) || fclose (f) != 0);
8322
8323 ;
8324 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008325}
Martin v. Löwis11437992002-04-12 09:54:03 +00008326_ACEOF
8327rm -f conftest$ac_exeext
8328if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8329 (eval $ac_link) 2>&5
8330 ac_status=$?
8331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8332 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8334 (eval $ac_try) 2>&5
8335 ac_status=$?
8336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337 (exit $ac_status); }; }; then
8338 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008339else
Martin v. Löwis11437992002-04-12 09:54:03 +00008340 echo "$as_me: program exited with status $ac_status" >&5
8341echo "$as_me: failed program was:" >&5
8342cat conftest.$ac_ext >&5
8343( exit $ac_status )
8344{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8345echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8346 { (exit 1); exit 1; }; }
8347fi
8348rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8349fi
8350fi
8351rm -f conftest.val
8352else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008353 ac_cv_sizeof_uintptr_t=0
8354fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008355fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008356echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8357echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8358cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008359#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008360_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008361
Michael W. Hudson54241132001-12-07 15:38:26 +00008362
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008363fi
8364
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008365# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008366echo "$as_me:$LINENO: checking size of off_t" >&5
8367echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8368if test "${ac_cv_sizeof_off_t+set}" = set; then
8369 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008370else
8371 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008372 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008373else
Martin v. Löwis11437992002-04-12 09:54:03 +00008374 cat >conftest.$ac_ext <<_ACEOF
8375#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008376#include "confdefs.h"
8377#include <stdio.h>
8378#include <sys/types.h>
8379main()
8380{
8381 FILE *f=fopen("conftestval", "w");
8382 if (!f) exit(1);
8383 fprintf(f, "%d\n", sizeof(off_t));
8384 exit(0);
8385}
Martin v. Löwis11437992002-04-12 09:54:03 +00008386_ACEOF
8387rm -f conftest$ac_exeext
8388if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8389 (eval $ac_link) 2>&5
8390 ac_status=$?
8391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8392 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8394 (eval $ac_try) 2>&5
8395 ac_status=$?
8396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8397 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008398 ac_cv_sizeof_off_t=`cat conftestval`
8399else
Martin v. Löwis11437992002-04-12 09:54:03 +00008400 echo "$as_me: program exited with status $ac_status" >&5
8401echo "$as_me: failed program was:" >&5
8402cat conftest.$ac_ext >&5
8403( exit $ac_status )
8404ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008405fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008406rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008407fi
8408
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008409fi
8410
Martin v. Löwis11437992002-04-12 09:54:03 +00008411echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8412echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8413
8414cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008415#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008416_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008417
Michael W. Hudson54241132001-12-07 15:38:26 +00008418
Martin v. Löwis11437992002-04-12 09:54:03 +00008419echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8420echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008421if test "$have_long_long" = yes -a \
8422 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8423 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008424
Martin v. Löwis11437992002-04-12 09:54:03 +00008425cat >>confdefs.h <<\_ACEOF
8426#define HAVE_LARGEFILE_SUPPORT 1
8427_ACEOF
8428
8429 echo "$as_me:$LINENO: result: yes" >&5
8430echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008431else
Martin v. Löwis11437992002-04-12 09:54:03 +00008432 echo "$as_me:$LINENO: result: no" >&5
8433echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008434fi
8435
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008436# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008437echo "$as_me:$LINENO: checking size of time_t" >&5
8438echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8439if test "${ac_cv_sizeof_time_t+set}" = set; then
8440 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008441else
8442 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008443 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008444else
Martin v. Löwis11437992002-04-12 09:54:03 +00008445 cat >conftest.$ac_ext <<_ACEOF
8446#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008447#include "confdefs.h"
8448#include <stdio.h>
8449#include <time.h>
8450main()
8451{
8452 FILE *f=fopen("conftestval", "w");
8453 if (!f) exit(1);
8454 fprintf(f, "%d\n", sizeof(time_t));
8455 exit(0);
8456}
Martin v. Löwis11437992002-04-12 09:54:03 +00008457_ACEOF
8458rm -f conftest$ac_exeext
8459if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8460 (eval $ac_link) 2>&5
8461 ac_status=$?
8462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8463 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8465 (eval $ac_try) 2>&5
8466 ac_status=$?
8467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8468 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008469 ac_cv_sizeof_time_t=`cat conftestval`
8470else
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 echo "$as_me: program exited with status $ac_status" >&5
8472echo "$as_me: failed program was:" >&5
8473cat conftest.$ac_ext >&5
8474( exit $ac_status )
8475ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008476fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008477rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008478fi
8479
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008480fi
8481
Martin v. Löwis11437992002-04-12 09:54:03 +00008482echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8483echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8484
8485cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008486#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008487_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008488
Michael W. Hudson54241132001-12-07 15:38:26 +00008489
8490
Trent Mick635f6fb2000-08-23 21:33:05 +00008491# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008492ac_save_cc="$CC"
8493if test "$ac_cv_kpthread" = "yes"
8494then CC="$CC -Kpthread"
8495fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008496echo "$as_me:$LINENO: checking for pthread_t" >&5
8497echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008498have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008499cat >conftest.$ac_ext <<_ACEOF
8500#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008501#include "confdefs.h"
8502#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008503#ifdef F77_DUMMY_MAIN
8504# ifdef __cplusplus
8505 extern "C"
8506# endif
8507 int F77_DUMMY_MAIN() { return 1; }
8508#endif
8509int
8510main ()
8511{
Guido van Rossum12580492000-09-24 16:47:19 +00008512pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008513 ;
8514 return 0;
8515}
8516_ACEOF
8517rm -f conftest.$ac_objext
8518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8519 (eval $ac_compile) 2>&5
8520 ac_status=$?
8521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8522 (exit $ac_status); } &&
8523 { ac_try='test -s conftest.$ac_objext'
8524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8525 (eval $ac_try) 2>&5
8526 ac_status=$?
8527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8528 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008529 have_pthread_t=yes
8530else
Martin v. Löwis11437992002-04-12 09:54:03 +00008531 echo "$as_me: failed program was:" >&5
8532cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008533fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008534rm -f conftest.$ac_objext conftest.$ac_ext
8535echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8536echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008537if test "$have_pthread_t" = yes ; then
8538 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008539 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8540echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8541 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8542 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008543else
8544 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008545 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008546else
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 cat >conftest.$ac_ext <<_ACEOF
8548#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008549#include "confdefs.h"
8550#include <stdio.h>
8551 #include <pthread.h>
8552 main()
8553 {
8554 FILE *f=fopen("conftestval", "w");
8555 if (!f) exit(1);
8556 fprintf(f, "%d\n", sizeof(pthread_t));
8557 exit(0);
8558 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008559_ACEOF
8560rm -f conftest$ac_exeext
8561if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8562 (eval $ac_link) 2>&5
8563 ac_status=$?
8564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8565 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8567 (eval $ac_try) 2>&5
8568 ac_status=$?
8569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8570 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008571 ac_cv_sizeof_pthread_t=`cat conftestval`
8572else
Martin v. Löwis11437992002-04-12 09:54:03 +00008573 echo "$as_me: program exited with status $ac_status" >&5
8574echo "$as_me: failed program was:" >&5
8575cat conftest.$ac_ext >&5
8576( exit $ac_status )
8577ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008578fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008579rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008580fi
8581
Trent Mick635f6fb2000-08-23 21:33:05 +00008582fi
8583
Martin v. Löwis11437992002-04-12 09:54:03 +00008584 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8585echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8586
8587cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008588#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008589_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008590
8591fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008592CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008593
Martin v. Löwis11437992002-04-12 09:54:03 +00008594echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8595echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008596# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8597if test "${enable_toolbox_glue+set}" = set; then
8598 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008599
Martin v. Löwis11437992002-04-12 09:54:03 +00008600fi;
Jack Jansene578a632001-08-15 01:27:14 +00008601
8602if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008603then
Jack Jansene578a632001-08-15 01:27:14 +00008604 case $ac_sys_system/$ac_sys_release in
8605 Darwin/*)
8606 enable_toolbox_glue="yes";;
8607 *)
8608 enable_toolbox_glue="no";;
8609 esac
8610fi
8611case "$enable_toolbox_glue" in
8612yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008613 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008614 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008615 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008616
8617cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008618#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008619_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008620
8621 ;;
8622*)
8623 extra_frameworks=""
8624 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008625 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008626 ;;
8627esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008628echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8629echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008630
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008631
8632case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008633 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008634 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008635 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8636 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008637 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8638 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008639 Darwin/*)
8640 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008641 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8642 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008643 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8644 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008645esac
8646
Martin v. Löwis11437992002-04-12 09:54:03 +00008647echo "$as_me:$LINENO: checking for --enable-framework" >&5
8648echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008649if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008650then
Jack Jansenca06bc62001-08-03 15:32:23 +00008651 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008652 # -U __environ is needed since bundles don't have access
8653 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008655 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008656
Jack Jansena3891ea2001-09-07 14:25:12 +00008657 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008658 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8659 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008660 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008661
Martin v. Löwis11437992002-04-12 09:54:03 +00008662cat >>confdefs.h <<\_ACEOF
8663#define WITH_NEXT_FRAMEWORK 1
8664_ACEOF
8665
8666 echo "$as_me:$LINENO: result: yes" >&5
8667echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008668else
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 echo "$as_me:$LINENO: result: no" >&5
8670echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008671fi
8672
Martin v. Löwis11437992002-04-12 09:54:03 +00008673echo "$as_me:$LINENO: checking for dyld" >&5
8674echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008675case $ac_sys_system/$ac_sys_release in
8676 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008677
Martin v. Löwis11437992002-04-12 09:54:03 +00008678cat >>confdefs.h <<\_ACEOF
8679#define WITH_DYLD 1
8680_ACEOF
8681
8682 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8683echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008684 ;;
8685 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 echo "$as_me:$LINENO: result: no" >&5
8687echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008688 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008689esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008690
Guido van Rossum0a516c91994-09-12 10:58:40 +00008691# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008692
Michael W. Hudson54241132001-12-07 15:38:26 +00008693
8694
8695
8696
Guido van Rossum0a516c91994-09-12 10:58:40 +00008697# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008698# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008699echo "$as_me:$LINENO: checking SO" >&5
8700echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008701if test -z "$SO"
8702then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008703 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008704 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008705 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008706 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008707 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008708fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008709echo "$as_me:$LINENO: result: $SO" >&5
8710echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008711# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008712# -- "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 +00008713# (Shared libraries in this instance are shared modules to be loaded into
8714# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008715echo "$as_me:$LINENO: checking LDSHARED" >&5
8716echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008717if test -z "$LDSHARED"
8718then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008719 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008720 AIX*)
8721 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008722 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008723 ;;
8724 BeOS*)
8725 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008726 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008727 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008728 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008729 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008730 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008731 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00008732 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008733 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008734 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00008735 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008736 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008737 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8738 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008739 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008740 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8741 if test "$enable_framework" ; then
8742 # Link against the framework. All externals should be defined.
8743 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8744 else
8745 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008746 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008747 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008748 Darwin/*)
8749 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8750 if test "$enable_framework" ; then
8751 # Link against the framework. All externals should be defined.
8752 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8753 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008754 # No framework, use the Python app as bundle-loader
8755 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8756 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008757 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008758 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008759 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008760 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008761 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008762 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008763 then
8764 LDSHARED="cc -shared ${LDFLAGS}"
8765 else
8766 LDSHARED="ld -Bshareable ${LDFLAGS}"
8767 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008768 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008769 if test "$GCC" = "yes"
8770 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008771 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008772 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008773 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008774 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008775 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008776 *) LDSHARED="ld";;
8777 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008778fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008779echo "$as_me:$LINENO: result: $LDSHARED" >&5
8780echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008781BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008782# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008783# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008784echo "$as_me:$LINENO: checking CCSHARED" >&5
8785echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008786if test -z "$CCSHARED"
8787then
Guido van Rossum07397971997-04-29 21:49:50 +00008788 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008789 SunOS*) if test "$GCC" = yes;
8790 then CCSHARED="-fPIC";
8791 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008792 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008793 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008794 else CCSHARED="+z";
8795 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008796 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008797 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008798 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008799 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008800 if test "$GCC" = "yes"
8801 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008802 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008803 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008804 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008805 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008806 IRIX*/6*) case $CC in
8807 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008808 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008809 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008810 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008811 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008812fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008813echo "$as_me:$LINENO: result: $CCSHARED" >&5
8814echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008815# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008816# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008817echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8818echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008819if test -z "$LINKFORSHARED"
8820then
Guido van Rossum07397971997-04-29 21:49:50 +00008821 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008822 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008823 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008824 LINKFORSHARED="-Wl,-E -Wl,+s";;
8825# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008826 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008827 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008828 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008829 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008830 # -u __dummy makes the linker aware of the objc runtime
8831 # in System.framework; otherwise, __objcInit (referenced in
8832 # crt1.o) gets erroneously defined as common, which breaks dynamic
8833 # loading of any modules which reference it in System.framework.
8834 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8835 # not used by the core itself but which needs to be in the core so
8836 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008837 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008838 if test "$enable_framework"
8839 then
8840 LINKFORSHARED="$LINKFORSHARED -framework Python"
8841 fi
8842 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008843 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008844 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008845 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008846 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008847 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8848 then
8849 LINKFORSHARED="-Wl,--export-dynamic"
8850 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008851 SunOS/5*) case $CC in
8852 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008853 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008854 then
8855 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008856 fi;;
8857 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008858 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008859fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008860echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8861echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008862
Michael W. Hudson54241132001-12-07 15:38:26 +00008863
Martin v. Löwis11437992002-04-12 09:54:03 +00008864echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8865echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008866if test ! "$LIBRARY" = "$LDLIBRARY"
8867then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008868 case $ac_sys_system in
8869 CYGWIN*)
8870 # Cygwin needs CCSHARED when building extension DLLs
8871 # but not when building the interpreter DLL.
8872 CFLAGSFORSHARED='';;
8873 *)
8874 CFLAGSFORSHARED='$(CCSHARED)'
8875 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008876fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008877echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8878echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008879
Guido van Rossum627b2d71993-12-24 10:39:16 +00008880# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008881
8882echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8883echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8884if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8885 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008886else
Martin v. Löwis11437992002-04-12 09:54:03 +00008887 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008888LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008889cat >conftest.$ac_ext <<_ACEOF
8890#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008891#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008892
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008893/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008894#ifdef __cplusplus
8895extern "C"
8896#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008897/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 builtin and then its argument prototype would still apply. */
8899char dlopen ();
8900#ifdef F77_DUMMY_MAIN
8901# ifdef __cplusplus
8902 extern "C"
8903# endif
8904 int F77_DUMMY_MAIN() { return 1; }
8905#endif
8906int
8907main ()
8908{
8909dlopen ();
8910 ;
8911 return 0;
8912}
8913_ACEOF
8914rm -f conftest.$ac_objext conftest$ac_exeext
8915if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8916 (eval $ac_link) 2>&5
8917 ac_status=$?
8918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8919 (exit $ac_status); } &&
8920 { ac_try='test -s conftest$ac_exeext'
8921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8922 (eval $ac_try) 2>&5
8923 ac_status=$?
8924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8925 (exit $ac_status); }; }; then
8926 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008927else
Martin v. Löwis11437992002-04-12 09:54:03 +00008928 echo "$as_me: failed program was:" >&5
8929cat conftest.$ac_ext >&5
8930ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008931fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008932rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8933LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008934fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008935echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8936echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8937if test $ac_cv_lib_dl_dlopen = yes; then
8938 cat >>confdefs.h <<_ACEOF
8939#define HAVE_LIBDL 1
8940_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008941
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008942 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008943
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008944fi
8945 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008946
8947echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8948echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8949if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8950 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008951else
Martin v. Löwis11437992002-04-12 09:54:03 +00008952 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008953LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008954cat >conftest.$ac_ext <<_ACEOF
8955#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008956#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008957
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008958/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008959#ifdef __cplusplus
8960extern "C"
8961#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008962/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008963 builtin and then its argument prototype would still apply. */
8964char shl_load ();
8965#ifdef F77_DUMMY_MAIN
8966# ifdef __cplusplus
8967 extern "C"
8968# endif
8969 int F77_DUMMY_MAIN() { return 1; }
8970#endif
8971int
8972main ()
8973{
8974shl_load ();
8975 ;
8976 return 0;
8977}
8978_ACEOF
8979rm -f conftest.$ac_objext conftest$ac_exeext
8980if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8981 (eval $ac_link) 2>&5
8982 ac_status=$?
8983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8984 (exit $ac_status); } &&
8985 { ac_try='test -s conftest$ac_exeext'
8986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8987 (eval $ac_try) 2>&5
8988 ac_status=$?
8989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8990 (exit $ac_status); }; }; then
8991 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008992else
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 echo "$as_me: failed program was:" >&5
8994cat conftest.$ac_ext >&5
8995ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008996fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008997rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8998LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008999fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009000echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9001echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9002if test $ac_cv_lib_dld_shl_load = yes; then
9003 cat >>confdefs.h <<_ACEOF
9004#define HAVE_LIBDLD 1
9005_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009006
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009007 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009009fi
9010 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009011
9012echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9013echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9014if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9015 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009016else
Martin v. Löwis11437992002-04-12 09:54:03 +00009017 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009018LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009019cat >conftest.$ac_ext <<_ACEOF
9020#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009021#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009022
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009023/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009024#ifdef __cplusplus
9025extern "C"
9026#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009027/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 builtin and then its argument prototype would still apply. */
9029char sem_init ();
9030#ifdef F77_DUMMY_MAIN
9031# ifdef __cplusplus
9032 extern "C"
9033# endif
9034 int F77_DUMMY_MAIN() { return 1; }
9035#endif
9036int
9037main ()
9038{
9039sem_init ();
9040 ;
9041 return 0;
9042}
9043_ACEOF
9044rm -f conftest.$ac_objext conftest$ac_exeext
9045if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9046 (eval $ac_link) 2>&5
9047 ac_status=$?
9048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9049 (exit $ac_status); } &&
9050 { ac_try='test -s conftest$ac_exeext'
9051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9052 (eval $ac_try) 2>&5
9053 ac_status=$?
9054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9055 (exit $ac_status); }; }; then
9056 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009057else
Martin v. Löwis11437992002-04-12 09:54:03 +00009058 echo "$as_me: failed program was:" >&5
9059cat conftest.$ac_ext >&5
9060ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009061fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009062rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9063LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009064fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009065echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9066echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9067if test $ac_cv_lib_rt_sem_init = yes; then
9068 cat >>confdefs.h <<_ACEOF
9069#define HAVE_LIBRT 1
9070_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009071
9072 LIBS="-lrt $LIBS"
9073
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009074fi
9075 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009076
9077# checks for system dependent C++ extensions support
9078case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9080echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9081 cat >conftest.$ac_ext <<_ACEOF
9082#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009083#include "confdefs.h"
9084#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009085#ifdef F77_DUMMY_MAIN
9086# ifdef __cplusplus
9087 extern "C"
9088# endif
9089 int F77_DUMMY_MAIN() { return 1; }
9090#endif
9091int
9092main ()
9093{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009094loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009095 ;
9096 return 0;
9097}
9098_ACEOF
9099rm -f conftest.$ac_objext conftest$ac_exeext
9100if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9101 (eval $ac_link) 2>&5
9102 ac_status=$?
9103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9104 (exit $ac_status); } &&
9105 { ac_try='test -s conftest$ac_exeext'
9106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9107 (eval $ac_try) 2>&5
9108 ac_status=$?
9109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9110 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009111
Martin v. Löwis11437992002-04-12 09:54:03 +00009112cat >>confdefs.h <<\_ACEOF
9113#define AIX_GENUINE_CPLUSPLUS 1
9114_ACEOF
9115
9116 echo "$as_me:$LINENO: result: yes" >&5
9117echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009118else
Martin v. Löwis11437992002-04-12 09:54:03 +00009119 echo "$as_me: failed program was:" >&5
9120cat conftest.$ac_ext >&5
9121echo "$as_me:$LINENO: result: no" >&5
9122echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009123fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009124rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009125 *) ;;
9126esac
9127
Guido van Rossum70c7f481998-03-26 18:44:10 +00009128# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9129# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009130# BeOS' sockets are stashed in libnet.
9131case "$ac_sys_system" in
9132IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009133*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009134echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9135echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9136if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9137 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009138else
Martin v. Löwis11437992002-04-12 09:54:03 +00009139 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009140LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009141cat >conftest.$ac_ext <<_ACEOF
9142#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009143#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009144
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009145/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009146#ifdef __cplusplus
9147extern "C"
9148#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009149/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009150 builtin and then its argument prototype would still apply. */
9151char t_open ();
9152#ifdef F77_DUMMY_MAIN
9153# ifdef __cplusplus
9154 extern "C"
9155# endif
9156 int F77_DUMMY_MAIN() { return 1; }
9157#endif
9158int
9159main ()
9160{
9161t_open ();
9162 ;
9163 return 0;
9164}
9165_ACEOF
9166rm -f conftest.$ac_objext conftest$ac_exeext
9167if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9168 (eval $ac_link) 2>&5
9169 ac_status=$?
9170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9171 (exit $ac_status); } &&
9172 { ac_try='test -s conftest$ac_exeext'
9173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9174 (eval $ac_try) 2>&5
9175 ac_status=$?
9176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9177 (exit $ac_status); }; }; then
9178 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009179else
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 echo "$as_me: failed program was:" >&5
9181cat conftest.$ac_ext >&5
9182ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009183fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009184rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9185LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009186fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009187echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9188echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9189if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009190 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009191fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009192 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009193echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9194echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9195if test "${ac_cv_lib_socket_socket+set}" = set; then
9196 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009197else
Martin v. Löwis11437992002-04-12 09:54:03 +00009198 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009199LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009200cat >conftest.$ac_ext <<_ACEOF
9201#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009202#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009203
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009204/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009205#ifdef __cplusplus
9206extern "C"
9207#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009208/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 builtin and then its argument prototype would still apply. */
9210char socket ();
9211#ifdef F77_DUMMY_MAIN
9212# ifdef __cplusplus
9213 extern "C"
9214# endif
9215 int F77_DUMMY_MAIN() { return 1; }
9216#endif
9217int
9218main ()
9219{
9220socket ();
9221 ;
9222 return 0;
9223}
9224_ACEOF
9225rm -f conftest.$ac_objext conftest$ac_exeext
9226if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9227 (eval $ac_link) 2>&5
9228 ac_status=$?
9229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9230 (exit $ac_status); } &&
9231 { ac_try='test -s conftest$ac_exeext'
9232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9233 (eval $ac_try) 2>&5
9234 ac_status=$?
9235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9236 (exit $ac_status); }; }; then
9237 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009238else
Martin v. Löwis11437992002-04-12 09:54:03 +00009239 echo "$as_me: failed program was:" >&5
9240cat conftest.$ac_ext >&5
9241ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009242fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009243rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9244LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009245fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009246echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9247echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9248if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009249 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009250fi
9251 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009252;;
9253esac
9254case "$ac_sys_system" in
9255BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009256echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9257echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9258if test "${ac_cv_lib_net_socket+set}" = set; then
9259 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009260else
Martin v. Löwis11437992002-04-12 09:54:03 +00009261 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009262LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009263cat >conftest.$ac_ext <<_ACEOF
9264#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009265#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009266
Guido van Rossumad678af1998-10-02 14:42:15 +00009267/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009268#ifdef __cplusplus
9269extern "C"
9270#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009271/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009272 builtin and then its argument prototype would still apply. */
9273char socket ();
9274#ifdef F77_DUMMY_MAIN
9275# ifdef __cplusplus
9276 extern "C"
9277# endif
9278 int F77_DUMMY_MAIN() { return 1; }
9279#endif
9280int
9281main ()
9282{
9283socket ();
9284 ;
9285 return 0;
9286}
9287_ACEOF
9288rm -f conftest.$ac_objext conftest$ac_exeext
9289if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9290 (eval $ac_link) 2>&5
9291 ac_status=$?
9292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9293 (exit $ac_status); } &&
9294 { ac_try='test -s conftest$ac_exeext'
9295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9296 (eval $ac_try) 2>&5
9297 ac_status=$?
9298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9299 (exit $ac_status); }; }; then
9300 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009301else
Martin v. Löwis11437992002-04-12 09:54:03 +00009302 echo "$as_me: failed program was:" >&5
9303cat conftest.$ac_ext >&5
9304ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009305fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009306rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9307LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009308fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009309echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9310echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9311if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009312 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009313fi
9314 # BeOS
9315;;
9316esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009317
Martin v. Löwis11437992002-04-12 09:54:03 +00009318echo "$as_me:$LINENO: checking for --with-libs" >&5
9319echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9320
Guido van Rossuma68acba1996-07-31 17:36:39 +00009321# Check whether --with-libs or --without-libs was given.
9322if test "${with_libs+set}" = set; then
9323 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009324
9325echo "$as_me:$LINENO: result: $withval" >&5
9326echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009327LIBS="$withval $LIBS"
9328
9329else
Martin v. Löwis11437992002-04-12 09:54:03 +00009330 echo "$as_me:$LINENO: result: no" >&5
9331echo "${ECHO_T}no" >&6
9332fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009333
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009334# Determine if signalmodule should be used.
9335
9336
Martin v. Löwis11437992002-04-12 09:54:03 +00009337echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9338echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9339
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009340# Check whether --with-signal-module or --without-signal-module was given.
9341if test "${with_signal_module+set}" = set; then
9342 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009343
Martin v. Löwis11437992002-04-12 09:54:03 +00009344fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009345
9346if test -z "$with_signal_module"
9347then with_signal_module="yes"
9348fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009349echo "$as_me:$LINENO: result: $with_signal_module" >&5
9350echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009351
9352if test "${with_signal_module}" = "yes"; then
9353 USE_SIGNAL_MODULE=""
9354 SIGNAL_OBJS=""
9355else
9356 USE_SIGNAL_MODULE="#"
9357 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9358fi
9359
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009360# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009361
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009362USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009363
Martin v. Löwis11437992002-04-12 09:54:03 +00009364echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9365echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9366
Guido van Rossumec2f0731997-01-22 20:54:01 +00009367
9368# Check whether --with-dec-threads or --without-dec-threads was given.
9369if test "${with_dec_threads+set}" = set; then
9370 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009371
9372echo "$as_me:$LINENO: result: $withval" >&5
9373echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009374LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009375if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009376 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009377fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009378else
Martin v. Löwis11437992002-04-12 09:54:03 +00009379 echo "$as_me:$LINENO: result: no" >&5
9380echo "${ECHO_T}no" >&6
9381fi;
9382
9383# Templates for things AC_DEFINEd more than once.
9384# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009385
9386
Martin v. Löwis11437992002-04-12 09:54:03 +00009387
9388
9389
9390
9391
9392echo "$as_me:$LINENO: checking for --with-threads" >&5
9393echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9394
Guido van Rossumec2f0731997-01-22 20:54:01 +00009395# Check whether --with-threads or --without-threads was given.
9396if test "${with_threads+set}" = set; then
9397 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009398
Martin v. Löwis11437992002-04-12 09:54:03 +00009399fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009400
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009401# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009402
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009403# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009404if test "${with_thread+set}" = set; then
9405 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009406
Martin v. Löwis11437992002-04-12 09:54:03 +00009407with_threads=$with_thread
9408fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009409
9410if test -z "$with_threads"
9411then with_threads="yes"
9412fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009413echo "$as_me:$LINENO: result: $with_threads" >&5
9414echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009415
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009416
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009417if test "$with_threads" = "no"
9418then
9419 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009420elif test "$ac_cv_pthread_is_default" = yes
9421then
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009423#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009424_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009425
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009426 # Defining _REENTRANT on system with POSIX threads should not hurt.
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 _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009429_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009430
9431 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009432 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009433elif test "$ac_cv_kpthread" = "yes"
9434then
9435 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009437#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009438_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009439
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009440 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009441 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009442else
9443 if test ! -z "$with_threads" -a -d "$with_threads"
9444 then LDFLAGS="$LDFLAGS -L$with_threads"
9445 fi
9446 if test ! -z "$withval" -a -d "$withval"
9447 then LDFLAGS="$LDFLAGS -L$withval"
9448 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009449
9450 # According to the POSIX spec, a pthreads implementation must
9451 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9453echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9454 cat >conftest.$ac_ext <<_ACEOF
9455#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009456#include "confdefs.h"
9457#include <unistd.h>
9458 #ifdef _POSIX_THREADS
9459 yes
9460 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009461
9462_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9464 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009465 unistd_defines_pthreads=yes
9466else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009467 unistd_defines_pthreads=no
9468fi
9469rm -f conftest*
9470
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9472echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009473
Martin v. Löwis11437992002-04-12 09:54:03 +00009474 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009475#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009476_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009477
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 if test "${ac_cv_header_cthreads_h+set}" = set; then
9479 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9480echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9481if test "${ac_cv_header_cthreads_h+set}" = set; then
9482 echo $ECHO_N "(cached) $ECHO_C" >&6
9483fi
9484echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9485echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009486else
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 # Is the header compilable?
9488echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9489echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9490cat >conftest.$ac_ext <<_ACEOF
9491#line $LINENO "configure"
9492#include "confdefs.h"
9493$ac_includes_default
9494#include <cthreads.h>
9495_ACEOF
9496rm -f conftest.$ac_objext
9497if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9498 (eval $ac_compile) 2>&5
9499 ac_status=$?
9500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9501 (exit $ac_status); } &&
9502 { ac_try='test -s conftest.$ac_objext'
9503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9504 (eval $ac_try) 2>&5
9505 ac_status=$?
9506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9507 (exit $ac_status); }; }; then
9508 ac_header_compiler=yes
9509else
9510 echo "$as_me: failed program was:" >&5
9511cat conftest.$ac_ext >&5
9512ac_header_compiler=no
9513fi
9514rm -f conftest.$ac_objext conftest.$ac_ext
9515echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9516echo "${ECHO_T}$ac_header_compiler" >&6
9517
9518# Is the header present?
9519echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9520echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9521cat >conftest.$ac_ext <<_ACEOF
9522#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009523#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009524#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009525_ACEOF
9526if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9527 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9528 ac_status=$?
9529 egrep -v '^ *\+' conftest.er1 >conftest.err
9530 rm -f conftest.er1
9531 cat conftest.err >&5
9532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9533 (exit $ac_status); } >/dev/null; then
9534 if test -s conftest.err; then
9535 ac_cpp_err=$ac_c_preproc_warn_flag
9536 else
9537 ac_cpp_err=
9538 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009539else
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 ac_cpp_err=yes
9541fi
9542if test -z "$ac_cpp_err"; then
9543 ac_header_preproc=yes
9544else
9545 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009546 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009548fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009549rm -f conftest.err conftest.$ac_ext
9550echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9551echo "${ECHO_T}$ac_header_preproc" >&6
9552
9553# So? What about this header?
9554case $ac_header_compiler:$ac_header_preproc in
9555 yes:no )
9556 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9557echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9558 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9559echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9560 no:yes )
9561 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9562echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9563 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9564echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9565 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9566echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9567esac
9568echo "$as_me:$LINENO: checking for cthreads.h" >&5
9569echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9570if test "${ac_cv_header_cthreads_h+set}" = set; then
9571 echo $ECHO_N "(cached) $ECHO_C" >&6
9572else
9573 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009574fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009575echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9576echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9577
9578fi
9579if test $ac_cv_header_cthreads_h = yes; then
9580 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009581#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009582_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009583
Martin v. Löwis11437992002-04-12 09:54:03 +00009584 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009585#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009586_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009587
Martin v. Löwis11437992002-04-12 09:54:03 +00009588
9589cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009590#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009591_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009592
9593 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009594 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009595else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009596
Martin v. Löwis11437992002-04-12 09:54:03 +00009597 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9598 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9599echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9600if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9601 echo $ECHO_N "(cached) $ECHO_C" >&6
9602fi
9603echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9604echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009605else
Martin v. Löwis11437992002-04-12 09:54:03 +00009606 # Is the header compilable?
9607echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9608echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9609cat >conftest.$ac_ext <<_ACEOF
9610#line $LINENO "configure"
9611#include "confdefs.h"
9612$ac_includes_default
9613#include <mach/cthreads.h>
9614_ACEOF
9615rm -f conftest.$ac_objext
9616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9617 (eval $ac_compile) 2>&5
9618 ac_status=$?
9619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9620 (exit $ac_status); } &&
9621 { ac_try='test -s conftest.$ac_objext'
9622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9623 (eval $ac_try) 2>&5
9624 ac_status=$?
9625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9626 (exit $ac_status); }; }; then
9627 ac_header_compiler=yes
9628else
9629 echo "$as_me: failed program was:" >&5
9630cat conftest.$ac_ext >&5
9631ac_header_compiler=no
9632fi
9633rm -f conftest.$ac_objext conftest.$ac_ext
9634echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9635echo "${ECHO_T}$ac_header_compiler" >&6
9636
9637# Is the header present?
9638echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9639echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9640cat >conftest.$ac_ext <<_ACEOF
9641#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009642#include "confdefs.h"
9643#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009644_ACEOF
9645if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9646 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9647 ac_status=$?
9648 egrep -v '^ *\+' conftest.er1 >conftest.err
9649 rm -f conftest.er1
9650 cat conftest.err >&5
9651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9652 (exit $ac_status); } >/dev/null; then
9653 if test -s conftest.err; then
9654 ac_cpp_err=$ac_c_preproc_warn_flag
9655 else
9656 ac_cpp_err=
9657 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009658else
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 ac_cpp_err=yes
9660fi
9661if test -z "$ac_cpp_err"; then
9662 ac_header_preproc=yes
9663else
9664 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009665 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009666 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009668rm -f conftest.err conftest.$ac_ext
9669echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9670echo "${ECHO_T}$ac_header_preproc" >&6
9671
9672# So? What about this header?
9673case $ac_header_compiler:$ac_header_preproc in
9674 yes:no )
9675 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9676echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9677 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9678echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9679 no:yes )
9680 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9681echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9682 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9683echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9684 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9685echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9686esac
9687echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9688echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9689if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9690 echo $ECHO_N "(cached) $ECHO_C" >&6
9691else
9692 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009693fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009694echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9695echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9696
9697fi
9698if test $ac_cv_header_mach_cthreads_h = yes; then
9699 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009700#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009701_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009702
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009704#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009705_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009706
Martin v. Löwis11437992002-04-12 09:54:03 +00009707
9708cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009709#define MACH_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öwis2d7e2642002-04-05 16:50:53 +00009712 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009713else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009714
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 echo "$as_me:$LINENO: checking for --with-pth" >&5
9716echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9717
9718# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009719if test "${with_pth+set}" = set; then
9720 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009721
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 echo "$as_me:$LINENO: result: $withval" >&5
9723echo "${ECHO_T}$withval" >&6
9724 cat >>confdefs.h <<\_ACEOF
9725#define WITH_THREAD 1
9726_ACEOF
9727
9728
9729cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009730#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009731_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009732
Martin v. Löwis130fb172001-07-19 11:00:41 +00009733 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009734 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009735else
Martin v. Löwis11437992002-04-12 09:54:03 +00009736
9737 echo "$as_me:$LINENO: result: no" >&5
9738echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009739
9740 # Just looking for pthread_create in libpthread is not enough:
9741 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9742 # So we really have to include pthread.h, and then link.
9743 _libs=$LIBS
9744 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9746echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9747 cat >conftest.$ac_ext <<_ACEOF
9748#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009749#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009750#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009751
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009752void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009753#ifdef F77_DUMMY_MAIN
9754# ifdef __cplusplus
9755 extern "C"
9756# endif
9757 int F77_DUMMY_MAIN() { return 1; }
9758#endif
9759int
9760main ()
9761{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009762
9763pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 ;
9765 return 0;
9766}
9767_ACEOF
9768rm -f conftest.$ac_objext conftest$ac_exeext
9769if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9770 (eval $ac_link) 2>&5
9771 ac_status=$?
9772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9773 (exit $ac_status); } &&
9774 { ac_try='test -s conftest$ac_exeext'
9775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9776 (eval $ac_try) 2>&5
9777 ac_status=$?
9778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9779 (exit $ac_status); }; }; then
9780
9781 echo "$as_me:$LINENO: result: yes" >&5
9782echo "${ECHO_T}yes" >&6
9783 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009784#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009785_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009786
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009787 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009788 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009789else
Martin v. Löwis11437992002-04-12 09:54:03 +00009790 echo "$as_me: failed program was:" >&5
9791cat conftest.$ac_ext >&5
9792
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009793 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9795echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9796if test "${ac_cv_func_pthread_detach+set}" = set; then
9797 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009798else
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 cat >conftest.$ac_ext <<_ACEOF
9800#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009801#include "confdefs.h"
9802/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009804#include <assert.h>
9805/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009806#ifdef __cplusplus
9807extern "C"
9808#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009809/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 builtin and then its argument prototype would still apply. */
9811char pthread_detach ();
9812char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009813
Martin v. Löwis11437992002-04-12 09:54:03 +00009814#ifdef F77_DUMMY_MAIN
9815# ifdef __cplusplus
9816 extern "C"
9817# endif
9818 int F77_DUMMY_MAIN() { return 1; }
9819#endif
9820int
9821main ()
9822{
Guido van Rossumad678af1998-10-02 14:42:15 +00009823/* The GNU C library defines this for functions which it implements
9824 to always fail with ENOSYS. Some functions are actually named
9825 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009826#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009827choke me
9828#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009829f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009830#endif
9831
Martin v. Löwis11437992002-04-12 09:54:03 +00009832 ;
9833 return 0;
9834}
9835_ACEOF
9836rm -f conftest.$ac_objext conftest$ac_exeext
9837if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9838 (eval $ac_link) 2>&5
9839 ac_status=$?
9840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9841 (exit $ac_status); } &&
9842 { ac_try='test -s conftest$ac_exeext'
9843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9844 (eval $ac_try) 2>&5
9845 ac_status=$?
9846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9847 (exit $ac_status); }; }; then
9848 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009849else
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 echo "$as_me: failed program was:" >&5
9851cat conftest.$ac_ext >&5
9852ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009853fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009854rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009855fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009856echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9857echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9858if test $ac_cv_func_pthread_detach = yes; then
9859 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009860#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009861_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009862
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009863 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009864 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009865else
Guido van Rossumad678af1998-10-02 14:42:15 +00009866
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9868 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9869echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9870if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9871 echo $ECHO_N "(cached) $ECHO_C" >&6
9872fi
9873echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9874echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009875else
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 # Is the header compilable?
9877echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
9878echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
9879cat >conftest.$ac_ext <<_ACEOF
9880#line $LINENO "configure"
9881#include "confdefs.h"
9882$ac_includes_default
9883#include <kernel/OS.h>
9884_ACEOF
9885rm -f conftest.$ac_objext
9886if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9887 (eval $ac_compile) 2>&5
9888 ac_status=$?
9889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9890 (exit $ac_status); } &&
9891 { ac_try='test -s conftest.$ac_objext'
9892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9893 (eval $ac_try) 2>&5
9894 ac_status=$?
9895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9896 (exit $ac_status); }; }; then
9897 ac_header_compiler=yes
9898else
9899 echo "$as_me: failed program was:" >&5
9900cat conftest.$ac_ext >&5
9901ac_header_compiler=no
9902fi
9903rm -f conftest.$ac_objext conftest.$ac_ext
9904echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9905echo "${ECHO_T}$ac_header_compiler" >&6
9906
9907# Is the header present?
9908echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
9909echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
9910cat >conftest.$ac_ext <<_ACEOF
9911#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009912#include "confdefs.h"
9913#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009914_ACEOF
9915if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9916 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9917 ac_status=$?
9918 egrep -v '^ *\+' conftest.er1 >conftest.err
9919 rm -f conftest.er1
9920 cat conftest.err >&5
9921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9922 (exit $ac_status); } >/dev/null; then
9923 if test -s conftest.err; then
9924 ac_cpp_err=$ac_c_preproc_warn_flag
9925 else
9926 ac_cpp_err=
9927 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009928else
Martin v. Löwis11437992002-04-12 09:54:03 +00009929 ac_cpp_err=yes
9930fi
9931if test -z "$ac_cpp_err"; then
9932 ac_header_preproc=yes
9933else
9934 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009935 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009936 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009937fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009938rm -f conftest.err conftest.$ac_ext
9939echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9940echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009941
Martin v. Löwis11437992002-04-12 09:54:03 +00009942# So? What about this header?
9943case $ac_header_compiler:$ac_header_preproc in
9944 yes:no )
9945 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
9946echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9947 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9948echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9949 no:yes )
9950 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
9951echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
9952 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
9953echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
9954 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9955echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9956esac
9957echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9958echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9959if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9960 echo $ECHO_N "(cached) $ECHO_C" >&6
9961else
9962 ac_cv_header_kernel_OS_h=$ac_header_preproc
9963fi
9964echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9965echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
9966
9967fi
9968if test $ac_cv_header_kernel_OS_h = yes; then
9969 cat >>confdefs.h <<\_ACEOF
9970#define WITH_THREAD 1
9971_ACEOF
9972
9973
9974cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009975#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009976_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009977
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009978 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009979else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009980
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
9982echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
9983if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
9984 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009985else
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009987LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009988cat >conftest.$ac_ext <<_ACEOF
9989#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00009990#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009991
Greg Steinadf63d62000-07-05 10:38:09 +00009992/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009993#ifdef __cplusplus
9994extern "C"
9995#endif
Greg Steinadf63d62000-07-05 10:38:09 +00009996/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009997 builtin and then its argument prototype would still apply. */
9998char pthread_create ();
9999#ifdef F77_DUMMY_MAIN
10000# ifdef __cplusplus
10001 extern "C"
10002# endif
10003 int F77_DUMMY_MAIN() { return 1; }
10004#endif
10005int
10006main ()
10007{
10008pthread_create ();
10009 ;
10010 return 0;
10011}
10012_ACEOF
10013rm -f conftest.$ac_objext conftest$ac_exeext
10014if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10015 (eval $ac_link) 2>&5
10016 ac_status=$?
10017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10018 (exit $ac_status); } &&
10019 { ac_try='test -s conftest$ac_exeext'
10020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10021 (eval $ac_try) 2>&5
10022 ac_status=$?
10023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10024 (exit $ac_status); }; }; then
10025 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010026else
Martin v. Löwis11437992002-04-12 09:54:03 +000010027 echo "$as_me: failed program was:" >&5
10028cat conftest.$ac_ext >&5
10029ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010030fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010031rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10032LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010034echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10035echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10036if test $ac_cv_lib_pthreads_pthread_create = yes; then
10037 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010038#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010039_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010040
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010041 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010042 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010043 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010044else
Greg Steinadf63d62000-07-05 10:38:09 +000010045
Martin v. Löwis11437992002-04-12 09:54:03 +000010046 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10047echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10048if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10049 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010050else
Martin v. Löwis11437992002-04-12 09:54:03 +000010051 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010052LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010053cat >conftest.$ac_ext <<_ACEOF
10054#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010055#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010056
Guido van Rossum49545951997-12-02 19:28:29 +000010057/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010058#ifdef __cplusplus
10059extern "C"
10060#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010061/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010062 builtin and then its argument prototype would still apply. */
10063char pthread_create ();
10064#ifdef F77_DUMMY_MAIN
10065# ifdef __cplusplus
10066 extern "C"
10067# endif
10068 int F77_DUMMY_MAIN() { return 1; }
10069#endif
10070int
10071main ()
10072{
10073pthread_create ();
10074 ;
10075 return 0;
10076}
10077_ACEOF
10078rm -f conftest.$ac_objext conftest$ac_exeext
10079if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10080 (eval $ac_link) 2>&5
10081 ac_status=$?
10082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10083 (exit $ac_status); } &&
10084 { ac_try='test -s conftest$ac_exeext'
10085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10086 (eval $ac_try) 2>&5
10087 ac_status=$?
10088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10089 (exit $ac_status); }; }; then
10090 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010091else
Martin v. Löwis11437992002-04-12 09:54:03 +000010092 echo "$as_me: failed program was:" >&5
10093cat conftest.$ac_ext >&5
10094ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010095fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010096rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10097LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010098fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010099echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10100echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10101if test $ac_cv_lib_c_r_pthread_create = yes; then
10102 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010103#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010104_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010105
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010106 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010107 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010108 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010109else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010110
Martin v. Löwis11437992002-04-12 09:54:03 +000010111 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10112echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10113if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10114 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010115else
Martin v. Löwis11437992002-04-12 09:54:03 +000010116 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010117LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010118cat >conftest.$ac_ext <<_ACEOF
10119#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010120#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010121
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010122/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010123#ifdef __cplusplus
10124extern "C"
10125#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010126/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 builtin and then its argument prototype would still apply. */
10128char __d6_pthread_create ();
10129#ifdef F77_DUMMY_MAIN
10130# ifdef __cplusplus
10131 extern "C"
10132# endif
10133 int F77_DUMMY_MAIN() { return 1; }
10134#endif
10135int
10136main ()
10137{
10138__d6_pthread_create ();
10139 ;
10140 return 0;
10141}
10142_ACEOF
10143rm -f conftest.$ac_objext conftest$ac_exeext
10144if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10145 (eval $ac_link) 2>&5
10146 ac_status=$?
10147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10148 (exit $ac_status); } &&
10149 { ac_try='test -s conftest$ac_exeext'
10150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10151 (eval $ac_try) 2>&5
10152 ac_status=$?
10153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10154 (exit $ac_status); }; }; then
10155 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010156else
Martin v. Löwis11437992002-04-12 09:54:03 +000010157 echo "$as_me: failed program was:" >&5
10158cat conftest.$ac_ext >&5
10159ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010160fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010161rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10162LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010163fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010164echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10165echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10166if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10167 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010168#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010169_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010170
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010171 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010172 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010173 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010174else
Guido van Rossum49545951997-12-02 19:28:29 +000010175
Martin v. Löwis11437992002-04-12 09:54:03 +000010176 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10177echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10178if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10179 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010180else
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010182LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010183cat >conftest.$ac_ext <<_ACEOF
10184#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010185#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010186
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010187/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010188#ifdef __cplusplus
10189extern "C"
10190#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010191/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010192 builtin and then its argument prototype would still apply. */
10193char __pthread_create_system ();
10194#ifdef F77_DUMMY_MAIN
10195# ifdef __cplusplus
10196 extern "C"
10197# endif
10198 int F77_DUMMY_MAIN() { return 1; }
10199#endif
10200int
10201main ()
10202{
10203__pthread_create_system ();
10204 ;
10205 return 0;
10206}
10207_ACEOF
10208rm -f conftest.$ac_objext conftest$ac_exeext
10209if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10210 (eval $ac_link) 2>&5
10211 ac_status=$?
10212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10213 (exit $ac_status); } &&
10214 { ac_try='test -s conftest$ac_exeext'
10215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10216 (eval $ac_try) 2>&5
10217 ac_status=$?
10218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10219 (exit $ac_status); }; }; then
10220 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010221else
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 echo "$as_me: failed program was:" >&5
10223cat conftest.$ac_ext >&5
10224ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010225fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010226rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10227LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010228fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010229echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10230echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10231if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10232 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010233#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010234_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010235
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010236 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010237 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010238 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010239else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010240
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10242echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10243if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10244 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010245else
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010247LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010248cat >conftest.$ac_ext <<_ACEOF
10249#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010250#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010251
Guido van Rossumb93a8621998-05-07 13:27:32 +000010252/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010253#ifdef __cplusplus
10254extern "C"
10255#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010256/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010257 builtin and then its argument prototype would still apply. */
10258char pthread_create ();
10259#ifdef F77_DUMMY_MAIN
10260# ifdef __cplusplus
10261 extern "C"
10262# endif
10263 int F77_DUMMY_MAIN() { return 1; }
10264#endif
10265int
10266main ()
10267{
10268pthread_create ();
10269 ;
10270 return 0;
10271}
10272_ACEOF
10273rm -f conftest.$ac_objext conftest$ac_exeext
10274if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10275 (eval $ac_link) 2>&5
10276 ac_status=$?
10277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10278 (exit $ac_status); } &&
10279 { ac_try='test -s conftest$ac_exeext'
10280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10281 (eval $ac_try) 2>&5
10282 ac_status=$?
10283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10284 (exit $ac_status); }; }; then
10285 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010286else
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 echo "$as_me: failed program was:" >&5
10288cat conftest.$ac_ext >&5
10289ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010290fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010291rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10292LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010293fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010294echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10295echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10296if test $ac_cv_lib_cma_pthread_create = yes; then
10297 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010298#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010299_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010300
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010301 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010302 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010303 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010304else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010305
Martin v. Löwis130fb172001-07-19 11:00:41 +000010306 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010307fi
10308
Guido van Rossum627b2d71993-12-24 10:39:16 +000010309
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010310fi
10311
Guido van Rossum0be3e491997-05-22 20:33:33 +000010312fi
10313
Guido van Rossum49545951997-12-02 19:28:29 +000010314fi
10315
Guido van Rossumb93a8621998-05-07 13:27:32 +000010316fi
10317
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010318fi
10319
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010320
Michael W. Hudson54241132001-12-07 15:38:26 +000010321fi
10322
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010324rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10325fi;
10326fi
10327
10328
10329fi
10330
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010331
Michael W. Hudson54241132001-12-07 15:38:26 +000010332
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010333 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010334 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010335
10336cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010337#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010338_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010339
10340 fi
10341
Martin v. Löwis11437992002-04-12 09:54:03 +000010342 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10343echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10344 if test "${ac_cv_pthread_system_supported+set}" = set; then
10345 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010346else
10347 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010348 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010349else
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 cat >conftest.$ac_ext <<_ACEOF
10351#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010352#include "confdefs.h"
10353#include <pthread.h>
10354 void *foo(void *parm) {
10355 return NULL;
10356 }
10357 main() {
10358 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010359 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010360 if (pthread_attr_init(&attr)) exit(-1);
10361 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010362 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010363 exit(0);
10364 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010365_ACEOF
10366rm -f conftest$ac_exeext
10367if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10368 (eval $ac_link) 2>&5
10369 ac_status=$?
10370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10371 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10373 (eval $ac_try) 2>&5
10374 ac_status=$?
10375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10376 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010377 ac_cv_pthread_system_supported=yes
10378else
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 echo "$as_me: program exited with status $ac_status" >&5
10380echo "$as_me: failed program was:" >&5
10381cat conftest.$ac_ext >&5
10382( exit $ac_status )
10383ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010385rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010386fi
10387
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010388fi
10389
Martin v. Löwis11437992002-04-12 09:54:03 +000010390 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10391echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010392 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010393
10394cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010395#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010396_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010397
10398 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010399
10400for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010401do
Martin v. Löwis11437992002-04-12 09:54:03 +000010402as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10403echo "$as_me:$LINENO: checking for $ac_func" >&5
10404echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10405if eval "test \"\${$as_ac_var+set}\" = set"; then
10406 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010407else
Martin v. Löwis11437992002-04-12 09:54:03 +000010408 cat >conftest.$ac_ext <<_ACEOF
10409#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010410#include "confdefs.h"
10411/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010412 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010413#include <assert.h>
10414/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010415#ifdef __cplusplus
10416extern "C"
10417#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010418/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010419 builtin and then its argument prototype would still apply. */
10420char $ac_func ();
10421char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010422
Martin v. Löwis11437992002-04-12 09:54:03 +000010423#ifdef F77_DUMMY_MAIN
10424# ifdef __cplusplus
10425 extern "C"
10426# endif
10427 int F77_DUMMY_MAIN() { return 1; }
10428#endif
10429int
10430main ()
10431{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010432/* The GNU C library defines this for functions which it implements
10433 to always fail with ENOSYS. Some functions are actually named
10434 something starting with __ and the normal name is an alias. */
10435#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10436choke me
10437#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010438f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010439#endif
10440
Martin v. Löwis11437992002-04-12 09:54:03 +000010441 ;
10442 return 0;
10443}
10444_ACEOF
10445rm -f conftest.$ac_objext conftest$ac_exeext
10446if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10447 (eval $ac_link) 2>&5
10448 ac_status=$?
10449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10450 (exit $ac_status); } &&
10451 { ac_try='test -s conftest$ac_exeext'
10452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10453 (eval $ac_try) 2>&5
10454 ac_status=$?
10455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10456 (exit $ac_status); }; }; then
10457 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010458else
Martin v. Löwis11437992002-04-12 09:54:03 +000010459 echo "$as_me: failed program was:" >&5
10460cat conftest.$ac_ext >&5
10461eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010462fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010463rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010464fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010465echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10466echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10467if test `eval echo '${'$as_ac_var'}'` = yes; then
10468 cat >>confdefs.h <<_ACEOF
10469#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10470_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010471
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010472fi
10473done
10474
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010475 fi
10476
Martin v. Löwis11437992002-04-12 09:54:03 +000010477 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10478echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10479if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10480 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010481else
Martin v. Löwis11437992002-04-12 09:54:03 +000010482 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010483LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010484cat >conftest.$ac_ext <<_ACEOF
10485#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010486#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010487
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010488/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010489#ifdef __cplusplus
10490extern "C"
10491#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010492/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010493 builtin and then its argument prototype would still apply. */
10494char usconfig ();
10495#ifdef F77_DUMMY_MAIN
10496# ifdef __cplusplus
10497 extern "C"
10498# endif
10499 int F77_DUMMY_MAIN() { return 1; }
10500#endif
10501int
10502main ()
10503{
10504usconfig ();
10505 ;
10506 return 0;
10507}
10508_ACEOF
10509rm -f conftest.$ac_objext conftest$ac_exeext
10510if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10511 (eval $ac_link) 2>&5
10512 ac_status=$?
10513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10514 (exit $ac_status); } &&
10515 { ac_try='test -s conftest$ac_exeext'
10516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10517 (eval $ac_try) 2>&5
10518 ac_status=$?
10519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10520 (exit $ac_status); }; }; then
10521 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010522else
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 echo "$as_me: failed program was:" >&5
10524cat conftest.$ac_ext >&5
10525ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010526fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010527rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10528LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010529fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010530echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10531echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10532if test $ac_cv_lib_mpc_usconfig = yes; then
10533 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010534#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010535_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010536
Martin v. Löwis130fb172001-07-19 11:00:41 +000010537 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010538 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010539 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010540fi
10541
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010542
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 if test $posix_threads != "yes"; then
10544 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10545echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10546if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10547 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010548else
Martin v. Löwis11437992002-04-12 09:54:03 +000010549 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010550LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010551cat >conftest.$ac_ext <<_ACEOF
10552#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010553#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010554
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010555/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010556#ifdef __cplusplus
10557extern "C"
10558#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010559/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010560 builtin and then its argument prototype would still apply. */
10561char thr_create ();
10562#ifdef F77_DUMMY_MAIN
10563# ifdef __cplusplus
10564 extern "C"
10565# endif
10566 int F77_DUMMY_MAIN() { return 1; }
10567#endif
10568int
10569main ()
10570{
10571thr_create ();
10572 ;
10573 return 0;
10574}
10575_ACEOF
10576rm -f conftest.$ac_objext conftest$ac_exeext
10577if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10578 (eval $ac_link) 2>&5
10579 ac_status=$?
10580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10581 (exit $ac_status); } &&
10582 { ac_try='test -s conftest$ac_exeext'
10583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10584 (eval $ac_try) 2>&5
10585 ac_status=$?
10586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10587 (exit $ac_status); }; }; then
10588 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010589else
Martin v. Löwis11437992002-04-12 09:54:03 +000010590 echo "$as_me: failed program was:" >&5
10591cat conftest.$ac_ext >&5
10592ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010593fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010594rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10595LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010596fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010597echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10598echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10599if test $ac_cv_lib_thread_thr_create = yes; then
10600 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010601#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010602_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010603
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010604 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010605 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010606 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010607fi
10608
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010609 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010610
Martin v. Löwis130fb172001-07-19 11:00:41 +000010611 if test "$USE_THREAD_MODULE" != "#"
10612 then
10613 # If the above checks didn't disable threads, (at least) OSF1
10614 # needs this '-threads' argument during linking.
10615 case $ac_sys_system in
10616 OSF1) LDLAST=-threads;;
10617 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010618 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010619fi
10620
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010621# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010622
10623
10624echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10625echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010626# Check whether --enable-ipv6 or --disable-ipv6 was given.
10627if test "${enable_ipv6+set}" = set; then
10628 enableval="$enable_ipv6"
10629 case "$enableval" in
10630 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010631 echo "$as_me:$LINENO: result: no" >&5
10632echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010633 ipv6=no
10634 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010635 *) echo "$as_me:$LINENO: result: yes" >&5
10636echo "${ECHO_T}yes" >&6
10637 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010638#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010639_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010640
10641 ipv6=yes
10642 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010643 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010644else
Martin v. Löwis11437992002-04-12 09:54:03 +000010645
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010646 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010647 echo "$as_me:$LINENO: result: no" >&5
10648echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010649 ipv6=no
10650
10651else
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 cat >conftest.$ac_ext <<_ACEOF
10653#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010654#include "confdefs.h"
10655 /* AF_INET6 available check */
10656#include <sys/types.h>
10657#include <sys/socket.h>
10658main()
10659{
10660 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10661 exit(1);
10662 else
10663 exit(0);
10664}
10665
Martin v. Löwis11437992002-04-12 09:54:03 +000010666_ACEOF
10667rm -f conftest$ac_exeext
10668if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10669 (eval $ac_link) 2>&5
10670 ac_status=$?
10671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10672 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10674 (eval $ac_try) 2>&5
10675 ac_status=$?
10676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10677 (exit $ac_status); }; }; then
10678 echo "$as_me:$LINENO: result: yes" >&5
10679echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010680 ipv6=yes
10681else
Martin v. Löwis11437992002-04-12 09:54:03 +000010682 echo "$as_me: program exited with status $ac_status" >&5
10683echo "$as_me: failed program was:" >&5
10684cat conftest.$ac_ext >&5
10685( exit $ac_status )
10686echo "$as_me:$LINENO: result: no" >&5
10687echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010688 ipv6=no
10689fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010690rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010691fi
10692
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010693if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010694 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10695echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10696 cat >conftest.$ac_ext <<_ACEOF
10697#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010698#include "confdefs.h"
10699#include <sys/types.h>
10700#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010701#ifdef F77_DUMMY_MAIN
10702# ifdef __cplusplus
10703 extern "C"
10704# endif
10705 int F77_DUMMY_MAIN() { return 1; }
10706#endif
10707int
10708main ()
10709{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010710struct sockaddr_in6 x;
10711x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010712 ;
10713 return 0;
10714}
10715_ACEOF
10716rm -f conftest.$ac_objext
10717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10718 (eval $ac_compile) 2>&5
10719 ac_status=$?
10720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10721 (exit $ac_status); } &&
10722 { ac_try='test -s conftest.$ac_objext'
10723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10724 (eval $ac_try) 2>&5
10725 ac_status=$?
10726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10727 (exit $ac_status); }; }; then
10728 echo "$as_me:$LINENO: result: yes" >&5
10729echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010730 ipv6=yes
10731else
Martin v. Löwis11437992002-04-12 09:54:03 +000010732 echo "$as_me: failed program was:" >&5
10733cat conftest.$ac_ext >&5
10734echo "$as_me:$LINENO: result: no" >&5
10735echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010736 ipv6=no
10737fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010738rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010739fi
10740
10741if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010742 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010743#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010744_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010745
10746fi
10747
Martin v. Löwis11437992002-04-12 09:54:03 +000010748fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010749
10750ipv6type=unknown
10751ipv6lib=none
10752ipv6trylibc=no
10753
10754if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10756echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010757 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10758 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010759 case $i in
10760 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010761 cat >conftest.$ac_ext <<_ACEOF
10762#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010764
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010765#include <netinet/in.h>
10766#ifdef IPV6_INRIA_VERSION
10767yes
10768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010769_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10771 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010772 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010773fi
10774rm -f conftest*
10775
10776 ;;
10777 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010778 cat >conftest.$ac_ext <<_ACEOF
10779#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010780#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010781
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010782#include <netinet/in.h>
10783#ifdef __KAME__
10784yes
10785#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010786_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10788 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789 ipv6type=$i;
10790 ipv6lib=inet6
10791 ipv6libdir=/usr/local/v6/lib
10792 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793fi
10794rm -f conftest*
10795
10796 ;;
10797 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 cat >conftest.$ac_ext <<_ACEOF
10799#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010801
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802#include <features.h>
10803#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10804yes
10805#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010806_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10808 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809 ipv6type=$i;
10810 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010811fi
10812rm -f conftest*
10813
10814 ;;
10815 linux-inet6)
10816 if test -d /usr/inet6; then
10817 ipv6type=$i
10818 ipv6lib=inet6
10819 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010820 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821 fi
10822 ;;
10823 solaris)
10824 if test -f /etc/netconfig; then
10825 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10826 ipv6type=$i
10827 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010828 fi
10829 fi
10830 ;;
10831 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010832 cat >conftest.$ac_ext <<_ACEOF
10833#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010834#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010835
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010836#include <sys/param.h>
10837#ifdef _TOSHIBA_INET6
10838yes
10839#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010840_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10842 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843 ipv6type=$i;
10844 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010845 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846fi
10847rm -f conftest*
10848
10849 ;;
10850 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000010851 cat >conftest.$ac_ext <<_ACEOF
10852#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010853#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010854
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010855#include </usr/local/v6/include/sys/v6config.h>
10856#ifdef __V6D__
10857yes
10858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010859_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10861 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010862 ipv6type=$i;
10863 ipv6lib=v6;
10864 ipv6libdir=/usr/local/v6/lib;
10865 OPT="-I/usr/local/v6/include $OPT"
10866fi
10867rm -f conftest*
10868
10869 ;;
10870 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000010871 cat >conftest.$ac_ext <<_ACEOF
10872#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010874
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010875#include <sys/param.h>
10876#ifdef _ZETA_MINAMI_INET6
10877yes
10878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010879_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10881 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882 ipv6type=$i;
10883 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010884 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010885fi
10886rm -f conftest*
10887
10888 ;;
10889 esac
10890 if test "$ipv6type" != "unknown"; then
10891 break
10892 fi
10893 done
Martin v. Löwis11437992002-04-12 09:54:03 +000010894 echo "$as_me:$LINENO: result: $ipv6type" >&5
10895echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010896fi
10897
10898if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10899 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10900 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10901 echo "using lib$ipv6lib"
10902 else
10903 if test $ipv6trylibc = "yes"; then
10904 echo "using libc"
10905 else
10906 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10907 echo "You need to fetch lib$ipv6lib.a from appropriate"
10908 echo 'ipv6 kit and compile beforehand.'
10909 exit 1
10910 fi
10911 fi
10912fi
10913
Barry Warsawef82cd72000-06-30 16:21:01 +000010914# Check for GC support
Martin v. Löwis11437992002-04-12 09:54:03 +000010915echo "$as_me:$LINENO: checking for --with-cycle-gc" >&5
10916echo $ECHO_N "checking for --with-cycle-gc... $ECHO_C" >&6
10917
Barry Warsawef82cd72000-06-30 16:21:01 +000010918# Check whether --with-cycle-gc or --without-cycle-gc was given.
10919if test "${with_cycle_gc+set}" = set; then
10920 withval="$with_cycle_gc"
Barry Warsawef82cd72000-06-30 16:21:01 +000010921
Martin v. Löwis11437992002-04-12 09:54:03 +000010922fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000010923
10924if test -z "$with_cycle_gc"
10925then with_cycle_gc="yes"
10926fi
Neil Schemenauercf229462001-08-29 23:58:47 +000010927if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +000010928then
Martin v. Löwis11437992002-04-12 09:54:03 +000010929
10930cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010931#define WITH_CYCLE_GC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010932_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010933
10934fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010935echo "$as_me:$LINENO: result: $with_cycle_gc" >&5
10936echo "${ECHO_T}$with_cycle_gc" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000010937
Jack Jansen7b8c7542002-04-14 20:12:41 +000010938# Check for universal newline support
10939echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
10940echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
10941
10942# Check whether --with-universal-newlines or --without-universal-newlines was given.
10943if test "${with_universal_newlines+set}" = set; then
10944 withval="$with_universal_newlines"
10945
10946fi;
10947
10948if test -z "$with_universal_newlines"
10949then with_universal_newlines="yes"
10950fi
10951if test "$with_universal_newlines" != "no"
10952then
Martin v. Löwise8aea582002-04-16 05:51:02 +000010953
10954cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000010955#define WITH_UNIVERSAL_NEWLINES 1
10956_ACEOF
10957
10958fi
10959echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
10960echo "${ECHO_T}$with_universal_newlines" >&6
10961
Neil Schemenauera35c6882001-02-27 04:45:05 +000010962# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000010963echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
10964echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
10965
Neil Schemenauera35c6882001-02-27 04:45:05 +000010966# Check whether --with-pymalloc or --without-pymalloc was given.
10967if test "${with_pymalloc+set}" = set; then
10968 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000010969
Martin v. Löwis11437992002-04-12 09:54:03 +000010970fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000010971
Neil Schemenauer16c22972002-03-22 15:34:49 +000010972if test -z "$with_pymalloc"
10973then with_pymalloc="yes"
10974fi
10975if test "$with_pymalloc" != "no"
10976then
Martin v. Löwis11437992002-04-12 09:54:03 +000010977
10978cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000010979#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010980_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000010981
10982fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010983echo "$as_me:$LINENO: result: $with_pymalloc" >&5
10984echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000010985
Barry Warsawef82cd72000-06-30 16:21:01 +000010986# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000010987echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
10988echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
10989
Barry Warsawef82cd72000-06-30 16:21:01 +000010990# Check whether --with-wctype-functions or --without-wctype-functions was given.
10991if test "${with_wctype_functions+set}" = set; then
10992 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000010993
Barry Warsawef82cd72000-06-30 16:21:01 +000010994if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010995then
10996
10997cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010998#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010999_ACEOF
11000
11001 echo "$as_me:$LINENO: result: yes" >&5
11002echo "${ECHO_T}yes" >&6
11003else echo "$as_me:$LINENO: result: no" >&5
11004echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011005fi
11006else
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 echo "$as_me:$LINENO: result: no" >&5
11008echo "${ECHO_T}no" >&6
11009fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011010
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011011# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011012
Guido van Rossum98935bf2001-09-05 19:13:16 +000011013DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011014
Martin v. Löwis11437992002-04-12 09:54:03 +000011015echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11016echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11017
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011018# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011019if test "${with_sgi_dl+set}" = set; then
11020 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011021
11022echo "$as_me:$LINENO: result: $withval" >&5
11023echo "${ECHO_T}$withval" >&6
11024
11025cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011026#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011027_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011028
Guido van Rossume97ee181999-12-20 21:27:22 +000011029DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011030dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011031if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011032then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011033else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11034echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11035 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011036fi
11037DLINCLDIR=${dldir}
11038LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011039else
Martin v. Löwis11437992002-04-12 09:54:03 +000011040 echo "$as_me:$LINENO: result: no" >&5
11041echo "${ECHO_T}no" >&6
11042fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011043
Martin v. Löwis11437992002-04-12 09:54:03 +000011044echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11045echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011046
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011047# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011048if test "${with_dl_dld+set}" = set; then
11049 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011050
11051echo "$as_me:$LINENO: result: $withval" >&5
11052echo "${ECHO_T}$withval" >&6
11053
11054cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011055#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011056_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011057
Guido van Rossume97ee181999-12-20 21:27:22 +000011058DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011059dldir=`echo "$withval" | sed 's/,.*//'`
11060dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011061if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011062then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011063else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11064echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11065 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011066fi
11067DLINCLDIR=${dldir}
11068LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011069else
Martin v. Löwis11437992002-04-12 09:54:03 +000011070 echo "$as_me:$LINENO: result: no" >&5
11071echo "${ECHO_T}no" >&6
11072fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011073
Guido van Rossume97ee181999-12-20 21:27:22 +000011074# the dlopen() function means we might want to use dynload_shlib.o. some
11075# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011076
Thomas Wouters3a584202000-08-05 23:28:51 +000011077for ac_func in dlopen
11078do
Martin v. Löwis11437992002-04-12 09:54:03 +000011079as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11080echo "$as_me:$LINENO: checking for $ac_func" >&5
11081echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11082if eval "test \"\${$as_ac_var+set}\" = set"; then
11083 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011084else
Martin v. Löwis11437992002-04-12 09:54:03 +000011085 cat >conftest.$ac_ext <<_ACEOF
11086#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011087#include "confdefs.h"
11088/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011089 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011090#include <assert.h>
11091/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011092#ifdef __cplusplus
11093extern "C"
11094#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011095/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011096 builtin and then its argument prototype would still apply. */
11097char $ac_func ();
11098char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011099
Martin v. Löwis11437992002-04-12 09:54:03 +000011100#ifdef F77_DUMMY_MAIN
11101# ifdef __cplusplus
11102 extern "C"
11103# endif
11104 int F77_DUMMY_MAIN() { return 1; }
11105#endif
11106int
11107main ()
11108{
Guido van Rossume97ee181999-12-20 21:27:22 +000011109/* The GNU C library defines this for functions which it implements
11110 to always fail with ENOSYS. Some functions are actually named
11111 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011112#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011113choke me
11114#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011115f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011116#endif
11117
Martin v. Löwis11437992002-04-12 09:54:03 +000011118 ;
11119 return 0;
11120}
11121_ACEOF
11122rm -f conftest.$ac_objext conftest$ac_exeext
11123if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11124 (eval $ac_link) 2>&5
11125 ac_status=$?
11126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11127 (exit $ac_status); } &&
11128 { ac_try='test -s conftest$ac_exeext'
11129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11130 (eval $ac_try) 2>&5
11131 ac_status=$?
11132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11133 (exit $ac_status); }; }; then
11134 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011135else
Martin v. Löwis11437992002-04-12 09:54:03 +000011136 echo "$as_me: failed program was:" >&5
11137cat conftest.$ac_ext >&5
11138eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011139fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011140rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011141fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011142echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11143echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11144if test `eval echo '${'$as_ac_var'}'` = yes; then
11145 cat >>confdefs.h <<_ACEOF
11146#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11147_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011148
Guido van Rossume97ee181999-12-20 21:27:22 +000011149fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011150done
Guido van Rossume97ee181999-12-20 21:27:22 +000011151
Michael W. Hudson54241132001-12-07 15:38:26 +000011152
Guido van Rossume97ee181999-12-20 21:27:22 +000011153# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11154# loading of modules.
11155
Martin v. Löwis11437992002-04-12 09:54:03 +000011156echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11157echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011158if test -z "$DYNLOADFILE"
11159then
11160 case $ac_sys_system/$ac_sys_release in
11161 AIX*) DYNLOADFILE="dynload_aix.o";;
11162 BeOS*) DYNLOADFILE="dynload_beos.o";;
11163 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011164 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011165 *)
11166 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11167 # out any dynamic loading
11168 if test "$ac_cv_func_dlopen" = yes
11169 then DYNLOADFILE="dynload_shlib.o"
11170 else DYNLOADFILE="dynload_stub.o"
11171 fi
11172 ;;
11173 esac
11174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011175echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11176echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011177if test "$DYNLOADFILE" != "dynload_stub.o"
11178then
Martin v. Löwis11437992002-04-12 09:54:03 +000011179
11180cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011181#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011182_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011183
11184fi
11185
Neil Schemenauer4e425612001-06-19 15:44:15 +000011186# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11187
Michael W. Hudson54241132001-12-07 15:38:26 +000011188
Martin v. Löwis11437992002-04-12 09:54:03 +000011189echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11190echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011191if test -z "$MACHDEP_OBJS"
11192then
Jack Jansene578a632001-08-15 01:27:14 +000011193 MACHDEP_OBJS=$extra_machdep_objs
11194else
11195 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011196fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011197echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11198echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011199
Guido van Rossum627b2d71993-12-24 10:39:16 +000011200# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011201
11202
11203
11204
11205
11206
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
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011274
Fred Drake6b3cc522002-04-15 19:20:27 +000011275
Martin v. Löwis244edc82001-10-04 22:44:26 +000011276for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011277 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +000011278 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011279 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011280 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011281 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011282 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011283 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +000011284 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +000011285 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011286 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011287do
Martin v. Löwis11437992002-04-12 09:54:03 +000011288as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11289echo "$as_me:$LINENO: checking for $ac_func" >&5
11290echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11291if eval "test \"\${$as_ac_var+set}\" = set"; then
11292 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011293else
Martin v. Löwis11437992002-04-12 09:54:03 +000011294 cat >conftest.$ac_ext <<_ACEOF
11295#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011296#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011297/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011298 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011299#include <assert.h>
11300/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011301#ifdef __cplusplus
11302extern "C"
11303#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011304/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011305 builtin and then its argument prototype would still apply. */
11306char $ac_func ();
11307char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011308
Martin v. Löwis11437992002-04-12 09:54:03 +000011309#ifdef F77_DUMMY_MAIN
11310# ifdef __cplusplus
11311 extern "C"
11312# endif
11313 int F77_DUMMY_MAIN() { return 1; }
11314#endif
11315int
11316main ()
11317{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011318/* The GNU C library defines this for functions which it implements
11319 to always fail with ENOSYS. Some functions are actually named
11320 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011321#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011322choke me
11323#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011324f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011325#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011326
Martin v. Löwis11437992002-04-12 09:54:03 +000011327 ;
11328 return 0;
11329}
11330_ACEOF
11331rm -f conftest.$ac_objext conftest$ac_exeext
11332if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11333 (eval $ac_link) 2>&5
11334 ac_status=$?
11335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11336 (exit $ac_status); } &&
11337 { ac_try='test -s conftest$ac_exeext'
11338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11339 (eval $ac_try) 2>&5
11340 ac_status=$?
11341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11342 (exit $ac_status); }; }; then
11343 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011344else
Martin v. Löwis11437992002-04-12 09:54:03 +000011345 echo "$as_me: failed program was:" >&5
11346cat conftest.$ac_ext >&5
11347eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011349rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011350fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011351echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11352echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11353if test `eval echo '${'$as_ac_var'}'` = yes; then
11354 cat >>confdefs.h <<_ACEOF
11355#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11356_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011357
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011358fi
11359done
11360
Michael W. Hudson54241132001-12-07 15:38:26 +000011361
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011362# check for openpty and forkpty
11363
Martin v. Löwis11437992002-04-12 09:54:03 +000011364
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011365for ac_func in openpty
11366do
Martin v. Löwis11437992002-04-12 09:54:03 +000011367as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11368echo "$as_me:$LINENO: checking for $ac_func" >&5
11369echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11370if eval "test \"\${$as_ac_var+set}\" = set"; then
11371 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011372else
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 cat >conftest.$ac_ext <<_ACEOF
11374#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011375#include "confdefs.h"
11376/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011378#include <assert.h>
11379/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011380#ifdef __cplusplus
11381extern "C"
11382#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011383/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011384 builtin and then its argument prototype would still apply. */
11385char $ac_func ();
11386char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011387
Martin v. Löwis11437992002-04-12 09:54:03 +000011388#ifdef F77_DUMMY_MAIN
11389# ifdef __cplusplus
11390 extern "C"
11391# endif
11392 int F77_DUMMY_MAIN() { return 1; }
11393#endif
11394int
11395main ()
11396{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011397/* The GNU C library defines this for functions which it implements
11398 to always fail with ENOSYS. Some functions are actually named
11399 something starting with __ and the normal name is an alias. */
11400#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11401choke me
11402#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011403f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011404#endif
11405
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 ;
11407 return 0;
11408}
11409_ACEOF
11410rm -f conftest.$ac_objext conftest$ac_exeext
11411if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11412 (eval $ac_link) 2>&5
11413 ac_status=$?
11414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11415 (exit $ac_status); } &&
11416 { ac_try='test -s conftest$ac_exeext'
11417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11418 (eval $ac_try) 2>&5
11419 ac_status=$?
11420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11421 (exit $ac_status); }; }; then
11422 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011423else
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 echo "$as_me: failed program was:" >&5
11425cat conftest.$ac_ext >&5
11426eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011428rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011429fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011430echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11431echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11432if test `eval echo '${'$as_ac_var'}'` = yes; then
11433 cat >>confdefs.h <<_ACEOF
11434#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11435_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011436
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011437else
Martin v. Löwis11437992002-04-12 09:54:03 +000011438 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11439echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11440if test "${ac_cv_lib_util_openpty+set}" = set; then
11441 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011442else
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011444LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011445cat >conftest.$ac_ext <<_ACEOF
11446#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011447#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011448
Fred Drake8cef4cf2000-06-28 16:40:38 +000011449/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011450#ifdef __cplusplus
11451extern "C"
11452#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011453/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 builtin and then its argument prototype would still apply. */
11455char openpty ();
11456#ifdef F77_DUMMY_MAIN
11457# ifdef __cplusplus
11458 extern "C"
11459# endif
11460 int F77_DUMMY_MAIN() { return 1; }
11461#endif
11462int
11463main ()
11464{
11465openpty ();
11466 ;
11467 return 0;
11468}
11469_ACEOF
11470rm -f conftest.$ac_objext conftest$ac_exeext
11471if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11472 (eval $ac_link) 2>&5
11473 ac_status=$?
11474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11475 (exit $ac_status); } &&
11476 { ac_try='test -s conftest$ac_exeext'
11477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11478 (eval $ac_try) 2>&5
11479 ac_status=$?
11480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11481 (exit $ac_status); }; }; then
11482 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011483else
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 echo "$as_me: failed program was:" >&5
11485cat conftest.$ac_ext >&5
11486ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011488rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11489LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011490fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011491echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11492echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11493if test $ac_cv_lib_util_openpty = yes; then
11494 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011495#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011496_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011497 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011498fi
11499
11500fi
11501done
11502
Martin v. Löwis11437992002-04-12 09:54:03 +000011503
Fred Drake8cef4cf2000-06-28 16:40:38 +000011504for ac_func in forkpty
11505do
Martin v. Löwis11437992002-04-12 09:54:03 +000011506as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11507echo "$as_me:$LINENO: checking for $ac_func" >&5
11508echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11509if eval "test \"\${$as_ac_var+set}\" = set"; then
11510 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011511else
Martin v. Löwis11437992002-04-12 09:54:03 +000011512 cat >conftest.$ac_ext <<_ACEOF
11513#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011514#include "confdefs.h"
11515/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011516 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011517#include <assert.h>
11518/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011519#ifdef __cplusplus
11520extern "C"
11521#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011522/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 builtin and then its argument prototype would still apply. */
11524char $ac_func ();
11525char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011526
Martin v. Löwis11437992002-04-12 09:54:03 +000011527#ifdef F77_DUMMY_MAIN
11528# ifdef __cplusplus
11529 extern "C"
11530# endif
11531 int F77_DUMMY_MAIN() { return 1; }
11532#endif
11533int
11534main ()
11535{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011536/* The GNU C library defines this for functions which it implements
11537 to always fail with ENOSYS. Some functions are actually named
11538 something starting with __ and the normal name is an alias. */
11539#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11540choke me
11541#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011542f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011543#endif
11544
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 ;
11546 return 0;
11547}
11548_ACEOF
11549rm -f conftest.$ac_objext conftest$ac_exeext
11550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11551 (eval $ac_link) 2>&5
11552 ac_status=$?
11553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11554 (exit $ac_status); } &&
11555 { ac_try='test -s conftest$ac_exeext'
11556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11557 (eval $ac_try) 2>&5
11558 ac_status=$?
11559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11560 (exit $ac_status); }; }; then
11561 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011562else
Martin v. Löwis11437992002-04-12 09:54:03 +000011563 echo "$as_me: failed program was:" >&5
11564cat conftest.$ac_ext >&5
11565eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011567rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011568fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011569echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11570echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11571if test `eval echo '${'$as_ac_var'}'` = yes; then
11572 cat >>confdefs.h <<_ACEOF
11573#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11574_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011575
Fred Drake8cef4cf2000-06-28 16:40:38 +000011576else
Martin v. Löwis11437992002-04-12 09:54:03 +000011577 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11578echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11579if test "${ac_cv_lib_util_forkpty+set}" = set; then
11580 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011581else
Martin v. Löwis11437992002-04-12 09:54:03 +000011582 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011583LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011584cat >conftest.$ac_ext <<_ACEOF
11585#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011586#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011587
Fred Drake8cef4cf2000-06-28 16:40:38 +000011588/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011589#ifdef __cplusplus
11590extern "C"
11591#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011592/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011593 builtin and then its argument prototype would still apply. */
11594char forkpty ();
11595#ifdef F77_DUMMY_MAIN
11596# ifdef __cplusplus
11597 extern "C"
11598# endif
11599 int F77_DUMMY_MAIN() { return 1; }
11600#endif
11601int
11602main ()
11603{
11604forkpty ();
11605 ;
11606 return 0;
11607}
11608_ACEOF
11609rm -f conftest.$ac_objext conftest$ac_exeext
11610if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11611 (eval $ac_link) 2>&5
11612 ac_status=$?
11613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11614 (exit $ac_status); } &&
11615 { ac_try='test -s conftest$ac_exeext'
11616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11617 (eval $ac_try) 2>&5
11618 ac_status=$?
11619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11620 (exit $ac_status); }; }; then
11621 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011622else
Martin v. Löwis11437992002-04-12 09:54:03 +000011623 echo "$as_me: failed program was:" >&5
11624cat conftest.$ac_ext >&5
11625ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011626fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011627rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11628LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011630echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11631echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11632if test $ac_cv_lib_util_forkpty = yes; then
11633 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011634#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011635_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011636 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011637fi
11638
11639fi
11640done
11641
Jack Jansendd19cf82001-12-06 22:36:17 +000011642
Michael W. Hudson54241132001-12-07 15:38:26 +000011643# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011644
11645
11646
11647
11648
11649
Fred Drake8cef4cf2000-06-28 16:40:38 +000011650for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11651do
Martin v. Löwis11437992002-04-12 09:54:03 +000011652as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11653echo "$as_me:$LINENO: checking for $ac_func" >&5
11654echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11655if eval "test \"\${$as_ac_var+set}\" = set"; then
11656 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011657else
Martin v. Löwis11437992002-04-12 09:54:03 +000011658 cat >conftest.$ac_ext <<_ACEOF
11659#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011660#include "confdefs.h"
11661/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011662 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011663#include <assert.h>
11664/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011665#ifdef __cplusplus
11666extern "C"
11667#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011668/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011669 builtin and then its argument prototype would still apply. */
11670char $ac_func ();
11671char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011672
Martin v. Löwis11437992002-04-12 09:54:03 +000011673#ifdef F77_DUMMY_MAIN
11674# ifdef __cplusplus
11675 extern "C"
11676# endif
11677 int F77_DUMMY_MAIN() { return 1; }
11678#endif
11679int
11680main ()
11681{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011682/* The GNU C library defines this for functions which it implements
11683 to always fail with ENOSYS. Some functions are actually named
11684 something starting with __ and the normal name is an alias. */
11685#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11686choke me
11687#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011688f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011689#endif
11690
Martin v. Löwis11437992002-04-12 09:54:03 +000011691 ;
11692 return 0;
11693}
11694_ACEOF
11695rm -f conftest.$ac_objext conftest$ac_exeext
11696if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11697 (eval $ac_link) 2>&5
11698 ac_status=$?
11699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11700 (exit $ac_status); } &&
11701 { ac_try='test -s conftest$ac_exeext'
11702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11703 (eval $ac_try) 2>&5
11704 ac_status=$?
11705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11706 (exit $ac_status); }; }; then
11707 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011708else
Martin v. Löwis11437992002-04-12 09:54:03 +000011709 echo "$as_me: failed program was:" >&5
11710cat conftest.$ac_ext >&5
11711eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011712fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011713rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011714fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011715echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11716echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11717if test `eval echo '${'$as_ac_var'}'` = yes; then
11718 cat >>confdefs.h <<_ACEOF
11719#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11720_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011721
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011722fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011723done
11724
Michael W. Hudson54241132001-12-07 15:38:26 +000011725
Martin v. Löwis11437992002-04-12 09:54:03 +000011726
11727
11728
11729
11730
Martin v. Löwis1142de32002-03-29 16:28:31 +000011731for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011732do
Martin v. Löwis11437992002-04-12 09:54:03 +000011733as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11734echo "$as_me:$LINENO: checking for $ac_func" >&5
11735echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11736if eval "test \"\${$as_ac_var+set}\" = set"; then
11737 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011738else
Martin v. Löwis11437992002-04-12 09:54:03 +000011739 cat >conftest.$ac_ext <<_ACEOF
11740#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011741#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011742/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011743 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011744#include <assert.h>
11745/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011746#ifdef __cplusplus
11747extern "C"
11748#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011749/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011750 builtin and then its argument prototype would still apply. */
11751char $ac_func ();
11752char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011753
Martin v. Löwis11437992002-04-12 09:54:03 +000011754#ifdef F77_DUMMY_MAIN
11755# ifdef __cplusplus
11756 extern "C"
11757# endif
11758 int F77_DUMMY_MAIN() { return 1; }
11759#endif
11760int
11761main ()
11762{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011763/* The GNU C library defines this for functions which it implements
11764 to always fail with ENOSYS. Some functions are actually named
11765 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011766#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011767choke me
11768#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011769f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011770#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011771
Martin v. Löwis11437992002-04-12 09:54:03 +000011772 ;
11773 return 0;
11774}
11775_ACEOF
11776rm -f conftest.$ac_objext conftest$ac_exeext
11777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11778 (eval $ac_link) 2>&5
11779 ac_status=$?
11780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11781 (exit $ac_status); } &&
11782 { ac_try='test -s conftest$ac_exeext'
11783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11784 (eval $ac_try) 2>&5
11785 ac_status=$?
11786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11787 (exit $ac_status); }; }; then
11788 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011789else
Martin v. Löwis11437992002-04-12 09:54:03 +000011790 echo "$as_me: failed program was:" >&5
11791cat conftest.$ac_ext >&5
11792eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011793fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011794rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011795fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011796echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11797echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11798if test `eval echo '${'$as_ac_var'}'` = yes; then
11799 cat >>confdefs.h <<_ACEOF
11800#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11801_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011802
Martin v. Löwis1142de32002-03-29 16:28:31 +000011803else
Martin v. Löwis11437992002-04-12 09:54:03 +000011804 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011805fi
11806done
11807
11808
Martin v. Löwis11437992002-04-12 09:54:03 +000011809
Martin v. Löwis1142de32002-03-29 16:28:31 +000011810for ac_func in getpgrp
11811do
Martin v. Löwis11437992002-04-12 09:54:03 +000011812as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11813echo "$as_me:$LINENO: checking for $ac_func" >&5
11814echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11815if eval "test \"\${$as_ac_var+set}\" = set"; then
11816 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011817else
Martin v. Löwis11437992002-04-12 09:54:03 +000011818 cat >conftest.$ac_ext <<_ACEOF
11819#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011820#include "confdefs.h"
11821/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011822 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011823#include <assert.h>
11824/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011825#ifdef __cplusplus
11826extern "C"
11827#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011828/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011829 builtin and then its argument prototype would still apply. */
11830char $ac_func ();
11831char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011832
Martin v. Löwis11437992002-04-12 09:54:03 +000011833#ifdef F77_DUMMY_MAIN
11834# ifdef __cplusplus
11835 extern "C"
11836# endif
11837 int F77_DUMMY_MAIN() { return 1; }
11838#endif
11839int
11840main ()
11841{
Martin v. Löwis1142de32002-03-29 16:28:31 +000011842/* The GNU C library defines this for functions which it implements
11843 to always fail with ENOSYS. Some functions are actually named
11844 something starting with __ and the normal name is an alias. */
11845#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11846choke me
11847#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011848f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000011849#endif
11850
Martin v. Löwis11437992002-04-12 09:54:03 +000011851 ;
11852 return 0;
11853}
11854_ACEOF
11855rm -f conftest.$ac_objext conftest$ac_exeext
11856if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11857 (eval $ac_link) 2>&5
11858 ac_status=$?
11859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11860 (exit $ac_status); } &&
11861 { ac_try='test -s conftest$ac_exeext'
11862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11863 (eval $ac_try) 2>&5
11864 ac_status=$?
11865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11866 (exit $ac_status); }; }; then
11867 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011868else
Martin v. Löwis11437992002-04-12 09:54:03 +000011869 echo "$as_me: failed program was:" >&5
11870cat conftest.$ac_ext >&5
11871eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011872fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011873rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011874fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011875echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11876echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11877if test `eval echo '${'$as_ac_var'}'` = yes; then
11878 cat >>confdefs.h <<_ACEOF
11879#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11880_ACEOF
11881 cat >conftest.$ac_ext <<_ACEOF
11882#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011883#include "confdefs.h"
11884#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011885#ifdef F77_DUMMY_MAIN
11886# ifdef __cplusplus
11887 extern "C"
11888# endif
11889 int F77_DUMMY_MAIN() { return 1; }
11890#endif
11891int
11892main ()
11893{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011894getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011895 ;
11896 return 0;
11897}
11898_ACEOF
11899rm -f conftest.$ac_objext
11900if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11901 (eval $ac_compile) 2>&5
11902 ac_status=$?
11903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11904 (exit $ac_status); } &&
11905 { ac_try='test -s conftest.$ac_objext'
11906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11907 (eval $ac_try) 2>&5
11908 ac_status=$?
11909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11910 (exit $ac_status); }; }; then
11911
11912cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011913#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011914_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011915
Martin v. Löwis11437992002-04-12 09:54:03 +000011916
Guido van Rossumf78abae1997-01-21 22:02:36 +000011917else
Martin v. Löwis11437992002-04-12 09:54:03 +000011918 echo "$as_me: failed program was:" >&5
11919cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000011920fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011921rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011922
Guido van Rossum627b2d71993-12-24 10:39:16 +000011923fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011924done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011925
Martin v. Löwis11437992002-04-12 09:54:03 +000011926
Thomas Wouters3a584202000-08-05 23:28:51 +000011927for ac_func in setpgrp
11928do
Martin v. Löwis11437992002-04-12 09:54:03 +000011929as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11930echo "$as_me:$LINENO: checking for $ac_func" >&5
11931echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11932if eval "test \"\${$as_ac_var+set}\" = set"; then
11933 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011934else
Martin v. Löwis11437992002-04-12 09:54:03 +000011935 cat >conftest.$ac_ext <<_ACEOF
11936#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011937#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011938/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011939 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011940#include <assert.h>
11941/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011942#ifdef __cplusplus
11943extern "C"
11944#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011945/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011946 builtin and then its argument prototype would still apply. */
11947char $ac_func ();
11948char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011949
Martin v. Löwis11437992002-04-12 09:54:03 +000011950#ifdef F77_DUMMY_MAIN
11951# ifdef __cplusplus
11952 extern "C"
11953# endif
11954 int F77_DUMMY_MAIN() { return 1; }
11955#endif
11956int
11957main ()
11958{
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011959/* The GNU C library defines this for functions which it implements
11960 to always fail with ENOSYS. Some functions are actually named
11961 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011962#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011963choke me
11964#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011965f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011966#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011967
Martin v. Löwis11437992002-04-12 09:54:03 +000011968 ;
11969 return 0;
11970}
11971_ACEOF
11972rm -f conftest.$ac_objext conftest$ac_exeext
11973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11974 (eval $ac_link) 2>&5
11975 ac_status=$?
11976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11977 (exit $ac_status); } &&
11978 { ac_try='test -s conftest$ac_exeext'
11979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11980 (eval $ac_try) 2>&5
11981 ac_status=$?
11982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11983 (exit $ac_status); }; }; then
11984 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011985else
Martin v. Löwis11437992002-04-12 09:54:03 +000011986 echo "$as_me: failed program was:" >&5
11987cat conftest.$ac_ext >&5
11988eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011989fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011990rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011991fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011992echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11993echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11994if test `eval echo '${'$as_ac_var'}'` = yes; then
11995 cat >>confdefs.h <<_ACEOF
11996#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11997_ACEOF
11998 cat >conftest.$ac_ext <<_ACEOF
11999#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012000#include "confdefs.h"
12001#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012002#ifdef F77_DUMMY_MAIN
12003# ifdef __cplusplus
12004 extern "C"
12005# endif
12006 int F77_DUMMY_MAIN() { return 1; }
12007#endif
12008int
12009main ()
12010{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012011setpgrp(0,0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012012 ;
12013 return 0;
12014}
12015_ACEOF
12016rm -f conftest.$ac_objext
12017if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12018 (eval $ac_compile) 2>&5
12019 ac_status=$?
12020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12021 (exit $ac_status); } &&
12022 { ac_try='test -s conftest.$ac_objext'
12023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12024 (eval $ac_try) 2>&5
12025 ac_status=$?
12026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12027 (exit $ac_status); }; }; then
12028
12029cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012030#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012031_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012032
Martin v. Löwis11437992002-04-12 09:54:03 +000012033
Guido van Rossumf78abae1997-01-21 22:02:36 +000012034else
Martin v. Löwis11437992002-04-12 09:54:03 +000012035 echo "$as_me: failed program was:" >&5
12036cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012037fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012038rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012039
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012040fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012041done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012042
Martin v. Löwis11437992002-04-12 09:54:03 +000012043
Thomas Wouters3a584202000-08-05 23:28:51 +000012044for ac_func in gettimeofday
12045do
Martin v. Löwis11437992002-04-12 09:54:03 +000012046as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12047echo "$as_me:$LINENO: checking for $ac_func" >&5
12048echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12049if eval "test \"\${$as_ac_var+set}\" = set"; then
12050 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012051else
Martin v. Löwis11437992002-04-12 09:54:03 +000012052 cat >conftest.$ac_ext <<_ACEOF
12053#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012054#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012055/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012056 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012057#include <assert.h>
12058/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012059#ifdef __cplusplus
12060extern "C"
12061#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012062/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 builtin and then its argument prototype would still apply. */
12064char $ac_func ();
12065char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012066
Martin v. Löwis11437992002-04-12 09:54:03 +000012067#ifdef F77_DUMMY_MAIN
12068# ifdef __cplusplus
12069 extern "C"
12070# endif
12071 int F77_DUMMY_MAIN() { return 1; }
12072#endif
12073int
12074main ()
12075{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012076/* The GNU C library defines this for functions which it implements
12077 to always fail with ENOSYS. Some functions are actually named
12078 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012079#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012080choke me
12081#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012082f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012083#endif
12084
Martin v. Löwis11437992002-04-12 09:54:03 +000012085 ;
12086 return 0;
12087}
12088_ACEOF
12089rm -f conftest.$ac_objext conftest$ac_exeext
12090if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12091 (eval $ac_link) 2>&5
12092 ac_status=$?
12093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12094 (exit $ac_status); } &&
12095 { ac_try='test -s conftest$ac_exeext'
12096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12097 (eval $ac_try) 2>&5
12098 ac_status=$?
12099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12100 (exit $ac_status); }; }; then
12101 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012102else
Martin v. Löwis11437992002-04-12 09:54:03 +000012103 echo "$as_me: failed program was:" >&5
12104cat conftest.$ac_ext >&5
12105eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012106fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012107rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012108fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012109echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12110echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12111if test `eval echo '${'$as_ac_var'}'` = yes; then
12112 cat >>confdefs.h <<_ACEOF
12113#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12114_ACEOF
12115 cat >conftest.$ac_ext <<_ACEOF
12116#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012117#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012118#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012119#ifdef F77_DUMMY_MAIN
12120# ifdef __cplusplus
12121 extern "C"
12122# endif
12123 int F77_DUMMY_MAIN() { return 1; }
12124#endif
12125int
12126main ()
12127{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012128gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012129 ;
12130 return 0;
12131}
12132_ACEOF
12133rm -f conftest.$ac_objext
12134if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12135 (eval $ac_compile) 2>&5
12136 ac_status=$?
12137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12138 (exit $ac_status); } &&
12139 { ac_try='test -s conftest.$ac_objext'
12140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12141 (eval $ac_try) 2>&5
12142 ac_status=$?
12143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12144 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012145 :
12146else
Martin v. Löwis11437992002-04-12 09:54:03 +000012147 echo "$as_me: failed program was:" >&5
12148cat conftest.$ac_ext >&5
12149
12150cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012151#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012152_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012153
Martin v. Löwis11437992002-04-12 09:54:03 +000012154
Guido van Rossum627b2d71993-12-24 10:39:16 +000012155fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012156rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012157
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012158fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012159done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012160
Michael W. Hudson54241132001-12-07 15:38:26 +000012161
12162
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012163# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012164# for [no]getaddrinfo in netdb.h.
12165echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12166echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12167cat >conftest.$ac_ext <<_ACEOF
12168#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012169#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012170
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012171#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012172#include <sys/socket.h>
12173#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012174#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012175
Martin v. Löwis11437992002-04-12 09:54:03 +000012176#ifdef F77_DUMMY_MAIN
12177# ifdef __cplusplus
12178 extern "C"
12179# endif
12180 int F77_DUMMY_MAIN() { return 1; }
12181#endif
12182int
12183main ()
12184{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012185
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012186getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012187
Martin v. Löwis11437992002-04-12 09:54:03 +000012188 ;
12189 return 0;
12190}
12191_ACEOF
12192rm -f conftest.$ac_objext conftest$ac_exeext
12193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12194 (eval $ac_link) 2>&5
12195 ac_status=$?
12196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12197 (exit $ac_status); } &&
12198 { ac_try='test -s conftest$ac_exeext'
12199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12200 (eval $ac_try) 2>&5
12201 ac_status=$?
12202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12203 (exit $ac_status); }; }; then
12204
12205echo "$as_me:$LINENO: result: yes" >&5
12206echo "${ECHO_T}yes" >&6
12207echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12208echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012209if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 echo "$as_me:$LINENO: result: buggy" >&5
12211echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012212buggygetaddrinfo=yes
12213else
Martin v. Löwis11437992002-04-12 09:54:03 +000012214 cat >conftest.$ac_ext <<_ACEOF
12215#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012216#include "confdefs.h"
12217
12218#include <sys/types.h>
12219#include <netdb.h>
12220#include <string.h>
12221#include <sys/socket.h>
12222#include <netinet/in.h>
12223
12224main()
12225{
12226 int passive, gaierr, inet4 = 0, inet6 = 0;
12227 struct addrinfo hints, *ai, *aitop;
12228 char straddr[INET6_ADDRSTRLEN], strport[16];
12229
12230 for (passive = 0; passive <= 1; passive++) {
12231 memset(&hints, 0, sizeof(hints));
12232 hints.ai_family = AF_UNSPEC;
12233 hints.ai_flags = passive ? AI_PASSIVE : 0;
12234 hints.ai_socktype = SOCK_STREAM;
12235 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12236 (void)gai_strerror(gaierr);
12237 goto bad;
12238 }
12239 for (ai = aitop; ai; ai = ai->ai_next) {
12240 if (ai->ai_addr == NULL ||
12241 ai->ai_addrlen == 0 ||
12242 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12243 straddr, sizeof(straddr), strport, sizeof(strport),
12244 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12245 goto bad;
12246 }
12247 switch (ai->ai_family) {
12248 case AF_INET:
12249 if (strcmp(strport, "54321") != 0) {
12250 goto bad;
12251 }
12252 if (passive) {
12253 if (strcmp(straddr, "0.0.0.0") != 0) {
12254 goto bad;
12255 }
12256 } else {
12257 if (strcmp(straddr, "127.0.0.1") != 0) {
12258 goto bad;
12259 }
12260 }
12261 inet4++;
12262 break;
12263 case AF_INET6:
12264 if (strcmp(strport, "54321") != 0) {
12265 goto bad;
12266 }
12267 if (passive) {
12268 if (strcmp(straddr, "::") != 0) {
12269 goto bad;
12270 }
12271 } else {
12272 if (strcmp(straddr, "::1") != 0) {
12273 goto bad;
12274 }
12275 }
12276 inet6++;
12277 break;
12278 case AF_UNSPEC:
12279 goto bad;
12280 break;
12281 default:
12282 /* another family support? */
12283 break;
12284 }
12285 }
12286 }
12287
12288 if (!(inet4 == 0 || inet4 == 2))
12289 goto bad;
12290 if (!(inet6 == 0 || inet6 == 2))
12291 goto bad;
12292
12293 if (aitop)
12294 freeaddrinfo(aitop);
12295 exit(0);
12296
12297 bad:
12298 if (aitop)
12299 freeaddrinfo(aitop);
12300 exit(1);
12301}
12302
Martin v. Löwis11437992002-04-12 09:54:03 +000012303_ACEOF
12304rm -f conftest$ac_exeext
12305if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12306 (eval $ac_link) 2>&5
12307 ac_status=$?
12308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12309 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12311 (eval $ac_try) 2>&5
12312 ac_status=$?
12313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12314 (exit $ac_status); }; }; then
12315 echo "$as_me:$LINENO: result: good" >&5
12316echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012317buggygetaddrinfo=no
12318else
Martin v. Löwis11437992002-04-12 09:54:03 +000012319 echo "$as_me: program exited with status $ac_status" >&5
12320echo "$as_me: failed program was:" >&5
12321cat conftest.$ac_ext >&5
12322( exit $ac_status )
12323echo "$as_me:$LINENO: result: buggy" >&5
12324echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012325buggygetaddrinfo=yes
12326fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012327rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012328fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012329else
Martin v. Löwis11437992002-04-12 09:54:03 +000012330 echo "$as_me: failed program was:" >&5
12331cat conftest.$ac_ext >&5
12332
12333echo "$as_me:$LINENO: result: no" >&5
12334echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012335buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012336
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012337fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012338rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012339
12340if test "$buggygetaddrinfo" = "yes"; then
12341 if test "$ipv6" = "yes"; then
12342 echo 'Fatal: You must get working getaddrinfo() function.'
12343 echo ' or you can specify "--disable-ipv6"'.
12344 exit 1
12345 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012346else
Martin v. Löwis11437992002-04-12 09:54:03 +000012347
12348cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012349#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012350_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012351
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012352fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012353
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012354for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012355do
Martin v. Löwis11437992002-04-12 09:54:03 +000012356as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12357echo "$as_me:$LINENO: checking for $ac_func" >&5
12358echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12359if eval "test \"\${$as_ac_var+set}\" = set"; then
12360 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012361else
Martin v. Löwis11437992002-04-12 09:54:03 +000012362 cat >conftest.$ac_ext <<_ACEOF
12363#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012364#include "confdefs.h"
12365/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012366 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012367#include <assert.h>
12368/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012369#ifdef __cplusplus
12370extern "C"
12371#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012372/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012373 builtin and then its argument prototype would still apply. */
12374char $ac_func ();
12375char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012376
Martin v. Löwis11437992002-04-12 09:54:03 +000012377#ifdef F77_DUMMY_MAIN
12378# ifdef __cplusplus
12379 extern "C"
12380# endif
12381 int F77_DUMMY_MAIN() { return 1; }
12382#endif
12383int
12384main ()
12385{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012386/* The GNU C library defines this for functions which it implements
12387 to always fail with ENOSYS. Some functions are actually named
12388 something starting with __ and the normal name is an alias. */
12389#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12390choke me
12391#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012392f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012393#endif
12394
Martin v. Löwis11437992002-04-12 09:54:03 +000012395 ;
12396 return 0;
12397}
12398_ACEOF
12399rm -f conftest.$ac_objext conftest$ac_exeext
12400if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12401 (eval $ac_link) 2>&5
12402 ac_status=$?
12403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12404 (exit $ac_status); } &&
12405 { ac_try='test -s conftest$ac_exeext'
12406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12407 (eval $ac_try) 2>&5
12408 ac_status=$?
12409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12410 (exit $ac_status); }; }; then
12411 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012412else
Martin v. Löwis11437992002-04-12 09:54:03 +000012413 echo "$as_me: failed program was:" >&5
12414cat conftest.$ac_ext >&5
12415eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012416fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012417rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012418fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012419echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12420echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12421if test `eval echo '${'$as_ac_var'}'` = yes; then
12422 cat >>confdefs.h <<_ACEOF
12423#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12424_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012425
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012426fi
12427done
12428
Michael W. Hudson54241132001-12-07 15:38:26 +000012429
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012430# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012431echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12432echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12433if test "${ac_cv_header_time+set}" = set; then
12434 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012435else
Martin v. Löwis11437992002-04-12 09:54:03 +000012436 cat >conftest.$ac_ext <<_ACEOF
12437#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012438#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012439#include <sys/types.h>
12440#include <sys/time.h>
12441#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012442
12443#ifdef F77_DUMMY_MAIN
12444# ifdef __cplusplus
12445 extern "C"
12446# endif
12447 int F77_DUMMY_MAIN() { return 1; }
12448#endif
12449int
12450main ()
12451{
12452if ((struct tm *) 0)
12453return 0;
12454 ;
12455 return 0;
12456}
12457_ACEOF
12458rm -f conftest.$ac_objext
12459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12460 (eval $ac_compile) 2>&5
12461 ac_status=$?
12462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12463 (exit $ac_status); } &&
12464 { ac_try='test -s conftest.$ac_objext'
12465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12466 (eval $ac_try) 2>&5
12467 ac_status=$?
12468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12469 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012470 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012471else
Martin v. Löwis11437992002-04-12 09:54:03 +000012472 echo "$as_me: failed program was:" >&5
12473cat conftest.$ac_ext >&5
12474ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012475fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012476rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012477fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012478echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12479echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012480if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012481
12482cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012483#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012484_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012485
12486fi
12487
Martin v. Löwis11437992002-04-12 09:54:03 +000012488echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12489echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12490if test "${ac_cv_struct_tm+set}" = set; then
12491 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012492else
Martin v. Löwis11437992002-04-12 09:54:03 +000012493 cat >conftest.$ac_ext <<_ACEOF
12494#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012495#include "confdefs.h"
12496#include <sys/types.h>
12497#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012498
12499#ifdef F77_DUMMY_MAIN
12500# ifdef __cplusplus
12501 extern "C"
12502# endif
12503 int F77_DUMMY_MAIN() { return 1; }
12504#endif
12505int
12506main ()
12507{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012508struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 ;
12510 return 0;
12511}
12512_ACEOF
12513rm -f conftest.$ac_objext
12514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12515 (eval $ac_compile) 2>&5
12516 ac_status=$?
12517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12518 (exit $ac_status); } &&
12519 { ac_try='test -s conftest.$ac_objext'
12520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12521 (eval $ac_try) 2>&5
12522 ac_status=$?
12523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12524 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012525 ac_cv_struct_tm=time.h
12526else
Martin v. Löwis11437992002-04-12 09:54:03 +000012527 echo "$as_me: failed program was:" >&5
12528cat conftest.$ac_ext >&5
12529ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012530fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012531rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012532fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012533echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12534echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012535if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012536
12537cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012538#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012539_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012540
12541fi
12542
Martin v. Löwis11437992002-04-12 09:54:03 +000012543echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12544echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12545if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12546 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012547else
Martin v. Löwis11437992002-04-12 09:54:03 +000012548 cat >conftest.$ac_ext <<_ACEOF
12549#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012550#include "confdefs.h"
12551#include <sys/types.h>
12552#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012553
12554
12555#ifdef F77_DUMMY_MAIN
12556# ifdef __cplusplus
12557 extern "C"
12558# endif
12559 int F77_DUMMY_MAIN() { return 1; }
12560#endif
12561int
12562main ()
12563{
12564static struct tm ac_aggr;
12565if (ac_aggr.tm_zone)
12566return 0;
12567 ;
12568 return 0;
12569}
12570_ACEOF
12571rm -f conftest.$ac_objext
12572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12573 (eval $ac_compile) 2>&5
12574 ac_status=$?
12575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12576 (exit $ac_status); } &&
12577 { ac_try='test -s conftest.$ac_objext'
12578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12579 (eval $ac_try) 2>&5
12580 ac_status=$?
12581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12582 (exit $ac_status); }; }; then
12583 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012584else
Martin v. Löwis11437992002-04-12 09:54:03 +000012585 echo "$as_me: failed program was:" >&5
12586cat conftest.$ac_ext >&5
12587ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012588fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012589rm -f conftest.$ac_objext conftest.$ac_ext
12590fi
12591echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12592echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12593if test $ac_cv_member_struct_tm_tm_zone = yes; then
12594
12595cat >>confdefs.h <<_ACEOF
12596#define HAVE_STRUCT_TM_TM_ZONE 1
12597_ACEOF
12598
12599
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012600fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012601
Martin v. Löwis11437992002-04-12 09:54:03 +000012602if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12603
12604cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012605#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012606_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012607
12608else
Martin v. Löwis11437992002-04-12 09:54:03 +000012609 echo "$as_me:$LINENO: checking for tzname" >&5
12610echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12611if test "${ac_cv_var_tzname+set}" = set; then
12612 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012613else
Martin v. Löwis11437992002-04-12 09:54:03 +000012614 cat >conftest.$ac_ext <<_ACEOF
12615#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012616#include "confdefs.h"
12617#include <time.h>
12618#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012619extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012621
12622#ifdef F77_DUMMY_MAIN
12623# ifdef __cplusplus
12624 extern "C"
12625# endif
12626 int F77_DUMMY_MAIN() { return 1; }
12627#endif
12628int
12629main ()
12630{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012631atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012632 ;
12633 return 0;
12634}
12635_ACEOF
12636rm -f conftest.$ac_objext conftest$ac_exeext
12637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12638 (eval $ac_link) 2>&5
12639 ac_status=$?
12640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12641 (exit $ac_status); } &&
12642 { ac_try='test -s conftest$ac_exeext'
12643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12644 (eval $ac_try) 2>&5
12645 ac_status=$?
12646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12647 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012648 ac_cv_var_tzname=yes
12649else
Martin v. Löwis11437992002-04-12 09:54:03 +000012650 echo "$as_me: failed program was:" >&5
12651cat conftest.$ac_ext >&5
12652ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012653fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012654rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012655fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012656echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12657echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012658 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012659
12660cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012661#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012662_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012663
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012664 fi
12665fi
12666
Jack Jansendd19cf82001-12-06 22:36:17 +000012667
Martin v. Löwis11437992002-04-12 09:54:03 +000012668echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12669echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12670if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12671 echo $ECHO_N "(cached) $ECHO_C" >&6
12672else
12673 cat >conftest.$ac_ext <<_ACEOF
12674#line $LINENO "configure"
12675#include "confdefs.h"
12676$ac_includes_default
12677#ifdef F77_DUMMY_MAIN
12678# ifdef __cplusplus
12679 extern "C"
12680# endif
12681 int F77_DUMMY_MAIN() { return 1; }
12682#endif
12683int
12684main ()
12685{
12686static struct stat ac_aggr;
12687if (ac_aggr.st_rdev)
12688return 0;
12689 ;
12690 return 0;
12691}
12692_ACEOF
12693rm -f conftest.$ac_objext
12694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12695 (eval $ac_compile) 2>&5
12696 ac_status=$?
12697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12698 (exit $ac_status); } &&
12699 { ac_try='test -s conftest.$ac_objext'
12700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12701 (eval $ac_try) 2>&5
12702 ac_status=$?
12703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12704 (exit $ac_status); }; }; then
12705 ac_cv_member_struct_stat_st_rdev=yes
12706else
12707 echo "$as_me: failed program was:" >&5
12708cat conftest.$ac_ext >&5
12709ac_cv_member_struct_stat_st_rdev=no
12710fi
12711rm -f conftest.$ac_objext conftest.$ac_ext
12712fi
12713echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12714echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12715if test $ac_cv_member_struct_stat_st_rdev = yes; then
12716
12717cat >>confdefs.h <<_ACEOF
12718#define HAVE_STRUCT_STAT_ST_RDEV 1
12719_ACEOF
12720
12721
12722cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012723#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012724_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012725
12726fi
12727
Martin v. Löwis11437992002-04-12 09:54:03 +000012728
12729
12730echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12731echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12732if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12733 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012734else
Martin v. Löwis11437992002-04-12 09:54:03 +000012735 cat >conftest.$ac_ext <<_ACEOF
12736#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012737#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012738$ac_includes_default
12739#ifdef F77_DUMMY_MAIN
12740# ifdef __cplusplus
12741 extern "C"
12742# endif
12743 int F77_DUMMY_MAIN() { return 1; }
12744#endif
12745int
12746main ()
12747{
12748static struct stat ac_aggr;
12749if (ac_aggr.st_blksize)
12750return 0;
12751 ;
12752 return 0;
12753}
12754_ACEOF
12755rm -f conftest.$ac_objext
12756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12757 (eval $ac_compile) 2>&5
12758 ac_status=$?
12759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12760 (exit $ac_status); } &&
12761 { ac_try='test -s conftest.$ac_objext'
12762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12763 (eval $ac_try) 2>&5
12764 ac_status=$?
12765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12766 (exit $ac_status); }; }; then
12767 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012768else
Martin v. Löwis11437992002-04-12 09:54:03 +000012769 echo "$as_me: failed program was:" >&5
12770cat conftest.$ac_ext >&5
12771ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012772fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012773rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012774fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012775echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12776echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12777if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012778
Martin v. Löwis11437992002-04-12 09:54:03 +000012779cat >>confdefs.h <<_ACEOF
12780#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12781_ACEOF
12782
12783
12784cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012785#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012786_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012787
12788fi
12789
Martin v. Löwis11437992002-04-12 09:54:03 +000012790
12791echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12792echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12793if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12794 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012795else
Martin v. Löwis11437992002-04-12 09:54:03 +000012796 cat >conftest.$ac_ext <<_ACEOF
12797#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012798#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012799$ac_includes_default
12800#ifdef F77_DUMMY_MAIN
12801# ifdef __cplusplus
12802 extern "C"
12803# endif
12804 int F77_DUMMY_MAIN() { return 1; }
12805#endif
12806int
12807main ()
12808{
12809static struct stat ac_aggr;
12810if (ac_aggr.st_blocks)
12811return 0;
12812 ;
12813 return 0;
12814}
12815_ACEOF
12816rm -f conftest.$ac_objext
12817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12818 (eval $ac_compile) 2>&5
12819 ac_status=$?
12820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12821 (exit $ac_status); } &&
12822 { ac_try='test -s conftest.$ac_objext'
12823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12824 (eval $ac_try) 2>&5
12825 ac_status=$?
12826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12827 (exit $ac_status); }; }; then
12828 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012829else
Martin v. Löwis11437992002-04-12 09:54:03 +000012830 echo "$as_me: failed program was:" >&5
12831cat conftest.$ac_ext >&5
12832ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012833fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012834rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012835fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012836echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12837echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12838if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012839
Martin v. Löwis11437992002-04-12 09:54:03 +000012840cat >>confdefs.h <<_ACEOF
12841#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12842_ACEOF
12843
12844
12845cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012846#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012847_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012848
12849else
Martin v. Löwis11437992002-04-12 09:54:03 +000012850 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012851fi
12852
Michael W. Hudson54241132001-12-07 15:38:26 +000012853
Martin v. Löwis11437992002-04-12 09:54:03 +000012854
12855echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
12856echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
12857if test "${ac_cv_header_time_altzone+set}" = set; then
12858 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012859else
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 cat >conftest.$ac_ext <<_ACEOF
12861#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012862#include "confdefs.h"
12863#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012864#ifdef F77_DUMMY_MAIN
12865# ifdef __cplusplus
12866 extern "C"
12867# endif
12868 int F77_DUMMY_MAIN() { return 1; }
12869#endif
12870int
12871main ()
12872{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012873return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012874 ;
12875 return 0;
12876}
12877_ACEOF
12878rm -f conftest.$ac_objext
12879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12880 (eval $ac_compile) 2>&5
12881 ac_status=$?
12882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12883 (exit $ac_status); } &&
12884 { ac_try='test -s conftest.$ac_objext'
12885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12886 (eval $ac_try) 2>&5
12887 ac_status=$?
12888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12889 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012890 ac_cv_header_time_altzone=yes
12891else
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 echo "$as_me: failed program was:" >&5
12893cat conftest.$ac_ext >&5
12894ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012895fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012896rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012897fi
12898
Martin v. Löwis11437992002-04-12 09:54:03 +000012899echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
12900echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012901if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012902
12903cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012904#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012905_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012906
12907fi
12908
Guido van Rossumda88dad1995-01-26 00:46:29 +000012909was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012910echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
12911echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
12912cat >conftest.$ac_ext <<_ACEOF
12913#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012914#include "confdefs.h"
12915
12916#include <sys/types.h>
12917#include <sys/select.h>
12918#include <sys/time.h>
12919
Martin v. Löwis11437992002-04-12 09:54:03 +000012920#ifdef F77_DUMMY_MAIN
12921# ifdef __cplusplus
12922 extern "C"
12923# endif
12924 int F77_DUMMY_MAIN() { return 1; }
12925#endif
12926int
12927main ()
12928{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012929;
Martin v. Löwis11437992002-04-12 09:54:03 +000012930 ;
12931 return 0;
12932}
12933_ACEOF
12934rm -f conftest.$ac_objext
12935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12936 (eval $ac_compile) 2>&5
12937 ac_status=$?
12938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12939 (exit $ac_status); } &&
12940 { ac_try='test -s conftest.$ac_objext'
12941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12942 (eval $ac_try) 2>&5
12943 ac_status=$?
12944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12945 (exit $ac_status); }; }; then
12946
12947
12948cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012949#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012950_ACEOF
12951
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012952 was_it_defined=yes
12953
Guido van Rossumf78abae1997-01-21 22:02:36 +000012954else
Martin v. Löwis11437992002-04-12 09:54:03 +000012955 echo "$as_me: failed program was:" >&5
12956cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012957fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012958rm -f conftest.$ac_objext conftest.$ac_ext
12959echo "$as_me:$LINENO: result: $was_it_defined" >&5
12960echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000012961
Martin v. Löwis11437992002-04-12 09:54:03 +000012962echo "$as_me:$LINENO: checking for addrinfo" >&5
12963echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
12964if test "${ac_cv_struct_addrinfo+set}" = set; then
12965 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012966else
Martin v. Löwis11437992002-04-12 09:54:03 +000012967 cat >conftest.$ac_ext <<_ACEOF
12968#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012969#include "confdefs.h"
12970
12971# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012972#ifdef F77_DUMMY_MAIN
12973# ifdef __cplusplus
12974 extern "C"
12975# endif
12976 int F77_DUMMY_MAIN() { return 1; }
12977#endif
12978int
12979main ()
12980{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012981struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012982 ;
12983 return 0;
12984}
12985_ACEOF
12986rm -f conftest.$ac_objext
12987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12988 (eval $ac_compile) 2>&5
12989 ac_status=$?
12990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12991 (exit $ac_status); } &&
12992 { ac_try='test -s conftest.$ac_objext'
12993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12994 (eval $ac_try) 2>&5
12995 ac_status=$?
12996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12997 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012998 ac_cv_struct_addrinfo=yes
12999else
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 echo "$as_me: failed program was:" >&5
13001cat conftest.$ac_ext >&5
13002ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013003fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013004rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013005fi
13006
Martin v. Löwis11437992002-04-12 09:54:03 +000013007echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13008echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013009if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013010
13011cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013012#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013013_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013014
13015fi
13016
Martin v. Löwis11437992002-04-12 09:54:03 +000013017echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13018echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13019if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13020 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013021else
Martin v. Löwis11437992002-04-12 09:54:03 +000013022 cat >conftest.$ac_ext <<_ACEOF
13023#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013024#include "confdefs.h"
13025
13026# include <sys/types.h>
13027# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013028#ifdef F77_DUMMY_MAIN
13029# ifdef __cplusplus
13030 extern "C"
13031# endif
13032 int F77_DUMMY_MAIN() { return 1; }
13033#endif
13034int
13035main ()
13036{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013037struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013038 ;
13039 return 0;
13040}
13041_ACEOF
13042rm -f conftest.$ac_objext
13043if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13044 (eval $ac_compile) 2>&5
13045 ac_status=$?
13046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13047 (exit $ac_status); } &&
13048 { ac_try='test -s conftest.$ac_objext'
13049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13050 (eval $ac_try) 2>&5
13051 ac_status=$?
13052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13053 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013054 ac_cv_struct_sockaddr_storage=yes
13055else
Martin v. Löwis11437992002-04-12 09:54:03 +000013056 echo "$as_me: failed program was:" >&5
13057cat conftest.$ac_ext >&5
13058ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013059fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013060rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013061fi
13062
Martin v. Löwis11437992002-04-12 09:54:03 +000013063echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13064echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013065if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013066
13067cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013068#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013069_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013070
13071fi
13072
Guido van Rossum627b2d71993-12-24 10:39:16 +000013073# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013074
Michael W. Hudson54241132001-12-07 15:38:26 +000013075
Martin v. Löwis11437992002-04-12 09:54:03 +000013076echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13077echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13078if test "${ac_cv_c_char_unsigned+set}" = set; then
13079 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013080else
Martin v. Löwis11437992002-04-12 09:54:03 +000013081 cat >conftest.$ac_ext <<_ACEOF
13082#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013083#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013084$ac_includes_default
13085#ifdef F77_DUMMY_MAIN
13086# ifdef __cplusplus
13087 extern "C"
13088# endif
13089 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013091int
13092main ()
13093{
13094static int test_array [1 - 2 * !(((char) -1) < 0)];
13095test_array [0] = 0
13096
13097 ;
13098 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013099}
Martin v. Löwis11437992002-04-12 09:54:03 +000013100_ACEOF
13101rm -f conftest.$ac_objext
13102if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13103 (eval $ac_compile) 2>&5
13104 ac_status=$?
13105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13106 (exit $ac_status); } &&
13107 { ac_try='test -s conftest.$ac_objext'
13108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13109 (eval $ac_try) 2>&5
13110 ac_status=$?
13111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13112 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013113 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013114else
13115 echo "$as_me: failed program was:" >&5
13116cat conftest.$ac_ext >&5
13117ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013118fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013119rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013120fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013121echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13122echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013123if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013124 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013125#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013126_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013127
13128fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013129
Martin v. Löwis11437992002-04-12 09:54:03 +000013130echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13131echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13132if test "${ac_cv_prog_cc_stdc+set}" = set; then
13133 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013134else
Martin v. Löwis11437992002-04-12 09:54:03 +000013135 ac_cv_prog_cc_stdc=no
13136ac_save_CC=$CC
13137cat >conftest.$ac_ext <<_ACEOF
13138#line $LINENO "configure"
13139#include "confdefs.h"
13140#include <stdarg.h>
13141#include <stdio.h>
13142#include <sys/types.h>
13143#include <sys/stat.h>
13144/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13145struct buf { int x; };
13146FILE * (*rcsopen) (struct buf *, struct stat *, int);
13147static char *e (p, i)
13148 char **p;
13149 int i;
13150{
13151 return p[i];
13152}
13153static char *f (char * (*g) (char **, int), char **p, ...)
13154{
13155 char *s;
13156 va_list v;
13157 va_start (v,p);
13158 s = g (p, va_arg (v,int));
13159 va_end (v);
13160 return s;
13161}
13162int test (int i, double x);
13163struct s1 {int (*f) (int a);};
13164struct s2 {int (*f) (double a);};
13165int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13166int argc;
13167char **argv;
13168#ifdef F77_DUMMY_MAIN
13169# ifdef __cplusplus
13170 extern "C"
13171# endif
13172 int F77_DUMMY_MAIN() { return 1; }
13173#endif
13174int
13175main ()
13176{
13177return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13178 ;
13179 return 0;
13180}
13181_ACEOF
13182# Don't try gcc -ansi; that turns off useful extensions and
13183# breaks some systems' header files.
13184# AIX -qlanglvl=ansi
13185# Ultrix and OSF/1 -std1
13186# HP-UX 10.20 and later -Ae
13187# HP-UX older versions -Aa -D_HPUX_SOURCE
13188# SVR4 -Xc -D__EXTENSIONS__
13189for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13190do
13191 CC="$ac_save_CC $ac_arg"
13192 rm -f conftest.$ac_objext
13193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13194 (eval $ac_compile) 2>&5
13195 ac_status=$?
13196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13197 (exit $ac_status); } &&
13198 { ac_try='test -s conftest.$ac_objext'
13199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13200 (eval $ac_try) 2>&5
13201 ac_status=$?
13202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13203 (exit $ac_status); }; }; then
13204 ac_cv_prog_cc_stdc=$ac_arg
13205break
13206else
13207 echo "$as_me: failed program was:" >&5
13208cat conftest.$ac_ext >&5
13209fi
13210rm -f conftest.$ac_objext
13211done
13212rm -f conftest.$ac_ext conftest.$ac_objext
13213CC=$ac_save_CC
13214
13215fi
13216
13217case "x$ac_cv_prog_cc_stdc" in
13218 x|xno)
13219 echo "$as_me:$LINENO: result: none needed" >&5
13220echo "${ECHO_T}none needed" >&6 ;;
13221 *)
13222 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13223echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13224 CC="$CC $ac_cv_prog_cc_stdc" ;;
13225esac
13226
13227echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13228echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13229if test "${ac_cv_c_const+set}" = set; then
13230 echo $ECHO_N "(cached) $ECHO_C" >&6
13231else
13232 cat >conftest.$ac_ext <<_ACEOF
13233#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013234#include "confdefs.h"
13235
Martin v. Löwis11437992002-04-12 09:54:03 +000013236#ifdef F77_DUMMY_MAIN
13237# ifdef __cplusplus
13238 extern "C"
13239# endif
13240 int F77_DUMMY_MAIN() { return 1; }
13241#endif
13242int
13243main ()
13244{
13245/* FIXME: Include the comments suggested by Paul. */
13246#ifndef __cplusplus
13247 /* Ultrix mips cc rejects this. */
13248 typedef int charset[2];
13249 const charset x;
13250 /* SunOS 4.1.1 cc rejects this. */
13251 char const *const *ccp;
13252 char **p;
13253 /* NEC SVR4.0.2 mips cc rejects this. */
13254 struct point {int x, y;};
13255 static struct point const zero = {0,0};
13256 /* AIX XL C 1.02.0.0 rejects this.
13257 It does not let you subtract one const X* pointer from another in
13258 an arm of an if-expression whose if-part is not a constant
13259 expression */
13260 const char *g = "string";
13261 ccp = &g + (g ? g-g : 0);
13262 /* HPUX 7.0 cc rejects these. */
13263 ++ccp;
13264 p = (char**) ccp;
13265 ccp = (char const *const *) p;
13266 { /* SCO 3.2v4 cc rejects this. */
13267 char *t;
13268 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013269
Martin v. Löwis11437992002-04-12 09:54:03 +000013270 *t++ = 0;
13271 }
13272 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13273 int x[] = {25, 17};
13274 const int *foo = &x[0];
13275 ++foo;
13276 }
13277 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13278 typedef const int *iptr;
13279 iptr p = 0;
13280 ++p;
13281 }
13282 { /* AIX XL C 1.02.0.0 rejects this saying
13283 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13284 struct s { int j; const int *ap[3]; };
13285 struct s *b; b->j = 5;
13286 }
13287 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13288 const int foo = 10;
13289 }
13290#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013291
Martin v. Löwis11437992002-04-12 09:54:03 +000013292 ;
13293 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013294}
Martin v. Löwis11437992002-04-12 09:54:03 +000013295_ACEOF
13296rm -f conftest.$ac_objext
13297if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13298 (eval $ac_compile) 2>&5
13299 ac_status=$?
13300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13301 (exit $ac_status); } &&
13302 { ac_try='test -s conftest.$ac_objext'
13303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13304 (eval $ac_try) 2>&5
13305 ac_status=$?
13306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13307 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013308 ac_cv_c_const=yes
13309else
Martin v. Löwis11437992002-04-12 09:54:03 +000013310 echo "$as_me: failed program was:" >&5
13311cat conftest.$ac_ext >&5
13312ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013313fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013314rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013315fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013316echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13317echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013318if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013319
13320cat >>confdefs.h <<\_ACEOF
13321#define const
13322_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013323
13324fi
13325
Michael W. Hudson54241132001-12-07 15:38:26 +000013326
Guido van Rossumda88dad1995-01-26 00:46:29 +000013327works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013328echo "$as_me:$LINENO: checking for working volatile" >&5
13329echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13330cat >conftest.$ac_ext <<_ACEOF
13331#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013332#include "confdefs.h"
13333
Martin v. Löwis11437992002-04-12 09:54:03 +000013334#ifdef F77_DUMMY_MAIN
13335# ifdef __cplusplus
13336 extern "C"
13337# endif
13338 int F77_DUMMY_MAIN() { return 1; }
13339#endif
13340int
13341main ()
13342{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013343volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013344 ;
13345 return 0;
13346}
13347_ACEOF
13348rm -f conftest.$ac_objext
13349if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13350 (eval $ac_compile) 2>&5
13351 ac_status=$?
13352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13353 (exit $ac_status); } &&
13354 { ac_try='test -s conftest.$ac_objext'
13355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13356 (eval $ac_try) 2>&5
13357 ac_status=$?
13358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13359 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013360 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013361else
Martin v. Löwis11437992002-04-12 09:54:03 +000013362 echo "$as_me: failed program was:" >&5
13363cat conftest.$ac_ext >&5
13364
13365cat >>confdefs.h <<\_ACEOF
13366#define volatile
13367_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013368
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013369
Guido van Rossum627b2d71993-12-24 10:39:16 +000013370fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013371rm -f conftest.$ac_objext conftest.$ac_ext
13372echo "$as_me:$LINENO: result: $works" >&5
13373echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013374
Guido van Rossumda88dad1995-01-26 00:46:29 +000013375works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013376echo "$as_me:$LINENO: checking for working signed char" >&5
13377echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13378cat >conftest.$ac_ext <<_ACEOF
13379#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013380#include "confdefs.h"
13381
Martin v. Löwis11437992002-04-12 09:54:03 +000013382#ifdef F77_DUMMY_MAIN
13383# ifdef __cplusplus
13384 extern "C"
13385# endif
13386 int F77_DUMMY_MAIN() { return 1; }
13387#endif
13388int
13389main ()
13390{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013391signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013392 ;
13393 return 0;
13394}
13395_ACEOF
13396rm -f conftest.$ac_objext
13397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13398 (eval $ac_compile) 2>&5
13399 ac_status=$?
13400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13401 (exit $ac_status); } &&
13402 { ac_try='test -s conftest.$ac_objext'
13403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13404 (eval $ac_try) 2>&5
13405 ac_status=$?
13406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13407 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013408 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013409else
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 echo "$as_me: failed program was:" >&5
13411cat conftest.$ac_ext >&5
13412
13413cat >>confdefs.h <<\_ACEOF
13414#define signed
13415_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013416
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013417
Guido van Rossum7f43da71994-08-01 12:15:30 +000013418fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013419rm -f conftest.$ac_objext conftest.$ac_ext
13420echo "$as_me:$LINENO: result: $works" >&5
13421echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013422
Guido van Rossumda88dad1995-01-26 00:46:29 +000013423have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013424echo "$as_me:$LINENO: checking for prototypes" >&5
13425echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13426cat >conftest.$ac_ext <<_ACEOF
13427#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013428#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013429int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013430#ifdef F77_DUMMY_MAIN
13431# ifdef __cplusplus
13432 extern "C"
13433# endif
13434 int F77_DUMMY_MAIN() { return 1; }
13435#endif
13436int
13437main ()
13438{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013439return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013440 ;
13441 return 0;
13442}
13443_ACEOF
13444rm -f conftest.$ac_objext
13445if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13446 (eval $ac_compile) 2>&5
13447 ac_status=$?
13448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13449 (exit $ac_status); } &&
13450 { ac_try='test -s conftest.$ac_objext'
13451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13452 (eval $ac_try) 2>&5
13453 ac_status=$?
13454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13455 (exit $ac_status); }; }; then
13456
13457
13458cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013459#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013460_ACEOF
13461
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013462 have_prototypes=yes
13463
Guido van Rossumf78abae1997-01-21 22:02:36 +000013464else
Martin v. Löwis11437992002-04-12 09:54:03 +000013465 echo "$as_me: failed program was:" >&5
13466cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013467fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013468rm -f conftest.$ac_objext conftest.$ac_ext
13469echo "$as_me:$LINENO: result: $have_prototypes" >&5
13470echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013471
Guido van Rossumda88dad1995-01-26 00:46:29 +000013472works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013473echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13474echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13475cat >conftest.$ac_ext <<_ACEOF
13476#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013477#include "confdefs.h"
13478
13479#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013480int foo(int x, ...) {
13481 va_list va;
13482 va_start(va, x);
13483 va_arg(va, int);
13484 va_arg(va, char *);
13485 va_arg(va, double);
13486 return 0;
13487}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013488
Martin v. Löwis11437992002-04-12 09:54:03 +000013489#ifdef F77_DUMMY_MAIN
13490# ifdef __cplusplus
13491 extern "C"
13492# endif
13493 int F77_DUMMY_MAIN() { return 1; }
13494#endif
13495int
13496main ()
13497{
Guido van Rossum90eea071996-08-30 20:58:57 +000013498return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 ;
13500 return 0;
13501}
13502_ACEOF
13503rm -f conftest.$ac_objext
13504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13505 (eval $ac_compile) 2>&5
13506 ac_status=$?
13507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13508 (exit $ac_status); } &&
13509 { ac_try='test -s conftest.$ac_objext'
13510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13511 (eval $ac_try) 2>&5
13512 ac_status=$?
13513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13514 (exit $ac_status); }; }; then
13515
13516
13517cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013518#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013519_ACEOF
13520
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013521 works=yes
13522
Guido van Rossumf78abae1997-01-21 22:02:36 +000013523else
Martin v. Löwis11437992002-04-12 09:54:03 +000013524 echo "$as_me: failed program was:" >&5
13525cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013526fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013527rm -f conftest.$ac_objext conftest.$ac_ext
13528echo "$as_me:$LINENO: result: $works" >&5
13529echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013530
Guido van Rossumda88dad1995-01-26 00:46:29 +000013531if test "$have_prototypes" = yes; then
13532bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013533echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13534echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13535cat >conftest.$ac_ext <<_ACEOF
13536#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013537#include "confdefs.h"
13538#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013539#ifdef F77_DUMMY_MAIN
13540# ifdef __cplusplus
13541 extern "C"
13542# endif
13543 int F77_DUMMY_MAIN() { return 1; }
13544#endif
13545int
13546main ()
13547{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013548char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013549 ;
13550 return 0;
13551}
13552_ACEOF
13553rm -f conftest.$ac_objext
13554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13555 (eval $ac_compile) 2>&5
13556 ac_status=$?
13557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13558 (exit $ac_status); } &&
13559 { ac_try='test -s conftest.$ac_objext'
13560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13561 (eval $ac_try) 2>&5
13562 ac_status=$?
13563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13564 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013565 :
13566else
Martin v. Löwis11437992002-04-12 09:54:03 +000013567 echo "$as_me: failed program was:" >&5
13568cat conftest.$ac_ext >&5
13569
13570cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013571#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013572_ACEOF
13573
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013574 bad_prototypes=yes
13575
Guido van Rossum627b2d71993-12-24 10:39:16 +000013576fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013577rm -f conftest.$ac_objext conftest.$ac_ext
13578echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13579echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013580fi
13581
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013582# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013583echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13584echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13585cat >conftest.$ac_ext <<_ACEOF
13586#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013587#include "confdefs.h"
13588#include <sys/types.h>
13589#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013590#ifdef F77_DUMMY_MAIN
13591# ifdef __cplusplus
13592 extern "C"
13593# endif
13594 int F77_DUMMY_MAIN() { return 1; }
13595#endif
13596int
13597main ()
13598{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013599struct sockaddr x;
13600x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013601 ;
13602 return 0;
13603}
13604_ACEOF
13605rm -f conftest.$ac_objext
13606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13607 (eval $ac_compile) 2>&5
13608 ac_status=$?
13609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13610 (exit $ac_status); } &&
13611 { ac_try='test -s conftest.$ac_objext'
13612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13613 (eval $ac_try) 2>&5
13614 ac_status=$?
13615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13616 (exit $ac_status); }; }; then
13617 echo "$as_me:$LINENO: result: yes" >&5
13618echo "${ECHO_T}yes" >&6
13619
13620cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013621#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013622_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013623
13624else
Martin v. Löwis11437992002-04-12 09:54:03 +000013625 echo "$as_me: failed program was:" >&5
13626cat conftest.$ac_ext >&5
13627echo "$as_me:$LINENO: result: no" >&5
13628echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013630rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013631
Martin v. Löwis11437992002-04-12 09:54:03 +000013632echo "$as_me:$LINENO: checking for bad static forward" >&5
13633echo $ECHO_N "checking for bad static forward... $ECHO_C" >&6
13634if test "${ac_cv_bad_static_forward+set}" = set; then
13635 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013636else
13637 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013638 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013639else
Martin v. Löwis11437992002-04-12 09:54:03 +000013640 cat >conftest.$ac_ext <<_ACEOF
13641#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013642#include "confdefs.h"
13643
13644struct s { int a; int b; };
13645static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013646int foobar() {
13647 static int random;
13648 random = (int) &foo;
13649 return random;
13650}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013651static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013652main() {
13653 exit(!((int)&foo == foobar()));
13654}
Martin v. Löwis11437992002-04-12 09:54:03 +000013655_ACEOF
13656rm -f conftest$ac_exeext
13657if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13658 (eval $ac_link) 2>&5
13659 ac_status=$?
13660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13661 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13663 (eval $ac_try) 2>&5
13664 ac_status=$?
13665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13666 (exit $ac_status); }; }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013667 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013668else
Martin v. Löwis11437992002-04-12 09:54:03 +000013669 echo "$as_me: program exited with status $ac_status" >&5
13670echo "$as_me: failed program was:" >&5
13671cat conftest.$ac_ext >&5
13672( exit $ac_status )
13673ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013674fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013675rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13676fi
Guido van Rossumf78abae1997-01-21 22:02:36 +000013677fi
13678
Martin v. Löwis11437992002-04-12 09:54:03 +000013679echo "$as_me:$LINENO: result: $ac_cv_bad_static_forward" >&5
13680echo "${ECHO_T}$ac_cv_bad_static_forward" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013681if test "$ac_cv_bad_static_forward" = yes
13682then
Martin v. Löwis11437992002-04-12 09:54:03 +000013683
13684cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013685#define BAD_STATIC_FORWARD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013686_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013687
13688fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013689
Guido van Rossumda88dad1995-01-26 00:46:29 +000013690va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013691echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13692echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13693cat >conftest.$ac_ext <<_ACEOF
13694#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013695#include "confdefs.h"
13696
13697#ifdef HAVE_STDARG_PROTOTYPES
13698#include <stdarg.h>
13699#else
13700#include <varargs.h>
13701#endif
13702
Martin v. Löwis11437992002-04-12 09:54:03 +000013703#ifdef F77_DUMMY_MAIN
13704# ifdef __cplusplus
13705 extern "C"
13706# endif
13707 int F77_DUMMY_MAIN() { return 1; }
13708#endif
13709int
13710main ()
13711{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013712va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013713 ;
13714 return 0;
13715}
13716_ACEOF
13717rm -f conftest.$ac_objext
13718if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13719 (eval $ac_compile) 2>&5
13720 ac_status=$?
13721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13722 (exit $ac_status); } &&
13723 { ac_try='test -s conftest.$ac_objext'
13724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13725 (eval $ac_try) 2>&5
13726 ac_status=$?
13727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13728 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013729 :
13730else
Martin v. Löwis11437992002-04-12 09:54:03 +000013731 echo "$as_me: failed program was:" >&5
13732cat conftest.$ac_ext >&5
13733
13734
13735cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013736#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013737_ACEOF
13738
Guido van Rossumda88dad1995-01-26 00:46:29 +000013739 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013740
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013741fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013742rm -f conftest.$ac_objext conftest.$ac_ext
13743echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13744echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013745
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013746# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013747
13748
13749
13750echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13751echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13752if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13753 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013754else
Martin v. Löwis11437992002-04-12 09:54:03 +000013755 cat >conftest.$ac_ext <<_ACEOF
13756#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013757#include "confdefs.h"
13758/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013759 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013760#include <assert.h>
13761/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013762#ifdef __cplusplus
13763extern "C"
13764#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013765/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013766 builtin and then its argument prototype would still apply. */
13767char gethostbyname_r ();
13768char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013769
Martin v. Löwis11437992002-04-12 09:54:03 +000013770#ifdef F77_DUMMY_MAIN
13771# ifdef __cplusplus
13772 extern "C"
13773# endif
13774 int F77_DUMMY_MAIN() { return 1; }
13775#endif
13776int
13777main ()
13778{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013779/* The GNU C library defines this for functions which it implements
13780 to always fail with ENOSYS. Some functions are actually named
13781 something starting with __ and the normal name is an alias. */
13782#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13783choke me
13784#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013785f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013786#endif
13787
Martin v. Löwis11437992002-04-12 09:54:03 +000013788 ;
13789 return 0;
13790}
13791_ACEOF
13792rm -f conftest.$ac_objext conftest$ac_exeext
13793if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13794 (eval $ac_link) 2>&5
13795 ac_status=$?
13796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13797 (exit $ac_status); } &&
13798 { ac_try='test -s conftest$ac_exeext'
13799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13800 (eval $ac_try) 2>&5
13801 ac_status=$?
13802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13803 (exit $ac_status); }; }; then
13804 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013805else
Martin v. Löwis11437992002-04-12 09:54:03 +000013806 echo "$as_me: failed program was:" >&5
13807cat conftest.$ac_ext >&5
13808ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013809fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013810rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013811fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013812echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13813echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13814if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013815
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013817#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013818_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013819
Martin v. Löwis11437992002-04-12 09:54:03 +000013820 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13821echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013822 OLD_CFLAGS=$CFLAGS
13823 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013824 cat >conftest.$ac_ext <<_ACEOF
13825#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013826#include "confdefs.h"
13827
13828# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013829
13830#ifdef F77_DUMMY_MAIN
13831# ifdef __cplusplus
13832 extern "C"
13833# endif
13834 int F77_DUMMY_MAIN() { return 1; }
13835#endif
13836int
13837main ()
13838{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013839
13840 char *name;
13841 struct hostent *he, *res;
13842 char buffer[2048];
13843 int buflen = 2048;
13844 int h_errnop;
13845
13846 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013847
13848 ;
13849 return 0;
13850}
13851_ACEOF
13852rm -f conftest.$ac_objext
13853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13854 (eval $ac_compile) 2>&5
13855 ac_status=$?
13856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13857 (exit $ac_status); } &&
13858 { ac_try='test -s conftest.$ac_objext'
13859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13860 (eval $ac_try) 2>&5
13861 ac_status=$?
13862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13863 (exit $ac_status); }; }; then
13864
13865 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013866#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013867_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013868
Martin v. Löwis11437992002-04-12 09:54:03 +000013869
13870cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013871#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013872_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013873
Martin v. Löwis11437992002-04-12 09:54:03 +000013874 echo "$as_me:$LINENO: result: yes" >&5
13875echo "${ECHO_T}yes" >&6
13876
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013877else
Martin v. Löwis11437992002-04-12 09:54:03 +000013878 echo "$as_me: failed program was:" >&5
13879cat conftest.$ac_ext >&5
13880
13881 echo "$as_me:$LINENO: result: no" >&5
13882echo "${ECHO_T}no" >&6
13883 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
13884echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
13885 cat >conftest.$ac_ext <<_ACEOF
13886#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013887#include "confdefs.h"
13888
13889# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013890
13891#ifdef F77_DUMMY_MAIN
13892# ifdef __cplusplus
13893 extern "C"
13894# endif
13895 int F77_DUMMY_MAIN() { return 1; }
13896#endif
13897int
13898main ()
13899{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013900
13901 char *name;
13902 struct hostent *he;
13903 char buffer[2048];
13904 int buflen = 2048;
13905 int h_errnop;
13906
13907 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013908
13909 ;
13910 return 0;
13911}
13912_ACEOF
13913rm -f conftest.$ac_objext
13914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13915 (eval $ac_compile) 2>&5
13916 ac_status=$?
13917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13918 (exit $ac_status); } &&
13919 { ac_try='test -s conftest.$ac_objext'
13920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13921 (eval $ac_try) 2>&5
13922 ac_status=$?
13923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13924 (exit $ac_status); }; }; then
13925
13926 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013927#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013928_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013929
Martin v. Löwis11437992002-04-12 09:54:03 +000013930
13931cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013932#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013933_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013934
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 echo "$as_me:$LINENO: result: yes" >&5
13936echo "${ECHO_T}yes" >&6
13937
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013938else
Martin v. Löwis11437992002-04-12 09:54:03 +000013939 echo "$as_me: failed program was:" >&5
13940cat conftest.$ac_ext >&5
13941
13942 echo "$as_me:$LINENO: result: no" >&5
13943echo "${ECHO_T}no" >&6
13944 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
13945echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
13946 cat >conftest.$ac_ext <<_ACEOF
13947#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013948#include "confdefs.h"
13949
13950# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013951
13952#ifdef F77_DUMMY_MAIN
13953# ifdef __cplusplus
13954 extern "C"
13955# endif
13956 int F77_DUMMY_MAIN() { return 1; }
13957#endif
13958int
13959main ()
13960{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013961
13962 char *name;
13963 struct hostent *he;
13964 struct hostent_data data;
13965
13966 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000013967
13968 ;
13969 return 0;
13970}
13971_ACEOF
13972rm -f conftest.$ac_objext
13973if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13974 (eval $ac_compile) 2>&5
13975 ac_status=$?
13976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13977 (exit $ac_status); } &&
13978 { ac_try='test -s conftest.$ac_objext'
13979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13980 (eval $ac_try) 2>&5
13981 ac_status=$?
13982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13983 (exit $ac_status); }; }; then
13984
13985 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013986#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013987_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013988
Martin v. Löwis11437992002-04-12 09:54:03 +000013989
13990cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013991#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013992_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013993
Martin v. Löwis11437992002-04-12 09:54:03 +000013994 echo "$as_me:$LINENO: result: yes" >&5
13995echo "${ECHO_T}yes" >&6
13996
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013997else
Martin v. Löwis11437992002-04-12 09:54:03 +000013998 echo "$as_me: failed program was:" >&5
13999cat conftest.$ac_ext >&5
14000
14001 echo "$as_me:$LINENO: result: no" >&5
14002echo "${ECHO_T}no" >&6
14003
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014004fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014005rm -f conftest.$ac_objext conftest.$ac_ext
14006
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014007fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014008rm -f conftest.$ac_objext conftest.$ac_ext
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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014012 CFLAGS=$OLD_CFLAGS
14013
14014else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014015
Martin v. Löwis11437992002-04-12 09:54:03 +000014016
14017for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014018do
Martin v. Löwis11437992002-04-12 09:54:03 +000014019as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14020echo "$as_me:$LINENO: checking for $ac_func" >&5
14021echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14022if eval "test \"\${$as_ac_var+set}\" = set"; then
14023 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014024else
Martin v. Löwis11437992002-04-12 09:54:03 +000014025 cat >conftest.$ac_ext <<_ACEOF
14026#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014027#include "confdefs.h"
14028/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014029 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014030#include <assert.h>
14031/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014032#ifdef __cplusplus
14033extern "C"
14034#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014035/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014036 builtin and then its argument prototype would still apply. */
14037char $ac_func ();
14038char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014039
Martin v. Löwis11437992002-04-12 09:54:03 +000014040#ifdef F77_DUMMY_MAIN
14041# ifdef __cplusplus
14042 extern "C"
14043# endif
14044 int F77_DUMMY_MAIN() { return 1; }
14045#endif
14046int
14047main ()
14048{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014049/* The GNU C library defines this for functions which it implements
14050 to always fail with ENOSYS. Some functions are actually named
14051 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014052#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014053choke me
14054#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014055f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014056#endif
14057
Martin v. Löwis11437992002-04-12 09:54:03 +000014058 ;
14059 return 0;
14060}
14061_ACEOF
14062rm -f conftest.$ac_objext conftest$ac_exeext
14063if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14064 (eval $ac_link) 2>&5
14065 ac_status=$?
14066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14067 (exit $ac_status); } &&
14068 { ac_try='test -s conftest$ac_exeext'
14069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14070 (eval $ac_try) 2>&5
14071 ac_status=$?
14072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14073 (exit $ac_status); }; }; then
14074 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014075else
Martin v. Löwis11437992002-04-12 09:54:03 +000014076 echo "$as_me: failed program was:" >&5
14077cat conftest.$ac_ext >&5
14078eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014079fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014082echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14083echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14084if test `eval echo '${'$as_ac_var'}'` = yes; then
14085 cat >>confdefs.h <<_ACEOF
14086#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14087_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014088
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014089fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014090done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014091
Michael W. Hudson54241132001-12-07 15:38:26 +000014092
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014093fi
14094
Michael W. Hudson54241132001-12-07 15:38:26 +000014095
14096
14097
14098
14099
14100
Guido van Rossum627b2d71993-12-24 10:39:16 +000014101# checks for system services
14102# (none yet)
14103
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014104# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014105echo "$as_me:$LINENO: checking for __fpu_control" >&5
14106echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14107if test "${ac_cv_func___fpu_control+set}" = set; then
14108 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014109else
Martin v. Löwis11437992002-04-12 09:54:03 +000014110 cat >conftest.$ac_ext <<_ACEOF
14111#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014112#include "confdefs.h"
14113/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014114 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014115#include <assert.h>
14116/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014117#ifdef __cplusplus
14118extern "C"
14119#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014120/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014121 builtin and then its argument prototype would still apply. */
14122char __fpu_control ();
14123char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014124
Martin v. Löwis11437992002-04-12 09:54:03 +000014125#ifdef F77_DUMMY_MAIN
14126# ifdef __cplusplus
14127 extern "C"
14128# endif
14129 int F77_DUMMY_MAIN() { return 1; }
14130#endif
14131int
14132main ()
14133{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014134/* The GNU C library defines this for functions which it implements
14135 to always fail with ENOSYS. Some functions are actually named
14136 something starting with __ and the normal name is an alias. */
14137#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14138choke me
14139#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014140f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014141#endif
14142
Martin v. Löwis11437992002-04-12 09:54:03 +000014143 ;
14144 return 0;
14145}
14146_ACEOF
14147rm -f conftest.$ac_objext conftest$ac_exeext
14148if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14149 (eval $ac_link) 2>&5
14150 ac_status=$?
14151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14152 (exit $ac_status); } &&
14153 { ac_try='test -s conftest$ac_exeext'
14154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14155 (eval $ac_try) 2>&5
14156 ac_status=$?
14157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14158 (exit $ac_status); }; }; then
14159 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014160else
Martin v. Löwis11437992002-04-12 09:54:03 +000014161 echo "$as_me: failed program was:" >&5
14162cat conftest.$ac_ext >&5
14163ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014164fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014165rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014166fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014167echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14168echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14169if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014170 :
14171else
Martin v. Löwis11437992002-04-12 09:54:03 +000014172
14173echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14174echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14175if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14176 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014177else
Martin v. Löwis11437992002-04-12 09:54:03 +000014178 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014179LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014180cat >conftest.$ac_ext <<_ACEOF
14181#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014182#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014183
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014184/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014185#ifdef __cplusplus
14186extern "C"
14187#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014188/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014189 builtin and then its argument prototype would still apply. */
14190char __fpu_control ();
14191#ifdef F77_DUMMY_MAIN
14192# ifdef __cplusplus
14193 extern "C"
14194# endif
14195 int F77_DUMMY_MAIN() { return 1; }
14196#endif
14197int
14198main ()
14199{
14200__fpu_control ();
14201 ;
14202 return 0;
14203}
14204_ACEOF
14205rm -f conftest.$ac_objext conftest$ac_exeext
14206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14207 (eval $ac_link) 2>&5
14208 ac_status=$?
14209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14210 (exit $ac_status); } &&
14211 { ac_try='test -s conftest$ac_exeext'
14212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14213 (eval $ac_try) 2>&5
14214 ac_status=$?
14215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14216 (exit $ac_status); }; }; then
14217 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014218else
Martin v. Löwis11437992002-04-12 09:54:03 +000014219 echo "$as_me: failed program was:" >&5
14220cat conftest.$ac_ext >&5
14221ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014223rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14224LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014225fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014226echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14227echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14228if test $ac_cv_lib_ieee___fpu_control = yes; then
14229 cat >>confdefs.h <<_ACEOF
14230#define HAVE_LIBIEEE 1
14231_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014232
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014233 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014234
Guido van Rossum627b2d71993-12-24 10:39:16 +000014235fi
14236
Michael W. Hudson54241132001-12-07 15:38:26 +000014237
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014238fi
14239
Michael W. Hudson54241132001-12-07 15:38:26 +000014240
Guido van Rossum7f253911997-05-09 02:42:48 +000014241# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014242echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14243echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14244
Guido van Rossum7f253911997-05-09 02:42:48 +000014245# Check whether --with-fpectl or --without-fpectl was given.
14246if test "${with_fpectl+set}" = set; then
14247 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014248
Guido van Rossum7f253911997-05-09 02:42:48 +000014249if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014250then
14251
14252cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014253#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014254_ACEOF
14255
14256 echo "$as_me:$LINENO: result: yes" >&5
14257echo "${ECHO_T}yes" >&6
14258else echo "$as_me:$LINENO: result: no" >&5
14259echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014260fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014261else
Martin v. Löwis11437992002-04-12 09:54:03 +000014262 echo "$as_me:$LINENO: result: no" >&5
14263echo "${ECHO_T}no" >&6
14264fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014265
Guido van Rossum7f43da71994-08-01 12:15:30 +000014266# check for --with-libm=...
14267
Guido van Rossum563e7081996-09-10 18:20:48 +000014268case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014269Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014270BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014271*) LIBM=-lm
14272esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014273echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14274echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14275
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014276# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014277if test "${with_libm+set}" = set; then
14278 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014279
Guido van Rossum7f253911997-05-09 02:42:48 +000014280if test "$withval" = no
14281then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014282 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14283echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014284elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014285then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014286 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14287echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14288else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14289echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14290 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014291fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014292else
Martin v. Löwis11437992002-04-12 09:54:03 +000014293 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14294echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14295fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014296
14297# check for --with-libc=...
14298
Martin v. Löwis11437992002-04-12 09:54:03 +000014299echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14300echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14301
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014302# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014303if test "${with_libc+set}" = set; then
14304 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014305
Guido van Rossum7f253911997-05-09 02:42:48 +000014306if test "$withval" = no
14307then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014308 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14309echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014310elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014311then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014312 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14313echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14314else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14315echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14316 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014317fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014318else
Martin v. Löwis11437992002-04-12 09:54:03 +000014319 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14320echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14321fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014322
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014323# check for hypot() in math library
14324LIBS_SAVE=$LIBS
14325LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014326
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014327for ac_func in hypot
14328do
Martin v. Löwis11437992002-04-12 09:54:03 +000014329as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14330echo "$as_me:$LINENO: checking for $ac_func" >&5
14331echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14332if eval "test \"\${$as_ac_var+set}\" = set"; then
14333 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014334else
Martin v. Löwis11437992002-04-12 09:54:03 +000014335 cat >conftest.$ac_ext <<_ACEOF
14336#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014337#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014338/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014339 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014340#include <assert.h>
14341/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014342#ifdef __cplusplus
14343extern "C"
14344#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014345/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 builtin and then its argument prototype would still apply. */
14347char $ac_func ();
14348char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014349
Martin v. Löwis11437992002-04-12 09:54:03 +000014350#ifdef F77_DUMMY_MAIN
14351# ifdef __cplusplus
14352 extern "C"
14353# endif
14354 int F77_DUMMY_MAIN() { return 1; }
14355#endif
14356int
14357main ()
14358{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014359/* The GNU C library defines this for functions which it implements
14360 to always fail with ENOSYS. Some functions are actually named
14361 something starting with __ and the normal name is an alias. */
14362#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14363choke me
14364#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014365f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014366#endif
14367
Martin v. Löwis11437992002-04-12 09:54:03 +000014368 ;
14369 return 0;
14370}
14371_ACEOF
14372rm -f conftest.$ac_objext conftest$ac_exeext
14373if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14374 (eval $ac_link) 2>&5
14375 ac_status=$?
14376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14377 (exit $ac_status); } &&
14378 { ac_try='test -s conftest$ac_exeext'
14379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14380 (eval $ac_try) 2>&5
14381 ac_status=$?
14382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14383 (exit $ac_status); }; }; then
14384 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014385else
Martin v. Löwis11437992002-04-12 09:54:03 +000014386 echo "$as_me: failed program was:" >&5
14387cat conftest.$ac_ext >&5
14388eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014389fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014390rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014391fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014392echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14393echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14394if test `eval echo '${'$as_ac_var'}'` = yes; then
14395 cat >>confdefs.h <<_ACEOF
14396#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14397_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014398
Michael W. Hudson54241132001-12-07 15:38:26 +000014399else
Martin v. Löwis11437992002-04-12 09:54:03 +000014400 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014401fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014402done
14403
Michael W. Hudson54241132001-12-07 15:38:26 +000014404
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014405LIBS=$LIBS_SAVE
14406
Guido van Rossumad713701997-07-10 22:42:38 +000014407# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014408echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14409echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14410if test "${ac_cv_malloc_zero+set}" = set; then
14411 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014412else
14413 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014414 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014415else
Martin v. Löwis11437992002-04-12 09:54:03 +000014416 cat >conftest.$ac_ext <<_ACEOF
14417#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014418#include "confdefs.h"
14419#include <stdio.h>
14420#ifdef HAVE_STDLIB
14421#include <stdlib.h>
14422#else
14423char *malloc(), *realloc();
14424int *free();
14425#endif
14426main() {
14427 char *p;
14428 p = malloc(0);
14429 if (p == NULL) exit(1);
14430 p = realloc(p, 0);
14431 if (p == NULL) exit(1);
14432 free(p);
14433 exit(0);
14434}
Martin v. Löwis11437992002-04-12 09:54:03 +000014435_ACEOF
14436rm -f conftest$ac_exeext
14437if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14438 (eval $ac_link) 2>&5
14439 ac_status=$?
14440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14441 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14443 (eval $ac_try) 2>&5
14444 ac_status=$?
14445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14446 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014447 ac_cv_malloc_zero=nonnull
14448else
Martin v. Löwis11437992002-04-12 09:54:03 +000014449 echo "$as_me: program exited with status $ac_status" >&5
14450echo "$as_me: failed program was:" >&5
14451cat conftest.$ac_ext >&5
14452( exit $ac_status )
14453ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014454fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014455rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014456fi
Guido van Rossumad713701997-07-10 22:42:38 +000014457fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014458 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014459echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14460echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014461if test "$ac_cv_malloc_zero" = null
14462then
Martin v. Löwis11437992002-04-12 09:54:03 +000014463
14464cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014465#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014466_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014467
14468fi
14469
Guido van Rossumef2255b2000-03-10 22:30:29 +000014470# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014471if test "${ac_cv_header_wchar_h+set}" = set; then
14472 echo "$as_me:$LINENO: checking for wchar.h" >&5
14473echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14474if test "${ac_cv_header_wchar_h+set}" = set; then
14475 echo $ECHO_N "(cached) $ECHO_C" >&6
14476fi
14477echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14478echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014479else
Martin v. Löwis11437992002-04-12 09:54:03 +000014480 # Is the header compilable?
14481echo "$as_me:$LINENO: checking wchar.h usability" >&5
14482echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14483cat >conftest.$ac_ext <<_ACEOF
14484#line $LINENO "configure"
14485#include "confdefs.h"
14486$ac_includes_default
14487#include <wchar.h>
14488_ACEOF
14489rm -f conftest.$ac_objext
14490if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14491 (eval $ac_compile) 2>&5
14492 ac_status=$?
14493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14494 (exit $ac_status); } &&
14495 { ac_try='test -s conftest.$ac_objext'
14496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14497 (eval $ac_try) 2>&5
14498 ac_status=$?
14499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14500 (exit $ac_status); }; }; then
14501 ac_header_compiler=yes
14502else
14503 echo "$as_me: failed program was:" >&5
14504cat conftest.$ac_ext >&5
14505ac_header_compiler=no
14506fi
14507rm -f conftest.$ac_objext conftest.$ac_ext
14508echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14509echo "${ECHO_T}$ac_header_compiler" >&6
14510
14511# Is the header present?
14512echo "$as_me:$LINENO: checking wchar.h presence" >&5
14513echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14514cat >conftest.$ac_ext <<_ACEOF
14515#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014516#include "confdefs.h"
14517#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014518_ACEOF
14519if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14520 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14521 ac_status=$?
14522 egrep -v '^ *\+' conftest.er1 >conftest.err
14523 rm -f conftest.er1
14524 cat conftest.err >&5
14525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14526 (exit $ac_status); } >/dev/null; then
14527 if test -s conftest.err; then
14528 ac_cpp_err=$ac_c_preproc_warn_flag
14529 else
14530 ac_cpp_err=
14531 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014532else
Martin v. Löwis11437992002-04-12 09:54:03 +000014533 ac_cpp_err=yes
14534fi
14535if test -z "$ac_cpp_err"; then
14536 ac_header_preproc=yes
14537else
14538 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014539 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014540 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014541fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014542rm -f conftest.err conftest.$ac_ext
14543echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14544echo "${ECHO_T}$ac_header_preproc" >&6
14545
14546# So? What about this header?
14547case $ac_header_compiler:$ac_header_preproc in
14548 yes:no )
14549 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14550echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14551 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14552echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14553 no:yes )
14554 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14555echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14556 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14557echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14558 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14559echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14560esac
14561echo "$as_me:$LINENO: checking for wchar.h" >&5
14562echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14563if test "${ac_cv_header_wchar_h+set}" = set; then
14564 echo $ECHO_N "(cached) $ECHO_C" >&6
14565else
14566 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014568echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14569echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14570
14571fi
14572if test $ac_cv_header_wchar_h = yes; then
14573
14574
14575cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014576#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014577_ACEOF
14578
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014579 wchar_h="yes"
14580
Guido van Rossumef2255b2000-03-10 22:30:29 +000014581else
Martin v. Löwis11437992002-04-12 09:54:03 +000014582 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014583
14584fi
14585
Michael W. Hudson54241132001-12-07 15:38:26 +000014586
Martin v. Löwis11437992002-04-12 09:54:03 +000014587
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014588# determine wchar_t size
14589if test "$wchar_h" = yes
14590then
Martin v. Löwis11437992002-04-12 09:54:03 +000014591 echo "$as_me:$LINENO: checking for wchar_t" >&5
14592echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14593if test "${ac_cv_type_wchar_t+set}" = set; then
14594 echo $ECHO_N "(cached) $ECHO_C" >&6
14595else
14596 cat >conftest.$ac_ext <<_ACEOF
14597#line $LINENO "configure"
14598#include "confdefs.h"
14599#include <wchar.h>
14600
14601#ifdef F77_DUMMY_MAIN
14602# ifdef __cplusplus
14603 extern "C"
14604# endif
14605 int F77_DUMMY_MAIN() { return 1; }
14606#endif
14607int
14608main ()
14609{
14610if ((wchar_t *) 0)
14611 return 0;
14612if (sizeof (wchar_t))
14613 return 0;
14614 ;
14615 return 0;
14616}
14617_ACEOF
14618rm -f conftest.$ac_objext
14619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14620 (eval $ac_compile) 2>&5
14621 ac_status=$?
14622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14623 (exit $ac_status); } &&
14624 { ac_try='test -s conftest.$ac_objext'
14625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14626 (eval $ac_try) 2>&5
14627 ac_status=$?
14628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14629 (exit $ac_status); }; }; then
14630 ac_cv_type_wchar_t=yes
14631else
14632 echo "$as_me: failed program was:" >&5
14633cat conftest.$ac_ext >&5
14634ac_cv_type_wchar_t=no
14635fi
14636rm -f conftest.$ac_objext conftest.$ac_ext
14637fi
14638echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14639echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14640
14641echo "$as_me:$LINENO: checking size of wchar_t" >&5
14642echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14643if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14644 echo $ECHO_N "(cached) $ECHO_C" >&6
14645else
14646 if test "$ac_cv_type_wchar_t" = yes; then
14647 # The cast to unsigned long works around a bug in the HP C Compiler
14648 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14649 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14650 # This bug is HP SR number 8606223364.
14651 if test "$cross_compiling" = yes; then
14652 # Depending upon the size, compute the lo and hi bounds.
14653cat >conftest.$ac_ext <<_ACEOF
14654#line $LINENO "configure"
14655#include "confdefs.h"
14656#include <wchar.h>
14657
14658#ifdef F77_DUMMY_MAIN
14659# ifdef __cplusplus
14660 extern "C"
14661# endif
14662 int F77_DUMMY_MAIN() { return 1; }
14663#endif
14664int
14665main ()
14666{
14667static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14668test_array [0] = 0
14669
14670 ;
14671 return 0;
14672}
14673_ACEOF
14674rm -f conftest.$ac_objext
14675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14676 (eval $ac_compile) 2>&5
14677 ac_status=$?
14678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14679 (exit $ac_status); } &&
14680 { ac_try='test -s conftest.$ac_objext'
14681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14682 (eval $ac_try) 2>&5
14683 ac_status=$?
14684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14685 (exit $ac_status); }; }; then
14686 ac_lo=0 ac_mid=0
14687 while :; do
14688 cat >conftest.$ac_ext <<_ACEOF
14689#line $LINENO "configure"
14690#include "confdefs.h"
14691#include <wchar.h>
14692
14693#ifdef F77_DUMMY_MAIN
14694# ifdef __cplusplus
14695 extern "C"
14696# endif
14697 int F77_DUMMY_MAIN() { return 1; }
14698#endif
14699int
14700main ()
14701{
14702static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14703test_array [0] = 0
14704
14705 ;
14706 return 0;
14707}
14708_ACEOF
14709rm -f conftest.$ac_objext
14710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14711 (eval $ac_compile) 2>&5
14712 ac_status=$?
14713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14714 (exit $ac_status); } &&
14715 { ac_try='test -s conftest.$ac_objext'
14716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14717 (eval $ac_try) 2>&5
14718 ac_status=$?
14719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14720 (exit $ac_status); }; }; then
14721 ac_hi=$ac_mid; break
14722else
14723 echo "$as_me: failed program was:" >&5
14724cat conftest.$ac_ext >&5
14725ac_lo=`expr $ac_mid + 1`
14726 if test $ac_lo -le $ac_mid; then
14727 ac_lo= ac_hi=
14728 break
14729 fi
14730 ac_mid=`expr 2 '*' $ac_mid + 1`
14731fi
14732rm -f conftest.$ac_objext conftest.$ac_ext
14733 done
14734else
14735 echo "$as_me: failed program was:" >&5
14736cat conftest.$ac_ext >&5
14737cat >conftest.$ac_ext <<_ACEOF
14738#line $LINENO "configure"
14739#include "confdefs.h"
14740#include <wchar.h>
14741
14742#ifdef F77_DUMMY_MAIN
14743# ifdef __cplusplus
14744 extern "C"
14745# endif
14746 int F77_DUMMY_MAIN() { return 1; }
14747#endif
14748int
14749main ()
14750{
14751static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14752test_array [0] = 0
14753
14754 ;
14755 return 0;
14756}
14757_ACEOF
14758rm -f conftest.$ac_objext
14759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14760 (eval $ac_compile) 2>&5
14761 ac_status=$?
14762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14763 (exit $ac_status); } &&
14764 { ac_try='test -s conftest.$ac_objext'
14765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14766 (eval $ac_try) 2>&5
14767 ac_status=$?
14768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14769 (exit $ac_status); }; }; then
14770 ac_hi=-1 ac_mid=-1
14771 while :; do
14772 cat >conftest.$ac_ext <<_ACEOF
14773#line $LINENO "configure"
14774#include "confdefs.h"
14775#include <wchar.h>
14776
14777#ifdef F77_DUMMY_MAIN
14778# ifdef __cplusplus
14779 extern "C"
14780# endif
14781 int F77_DUMMY_MAIN() { return 1; }
14782#endif
14783int
14784main ()
14785{
14786static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14787test_array [0] = 0
14788
14789 ;
14790 return 0;
14791}
14792_ACEOF
14793rm -f conftest.$ac_objext
14794if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14795 (eval $ac_compile) 2>&5
14796 ac_status=$?
14797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14798 (exit $ac_status); } &&
14799 { ac_try='test -s conftest.$ac_objext'
14800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14801 (eval $ac_try) 2>&5
14802 ac_status=$?
14803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14804 (exit $ac_status); }; }; then
14805 ac_lo=$ac_mid; break
14806else
14807 echo "$as_me: failed program was:" >&5
14808cat conftest.$ac_ext >&5
14809ac_hi=`expr '(' $ac_mid ')' - 1`
14810 if test $ac_mid -le $ac_hi; then
14811 ac_lo= ac_hi=
14812 break
14813 fi
14814 ac_mid=`expr 2 '*' $ac_mid`
14815fi
14816rm -f conftest.$ac_objext conftest.$ac_ext
14817 done
14818else
14819 echo "$as_me: failed program was:" >&5
14820cat conftest.$ac_ext >&5
14821ac_lo= ac_hi=
14822fi
14823rm -f conftest.$ac_objext conftest.$ac_ext
14824fi
14825rm -f conftest.$ac_objext conftest.$ac_ext
14826# Binary search between lo and hi bounds.
14827while test "x$ac_lo" != "x$ac_hi"; do
14828 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14829 cat >conftest.$ac_ext <<_ACEOF
14830#line $LINENO "configure"
14831#include "confdefs.h"
14832#include <wchar.h>
14833
14834#ifdef F77_DUMMY_MAIN
14835# ifdef __cplusplus
14836 extern "C"
14837# endif
14838 int F77_DUMMY_MAIN() { return 1; }
14839#endif
14840int
14841main ()
14842{
14843static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14844test_array [0] = 0
14845
14846 ;
14847 return 0;
14848}
14849_ACEOF
14850rm -f conftest.$ac_objext
14851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14852 (eval $ac_compile) 2>&5
14853 ac_status=$?
14854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14855 (exit $ac_status); } &&
14856 { ac_try='test -s conftest.$ac_objext'
14857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14858 (eval $ac_try) 2>&5
14859 ac_status=$?
14860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14861 (exit $ac_status); }; }; then
14862 ac_hi=$ac_mid
14863else
14864 echo "$as_me: failed program was:" >&5
14865cat conftest.$ac_ext >&5
14866ac_lo=`expr '(' $ac_mid ')' + 1`
14867fi
14868rm -f conftest.$ac_objext conftest.$ac_ext
14869done
14870case $ac_lo in
14871?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14872'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14873echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14874 { (exit 1); exit 1; }; } ;;
14875esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014876else
14877 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014878 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14879echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14880 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014881else
Martin v. Löwis11437992002-04-12 09:54:03 +000014882 cat >conftest.$ac_ext <<_ACEOF
14883#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014884#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014885#include <wchar.h>
14886
14887long longval () { return (long) (sizeof (wchar_t)); }
14888unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000014889#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014890#include <stdlib.h>
14891#ifdef F77_DUMMY_MAIN
14892# ifdef __cplusplus
14893 extern "C"
14894# endif
14895 int F77_DUMMY_MAIN() { return 1; }
14896#endif
14897int
14898main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014899{
Martin v. Löwis11437992002-04-12 09:54:03 +000014900
14901 FILE *f = fopen ("conftest.val", "w");
14902 if (! f)
14903 exit (1);
14904 if (((long) (sizeof (wchar_t))) < 0)
14905 {
14906 long i = longval ();
14907 if (i != ((long) (sizeof (wchar_t))))
14908 exit (1);
14909 fprintf (f, "%ld\n", i);
14910 }
14911 else
14912 {
14913 unsigned long i = ulongval ();
14914 if (i != ((long) (sizeof (wchar_t))))
14915 exit (1);
14916 fprintf (f, "%lu\n", i);
14917 }
14918 exit (ferror (f) || fclose (f) != 0);
14919
14920 ;
14921 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014922}
Martin v. Löwis11437992002-04-12 09:54:03 +000014923_ACEOF
14924rm -f conftest$ac_exeext
14925if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14926 (eval $ac_link) 2>&5
14927 ac_status=$?
14928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14929 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14931 (eval $ac_try) 2>&5
14932 ac_status=$?
14933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14934 (exit $ac_status); }; }; then
14935 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000014936else
Martin v. Löwis11437992002-04-12 09:54:03 +000014937 echo "$as_me: program exited with status $ac_status" >&5
14938echo "$as_me: failed program was:" >&5
14939cat conftest.$ac_ext >&5
14940( exit $ac_status )
14941{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14942echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14943 { (exit 1); exit 1; }; }
14944fi
14945rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14946fi
14947fi
14948rm -f conftest.val
14949else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014950 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000014951fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014952fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014953echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
14954echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
14955cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014956#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014957_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014958
Michael W. Hudson54241132001-12-07 15:38:26 +000014959
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014960fi
14961
Martin v. Löwis11437992002-04-12 09:54:03 +000014962echo "$as_me:$LINENO: checking what type to use for unicode" >&5
14963echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014964# Check whether --enable-unicode or --disable-unicode was given.
14965if test "${enable_unicode+set}" = set; then
14966 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000014967
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014968else
14969 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014970fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014971
14972if test $enable_unicode = yes
14973then
Martin v. Löwisfd917792001-06-27 20:22:04 +000014974 # Without any arguments, Py_UNICODE defaults to two-byte mode
14975 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014976fi
14977
Martin v. Löwis0036cba2002-04-12 09:58:45 +000014978
14979
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014980case "$enable_unicode" in
14981ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000014982 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014983#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000014984_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014985
14986 ;;
14987ucs4) unicode_size="4"
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 4
Martin v. Löwis11437992002-04-12 09:54:03 +000014990_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014991
14992 ;;
14993esac
14994
Michael W. Hudson54241132001-12-07 15:38:26 +000014995
Martin v. Löwis11437992002-04-12 09:54:03 +000014996
14997
Martin v. Löwis0036cba2002-04-12 09:58:45 +000014998
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014999if test "$enable_unicode" = "no"
15000then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015001 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 echo "$as_me:$LINENO: result: not used" >&5
15003echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015004else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015005 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015006
15007cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015008#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015009_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015010
15011 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15012 then
15013 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015014
Martin v. Löwis11437992002-04-12 09:54:03 +000015015cat >>confdefs.h <<\_ACEOF
15016#define HAVE_USABLE_WCHAR_T 1
15017_ACEOF
15018
15019 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015020#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015021_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015022
15023 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15024 then
15025 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015026 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015027#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015028_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015029
15030 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15031 then
15032 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015034#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015035_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015036
15037 else
15038 PY_UNICODE_TYPE="no type found"
15039 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15041echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015042fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015043
15044# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015045echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15046echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15047if test "${ac_cv_c_bigendian+set}" = set; then
15048 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015049else
Martin v. Löwis11437992002-04-12 09:54:03 +000015050 # See if sys/param.h defines the BYTE_ORDER macro.
15051cat >conftest.$ac_ext <<_ACEOF
15052#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015053#include "confdefs.h"
15054#include <sys/types.h>
15055#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015056
Martin v. Löwis11437992002-04-12 09:54:03 +000015057#ifdef F77_DUMMY_MAIN
15058# ifdef __cplusplus
15059 extern "C"
15060# endif
15061 int F77_DUMMY_MAIN() { return 1; }
15062#endif
15063int
15064main ()
15065{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015066#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15067 bogus endian macros
15068#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015069
15070 ;
15071 return 0;
15072}
15073_ACEOF
15074rm -f conftest.$ac_objext
15075if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15076 (eval $ac_compile) 2>&5
15077 ac_status=$?
15078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15079 (exit $ac_status); } &&
15080 { ac_try='test -s conftest.$ac_objext'
15081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15082 (eval $ac_try) 2>&5
15083 ac_status=$?
15084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15085 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015086 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015087cat >conftest.$ac_ext <<_ACEOF
15088#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015089#include "confdefs.h"
15090#include <sys/types.h>
15091#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015092
Martin v. Löwis11437992002-04-12 09:54:03 +000015093#ifdef F77_DUMMY_MAIN
15094# ifdef __cplusplus
15095 extern "C"
15096# endif
15097 int F77_DUMMY_MAIN() { return 1; }
15098#endif
15099int
15100main ()
15101{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015102#if BYTE_ORDER != BIG_ENDIAN
15103 not big endian
15104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015105
15106 ;
15107 return 0;
15108}
15109_ACEOF
15110rm -f conftest.$ac_objext
15111if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15112 (eval $ac_compile) 2>&5
15113 ac_status=$?
15114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15115 (exit $ac_status); } &&
15116 { ac_try='test -s conftest.$ac_objext'
15117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15118 (eval $ac_try) 2>&5
15119 ac_status=$?
15120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15121 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015122 ac_cv_c_bigendian=yes
15123else
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 echo "$as_me: failed program was:" >&5
15125cat conftest.$ac_ext >&5
15126ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015127fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015128rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015129else
Martin v. Löwis11437992002-04-12 09:54:03 +000015130 echo "$as_me: failed program was:" >&5
15131cat conftest.$ac_ext >&5
15132# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015133if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015134 # try to guess the endianess by grep'ing values into an object file
15135 ac_cv_c_bigendian=unknown
15136 cat >conftest.$ac_ext <<_ACEOF
15137#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015138#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015139short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15140short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15141void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15142short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15143short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15144void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15145#ifdef F77_DUMMY_MAIN
15146# ifdef __cplusplus
15147 extern "C"
15148# endif
15149 int F77_DUMMY_MAIN() { return 1; }
15150#endif
15151int
15152main ()
15153{
15154 _ascii (); _ebcdic ();
15155 ;
15156 return 0;
15157}
15158_ACEOF
15159rm -f conftest.$ac_objext
15160if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15161 (eval $ac_compile) 2>&5
15162 ac_status=$?
15163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15164 (exit $ac_status); } &&
15165 { ac_try='test -s conftest.$ac_objext'
15166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15167 (eval $ac_try) 2>&5
15168 ac_status=$?
15169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15170 (exit $ac_status); }; }; then
15171 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15172 ac_cv_c_bigendian=yes
15173fi
15174if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15175 if test "$ac_cv_c_bigendian" = unknown; then
15176 ac_cv_c_bigendian=no
15177 else
15178 # finding both strings is unlikely to happen, but who knows?
15179 ac_cv_c_bigendian=unknown
15180 fi
15181fi
15182else
15183 echo "$as_me: failed program was:" >&5
15184cat conftest.$ac_ext >&5
15185fi
15186rm -f conftest.$ac_objext conftest.$ac_ext
15187else
15188 cat >conftest.$ac_ext <<_ACEOF
15189#line $LINENO "configure"
15190#include "confdefs.h"
15191int
15192main ()
15193{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015194 /* Are we little or big endian? From Harbison&Steele. */
15195 union
15196 {
15197 long l;
15198 char c[sizeof (long)];
15199 } u;
15200 u.l = 1;
15201 exit (u.c[sizeof (long) - 1] == 1);
15202}
Martin v. Löwis11437992002-04-12 09:54:03 +000015203_ACEOF
15204rm -f conftest$ac_exeext
15205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15206 (eval $ac_link) 2>&5
15207 ac_status=$?
15208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15209 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15211 (eval $ac_try) 2>&5
15212 ac_status=$?
15213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15214 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015215 ac_cv_c_bigendian=no
15216else
Martin v. Löwis11437992002-04-12 09:54:03 +000015217 echo "$as_me: program exited with status $ac_status" >&5
15218echo "$as_me: failed program was:" >&5
15219cat conftest.$ac_ext >&5
15220( exit $ac_status )
15221ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015223rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015224fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015225fi
15226rm -f conftest.$ac_objext conftest.$ac_ext
15227fi
15228echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15229echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15230case $ac_cv_c_bigendian in
15231 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015232
Martin v. Löwis11437992002-04-12 09:54:03 +000015233cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015234#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015235_ACEOF
15236 ;;
15237 no)
15238 ;;
15239 *)
15240 { { echo "$as_me:$LINENO: error: unknown endianess
15241presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15242echo "$as_me: error: unknown endianess
15243presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15244 { (exit 1); exit 1; }; } ;;
15245esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015246
Michael W. Hudson54241132001-12-07 15:38:26 +000015247
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015248# Check whether right shifting a negative integer extends the sign bit
15249# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015250echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15251echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15252if test "${ac_cv_rshift_extends_sign+set}" = set; then
15253 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015254else
Martin v. Löwis11437992002-04-12 09:54:03 +000015255
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015256if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015257 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015258else
Martin v. Löwis11437992002-04-12 09:54:03 +000015259 cat >conftest.$ac_ext <<_ACEOF
15260#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015261#include "confdefs.h"
15262
15263int main()
15264{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015265 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015266}
15267
Martin v. Löwis11437992002-04-12 09:54:03 +000015268_ACEOF
15269rm -f conftest$ac_exeext
15270if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15271 (eval $ac_link) 2>&5
15272 ac_status=$?
15273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15274 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15276 (eval $ac_try) 2>&5
15277 ac_status=$?
15278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15279 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015280 ac_cv_rshift_extends_sign=yes
15281else
Martin v. Löwis11437992002-04-12 09:54:03 +000015282 echo "$as_me: program exited with status $ac_status" >&5
15283echo "$as_me: failed program was:" >&5
15284cat conftest.$ac_ext >&5
15285( exit $ac_status )
15286ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015287fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015288rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15289fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015290fi
15291
Martin v. Löwis11437992002-04-12 09:54:03 +000015292echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15293echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015294if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015295then
Martin v. Löwis11437992002-04-12 09:54:03 +000015296
15297cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015298#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015299_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015300
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015301fi
15302
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015303# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015304echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15305echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15306if test "${ac_cv_have_getc_unlocked+set}" = set; then
15307 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015308else
Martin v. Löwis11437992002-04-12 09:54:03 +000015309
15310cat >conftest.$ac_ext <<_ACEOF
15311#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015312#include "confdefs.h"
15313#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015314#ifdef F77_DUMMY_MAIN
15315# ifdef __cplusplus
15316 extern "C"
15317# endif
15318 int F77_DUMMY_MAIN() { return 1; }
15319#endif
15320int
15321main ()
15322{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015323
15324 FILE *f = fopen("/dev/null", "r");
15325 flockfile(f);
15326 getc_unlocked(f);
15327 funlockfile(f);
15328
Martin v. Löwis11437992002-04-12 09:54:03 +000015329 ;
15330 return 0;
15331}
15332_ACEOF
15333rm -f conftest.$ac_objext conftest$ac_exeext
15334if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15335 (eval $ac_link) 2>&5
15336 ac_status=$?
15337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15338 (exit $ac_status); } &&
15339 { ac_try='test -s conftest$ac_exeext'
15340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15341 (eval $ac_try) 2>&5
15342 ac_status=$?
15343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15344 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015345 ac_cv_have_getc_unlocked=yes
15346else
Martin v. Löwis11437992002-04-12 09:54:03 +000015347 echo "$as_me: failed program was:" >&5
15348cat conftest.$ac_ext >&5
15349ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015350fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015351rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015352fi
15353
Martin v. Löwis11437992002-04-12 09:54:03 +000015354echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15355echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015356if test "$ac_cv_have_getc_unlocked" = yes
15357then
Martin v. Löwis11437992002-04-12 09:54:03 +000015358
15359cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015360#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015361_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015362
15363fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015364
Martin v. Löwis0daad592001-09-30 21:09:59 +000015365# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015366echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15367echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15368if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15369 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015370else
Martin v. Löwis11437992002-04-12 09:54:03 +000015371 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015372LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015373cat >conftest.$ac_ext <<_ACEOF
15374#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015375#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015376
Guido van Rossum353ae582001-07-10 16:45:32 +000015377/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015378#ifdef __cplusplus
15379extern "C"
15380#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015381/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015382 builtin and then its argument prototype would still apply. */
15383char rl_pre_input_hook ();
15384#ifdef F77_DUMMY_MAIN
15385# ifdef __cplusplus
15386 extern "C"
15387# endif
15388 int F77_DUMMY_MAIN() { return 1; }
15389#endif
15390int
15391main ()
15392{
15393rl_pre_input_hook ();
15394 ;
15395 return 0;
15396}
15397_ACEOF
15398rm -f conftest.$ac_objext conftest$ac_exeext
15399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15400 (eval $ac_link) 2>&5
15401 ac_status=$?
15402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15403 (exit $ac_status); } &&
15404 { ac_try='test -s conftest$ac_exeext'
15405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15406 (eval $ac_try) 2>&5
15407 ac_status=$?
15408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15409 (exit $ac_status); }; }; then
15410 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015411else
Martin v. Löwis11437992002-04-12 09:54:03 +000015412 echo "$as_me: failed program was:" >&5
15413cat conftest.$ac_ext >&5
15414ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015415fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015416rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15417LIBS=$ac_check_lib_save_LIBS
15418fi
15419echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15420echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15421if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015422
Martin v. Löwis11437992002-04-12 09:54:03 +000015423cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015424#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015425_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015426
Martin v. Löwis0daad592001-09-30 21:09:59 +000015427fi
15428
Michael W. Hudson54241132001-12-07 15:38:26 +000015429
Martin v. Löwis0daad592001-09-30 21:09:59 +000015430# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015431echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15432echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15433if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15434 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015435else
Martin v. Löwis11437992002-04-12 09:54:03 +000015436 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015437LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015438cat >conftest.$ac_ext <<_ACEOF
15439#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015440#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015441
Martin v. Löwis0daad592001-09-30 21:09:59 +000015442/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015443#ifdef __cplusplus
15444extern "C"
15445#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015446/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015447 builtin and then its argument prototype would still apply. */
15448char rl_completion_matches ();
15449#ifdef F77_DUMMY_MAIN
15450# ifdef __cplusplus
15451 extern "C"
15452# endif
15453 int F77_DUMMY_MAIN() { return 1; }
15454#endif
15455int
15456main ()
15457{
15458rl_completion_matches ();
15459 ;
15460 return 0;
15461}
15462_ACEOF
15463rm -f conftest.$ac_objext conftest$ac_exeext
15464if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15465 (eval $ac_link) 2>&5
15466 ac_status=$?
15467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15468 (exit $ac_status); } &&
15469 { ac_try='test -s conftest$ac_exeext'
15470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15471 (eval $ac_try) 2>&5
15472 ac_status=$?
15473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15474 (exit $ac_status); }; }; then
15475 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015476else
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 echo "$as_me: failed program was:" >&5
15478cat conftest.$ac_ext >&5
15479ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015480fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015481rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15482LIBS=$ac_check_lib_save_LIBS
15483fi
15484echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15485echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15486if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015487
Martin v. Löwis11437992002-04-12 09:54:03 +000015488cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015489#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015490_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015491
Guido van Rossum353ae582001-07-10 16:45:32 +000015492fi
15493
Jack Jansendd19cf82001-12-06 22:36:17 +000015494
Martin v. Löwis11437992002-04-12 09:54:03 +000015495echo "$as_me:$LINENO: checking for broken nice()" >&5
15496echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15497if test "${ac_cv_broken_nice+set}" = set; then
15498 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015499else
Martin v. Löwis11437992002-04-12 09:54:03 +000015500
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015501if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015502 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015503else
Martin v. Löwis11437992002-04-12 09:54:03 +000015504 cat >conftest.$ac_ext <<_ACEOF
15505#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015506#include "confdefs.h"
15507
15508int main()
15509{
15510 int val1 = nice(1);
15511 if (val1 != -1 && val1 == nice(2))
15512 exit(0);
15513 exit(1);
15514}
15515
Martin v. Löwis11437992002-04-12 09:54:03 +000015516_ACEOF
15517rm -f conftest$ac_exeext
15518if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15519 (eval $ac_link) 2>&5
15520 ac_status=$?
15521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15522 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15524 (eval $ac_try) 2>&5
15525 ac_status=$?
15526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15527 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015528 ac_cv_broken_nice=yes
15529else
Martin v. Löwis11437992002-04-12 09:54:03 +000015530 echo "$as_me: program exited with status $ac_status" >&5
15531echo "$as_me: failed program was:" >&5
15532cat conftest.$ac_ext >&5
15533( exit $ac_status )
15534ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015535fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015536rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15537fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015538fi
15539
Martin v. Löwis11437992002-04-12 09:54:03 +000015540echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15541echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015542if test "$ac_cv_broken_nice" = yes
15543then
Martin v. Löwis11437992002-04-12 09:54:03 +000015544
15545cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015546#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015547_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015548
15549fi
15550
Jack Jansen666b1e72001-10-31 12:11:48 +000015551# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015552echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15553echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15554if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15555 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015556else
Martin v. Löwis11437992002-04-12 09:54:03 +000015557 cat >conftest.$ac_ext <<_ACEOF
15558#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015559#include "confdefs.h"
15560#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015561#ifdef F77_DUMMY_MAIN
15562# ifdef __cplusplus
15563 extern "C"
15564# endif
15565 int F77_DUMMY_MAIN() { return 1; }
15566#endif
15567int
15568main ()
15569{
Jack Jansen666b1e72001-10-31 12:11:48 +000015570
15571 int rtn;
15572 rtn = mvwdelch(0,0,0);
15573
Martin v. Löwis11437992002-04-12 09:54:03 +000015574 ;
15575 return 0;
15576}
15577_ACEOF
15578rm -f conftest.$ac_objext
15579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15580 (eval $ac_compile) 2>&5
15581 ac_status=$?
15582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15583 (exit $ac_status); } &&
15584 { ac_try='test -s conftest.$ac_objext'
15585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15586 (eval $ac_try) 2>&5
15587 ac_status=$?
15588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15589 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015590 ac_cv_mvwdelch_is_expression=yes
15591else
Martin v. Löwis11437992002-04-12 09:54:03 +000015592 echo "$as_me: failed program was:" >&5
15593cat conftest.$ac_ext >&5
15594ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015595fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015596rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015597fi
15598
Martin v. Löwis11437992002-04-12 09:54:03 +000015599echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15600echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015601
15602if test "$ac_cv_mvwdelch_is_expression" = yes
15603then
Martin v. Löwis11437992002-04-12 09:54:03 +000015604
15605cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015606#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015607_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015608
15609fi
15610
Martin v. Löwis11437992002-04-12 09:54:03 +000015611echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15612echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15613if test "${ac_cv_window_has_flags+set}" = set; then
15614 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015615else
Martin v. Löwis11437992002-04-12 09:54:03 +000015616 cat >conftest.$ac_ext <<_ACEOF
15617#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015618#include "confdefs.h"
15619#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015620#ifdef F77_DUMMY_MAIN
15621# ifdef __cplusplus
15622 extern "C"
15623# endif
15624 int F77_DUMMY_MAIN() { return 1; }
15625#endif
15626int
15627main ()
15628{
Jack Jansen666b1e72001-10-31 12:11:48 +000015629
15630 WINDOW *w;
15631 w->_flags = 0;
15632
Martin v. Löwis11437992002-04-12 09:54:03 +000015633 ;
15634 return 0;
15635}
15636_ACEOF
15637rm -f conftest.$ac_objext
15638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15639 (eval $ac_compile) 2>&5
15640 ac_status=$?
15641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15642 (exit $ac_status); } &&
15643 { ac_try='test -s conftest.$ac_objext'
15644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15645 (eval $ac_try) 2>&5
15646 ac_status=$?
15647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15648 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015649 ac_cv_window_has_flags=yes
15650else
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 echo "$as_me: failed program was:" >&5
15652cat conftest.$ac_ext >&5
15653ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015654fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015655rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015656fi
15657
Martin v. Löwis11437992002-04-12 09:54:03 +000015658echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15659echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015660
Jack Jansen666b1e72001-10-31 12:11:48 +000015661
15662if test "$ac_cv_window_has_flags" = yes
15663then
Martin v. Löwis11437992002-04-12 09:54:03 +000015664
15665cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015666#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015667_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015668
15669fi
15670
Guido van Rossum95713eb2000-05-18 20:53:31 +000015671# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15672# Add sys/socket.h to confdefs.h
15673cat >> confdefs.h <<\EOF
15674#ifdef HAVE_SYS_SOCKET_H
15675#include <sys/socket.h>
15676#endif
15677EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015678echo "$as_me:$LINENO: checking for socklen_t" >&5
15679echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15680if test "${ac_cv_type_socklen_t+set}" = set; then
15681 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015682else
Martin v. Löwis11437992002-04-12 09:54:03 +000015683 cat >conftest.$ac_ext <<_ACEOF
15684#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015685#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015686$ac_includes_default
15687#ifdef F77_DUMMY_MAIN
15688# ifdef __cplusplus
15689 extern "C"
15690# endif
15691 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015692#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015693int
15694main ()
15695{
15696if ((socklen_t *) 0)
15697 return 0;
15698if (sizeof (socklen_t))
15699 return 0;
15700 ;
15701 return 0;
15702}
15703_ACEOF
15704rm -f conftest.$ac_objext
15705if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15706 (eval $ac_compile) 2>&5
15707 ac_status=$?
15708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15709 (exit $ac_status); } &&
15710 { ac_try='test -s conftest.$ac_objext'
15711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15712 (eval $ac_try) 2>&5
15713 ac_status=$?
15714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15715 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015716 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015717else
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 echo "$as_me: failed program was:" >&5
15719cat conftest.$ac_ext >&5
15720ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015721fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015722rm -f conftest.$ac_objext conftest.$ac_ext
15723fi
15724echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15725echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15726if test $ac_cv_type_socklen_t = yes; then
15727 :
15728else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015729
Martin v. Löwis11437992002-04-12 09:54:03 +000015730cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015731#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015732_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015733
15734fi
15735
Michael W. Hudson54241132001-12-07 15:38:26 +000015736
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015737#AC_MSG_CHECKING(for Modules/Setup)
15738#if test ! -f Modules/Setup ; then
15739# if test ! -d Modules ; then
15740# mkdir Modules
15741# fi
15742# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15743# AC_MSG_RESULT(creating)
15744#else
15745# AC_MSG_RESULT(already exists)
15746#fi
15747
Michael W. Hudson54241132001-12-07 15:38:26 +000015748
15749
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015750for h in `(cd $srcdir;echo Python/thread_*.h)`
15751do
15752 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15753done
15754
Michael W. Hudson54241132001-12-07 15:38:26 +000015755
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +000015756SRCDIRS="Parser Grammar Objects Python Modules"
Martin v. Löwis11437992002-04-12 09:54:03 +000015757echo "$as_me:$LINENO: checking for build directories" >&5
15758echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015759for dir in $SRCDIRS; do
15760 if test ! -d $dir; then
15761 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015762 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015763done
Martin v. Löwis11437992002-04-12 09:54:03 +000015764echo "$as_me:$LINENO: result: done" >&5
15765echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015766
Guido van Rossum627b2d71993-12-24 10:39:16 +000015767# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015768ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15769cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015770# This file is a shell script that caches the results of configure
15771# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015772# scripts and configure runs, see configure's option --config-cache.
15773# It is not useful on other systems. If it contains results you don't
15774# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015775#
Martin v. Löwis11437992002-04-12 09:54:03 +000015776# config.status only pays attention to the cache file if you give it
15777# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015778#
Martin v. Löwis11437992002-04-12 09:54:03 +000015779# `ac_cv_env_foo' variables (set or unset) will be overriden when
15780# loading this file, other *unset* `ac_cv_foo' will be assigned the
15781# following values.
15782
15783_ACEOF
15784
Guido van Rossumf78abae1997-01-21 22:02:36 +000015785# The following way of writing the cache mishandles newlines in values,
15786# but we know of no workaround that is simple, portable, and efficient.
15787# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015788# Ultrix sh set writes to stderr and can't be redirected directly,
15789# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015790{
15791 (set) 2>&1 |
15792 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15793 *ac_space=\ *)
15794 # `set' does not quote correctly, so add quotes (double-quote
15795 # substitution turns \\\\ into \\, and sed turns \\ into \).
15796 sed -n \
15797 "s/'/'\\\\''/g;
15798 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15799 ;;
15800 *)
15801 # `set' quotes correctly as required by POSIX, so do not add quotes.
15802 sed -n \
15803 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15804 ;;
15805 esac;
15806} |
15807 sed '
15808 t clear
15809 : clear
15810 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15811 t end
15812 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15813 : end' >>confcache
15814if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015815 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015816 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15817 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015818 else
15819 echo "not updating unwritable cache $cache_file"
15820 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015821fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015822rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015823
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015824test "x$prefix" = xNONE && prefix=$ac_default_prefix
15825# Let make expand exec_prefix.
15826test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015827
Martin v. Löwis11437992002-04-12 09:54:03 +000015828# VPATH may cause trouble with some makes, so we remove $(srcdir),
15829# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15830# trailing colons and then remove the whole line if VPATH becomes empty
15831# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015832if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015833 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15834s/:*\$(srcdir):*/:/;
15835s/:*\${srcdir}:*/:/;
15836s/:*@srcdir@:*/:/;
15837s/^\([^=]*=[ ]*\):*/\1/;
15838s/:*$//;
15839s/^[^=]*=[ ]*$//;
15840}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015841fi
15842
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015843DEFS=-DHAVE_CONFIG_H
15844
Martin v. Löwis11437992002-04-12 09:54:03 +000015845
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015846: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015847ac_clean_files_save=$ac_clean_files
15848ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15849{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15850echo "$as_me: creating $CONFIG_STATUS" >&6;}
15851cat >$CONFIG_STATUS <<_ACEOF
15852#! $SHELL
15853# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015854# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015855# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015856# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015857
Martin v. Löwis11437992002-04-12 09:54:03 +000015858debug=false
15859SHELL=\${CONFIG_SHELL-$SHELL}
15860_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015861
Martin v. Löwis11437992002-04-12 09:54:03 +000015862cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015863
Martin v. Löwis11437992002-04-12 09:54:03 +000015864## --------------------- ##
15865## M4sh Initialization. ##
15866## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015867
Martin v. Löwis11437992002-04-12 09:54:03 +000015868# Be Bourne compatible
15869if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15870 emulate sh
15871 NULLCMD=:
15872elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15873 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000015874fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015875
Martin v. Löwis11437992002-04-12 09:54:03 +000015876# NLS nuisances.
15877# Support unset when possible.
15878if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15879 as_unset=unset
15880else
15881 as_unset=false
15882fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015883
Martin v. Löwis11437992002-04-12 09:54:03 +000015884(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
15885 { $as_unset LANG || test "${LANG+set}" != set; } ||
15886 { LANG=C; export LANG; }
15887(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
15888 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
15889 { LC_ALL=C; export LC_ALL; }
15890(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
15891 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
15892 { LC_TIME=C; export LC_TIME; }
15893(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
15894 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
15895 { LC_CTYPE=C; export LC_CTYPE; }
15896(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
15897 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
15898 { LANGUAGE=C; export LANGUAGE; }
15899(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
15900 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
15901 { LC_COLLATE=C; export LC_COLLATE; }
15902(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
15903 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
15904 { LC_NUMERIC=C; export LC_NUMERIC; }
15905(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
15906 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
15907 { LC_MESSAGES=C; export LC_MESSAGES; }
15908
15909
15910# Name of the executable.
15911as_me=`(basename "$0") 2>/dev/null ||
15912$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15913 X"$0" : 'X\(//\)$' \| \
15914 X"$0" : 'X\(/\)$' \| \
15915 . : '\(.\)' 2>/dev/null ||
15916echo X/"$0" |
15917 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15918 /^X\/\(\/\/\)$/{ s//\1/; q; }
15919 /^X\/\(\/\).*/{ s//\1/; q; }
15920 s/.*/./; q'`
15921
15922# PATH needs CR, and LINENO needs CR and PATH.
15923# Avoid depending upon Character Ranges.
15924as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15925as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15926as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15927as_cr_digits='0123456789'
15928as_cr_alnum=$as_cr_Letters$as_cr_digits
15929
15930# The user is always right.
15931if test "${PATH_SEPARATOR+set}" != set; then
15932 echo "#! /bin/sh" >conftest.sh
15933 echo "exit 0" >>conftest.sh
15934 chmod +x conftest.sh
15935 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
15936 PATH_SEPARATOR=';'
15937 else
15938 PATH_SEPARATOR=:
15939 fi
15940 rm -f conftest.sh
15941fi
15942
15943
15944 as_lineno_1=$LINENO
15945 as_lineno_2=$LINENO
15946 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15947 test "x$as_lineno_1" != "x$as_lineno_2" &&
15948 test "x$as_lineno_3" = "x$as_lineno_2" || {
15949 # Find who we are. Look in the path if we contain no path at all
15950 # relative or not.
15951 case $0 in
15952 *[\\/]* ) as_myself=$0 ;;
15953 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15954for as_dir in $PATH
15955do
15956 IFS=$as_save_IFS
15957 test -z "$as_dir" && as_dir=.
15958 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15959done
15960
15961 ;;
15962 esac
15963 # We did not find ourselves, most probably we were run as `sh COMMAND'
15964 # in which case we are not to be found in the path.
15965 if test "x$as_myself" = x; then
15966 as_myself=$0
15967 fi
15968 if test ! -f "$as_myself"; then
15969 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
15970echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
15971 { (exit 1); exit 1; }; }
15972 fi
15973 case $CONFIG_SHELL in
15974 '')
15975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15976for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
15977do
15978 IFS=$as_save_IFS
15979 test -z "$as_dir" && as_dir=.
15980 for as_base in sh bash ksh sh5; do
15981 case $as_dir in
15982 /*)
15983 if ("$as_dir/$as_base" -c '
15984 as_lineno_1=$LINENO
15985 as_lineno_2=$LINENO
15986 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15987 test "x$as_lineno_1" != "x$as_lineno_2" &&
15988 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
15989 CONFIG_SHELL=$as_dir/$as_base
15990 export CONFIG_SHELL
15991 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
15992 fi;;
15993 esac
15994 done
15995done
15996;;
Jack Jansendd19cf82001-12-06 22:36:17 +000015997 esac
15998
Martin v. Löwis11437992002-04-12 09:54:03 +000015999 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16000 # uniformly replaced by the line number. The first 'sed' inserts a
16001 # line-number line before each line; the second 'sed' does the real
16002 # work. The second script uses 'N' to pair each line-number line
16003 # with the numbered line, and appends trailing '-' during
16004 # substitution so that $LINENO is not a special case at line end.
16005 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16006 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16007 sed '=' <$as_myself |
16008 sed '
16009 N
16010 s,$,-,
16011 : loop
16012 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16013 t loop
16014 s,-$,,
16015 s,^['$as_cr_digits']*\n,,
16016 ' >$as_me.lineno &&
16017 chmod +x $as_me.lineno ||
16018 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16019echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16020 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016021
Martin v. Löwis11437992002-04-12 09:54:03 +000016022 # Don't try to exec as it changes $[0], causing all sort of problems
16023 # (the dirname of $[0] is not the place where we might find the
16024 # original and so on. Autoconf is especially sensible to this).
16025 . ./$as_me.lineno
16026 # Exit status is that of the last command.
16027 exit
16028}
16029
16030
16031case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16032 *c*,-n*) ECHO_N= ECHO_C='
16033' ECHO_T=' ' ;;
16034 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16035 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16036esac
16037
16038if expr a : '\(a\)' >/dev/null 2>&1; then
16039 as_expr=expr
16040else
16041 as_expr=false
16042fi
16043
16044rm -f conf$$ conf$$.exe conf$$.file
16045echo >conf$$.file
16046if ln -s conf$$.file conf$$ 2>/dev/null; then
16047 # We could just check for DJGPP; but this test a) works b) is more generic
16048 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16049 if test -f conf$$.exe; then
16050 # Don't use ln at all; we don't have any links
16051 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016052 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016053 as_ln_s='ln -s'
16054 fi
16055elif ln conf$$.file conf$$ 2>/dev/null; then
16056 as_ln_s=ln
16057else
16058 as_ln_s='cp -p'
16059fi
16060rm -f conf$$ conf$$.exe conf$$.file
16061
16062as_executable_p="test -f"
16063
16064# Sed expression to map a string onto a valid CPP name.
16065as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16066
16067# Sed expression to map a string onto a valid variable name.
16068as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16069
16070
16071# IFS
16072# We need space, tab and new line, in precisely that order.
16073as_nl='
16074'
16075IFS=" $as_nl"
16076
16077# CDPATH.
16078$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16079
16080exec 6>&1
16081
16082# Open the log real soon, to keep \$[0] and so on meaningful, and to
16083# report actual input values of CONFIG_FILES etc. instead of their
16084# values after options handling. Logging --version etc. is OK.
16085exec 5>>config.log
16086{
16087 echo
16088 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16089## Running $as_me. ##
16090_ASBOX
16091} >&5
16092cat >&5 <<_CSEOF
16093
16094This file was extended by $as_me, which was
16095generated by GNU Autoconf 2.53. Invocation command line was
16096
16097 CONFIG_FILES = $CONFIG_FILES
16098 CONFIG_HEADERS = $CONFIG_HEADERS
16099 CONFIG_LINKS = $CONFIG_LINKS
16100 CONFIG_COMMANDS = $CONFIG_COMMANDS
16101 $ $0 $@
16102
16103_CSEOF
16104echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16105echo >&5
16106_ACEOF
16107
16108# Files that config.status was made for.
16109if test -n "$ac_config_files"; then
16110 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16111fi
16112
16113if test -n "$ac_config_headers"; then
16114 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16115fi
16116
16117if test -n "$ac_config_links"; then
16118 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16119fi
16120
16121if test -n "$ac_config_commands"; then
16122 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16123fi
16124
16125cat >>$CONFIG_STATUS <<\_ACEOF
16126
16127ac_cs_usage="\
16128\`$as_me' instantiates files from templates according to the
16129current configuration.
16130
16131Usage: $0 [OPTIONS] [FILE]...
16132
16133 -h, --help print this help, then exit
16134 -V, --version print version number, then exit
16135 -d, --debug don't remove temporary files
16136 --recheck update $as_me by reconfiguring in the same conditions
16137 --file=FILE[:TEMPLATE]
16138 instantiate the configuration file FILE
16139 --header=FILE[:TEMPLATE]
16140 instantiate the configuration header FILE
16141
16142Configuration files:
16143$config_files
16144
16145Configuration headers:
16146$config_headers
16147
16148Report bugs to <bug-autoconf@gnu.org>."
16149_ACEOF
16150
16151cat >>$CONFIG_STATUS <<_ACEOF
16152ac_cs_version="\\
16153config.status
16154configured by $0, generated by GNU Autoconf 2.53,
16155 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16156
16157Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16158Free Software Foundation, Inc.
16159This config.status script is free software; the Free Software Foundation
16160gives unlimited permission to copy, distribute and modify it."
16161srcdir=$srcdir
16162INSTALL="$INSTALL"
16163_ACEOF
16164
16165cat >>$CONFIG_STATUS <<\_ACEOF
16166# If no file are specified by the user, then we need to provide default
16167# value. By we need to know if files were specified by the user.
16168ac_need_defaults=:
16169while test $# != 0
16170do
16171 case $1 in
16172 --*=*)
16173 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16174 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16175 shift
16176 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16177 shift
16178 ;;
16179 -*);;
16180 *) # This is not an option, so the user has probably given explicit
16181 # arguments.
16182 ac_need_defaults=false;;
16183 esac
16184
16185 case $1 in
16186 # Handling of the options.
16187_ACEOF
16188cat >>$CONFIG_STATUS <<_ACEOF
16189 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16190 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16191 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16192_ACEOF
16193cat >>$CONFIG_STATUS <<\_ACEOF
16194 --version | --vers* | -V )
16195 echo "$ac_cs_version"; exit 0 ;;
16196 --he | --h)
16197 # Conflict between --help and --header
16198 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16199Try \`$0 --help' for more information." >&5
16200echo "$as_me: error: ambiguous option: $1
16201Try \`$0 --help' for more information." >&2;}
16202 { (exit 1); exit 1; }; };;
16203 --help | --hel | -h )
16204 echo "$ac_cs_usage"; exit 0 ;;
16205 --debug | --d* | -d )
16206 debug=: ;;
16207 --file | --fil | --fi | --f )
16208 shift
16209 CONFIG_FILES="$CONFIG_FILES $1"
16210 ac_need_defaults=false;;
16211 --header | --heade | --head | --hea )
16212 shift
16213 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16214 ac_need_defaults=false;;
16215
16216 # This is an error.
16217 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16218Try \`$0 --help' for more information." >&5
16219echo "$as_me: error: unrecognized option: $1
16220Try \`$0 --help' for more information." >&2;}
16221 { (exit 1); exit 1; }; } ;;
16222
16223 *) ac_config_targets="$ac_config_targets $1" ;;
16224
16225 esac
16226 shift
16227done
16228
16229_ACEOF
16230
16231
16232
16233
16234
16235cat >>$CONFIG_STATUS <<\_ACEOF
16236for ac_config_target in $ac_config_targets
16237do
16238 case "$ac_config_target" in
16239 # Handling of arguments.
16240 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16241 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16242 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16243 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16244echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16245 { (exit 1); exit 1; }; };;
16246 esac
16247done
16248
16249# If the user did not use the arguments to specify the items to instantiate,
16250# then the envvar interface is used. Set only those that are not.
16251# We use the long form for the default assignment because of an extremely
16252# bizarre bug on SunOS 4.1.3.
16253if $ac_need_defaults; then
16254 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16255 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16256fi
16257
16258# Create a temporary directory, and hook for its removal unless debugging.
16259$debug ||
16260{
16261 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16262 trap '{ (exit 1); exit 1; }' 1 2 13 15
16263}
16264
16265# Create a (secure) tmp directory for tmp files.
16266: ${TMPDIR=/tmp}
16267{
16268 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16269 test -n "$tmp" && test -d "$tmp"
16270} ||
16271{
16272 tmp=$TMPDIR/cs$$-$RANDOM
16273 (umask 077 && mkdir $tmp)
16274} ||
16275{
16276 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16277 { (exit 1); exit 1; }
16278}
16279
16280_ACEOF
16281
16282cat >>$CONFIG_STATUS <<_ACEOF
16283
16284#
16285# CONFIG_FILES section.
16286#
16287
16288# No need to generate the scripts if there are no CONFIG_FILES.
16289# This happens for instance when ./config.status config.h
16290if test -n "\$CONFIG_FILES"; then
16291 # Protect against being on the right side of a sed subst in config.status.
16292 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16293 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16294s,@SHELL@,$SHELL,;t t
16295s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16296s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16297s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16298s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16299s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16300s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16301s,@exec_prefix@,$exec_prefix,;t t
16302s,@prefix@,$prefix,;t t
16303s,@program_transform_name@,$program_transform_name,;t t
16304s,@bindir@,$bindir,;t t
16305s,@sbindir@,$sbindir,;t t
16306s,@libexecdir@,$libexecdir,;t t
16307s,@datadir@,$datadir,;t t
16308s,@sysconfdir@,$sysconfdir,;t t
16309s,@sharedstatedir@,$sharedstatedir,;t t
16310s,@localstatedir@,$localstatedir,;t t
16311s,@libdir@,$libdir,;t t
16312s,@includedir@,$includedir,;t t
16313s,@oldincludedir@,$oldincludedir,;t t
16314s,@infodir@,$infodir,;t t
16315s,@mandir@,$mandir,;t t
16316s,@build_alias@,$build_alias,;t t
16317s,@host_alias@,$host_alias,;t t
16318s,@target_alias@,$target_alias,;t t
16319s,@DEFS@,$DEFS,;t t
16320s,@ECHO_C@,$ECHO_C,;t t
16321s,@ECHO_N@,$ECHO_N,;t t
16322s,@ECHO_T@,$ECHO_T,;t t
16323s,@LIBS@,$LIBS,;t t
16324s,@VERSION@,$VERSION,;t t
16325s,@SOVERSION@,$SOVERSION,;t t
16326s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16327s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16328s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16329s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16330s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16331s,@MACHDEP@,$MACHDEP,;t t
16332s,@SGI_ABI@,$SGI_ABI,;t t
16333s,@CXX@,$CXX,;t t
16334s,@MAINOBJ@,$MAINOBJ,;t t
16335s,@EXEEXT@,$EXEEXT,;t t
16336s,@CC@,$CC,;t t
16337s,@CFLAGS@,$CFLAGS,;t t
16338s,@LDFLAGS@,$LDFLAGS,;t t
16339s,@CPPFLAGS@,$CPPFLAGS,;t t
16340s,@ac_ct_CC@,$ac_ct_CC,;t t
16341s,@OBJEXT@,$OBJEXT,;t t
16342s,@CPP@,$CPP,;t t
16343s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16344s,@LIBRARY@,$LIBRARY,;t t
16345s,@LDLIBRARY@,$LDLIBRARY,;t t
16346s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16347s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16348s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16349s,@INSTSONAME@,$INSTSONAME,;t t
16350s,@RUNSHARED@,$RUNSHARED,;t t
16351s,@LINKCC@,$LINKCC,;t t
16352s,@RANLIB@,$RANLIB,;t t
16353s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16354s,@AR@,$AR,;t t
16355s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16356s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16357s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16358s,@LN@,$LN,;t t
16359s,@OPT@,$OPT,;t t
16360s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16361s,@SO@,$SO,;t t
16362s,@LDSHARED@,$LDSHARED,;t t
16363s,@BLDSHARED@,$BLDSHARED,;t t
16364s,@CCSHARED@,$CCSHARED,;t t
16365s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16366s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
16367s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16368s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16369s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16370s,@LDLAST@,$LDLAST,;t t
16371s,@THREADOBJ@,$THREADOBJ,;t t
16372s,@DLINCLDIR@,$DLINCLDIR,;t t
16373s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16374s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16375s,@LIBOBJS@,$LIBOBJS,;t t
16376s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16377s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16378s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16379s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16380s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16381s,@LIBM@,$LIBM,;t t
16382s,@LIBC@,$LIBC,;t t
16383s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16384s,@THREADHEADERS@,$THREADHEADERS,;t t
16385s,@SRCDIRS@,$SRCDIRS,;t t
16386CEOF
16387
16388_ACEOF
16389
16390 cat >>$CONFIG_STATUS <<\_ACEOF
16391 # Split the substitutions into bite-sized pieces for seds with
16392 # small command number limits, like on Digital OSF/1 and HP-UX.
16393 ac_max_sed_lines=48
16394 ac_sed_frag=1 # Number of current file.
16395 ac_beg=1 # First line for current file.
16396 ac_end=$ac_max_sed_lines # Line after last line for current file.
16397 ac_more_lines=:
16398 ac_sed_cmds=
16399 while $ac_more_lines; do
16400 if test $ac_beg -gt 1; then
16401 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16402 else
16403 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16404 fi
16405 if test ! -s $tmp/subs.frag; then
16406 ac_more_lines=false
16407 else
16408 # The purpose of the label and of the branching condition is to
16409 # speed up the sed processing (if there are no `@' at all, there
16410 # is no need to browse any of the substitutions).
16411 # These are the two extra sed commands mentioned above.
16412 (echo ':t
16413 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16414 if test -z "$ac_sed_cmds"; then
16415 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16416 else
16417 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16418 fi
16419 ac_sed_frag=`expr $ac_sed_frag + 1`
16420 ac_beg=$ac_end
16421 ac_end=`expr $ac_end + $ac_max_sed_lines`
16422 fi
16423 done
16424 if test -z "$ac_sed_cmds"; then
16425 ac_sed_cmds=cat
16426 fi
16427fi # test -n "$CONFIG_FILES"
16428
16429_ACEOF
16430cat >>$CONFIG_STATUS <<\_ACEOF
16431for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16432 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16433 case $ac_file in
16434 - | *:- | *:-:* ) # input from stdin
16435 cat >$tmp/stdin
16436 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16437 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16438 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16439 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16440 * ) ac_file_in=$ac_file.in ;;
16441 esac
16442
16443 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16444 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16445$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16446 X"$ac_file" : 'X\(//\)[^/]' \| \
16447 X"$ac_file" : 'X\(//\)$' \| \
16448 X"$ac_file" : 'X\(/\)' \| \
16449 . : '\(.\)' 2>/dev/null ||
16450echo X"$ac_file" |
16451 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16452 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16453 /^X\(\/\/\)$/{ s//\1/; q; }
16454 /^X\(\/\).*/{ s//\1/; q; }
16455 s/.*/./; q'`
16456 { case "$ac_dir" in
16457 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16458 *) as_incr_dir=.;;
16459esac
16460as_dummy="$ac_dir"
16461for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16462 case $as_mkdir_dir in
16463 # Skip DOS drivespec
16464 ?:) as_incr_dir=$as_mkdir_dir ;;
16465 *)
16466 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16467 test -d "$as_incr_dir" ||
16468 mkdir "$as_incr_dir" ||
16469 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16470echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16471 { (exit 1); exit 1; }; }
16472 ;;
16473 esac
16474done; }
16475
16476 ac_builddir=.
16477
16478if test "$ac_dir" != .; then
16479 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16480 # A "../" for each directory in $ac_dir_suffix.
16481 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16482else
16483 ac_dir_suffix= ac_top_builddir=
16484fi
16485
16486case $srcdir in
16487 .) # No --srcdir option. We are building in place.
16488 ac_srcdir=.
16489 if test -z "$ac_top_builddir"; then
16490 ac_top_srcdir=.
16491 else
16492 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16493 fi ;;
16494 [\\/]* | ?:[\\/]* ) # Absolute path.
16495 ac_srcdir=$srcdir$ac_dir_suffix;
16496 ac_top_srcdir=$srcdir ;;
16497 *) # Relative path.
16498 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16499 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16500esac
16501# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16502# absolute.
16503ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16504ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16505ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16506ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16507
16508
16509 case $INSTALL in
16510 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16511 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16512 esac
16513
16514 if test x"$ac_file" != x-; then
16515 { echo "$as_me:$LINENO: creating $ac_file" >&5
16516echo "$as_me: creating $ac_file" >&6;}
16517 rm -f "$ac_file"
16518 fi
16519 # Let's still pretend it is `configure' which instantiates (i.e., don't
16520 # use $as_me), people would be surprised to read:
16521 # /* config.h. Generated by config.status. */
16522 if test x"$ac_file" = x-; then
16523 configure_input=
16524 else
16525 configure_input="$ac_file. "
16526 fi
16527 configure_input=$configure_input"Generated from `echo $ac_file_in |
16528 sed 's,.*/,,'` by configure."
16529
16530 # First look for the input files in the build tree, otherwise in the
16531 # src tree.
16532 ac_file_inputs=`IFS=:
16533 for f in $ac_file_in; do
16534 case $f in
16535 -) echo $tmp/stdin ;;
16536 [\\/$]*)
16537 # Absolute (can't be DOS-style, as IFS=:)
16538 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16539echo "$as_me: error: cannot find input file: $f" >&2;}
16540 { (exit 1); exit 1; }; }
16541 echo $f;;
16542 *) # Relative
16543 if test -f "$f"; then
16544 # Build tree
16545 echo $f
16546 elif test -f "$srcdir/$f"; then
16547 # Source tree
16548 echo $srcdir/$f
16549 else
16550 # /dev/null tree
16551 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16552echo "$as_me: error: cannot find input file: $f" >&2;}
16553 { (exit 1); exit 1; }; }
16554 fi;;
16555 esac
16556 done` || { (exit 1); exit 1; }
16557_ACEOF
16558cat >>$CONFIG_STATUS <<_ACEOF
16559 sed "$ac_vpsub
16560$extrasub
16561_ACEOF
16562cat >>$CONFIG_STATUS <<\_ACEOF
16563:t
16564/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16565s,@configure_input@,$configure_input,;t t
16566s,@srcdir@,$ac_srcdir,;t t
16567s,@abs_srcdir@,$ac_abs_srcdir,;t t
16568s,@top_srcdir@,$ac_top_srcdir,;t t
16569s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16570s,@builddir@,$ac_builddir,;t t
16571s,@abs_builddir@,$ac_abs_builddir,;t t
16572s,@top_builddir@,$ac_top_builddir,;t t
16573s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16574s,@INSTALL@,$ac_INSTALL,;t t
16575" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16576 rm -f $tmp/stdin
16577 if test x"$ac_file" != x-; then
16578 mv $tmp/out $ac_file
16579 else
16580 cat $tmp/out
16581 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016582 fi
16583
Martin v. Löwis11437992002-04-12 09:54:03 +000016584done
16585_ACEOF
16586cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016587
Martin v. Löwis11437992002-04-12 09:54:03 +000016588#
16589# CONFIG_HEADER section.
16590#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016591
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016592# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16593# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016594#
16595# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016596ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16597ac_dB='[ ].*$,\1#\2'
16598ac_dC=' '
16599ac_dD=',;t'
16600# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16601ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16602ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016603ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016604ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016605
Martin v. Löwis11437992002-04-12 09:54:03 +000016606for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016607 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016608 case $ac_file in
16609 - | *:- | *:-:* ) # input from stdin
16610 cat >$tmp/stdin
16611 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16612 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16613 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16614 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16615 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016616 esac
16617
Martin v. Löwis11437992002-04-12 09:54:03 +000016618 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16619echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016620
Martin v. Löwis11437992002-04-12 09:54:03 +000016621 # First look for the input files in the build tree, otherwise in the
16622 # src tree.
16623 ac_file_inputs=`IFS=:
16624 for f in $ac_file_in; do
16625 case $f in
16626 -) echo $tmp/stdin ;;
16627 [\\/$]*)
16628 # Absolute (can't be DOS-style, as IFS=:)
16629 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16630echo "$as_me: error: cannot find input file: $f" >&2;}
16631 { (exit 1); exit 1; }; }
16632 echo $f;;
16633 *) # Relative
16634 if test -f "$f"; then
16635 # Build tree
16636 echo $f
16637 elif test -f "$srcdir/$f"; then
16638 # Source tree
16639 echo $srcdir/$f
16640 else
16641 # /dev/null tree
16642 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16643echo "$as_me: error: cannot find input file: $f" >&2;}
16644 { (exit 1); exit 1; }; }
16645 fi;;
16646 esac
16647 done` || { (exit 1); exit 1; }
16648 # Remove the trailing spaces.
16649 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016650
Martin v. Löwis11437992002-04-12 09:54:03 +000016651_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016652
Martin v. Löwis11437992002-04-12 09:54:03 +000016653# Transform confdefs.h into two sed scripts, `conftest.defines' and
16654# `conftest.undefs', that substitutes the proper values into
16655# config.h.in to produce config.h. The first handles `#define'
16656# templates, and the second `#undef' templates.
16657# And first: Protect against being on the right side of a sed subst in
16658# config.status. Protect against being in an unquoted here document
16659# in config.status.
16660rm -f conftest.defines conftest.undefs
16661# Using a here document instead of a string reduces the quoting nightmare.
16662# Putting comments in sed scripts is not portable.
16663#
16664# `end' is used to avoid that the second main sed command (meant for
16665# 0-ary CPP macros) applies to n-ary macro definitions.
16666# See the Autoconf documentation for `clear'.
16667cat >confdef2sed.sed <<\_ACEOF
16668s/[\\&,]/\\&/g
16669s,[\\$`],\\&,g
16670t clear
16671: clear
16672s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16673t end
16674s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16675: end
16676_ACEOF
16677# If some macros were called several times there might be several times
16678# the same #defines, which is useless. Nevertheless, we may not want to
16679# sort them, since we want the *last* AC-DEFINE to be honored.
16680uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16681sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16682rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016683
16684# This sed command replaces #undef with comments. This is necessary, for
16685# example, in the case of _POSIX_SOURCE, which is predefined and required
16686# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016687cat >>conftest.undefs <<\_ACEOF
16688s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16689_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016690
Martin v. Löwis11437992002-04-12 09:54:03 +000016691# Break up conftest.defines because some shells have a limit on the size
16692# of here documents, and old seds have small limits too (100 cmds).
16693echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16694echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16695echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16696echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016697rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016698while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016699do
Martin v. Löwis11437992002-04-12 09:54:03 +000016700 # Write a limited-size here document to $tmp/defines.sed.
16701 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16702 # Speed up: don't consider the non `#define' lines.
16703 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16704 # Work around the forget-to-reset-the-flag bug.
16705 echo 't clr' >>$CONFIG_STATUS
16706 echo ': clr' >>$CONFIG_STATUS
16707 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016708 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016709 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16710 rm -f $tmp/in
16711 mv $tmp/out $tmp/in
16712' >>$CONFIG_STATUS
16713 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16714 rm -f conftest.defines
16715 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016716done
Martin v. Löwis11437992002-04-12 09:54:03 +000016717rm -f conftest.defines
16718echo ' fi # egrep' >>$CONFIG_STATUS
16719echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016720
Martin v. Löwis11437992002-04-12 09:54:03 +000016721# Break up conftest.undefs because some shells have a limit on the size
16722# of here documents, and old seds have small limits too (100 cmds).
16723echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16724rm -f conftest.tail
16725while grep . conftest.undefs >/dev/null
16726do
16727 # Write a limited-size here document to $tmp/undefs.sed.
16728 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16729 # Speed up: don't consider the non `#undef'
16730 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16731 # Work around the forget-to-reset-the-flag bug.
16732 echo 't clr' >>$CONFIG_STATUS
16733 echo ': clr' >>$CONFIG_STATUS
16734 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16735 echo 'CEOF
16736 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16737 rm -f $tmp/in
16738 mv $tmp/out $tmp/in
16739' >>$CONFIG_STATUS
16740 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16741 rm -f conftest.undefs
16742 mv conftest.tail conftest.undefs
16743done
16744rm -f conftest.undefs
16745
16746cat >>$CONFIG_STATUS <<\_ACEOF
16747 # Let's still pretend it is `configure' which instantiates (i.e., don't
16748 # use $as_me), people would be surprised to read:
16749 # /* config.h. Generated by config.status. */
16750 if test x"$ac_file" = x-; then
16751 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016752 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016753 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016754 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016755 cat $tmp/in >>$tmp/config.h
16756 rm -f $tmp/in
16757 if test x"$ac_file" != x-; then
16758 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16759 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16760echo "$as_me: $ac_file is unchanged" >&6;}
16761 else
16762 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16763$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16764 X"$ac_file" : 'X\(//\)[^/]' \| \
16765 X"$ac_file" : 'X\(//\)$' \| \
16766 X"$ac_file" : 'X\(/\)' \| \
16767 . : '\(.\)' 2>/dev/null ||
16768echo X"$ac_file" |
16769 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16770 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16771 /^X\(\/\/\)$/{ s//\1/; q; }
16772 /^X\(\/\).*/{ s//\1/; q; }
16773 s/.*/./; q'`
16774 { case "$ac_dir" in
16775 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16776 *) as_incr_dir=.;;
16777esac
16778as_dummy="$ac_dir"
16779for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16780 case $as_mkdir_dir in
16781 # Skip DOS drivespec
16782 ?:) as_incr_dir=$as_mkdir_dir ;;
16783 *)
16784 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16785 test -d "$as_incr_dir" ||
16786 mkdir "$as_incr_dir" ||
16787 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16788echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16789 { (exit 1); exit 1; }; }
16790 ;;
16791 esac
16792done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016793
Martin v. Löwis11437992002-04-12 09:54:03 +000016794 rm -f $ac_file
16795 mv $tmp/config.h $ac_file
16796 fi
16797 else
16798 cat $tmp/config.h
16799 rm -f $tmp/config.h
16800 fi
16801done
16802_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016803
Martin v. Löwis11437992002-04-12 09:54:03 +000016804cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016805
Martin v. Löwis11437992002-04-12 09:54:03 +000016806{ (exit 0); exit 0; }
16807_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016808chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016809ac_clean_files=$ac_clean_files_save
16810
16811
16812# configure is writing to config.log, and then calls config.status.
16813# config.status does its own redirection, appending to config.log.
16814# Unfortunately, on DOS this fails, as config.log is still kept open
16815# by configure, so config.status won't be able to write to it; its
16816# output is simply discarded. So we exec the FD to /dev/null,
16817# effectively closing config.log, so it can be properly (re)opened and
16818# appended to by config.status. When coming back to configure, we
16819# need to make the FD available again.
16820if test "$no_create" != yes; then
16821 ac_cs_success=:
16822 exec 5>/dev/null
16823 $SHELL $CONFIG_STATUS || ac_cs_success=false
16824 exec 5>>config.log
16825 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16826 # would make configure fail if this is the last instruction.
16827 $ac_cs_success || { (exit 1); exit 1; }
16828fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016829
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016830
16831echo "creating Setup"
16832if test ! -f Modules/Setup
16833then
16834 cp $srcdir/Modules/Setup.dist Modules/Setup
16835fi
16836
16837echo "creating Setup.local"
16838if test ! -f Modules/Setup.local
16839then
16840 echo "# Edit this file for local setup changes" >Modules/Setup.local
16841fi
16842
16843echo "creating Makefile"
16844$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16845 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016846 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016847mv config.c Modules