blob: c9c9bd2f06f96da9ec90b63735ee54b2c507d0d8 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis06a83e92002-04-14 10:19:44 +00002# From configure.in Revision: 1.307 .
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
847 --with(out)-pymalloc disable/enable specialized mallocs
848 --with-wctype-functions use wctype.h functions
849 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
850 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
851 --with-fpectl enable SIGFPE catching
852 --with-libm=STRING math library
853 --with-libc=STRING C library
854
855Some influential environment variables:
856 CC C compiler command
857 CFLAGS C compiler flags
858 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
859 nonstandard directory <lib dir>
860 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
861 headers in a nonstandard directory <include dir>
862 CPP C preprocessor
863
864Use these variables to override the choices made by `configure' or to help
865it to find libraries and programs with nonstandard names/locations.
866
867_ACEOF
868fi
869
870if test "$ac_init_help" = "recursive"; then
871 # If there are subdirs, report their specific --help.
872 ac_popdir=`pwd`
873 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
874 test -d $ac_dir || continue
875 ac_builddir=.
876
877if test "$ac_dir" != .; then
878 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
879 # A "../" for each directory in $ac_dir_suffix.
880 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
881else
882 ac_dir_suffix= ac_top_builddir=
883fi
884
885case $srcdir in
886 .) # No --srcdir option. We are building in place.
887 ac_srcdir=.
888 if test -z "$ac_top_builddir"; then
889 ac_top_srcdir=.
890 else
891 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
892 fi ;;
893 [\\/]* | ?:[\\/]* ) # Absolute path.
894 ac_srcdir=$srcdir$ac_dir_suffix;
895 ac_top_srcdir=$srcdir ;;
896 *) # Relative path.
897 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
898 ac_top_srcdir=$ac_top_builddir$srcdir ;;
899esac
900# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
901# absolute.
902ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
903ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
904ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
905ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
906
907 cd $ac_dir
908 # Check for guested configure; otherwise get Cygnus style configure.
909 if test -f $ac_srcdir/configure.gnu; then
910 echo
911 $SHELL $ac_srcdir/configure.gnu --help=recursive
912 elif test -f $ac_srcdir/configure; then
913 echo
914 $SHELL $ac_srcdir/configure --help=recursive
915 elif test -f $ac_srcdir/configure.ac ||
916 test -f $ac_srcdir/configure.in; then
917 echo
918 $ac_configure --help
919 else
920 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
921 fi
922 cd $ac_popdir
923 done
924fi
925
926test -n "$ac_init_help" && exit 0
927if $ac_init_version; then
928 cat <<\_ACEOF
929
930Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
931Free Software Foundation, Inc.
932This configure script is free software; the Free Software Foundation
933gives unlimited permission to copy, distribute and modify it.
934_ACEOF
935 exit 0
936fi
937exec 5>config.log
938cat >&5 <<_ACEOF
939This file contains any messages produced by compilers while
940running configure, to aid debugging if configure makes a mistake.
941
942It was created by $as_me, which was
943generated by GNU Autoconf 2.53. Invocation command line was
944
945 $ $0 $@
946
947_ACEOF
948{
949cat <<_ASUNAME
950## --------- ##
951## Platform. ##
952## --------- ##
953
954hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
955uname -m = `(uname -m) 2>/dev/null || echo unknown`
956uname -r = `(uname -r) 2>/dev/null || echo unknown`
957uname -s = `(uname -s) 2>/dev/null || echo unknown`
958uname -v = `(uname -v) 2>/dev/null || echo unknown`
959
960/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
961/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
962
963/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
964/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
965/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
966hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
967/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
968/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
969/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
970
971_ASUNAME
972
973as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
974for as_dir in $PATH
975do
976 IFS=$as_save_IFS
977 test -z "$as_dir" && as_dir=.
978 echo "PATH: $as_dir"
979done
980
981} >&5
982
983cat >&5 <<_ACEOF
984
985
986## ----------- ##
987## Core tests. ##
988## ----------- ##
989
990_ACEOF
991
992
993# Keep a trace of the command line.
994# Strip out --no-create and --no-recursion so they do not pile up.
995# Also quote any args containing shell meta-characters.
996ac_configure_args=
997ac_sep=
998for ac_arg
999do
1000 case $ac_arg in
1001 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1002 | --no-cr | --no-c | -n ) continue ;;
1003 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1004 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1005 continue ;;
1006 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1007 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1008 esac
1009 case " $ac_configure_args " in
1010 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1011 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1012 ac_sep=" " ;;
1013 esac
1014 # Get rid of the leading space.
1015done
1016
1017# When interrupted or exit'd, cleanup temporary files, and complete
1018# config.log. We remove comments because anyway the quotes in there
1019# would cause problems or look ugly.
1020# WARNING: Be sure not to use single quotes in there, as some shells,
1021# such as our DU 5.0 friend, will then `close' the trap.
1022trap 'exit_status=$?
1023 # Save into config.log some information that might help in debugging.
1024 {
1025 echo
1026 cat <<\_ASBOX
1027## ---------------- ##
1028## Cache variables. ##
1029## ---------------- ##
1030_ASBOX
1031 echo
1032 # The following way of writing the cache mishandles newlines in values,
1033{
1034 (set) 2>&1 |
1035 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1036 *ac_space=\ *)
1037 sed -n \
1038 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1039 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1040 ;;
1041 *)
1042 sed -n \
1043 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1044 ;;
1045 esac;
1046}
1047 echo
1048 if test -s confdefs.h; then
1049 cat <<\_ASBOX
1050## ----------- ##
1051## confdefs.h. ##
1052## ----------- ##
1053_ASBOX
1054 echo
1055 sed "/^$/d" confdefs.h
1056 echo
1057 fi
1058 test "$ac_signal" != 0 &&
1059 echo "$as_me: caught signal $ac_signal"
1060 echo "$as_me: exit $exit_status"
1061 } >&5
1062 rm -f core core.* *.core &&
1063 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1064 exit $exit_status
1065 ' 0
1066for ac_signal in 1 2 13 15; do
1067 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1068done
1069ac_signal=0
1070
1071# confdefs.h avoids OS command line length limits that DEFS can exceed.
1072rm -rf conftest* confdefs.h
1073# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1074echo >confdefs.h
1075
1076# Predefined preprocessor variables.
1077
1078cat >>confdefs.h <<_ACEOF
1079#define PACKAGE_NAME "$PACKAGE_NAME"
1080_ACEOF
1081
1082
1083cat >>confdefs.h <<_ACEOF
1084#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1085_ACEOF
1086
1087
1088cat >>confdefs.h <<_ACEOF
1089#define PACKAGE_VERSION "$PACKAGE_VERSION"
1090_ACEOF
1091
1092
1093cat >>confdefs.h <<_ACEOF
1094#define PACKAGE_STRING "$PACKAGE_STRING"
1095_ACEOF
1096
1097
1098cat >>confdefs.h <<_ACEOF
1099#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1100_ACEOF
1101
1102
1103# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001104# Prefer explicitly selected file to automatically selected ones.
1105if test -z "$CONFIG_SITE"; then
1106 if test "x$prefix" != xNONE; then
1107 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1108 else
1109 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1110 fi
1111fi
1112for ac_site_file in $CONFIG_SITE; do
1113 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1115echo "$as_me: loading site script $ac_site_file" >&6;}
1116 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001117 . "$ac_site_file"
1118 fi
1119done
1120
1121if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 # Some versions of bash will fail to source /dev/null (special
1123 # files actually), so we avoid doing that.
1124 if test -f "$cache_file"; then
1125 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1126echo "$as_me: loading cache $cache_file" >&6;}
1127 case $cache_file in
1128 [\\/]* | ?:[\\/]* ) . $cache_file;;
1129 *) . ./$cache_file;;
1130 esac
1131 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001132else
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1134echo "$as_me: creating cache $cache_file" >&6;}
1135 >$cache_file
1136fi
1137
1138# Check that the precious variables saved in the cache have kept the same
1139# value.
1140ac_cache_corrupted=false
1141for ac_var in `(set) 2>&1 |
1142 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1143 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1144 eval ac_new_set=\$ac_env_${ac_var}_set
1145 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1146 eval ac_new_val="\$ac_env_${ac_var}_value"
1147 case $ac_old_set,$ac_new_set in
1148 set,)
1149 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1150echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1151 ac_cache_corrupted=: ;;
1152 ,set)
1153 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1154echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1155 ac_cache_corrupted=: ;;
1156 ,);;
1157 *)
1158 if test "x$ac_old_val" != "x$ac_new_val"; then
1159 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1160echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1161 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1162echo "$as_me: former value: $ac_old_val" >&2;}
1163 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1164echo "$as_me: current value: $ac_new_val" >&2;}
1165 ac_cache_corrupted=:
1166 fi;;
1167 esac
1168 # Pass precious variables to config.status.
1169 if test "$ac_new_set" = set; then
1170 case $ac_new_val in
1171 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1172 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1173 *) ac_arg=$ac_var=$ac_new_val ;;
1174 esac
1175 case " $ac_configure_args " in
1176 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1177 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1178 esac
1179 fi
1180done
1181if $ac_cache_corrupted; then
1182 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1183echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1184 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1185echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1186 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187fi
1188
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001190ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001191ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1192ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1193ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194
Guido van Rossum627b2d71993-12-24 10:39:16 +00001195
Michael W. Hudson54241132001-12-07 15:38:26 +00001196
1197
Guido van Rossum627b2d71993-12-24 10:39:16 +00001198
Martin v. Löwis11437992002-04-12 09:54:03 +00001199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212ac_config_headers="$ac_config_headers pyconfig.h"
1213
1214
1215# This is for stuff that absolutely must end up in pyconfig.h.
1216# Please use pyport.h instead, if possible.
1217
1218
1219
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001220# Set VERSION so we only need to edit in one place (i.e., here)
1221
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001222VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001223
Martin v. Löwis1142de32002-03-29 16:28:31 +00001224
1225SOVERSION=1.0
1226
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001227# Arguments passed to configure.
1228
1229CONFIG_ARGS="$ac_configure_args"
1230
Michael W. Hudson54241132001-12-07 15:38:26 +00001231
Jack Jansene578a632001-08-15 01:27:14 +00001232# Check whether --enable-framework or --disable-framework was given.
1233if test "${enable_framework+set}" = set; then
1234 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001235
Jack Jansene578a632001-08-15 01:27:14 +00001236 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001238 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001239 esac
1240 case $enableval in
1241 no)
1242 PYTHONFRAMEWORK=
1243 PYTHONFRAMEWORKDIR=no-framework
1244 PYTHONFRAMEWORKPREFIX=
1245 PYTHONFRAMEWORKINSTALLDIR=
1246 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001247 ;;
1248 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001249 PYTHONFRAMEWORK=Python
1250 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001251 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001252 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1253 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001254 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001255
Guido van Rossum563e7081996-09-10 18:20:48 +00001256else
Martin v. Löwis11437992002-04-12 09:54:03 +00001257
Jack Jansene578a632001-08-15 01:27:14 +00001258 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001259 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001260 PYTHONFRAMEWORKPREFIX=
1261 PYTHONFRAMEWORKINSTALLDIR=
1262 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001263
Martin v. Löwis11437992002-04-12 09:54:03 +00001264fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001265
1266
1267
1268
Jack Jansene578a632001-08-15 01:27:14 +00001269
1270##AC_ARG_WITH(dyld,
1271##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1272##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001273# Set name for machine-dependent library files
1274
Martin v. Löwis11437992002-04-12 09:54:03 +00001275echo "$as_me:$LINENO: checking MACHDEP" >&5
1276echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001277if test -z "$MACHDEP"
1278then
Guido van Rossum563e7081996-09-10 18:20:48 +00001279 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +00001280 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001281 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001282 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001283 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001284 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001285 ac_md_system=`echo $ac_sys_system |
1286 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1287 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001288 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001289 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001290
Guido van Rossum07397971997-04-29 21:49:50 +00001291 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001292 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001293 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001294 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001295 esac
1296fi
Guido van Rossum91922671997-10-09 20:24:13 +00001297
1298#
1299# SGI compilers allow the specification of the both the ABI and the
1300# ISA on the command line. Depending on the values of these switches,
1301# different and often incompatable code will be generated.
1302#
1303# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1304# thus supply support for various ABI/ISA combinations. The MACHDEP
1305# variable is also adjusted.
1306#
1307
1308if test ! -z "$SGI_ABI"
1309then
1310 CC="cc $SGI_ABI"
1311 LDFLAGS="$SGI_ABI $LDFLAGS"
1312 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1313fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001314echo "$as_me:$LINENO: result: $MACHDEP" >&5
1315echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001316
Guido van Rossum627b2d71993-12-24 10:39:16 +00001317# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001318echo "$as_me:$LINENO: checking for --without-gcc" >&5
1319echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1320
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001321# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001322if test "${with_gcc+set}" = set; then
1323 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001324
Guido van Rossum7f43da71994-08-01 12:15:30 +00001325 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001326 no) CC=cc
1327 without_gcc=yes;;
1328 yes) CC=gcc
1329 without_gcc=no;;
1330 *) CC=$withval
1331 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001332 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001333else
Martin v. Löwis11437992002-04-12 09:54:03 +00001334
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001335 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001336 AIX*) CC=cc_r
1337 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001338 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001339 case $BE_HOST_CPU in
1340 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001341 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001342 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +00001343 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 +00001344 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001345 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001346 ;;
1347 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001348 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001349 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001350 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001351 ;;
1352 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001353 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1354echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1355 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001356 ;;
1357 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001358 AR="\$(srcdir)/Modules/ar_beos"
1359 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001360 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001361 Monterey*)
1362 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001363 without_gcc=;;
1364 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001365 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001366fi;
1367echo "$as_me:$LINENO: result: $without_gcc" >&5
1368echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001369
1370
Guido van Rossum95012191999-12-16 17:50:52 +00001371
Fred Drakea1a84e72001-03-06 05:52:16 +00001372MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001373echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1374echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1375
Guido van Rossum95012191999-12-16 17:50:52 +00001376# Check whether --with-cxx or --without-cxx was given.
1377if test "${with_cxx+set}" = set; then
1378 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001379
Martin v. Löwis22352952000-12-13 17:37:02 +00001380 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001381 case $withval in
1382 no) CXX=
1383 with_cxx=no;;
1384 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001385 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001386 with_cxx=$withval;;
1387 esac
1388else
Martin v. Löwis11437992002-04-12 09:54:03 +00001389
Guido van Rossum95012191999-12-16 17:50:52 +00001390 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001391 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001392
Martin v. Löwis11437992002-04-12 09:54:03 +00001393fi;
1394echo "$as_me:$LINENO: result: $with_cxx" >&5
1395echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001396
1397if test "$with_cxx" = "yes"
1398then
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1400echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1401 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001402fi
1403
1404
1405
1406
Martin v. Löwis11437992002-04-12 09:54:03 +00001407if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001408then
1409 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1410do
Martin v. Löwis11437992002-04-12 09:54:03 +00001411 # 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 +00001412set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001413echo "$as_me:$LINENO: checking for $ac_word" >&5
1414echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1415if test "${ac_cv_prog_CXX+set}" = set; then
1416 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001417else
1418 if test -n "$CXX"; then
1419 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1420else
Martin v. Löwis11437992002-04-12 09:54:03 +00001421as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1422for as_dir in $PATH
1423do
1424 IFS=$as_save_IFS
1425 test -z "$as_dir" && as_dir=.
1426 for ac_exec_ext in '' $ac_executable_extensions; do
1427 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1428 ac_cv_prog_CXX="$ac_prog"
1429 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1430 break 2
1431 fi
1432done
1433done
1434
Martin v. Löwis22352952000-12-13 17:37:02 +00001435fi
1436fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001437CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001438if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001439 echo "$as_me:$LINENO: result: $CXX" >&5
1440echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001441else
Martin v. Löwis11437992002-04-12 09:54:03 +00001442 echo "$as_me:$LINENO: result: no" >&5
1443echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001444fi
1445
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001447done
1448test -n "$CXX" || CXX="notfound"
1449
1450 if test "$CXX" = "notfound"
1451 then
1452 CXX=
1453 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001455ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001456ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1457ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1458ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1459 cat >conftest.$ac_ext <<_ACEOF
1460#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001461#include "confdefs.h"
1462
Martin v. Löwis11437992002-04-12 09:54:03 +00001463#ifdef F77_DUMMY_MAIN
1464# ifdef __cplusplus
1465 extern "C"
1466# endif
1467 int F77_DUMMY_MAIN() { return 1; }
1468#endif
1469int
1470main ()
1471{
Michael W. Hudson54241132001-12-07 15:38:26 +00001472
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 ;
1474 return 0;
1475}
1476_ACEOF
1477ac_clean_files_save=$ac_clean_files
1478ac_clean_files="$ac_clean_files a.out a.exe"
1479# Try to create an executable without -o first, disregard a.out.
1480# It will help us diagnose broken compilers, and finding out an intuition
1481# of exeext.
1482echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1483echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1484ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1485if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1486 (eval $ac_link_default) 2>&5
1487 ac_status=$?
1488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1489 (exit $ac_status); }; then
1490 # Find the output, starting from the most likely. This scheme is
1491# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1492# resort.
1493
1494# Be careful to initialize this variable, since it used to be cached.
1495# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1496ac_cv_exeext=
1497for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1498 ls a.out conftest 2>/dev/null;
1499 ls a.* conftest.* 2>/dev/null`; do
1500 case $ac_file in
1501 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1502 a.out ) # We found the default executable, but exeext='' is most
1503 # certainly right.
1504 break;;
1505 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1506 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1507 export ac_cv_exeext
1508 break;;
1509 * ) break;;
1510 esac
1511done
1512else
1513 echo "$as_me: failed program was:" >&5
1514cat conftest.$ac_ext >&5
1515{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1516echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1517 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001518fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001519
1520ac_exeext=$ac_cv_exeext
1521echo "$as_me:$LINENO: result: $ac_file" >&5
1522echo "${ECHO_T}$ac_file" >&6
1523
1524# Check the compiler produces executables we can run. If not, either
1525# the compiler is broken, or we cross compile.
1526echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1527echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1528# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1529# If not cross compiling, check that we can run a simple program.
1530if test "$cross_compiling" != yes; then
1531 if { ac_try='./$ac_file'
1532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1533 (eval $ac_try) 2>&5
1534 ac_status=$?
1535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1536 (exit $ac_status); }; }; then
1537 cross_compiling=no
1538 else
1539 if test "$cross_compiling" = maybe; then
1540 cross_compiling=yes
1541 else
1542 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1543If you meant to cross compile, use \`--host'." >&5
1544echo "$as_me: error: cannot run C++ compiled programs.
1545If you meant to cross compile, use \`--host'." >&2;}
1546 { (exit 1); exit 1; }; }
1547 fi
1548 fi
1549fi
1550echo "$as_me:$LINENO: result: yes" >&5
1551echo "${ECHO_T}yes" >&6
1552
1553rm -f a.out a.exe conftest$ac_cv_exeext
1554ac_clean_files=$ac_clean_files_save
1555# Check the compiler produces executables we can run. If not, either
1556# the compiler is broken, or we cross compile.
1557echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1558echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1559echo "$as_me:$LINENO: result: $cross_compiling" >&5
1560echo "${ECHO_T}$cross_compiling" >&6
1561
1562echo "$as_me:$LINENO: checking for suffix of executables" >&5
1563echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1564if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1565 (eval $ac_link) 2>&5
1566 ac_status=$?
1567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1568 (exit $ac_status); }; then
1569 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1570# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1571# work properly (i.e., refer to `conftest.exe'), while it won't with
1572# `rm'.
1573for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1574 case $ac_file in
1575 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1576 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1577 export ac_cv_exeext
1578 break;;
1579 * ) break;;
1580 esac
1581done
1582else
1583 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1584echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1585 { (exit 1); exit 1; }; }
1586fi
1587
1588rm -f conftest$ac_cv_exeext
1589echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1590echo "${ECHO_T}$ac_cv_exeext" >&6
1591
1592rm -f conftest.$ac_ext
1593EXEEXT=$ac_cv_exeext
1594ac_exeext=$EXEEXT
1595
1596 ac_ext=c
1597ac_cpp='$CPP $CPPFLAGS'
1598ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1599ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1600ac_compiler_gnu=$ac_cv_c_compiler_gnu
1601
1602
Martin v. Löwis22352952000-12-13 17:37:02 +00001603
1604 fi
1605fi
1606
Guido van Rossum8b131c51995-03-09 14:10:13 +00001607# If the user switches compilers, we can't believe the cache
1608if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1609then
Martin v. Löwis11437992002-04-12 09:54:03 +00001610 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1611(it is also a good idea to do 'make clean' before compiling)" >&5
1612echo "$as_me: error: cached CC is different -- throw away $cache_file
1613(it is also a good idea to do 'make clean' before compiling)" >&2;}
1614 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001615fi
1616
Martin v. Löwis11437992002-04-12 09:54:03 +00001617ac_ext=c
1618ac_cpp='$CPP $CPPFLAGS'
1619ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1620ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1621ac_compiler_gnu=$ac_cv_c_compiler_gnu
1622if test -n "$ac_tool_prefix"; then
1623 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1624set dummy ${ac_tool_prefix}gcc; ac_word=$2
1625echo "$as_me:$LINENO: checking for $ac_word" >&5
1626echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1627if test "${ac_cv_prog_CC+set}" = set; then
1628 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001629else
1630 if test -n "$CC"; then
1631 ac_cv_prog_CC="$CC" # Let the user override the test.
1632else
Martin v. Löwis11437992002-04-12 09:54:03 +00001633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1634for as_dir in $PATH
1635do
1636 IFS=$as_save_IFS
1637 test -z "$as_dir" && as_dir=.
1638 for ac_exec_ext in '' $ac_executable_extensions; do
1639 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1640 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1641 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1642 break 2
1643 fi
1644done
1645done
1646
Jack Jansendd19cf82001-12-06 22:36:17 +00001647fi
1648fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001649CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001650if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001651 echo "$as_me:$LINENO: result: $CC" >&5
1652echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001653else
Martin v. Löwis11437992002-04-12 09:54:03 +00001654 echo "$as_me:$LINENO: result: no" >&5
1655echo "${ECHO_T}no" >&6
1656fi
1657
1658fi
1659if test -z "$ac_cv_prog_CC"; then
1660 ac_ct_CC=$CC
1661 # Extract the first word of "gcc", so it can be a program name with args.
1662set dummy gcc; ac_word=$2
1663echo "$as_me:$LINENO: checking for $ac_word" >&5
1664echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1665if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1666 echo $ECHO_N "(cached) $ECHO_C" >&6
1667else
1668 if test -n "$ac_ct_CC"; then
1669 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1670else
1671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1672for as_dir in $PATH
1673do
1674 IFS=$as_save_IFS
1675 test -z "$as_dir" && as_dir=.
1676 for ac_exec_ext in '' $ac_executable_extensions; do
1677 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1678 ac_cv_prog_ac_ct_CC="gcc"
1679 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1680 break 2
1681 fi
1682done
1683done
1684
1685fi
1686fi
1687ac_ct_CC=$ac_cv_prog_ac_ct_CC
1688if test -n "$ac_ct_CC"; then
1689 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1690echo "${ECHO_T}$ac_ct_CC" >&6
1691else
1692 echo "$as_me:$LINENO: result: no" >&5
1693echo "${ECHO_T}no" >&6
1694fi
1695
1696 CC=$ac_ct_CC
1697else
1698 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001699fi
1700
Jack Jansendd19cf82001-12-06 22:36:17 +00001701if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001702 if test -n "$ac_tool_prefix"; then
1703 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1704set dummy ${ac_tool_prefix}cc; ac_word=$2
1705echo "$as_me:$LINENO: checking for $ac_word" >&5
1706echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1707if test "${ac_cv_prog_CC+set}" = set; then
1708 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001709else
1710 if test -n "$CC"; then
1711 ac_cv_prog_CC="$CC" # Let the user override the test.
1712else
Martin v. Löwis11437992002-04-12 09:54:03 +00001713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1714for as_dir in $PATH
1715do
1716 IFS=$as_save_IFS
1717 test -z "$as_dir" && as_dir=.
1718 for ac_exec_ext in '' $ac_executable_extensions; do
1719 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1720 ac_cv_prog_CC="${ac_tool_prefix}cc"
1721 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1722 break 2
1723 fi
1724done
1725done
1726
1727fi
1728fi
1729CC=$ac_cv_prog_CC
1730if test -n "$CC"; then
1731 echo "$as_me:$LINENO: result: $CC" >&5
1732echo "${ECHO_T}$CC" >&6
1733else
1734 echo "$as_me:$LINENO: result: no" >&5
1735echo "${ECHO_T}no" >&6
1736fi
1737
1738fi
1739if test -z "$ac_cv_prog_CC"; then
1740 ac_ct_CC=$CC
1741 # Extract the first word of "cc", so it can be a program name with args.
1742set dummy cc; ac_word=$2
1743echo "$as_me:$LINENO: checking for $ac_word" >&5
1744echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1745if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1746 echo $ECHO_N "(cached) $ECHO_C" >&6
1747else
1748 if test -n "$ac_ct_CC"; then
1749 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1750else
1751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1752for as_dir in $PATH
1753do
1754 IFS=$as_save_IFS
1755 test -z "$as_dir" && as_dir=.
1756 for ac_exec_ext in '' $ac_executable_extensions; do
1757 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1758 ac_cv_prog_ac_ct_CC="cc"
1759 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1760 break 2
1761 fi
1762done
1763done
1764
1765fi
1766fi
1767ac_ct_CC=$ac_cv_prog_ac_ct_CC
1768if test -n "$ac_ct_CC"; then
1769 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1770echo "${ECHO_T}$ac_ct_CC" >&6
1771else
1772 echo "$as_me:$LINENO: result: no" >&5
1773echo "${ECHO_T}no" >&6
1774fi
1775
1776 CC=$ac_ct_CC
1777else
1778 CC="$ac_cv_prog_CC"
1779fi
1780
1781fi
1782if test -z "$CC"; then
1783 # Extract the first word of "cc", so it can be a program name with args.
1784set dummy cc; ac_word=$2
1785echo "$as_me:$LINENO: checking for $ac_word" >&5
1786echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1787if test "${ac_cv_prog_CC+set}" = set; then
1788 echo $ECHO_N "(cached) $ECHO_C" >&6
1789else
1790 if test -n "$CC"; then
1791 ac_cv_prog_CC="$CC" # Let the user override the test.
1792else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001793 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1795for as_dir in $PATH
1796do
1797 IFS=$as_save_IFS
1798 test -z "$as_dir" && as_dir=.
1799 for ac_exec_ext in '' $ac_executable_extensions; do
1800 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1801 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1802 ac_prog_rejected=yes
1803 continue
1804 fi
1805 ac_cv_prog_CC="cc"
1806 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1807 break 2
1808 fi
1809done
1810done
1811
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001812if test $ac_prog_rejected = yes; then
1813 # We found a bogon in the path, so make sure we never use it.
1814 set dummy $ac_cv_prog_CC
1815 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001816 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001817 # We chose a different compiler from the bogus one.
1818 # However, it has the same basename, so the bogon will be chosen
1819 # first if we set CC to just the basename; use the full file name.
1820 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001821 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001822 shift
1823 ac_cv_prog_CC="$@"
1824 fi
1825fi
1826fi
1827fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001828CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001829if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001830 echo "$as_me:$LINENO: result: $CC" >&5
1831echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001832else
Martin v. Löwis11437992002-04-12 09:54:03 +00001833 echo "$as_me:$LINENO: result: no" >&5
1834echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001835fi
1836
Martin v. Löwis11437992002-04-12 09:54:03 +00001837fi
1838if test -z "$CC"; then
1839 if test -n "$ac_tool_prefix"; then
1840 for ac_prog in cl
1841 do
1842 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1843set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1844echo "$as_me:$LINENO: checking for $ac_word" >&5
1845echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1846if test "${ac_cv_prog_CC+set}" = set; then
1847 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001848else
1849 if test -n "$CC"; then
1850 ac_cv_prog_CC="$CC" # Let the user override the test.
1851else
Martin v. Löwis11437992002-04-12 09:54:03 +00001852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1853for as_dir in $PATH
1854do
1855 IFS=$as_save_IFS
1856 test -z "$as_dir" && as_dir=.
1857 for ac_exec_ext in '' $ac_executable_extensions; do
1858 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1859 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1860 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1861 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001862 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001863done
1864done
1865
1866fi
1867fi
1868CC=$ac_cv_prog_CC
1869if test -n "$CC"; then
1870 echo "$as_me:$LINENO: result: $CC" >&5
1871echo "${ECHO_T}$CC" >&6
1872else
1873 echo "$as_me:$LINENO: result: no" >&5
1874echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001875fi
1876
Martin v. Löwis11437992002-04-12 09:54:03 +00001877 test -n "$CC" && break
1878 done
1879fi
1880if test -z "$CC"; then
1881 ac_ct_CC=$CC
1882 for ac_prog in cl
1883do
1884 # Extract the first word of "$ac_prog", so it can be a program name with args.
1885set dummy $ac_prog; ac_word=$2
1886echo "$as_me:$LINENO: checking for $ac_word" >&5
1887echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1888if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1889 echo $ECHO_N "(cached) $ECHO_C" >&6
1890else
1891 if test -n "$ac_ct_CC"; then
1892 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1893else
1894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1895for as_dir in $PATH
1896do
1897 IFS=$as_save_IFS
1898 test -z "$as_dir" && as_dir=.
1899 for ac_exec_ext in '' $ac_executable_extensions; do
1900 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1901 ac_cv_prog_ac_ct_CC="$ac_prog"
1902 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1903 break 2
1904 fi
1905done
1906done
Jack Jansendd19cf82001-12-06 22:36:17 +00001907
Martin v. Löwis11437992002-04-12 09:54:03 +00001908fi
1909fi
1910ac_ct_CC=$ac_cv_prog_ac_ct_CC
1911if test -n "$ac_ct_CC"; then
1912 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1913echo "${ECHO_T}$ac_ct_CC" >&6
1914else
1915 echo "$as_me:$LINENO: result: no" >&5
1916echo "${ECHO_T}no" >&6
1917fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001918
Martin v. Löwis11437992002-04-12 09:54:03 +00001919 test -n "$ac_ct_CC" && break
1920done
Michael W. Hudson54241132001-12-07 15:38:26 +00001921
Martin v. Löwis11437992002-04-12 09:54:03 +00001922 CC=$ac_ct_CC
1923fi
1924
1925fi
1926
1927
1928test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1929echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1930 { (exit 1); exit 1; }; }
1931
1932# Provide some information about the compiler.
1933echo "$as_me:$LINENO:" \
1934 "checking for C compiler version" >&5
1935ac_compiler=`set X $ac_compile; echo $2`
1936{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1937 (eval $ac_compiler --version </dev/null >&5) 2>&5
1938 ac_status=$?
1939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1940 (exit $ac_status); }
1941{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1942 (eval $ac_compiler -v </dev/null >&5) 2>&5
1943 ac_status=$?
1944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1945 (exit $ac_status); }
1946{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1947 (eval $ac_compiler -V </dev/null >&5) 2>&5
1948 ac_status=$?
1949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1950 (exit $ac_status); }
1951
1952cat >conftest.$ac_ext <<_ACEOF
1953#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001954#include "confdefs.h"
1955
Martin v. Löwis11437992002-04-12 09:54:03 +00001956#ifdef F77_DUMMY_MAIN
1957# ifdef __cplusplus
1958 extern "C"
1959# endif
1960 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001962int
1963main ()
1964{
1965
1966 ;
1967 return 0;
1968}
1969_ACEOF
1970ac_clean_files_save=$ac_clean_files
1971ac_clean_files="$ac_clean_files a.out a.exe"
1972# Try to create an executable without -o first, disregard a.out.
1973# It will help us diagnose broken compilers, and finding out an intuition
1974# of exeext.
1975echo "$as_me:$LINENO: checking for C compiler default output" >&5
1976echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1977ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1978if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1979 (eval $ac_link_default) 2>&5
1980 ac_status=$?
1981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1982 (exit $ac_status); }; then
1983 # Find the output, starting from the most likely. This scheme is
1984# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1985# resort.
1986
1987# Be careful to initialize this variable, since it used to be cached.
1988# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1989ac_cv_exeext=
1990for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1991 ls a.out conftest 2>/dev/null;
1992 ls a.* conftest.* 2>/dev/null`; do
1993 case $ac_file in
1994 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1995 a.out ) # We found the default executable, but exeext='' is most
1996 # certainly right.
1997 break;;
1998 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1999 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2000 export ac_cv_exeext
2001 break;;
2002 * ) break;;
2003 esac
2004done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002005else
Martin v. Löwis11437992002-04-12 09:54:03 +00002006 echo "$as_me: failed program was:" >&5
2007cat conftest.$ac_ext >&5
2008{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2009echo "$as_me: error: C compiler cannot create executables" >&2;}
2010 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002011fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002012
Martin v. Löwis11437992002-04-12 09:54:03 +00002013ac_exeext=$ac_cv_exeext
2014echo "$as_me:$LINENO: result: $ac_file" >&5
2015echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002016
Martin v. Löwis11437992002-04-12 09:54:03 +00002017# Check the compiler produces executables we can run. If not, either
2018# the compiler is broken, or we cross compile.
2019echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2020echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2021# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2022# If not cross compiling, check that we can run a simple program.
2023if test "$cross_compiling" != yes; then
2024 if { ac_try='./$ac_file'
2025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2026 (eval $ac_try) 2>&5
2027 ac_status=$?
2028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2029 (exit $ac_status); }; }; then
2030 cross_compiling=no
2031 else
2032 if test "$cross_compiling" = maybe; then
2033 cross_compiling=yes
2034 else
2035 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2036If you meant to cross compile, use \`--host'." >&5
2037echo "$as_me: error: cannot run C compiled programs.
2038If you meant to cross compile, use \`--host'." >&2;}
2039 { (exit 1); exit 1; }; }
2040 fi
2041 fi
2042fi
2043echo "$as_me:$LINENO: result: yes" >&5
2044echo "${ECHO_T}yes" >&6
2045
2046rm -f a.out a.exe conftest$ac_cv_exeext
2047ac_clean_files=$ac_clean_files_save
2048# Check the compiler produces executables we can run. If not, either
2049# the compiler is broken, or we cross compile.
2050echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2051echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2052echo "$as_me:$LINENO: result: $cross_compiling" >&5
2053echo "${ECHO_T}$cross_compiling" >&6
2054
2055echo "$as_me:$LINENO: checking for suffix of executables" >&5
2056echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2057if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2058 (eval $ac_link) 2>&5
2059 ac_status=$?
2060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2061 (exit $ac_status); }; then
2062 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2063# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2064# work properly (i.e., refer to `conftest.exe'), while it won't with
2065# `rm'.
2066for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2067 case $ac_file in
2068 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2069 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2070 export ac_cv_exeext
2071 break;;
2072 * ) break;;
2073 esac
2074done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002075else
Martin v. Löwis11437992002-04-12 09:54:03 +00002076 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2077echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2078 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002079fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002080
Martin v. Löwis11437992002-04-12 09:54:03 +00002081rm -f conftest$ac_cv_exeext
2082echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2083echo "${ECHO_T}$ac_cv_exeext" >&6
2084
2085rm -f conftest.$ac_ext
2086EXEEXT=$ac_cv_exeext
2087ac_exeext=$EXEEXT
2088echo "$as_me:$LINENO: checking for suffix of object files" >&5
2089echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2090if test "${ac_cv_objext+set}" = set; then
2091 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002092else
Martin v. Löwis11437992002-04-12 09:54:03 +00002093 cat >conftest.$ac_ext <<_ACEOF
2094#line $LINENO "configure"
2095#include "confdefs.h"
2096
2097#ifdef F77_DUMMY_MAIN
2098# ifdef __cplusplus
2099 extern "C"
2100# endif
2101 int F77_DUMMY_MAIN() { return 1; }
2102#endif
2103int
2104main ()
2105{
2106
2107 ;
2108 return 0;
2109}
2110_ACEOF
2111rm -f conftest.o conftest.obj
2112if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2113 (eval $ac_compile) 2>&5
2114 ac_status=$?
2115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2116 (exit $ac_status); }; then
2117 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2118 case $ac_file in
2119 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2120 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2121 break;;
2122 esac
2123done
2124else
2125 echo "$as_me: failed program was:" >&5
2126cat conftest.$ac_ext >&5
2127{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2128echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2129 { (exit 1); exit 1; }; }
2130fi
2131
2132rm -f conftest.$ac_cv_objext conftest.$ac_ext
2133fi
2134echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2135echo "${ECHO_T}$ac_cv_objext" >&6
2136OBJEXT=$ac_cv_objext
2137ac_objext=$OBJEXT
2138echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2139echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2140if test "${ac_cv_c_compiler_gnu+set}" = set; then
2141 echo $ECHO_N "(cached) $ECHO_C" >&6
2142else
2143 cat >conftest.$ac_ext <<_ACEOF
2144#line $LINENO "configure"
2145#include "confdefs.h"
2146
2147#ifdef F77_DUMMY_MAIN
2148# ifdef __cplusplus
2149 extern "C"
2150# endif
2151 int F77_DUMMY_MAIN() { return 1; }
2152#endif
2153int
2154main ()
2155{
2156#ifndef __GNUC__
2157 choke me
2158#endif
2159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164rm -f conftest.$ac_objext
2165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2166 (eval $ac_compile) 2>&5
2167 ac_status=$?
2168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2169 (exit $ac_status); } &&
2170 { ac_try='test -s conftest.$ac_objext'
2171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2172 (eval $ac_try) 2>&5
2173 ac_status=$?
2174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2175 (exit $ac_status); }; }; then
2176 ac_compiler_gnu=yes
2177else
2178 echo "$as_me: failed program was:" >&5
2179cat conftest.$ac_ext >&5
2180ac_compiler_gnu=no
2181fi
2182rm -f conftest.$ac_objext conftest.$ac_ext
2183ac_cv_c_compiler_gnu=$ac_compiler_gnu
2184
2185fi
2186echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2187echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2188GCC=`test $ac_compiler_gnu = yes && echo yes`
2189ac_test_CFLAGS=${CFLAGS+set}
2190ac_save_CFLAGS=$CFLAGS
2191CFLAGS="-g"
2192echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2193echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2194if test "${ac_cv_prog_cc_g+set}" = set; then
2195 echo $ECHO_N "(cached) $ECHO_C" >&6
2196else
2197 cat >conftest.$ac_ext <<_ACEOF
2198#line $LINENO "configure"
2199#include "confdefs.h"
2200
2201#ifdef F77_DUMMY_MAIN
2202# ifdef __cplusplus
2203 extern "C"
2204# endif
2205 int F77_DUMMY_MAIN() { return 1; }
2206#endif
2207int
2208main ()
2209{
2210
2211 ;
2212 return 0;
2213}
2214_ACEOF
2215rm -f conftest.$ac_objext
2216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2217 (eval $ac_compile) 2>&5
2218 ac_status=$?
2219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2220 (exit $ac_status); } &&
2221 { ac_try='test -s conftest.$ac_objext'
2222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2223 (eval $ac_try) 2>&5
2224 ac_status=$?
2225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2226 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002227 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002228else
Martin v. Löwis11437992002-04-12 09:54:03 +00002229 echo "$as_me: failed program was:" >&5
2230cat conftest.$ac_ext >&5
2231ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002232fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002233rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002234fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002235echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2236echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002237if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002238 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002239elif test $ac_cv_prog_cc_g = yes; then
2240 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002241 CFLAGS="-g -O2"
2242 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002243 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002244 fi
2245else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002246 if test "$GCC" = yes; then
2247 CFLAGS="-O2"
2248 else
2249 CFLAGS=
2250 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002251fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002252# Some people use a C++ compiler to compile C. Since we use `exit',
2253# in C++ we need to declare it. In case someone uses the same compiler
2254# for both compiling C and C++ we need to have the C++ compiler decide
2255# the declaration of exit, since it's the most demanding environment.
2256cat >conftest.$ac_ext <<_ACEOF
2257#ifndef __cplusplus
2258 choke me
2259#endif
2260_ACEOF
2261rm -f conftest.$ac_objext
2262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2263 (eval $ac_compile) 2>&5
2264 ac_status=$?
2265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2266 (exit $ac_status); } &&
2267 { ac_try='test -s conftest.$ac_objext'
2268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2269 (eval $ac_try) 2>&5
2270 ac_status=$?
2271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2272 (exit $ac_status); }; }; then
2273 for ac_declaration in \
2274 ''\
2275 '#include <stdlib.h>' \
2276 'extern "C" void std::exit (int) throw (); using std::exit;' \
2277 'extern "C" void std::exit (int); using std::exit;' \
2278 'extern "C" void exit (int) throw ();' \
2279 'extern "C" void exit (int);' \
2280 'void exit (int);'
2281do
2282 cat >conftest.$ac_ext <<_ACEOF
2283#line $LINENO "configure"
2284#include "confdefs.h"
2285#include <stdlib.h>
2286$ac_declaration
2287#ifdef F77_DUMMY_MAIN
2288# ifdef __cplusplus
2289 extern "C"
2290# endif
2291 int F77_DUMMY_MAIN() { return 1; }
2292#endif
2293int
2294main ()
2295{
2296exit (42);
2297 ;
2298 return 0;
2299}
2300_ACEOF
2301rm -f conftest.$ac_objext
2302if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2303 (eval $ac_compile) 2>&5
2304 ac_status=$?
2305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2306 (exit $ac_status); } &&
2307 { ac_try='test -s conftest.$ac_objext'
2308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2309 (eval $ac_try) 2>&5
2310 ac_status=$?
2311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2312 (exit $ac_status); }; }; then
2313 :
2314else
2315 echo "$as_me: failed program was:" >&5
2316cat conftest.$ac_ext >&5
2317continue
2318fi
2319rm -f conftest.$ac_objext conftest.$ac_ext
2320 cat >conftest.$ac_ext <<_ACEOF
2321#line $LINENO "configure"
2322#include "confdefs.h"
2323$ac_declaration
2324#ifdef F77_DUMMY_MAIN
2325# ifdef __cplusplus
2326 extern "C"
2327# endif
2328 int F77_DUMMY_MAIN() { return 1; }
2329#endif
2330int
2331main ()
2332{
2333exit (42);
2334 ;
2335 return 0;
2336}
2337_ACEOF
2338rm -f conftest.$ac_objext
2339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2340 (eval $ac_compile) 2>&5
2341 ac_status=$?
2342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2343 (exit $ac_status); } &&
2344 { ac_try='test -s conftest.$ac_objext'
2345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2346 (eval $ac_try) 2>&5
2347 ac_status=$?
2348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2349 (exit $ac_status); }; }; then
2350 break
2351else
2352 echo "$as_me: failed program was:" >&5
2353cat conftest.$ac_ext >&5
2354fi
2355rm -f conftest.$ac_objext conftest.$ac_ext
2356done
2357rm -f conftest*
2358if test -n "$ac_declaration"; then
2359 echo '#ifdef __cplusplus' >>confdefs.h
2360 echo $ac_declaration >>confdefs.h
2361 echo '#endif' >>confdefs.h
2362fi
2363
2364else
2365 echo "$as_me: failed program was:" >&5
2366cat conftest.$ac_ext >&5
2367fi
2368rm -f conftest.$ac_objext conftest.$ac_ext
2369ac_ext=c
2370ac_cpp='$CPP $CPPFLAGS'
2371ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2372ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2373ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002374
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002375
2376# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002377
2378ac_ext=c
2379ac_cpp='$CPP $CPPFLAGS'
2380ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2381ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2382ac_compiler_gnu=$ac_cv_c_compiler_gnu
2383echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2384echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002385# On Suns, sometimes $CPP names a directory.
2386if test -n "$CPP" && test -d "$CPP"; then
2387 CPP=
2388fi
2389if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002390 if test "${ac_cv_prog_CPP+set}" = set; then
2391 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002392else
Martin v. Löwis11437992002-04-12 09:54:03 +00002393 # Double quotes because CPP needs to be expanded
2394 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2395 do
2396 ac_preproc_ok=false
2397for ac_c_preproc_warn_flag in '' yes
2398do
2399 # Use a header file that comes with gcc, so configuring glibc
2400 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002401 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002402 # not just through cpp. "Syntax error" is here to catch this case.
2403 cat >conftest.$ac_ext <<_ACEOF
2404#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002405#include "confdefs.h"
2406#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002407 Syntax error
2408_ACEOF
2409if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2410 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2411 ac_status=$?
2412 egrep -v '^ *\+' conftest.er1 >conftest.err
2413 rm -f conftest.er1
2414 cat conftest.err >&5
2415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2416 (exit $ac_status); } >/dev/null; then
2417 if test -s conftest.err; then
2418 ac_cpp_err=$ac_c_preproc_warn_flag
2419 else
2420 ac_cpp_err=
2421 fi
2422else
2423 ac_cpp_err=yes
2424fi
2425if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002426 :
2427else
Martin v. Löwis11437992002-04-12 09:54:03 +00002428 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002429 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002430 # Broken: fails on valid input.
2431continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002432fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002433rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002434
Martin v. Löwis11437992002-04-12 09:54:03 +00002435 # OK, works on sane cases. Now check whether non-existent headers
2436 # can be detected and how.
2437 cat >conftest.$ac_ext <<_ACEOF
2438#line $LINENO "configure"
2439#include "confdefs.h"
2440#include <ac_nonexistent.h>
2441_ACEOF
2442if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2443 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2444 ac_status=$?
2445 egrep -v '^ *\+' conftest.er1 >conftest.err
2446 rm -f conftest.er1
2447 cat conftest.err >&5
2448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2449 (exit $ac_status); } >/dev/null; then
2450 if test -s conftest.err; then
2451 ac_cpp_err=$ac_c_preproc_warn_flag
2452 else
2453 ac_cpp_err=
2454 fi
2455else
2456 ac_cpp_err=yes
2457fi
2458if test -z "$ac_cpp_err"; then
2459 # Broken: success on invalid input.
2460continue
2461else
2462 echo "$as_me: failed program was:" >&5
2463 cat conftest.$ac_ext >&5
2464 # Passes both tests.
2465ac_preproc_ok=:
2466break
2467fi
2468rm -f conftest.err conftest.$ac_ext
2469
2470done
2471# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2472rm -f conftest.err conftest.$ac_ext
2473if $ac_preproc_ok; then
2474 break
2475fi
2476
2477 done
2478 ac_cv_prog_CPP=$CPP
2479
2480fi
2481 CPP=$ac_cv_prog_CPP
2482else
2483 ac_cv_prog_CPP=$CPP
2484fi
2485echo "$as_me:$LINENO: result: $CPP" >&5
2486echo "${ECHO_T}$CPP" >&6
2487ac_preproc_ok=false
2488for ac_c_preproc_warn_flag in '' yes
2489do
2490 # Use a header file that comes with gcc, so configuring glibc
2491 # with a fresh cross-compiler works.
2492 # On the NeXT, cc -E runs the code through the compiler's parser,
2493 # not just through cpp. "Syntax error" is here to catch this case.
2494 cat >conftest.$ac_ext <<_ACEOF
2495#line $LINENO "configure"
2496#include "confdefs.h"
2497#include <assert.h>
2498 Syntax error
2499_ACEOF
2500if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2501 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2502 ac_status=$?
2503 egrep -v '^ *\+' conftest.er1 >conftest.err
2504 rm -f conftest.er1
2505 cat conftest.err >&5
2506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2507 (exit $ac_status); } >/dev/null; then
2508 if test -s conftest.err; then
2509 ac_cpp_err=$ac_c_preproc_warn_flag
2510 else
2511 ac_cpp_err=
2512 fi
2513else
2514 ac_cpp_err=yes
2515fi
2516if test -z "$ac_cpp_err"; then
2517 :
2518else
2519 echo "$as_me: failed program was:" >&5
2520 cat conftest.$ac_ext >&5
2521 # Broken: fails on valid input.
2522continue
2523fi
2524rm -f conftest.err conftest.$ac_ext
2525
2526 # OK, works on sane cases. Now check whether non-existent headers
2527 # can be detected and how.
2528 cat >conftest.$ac_ext <<_ACEOF
2529#line $LINENO "configure"
2530#include "confdefs.h"
2531#include <ac_nonexistent.h>
2532_ACEOF
2533if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2534 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2535 ac_status=$?
2536 egrep -v '^ *\+' conftest.er1 >conftest.err
2537 rm -f conftest.er1
2538 cat conftest.err >&5
2539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2540 (exit $ac_status); } >/dev/null; then
2541 if test -s conftest.err; then
2542 ac_cpp_err=$ac_c_preproc_warn_flag
2543 else
2544 ac_cpp_err=
2545 fi
2546else
2547 ac_cpp_err=yes
2548fi
2549if test -z "$ac_cpp_err"; then
2550 # Broken: success on invalid input.
2551continue
2552else
2553 echo "$as_me: failed program was:" >&5
2554 cat conftest.$ac_ext >&5
2555 # Passes both tests.
2556ac_preproc_ok=:
2557break
2558fi
2559rm -f conftest.err conftest.$ac_ext
2560
2561done
2562# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2563rm -f conftest.err conftest.$ac_ext
2564if $ac_preproc_ok; then
2565 :
2566else
2567 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2568echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2569 { (exit 1); exit 1; }; }
2570fi
2571
2572ac_ext=c
2573ac_cpp='$CPP $CPPFLAGS'
2574ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2575ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2576ac_compiler_gnu=$ac_cv_c_compiler_gnu
2577
2578
2579
2580echo "$as_me:$LINENO: checking for AIX" >&5
2581echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2582cat >conftest.$ac_ext <<_ACEOF
2583#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002584#include "confdefs.h"
2585#ifdef _AIX
2586 yes
2587#endif
2588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002590if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2591 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 echo "$as_me:$LINENO: result: yes" >&5
2593echo "${ECHO_T}yes" >&6
2594cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002595#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002596_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002597
2598else
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 echo "$as_me:$LINENO: result: no" >&5
2600echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002601fi
2602rm -f conftest*
2603
Michael W. Hudson54241132001-12-07 15:38:26 +00002604
Martin v. Löwis11437992002-04-12 09:54:03 +00002605echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2606echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2607if test "${ac_cv_header_stdc+set}" = set; then
2608 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002609else
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 cat >conftest.$ac_ext <<_ACEOF
2611#line $LINENO "configure"
2612#include "confdefs.h"
2613#include <stdlib.h>
2614#include <stdarg.h>
2615#include <string.h>
2616#include <float.h>
2617
2618_ACEOF
2619if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2620 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2621 ac_status=$?
2622 egrep -v '^ *\+' conftest.er1 >conftest.err
2623 rm -f conftest.er1
2624 cat conftest.err >&5
2625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2626 (exit $ac_status); } >/dev/null; then
2627 if test -s conftest.err; then
2628 ac_cpp_err=$ac_c_preproc_warn_flag
2629 else
2630 ac_cpp_err=
2631 fi
2632else
2633 ac_cpp_err=yes
2634fi
2635if test -z "$ac_cpp_err"; then
2636 ac_cv_header_stdc=yes
2637else
2638 echo "$as_me: failed program was:" >&5
2639 cat conftest.$ac_ext >&5
2640 ac_cv_header_stdc=no
2641fi
2642rm -f conftest.err conftest.$ac_ext
2643
2644if test $ac_cv_header_stdc = yes; then
2645 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2646 cat >conftest.$ac_ext <<_ACEOF
2647#line $LINENO "configure"
2648#include "confdefs.h"
2649#include <string.h>
2650
2651_ACEOF
2652if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2653 egrep "memchr" >/dev/null 2>&1; then
2654 :
2655else
2656 ac_cv_header_stdc=no
2657fi
2658rm -f conftest*
2659
2660fi
2661
2662if test $ac_cv_header_stdc = yes; then
2663 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2664 cat >conftest.$ac_ext <<_ACEOF
2665#line $LINENO "configure"
2666#include "confdefs.h"
2667#include <stdlib.h>
2668
2669_ACEOF
2670if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2671 egrep "free" >/dev/null 2>&1; then
2672 :
2673else
2674 ac_cv_header_stdc=no
2675fi
2676rm -f conftest*
2677
2678fi
2679
2680if test $ac_cv_header_stdc = yes; then
2681 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2682 if test "$cross_compiling" = yes; then
2683 :
2684else
2685 cat >conftest.$ac_ext <<_ACEOF
2686#line $LINENO "configure"
2687#include "confdefs.h"
2688#include <ctype.h>
2689#if ((' ' & 0x0FF) == 0x020)
2690# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2691# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2692#else
2693# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2694 || ('j' <= (c) && (c) <= 'r') \
2695 || ('s' <= (c) && (c) <= 'z'))
2696# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2697#endif
2698
2699#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2700int
2701main ()
2702{
2703 int i;
2704 for (i = 0; i < 256; i++)
2705 if (XOR (islower (i), ISLOWER (i))
2706 || toupper (i) != TOUPPER (i))
2707 exit(2);
2708 exit (0);
2709}
2710_ACEOF
2711rm -f conftest$ac_exeext
2712if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2713 (eval $ac_link) 2>&5
2714 ac_status=$?
2715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2716 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2718 (eval $ac_try) 2>&5
2719 ac_status=$?
2720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2721 (exit $ac_status); }; }; then
2722 :
2723else
2724 echo "$as_me: program exited with status $ac_status" >&5
2725echo "$as_me: failed program was:" >&5
2726cat conftest.$ac_ext >&5
2727( exit $ac_status )
2728ac_cv_header_stdc=no
2729fi
2730rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2731fi
2732fi
2733fi
2734echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2735echo "${ECHO_T}$ac_cv_header_stdc" >&6
2736if test $ac_cv_header_stdc = yes; then
2737
2738cat >>confdefs.h <<\_ACEOF
2739#define STDC_HEADERS 1
2740_ACEOF
2741
2742fi
2743
2744# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2755 inttypes.h stdint.h unistd.h
2756do
2757as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2758echo "$as_me:$LINENO: checking for $ac_header" >&5
2759echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2760if eval "test \"\${$as_ac_Header+set}\" = set"; then
2761 echo $ECHO_N "(cached) $ECHO_C" >&6
2762else
2763 cat >conftest.$ac_ext <<_ACEOF
2764#line $LINENO "configure"
2765#include "confdefs.h"
2766$ac_includes_default
2767
2768#include <$ac_header>
2769_ACEOF
2770rm -f conftest.$ac_objext
2771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2772 (eval $ac_compile) 2>&5
2773 ac_status=$?
2774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2775 (exit $ac_status); } &&
2776 { ac_try='test -s conftest.$ac_objext'
2777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2778 (eval $ac_try) 2>&5
2779 ac_status=$?
2780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2781 (exit $ac_status); }; }; then
2782 eval "$as_ac_Header=yes"
2783else
2784 echo "$as_me: failed program was:" >&5
2785cat conftest.$ac_ext >&5
2786eval "$as_ac_Header=no"
2787fi
2788rm -f conftest.$ac_objext conftest.$ac_ext
2789fi
2790echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2791echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2792if test `eval echo '${'$as_ac_Header'}'` = yes; then
2793 cat >>confdefs.h <<_ACEOF
2794#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2795_ACEOF
2796
2797fi
2798
2799done
2800
2801
2802if test "${ac_cv_header_minix_config_h+set}" = set; then
2803 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2804echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2805if test "${ac_cv_header_minix_config_h+set}" = set; then
2806 echo $ECHO_N "(cached) $ECHO_C" >&6
2807fi
2808echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2809echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2810else
2811 # Is the header compilable?
2812echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2813echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2814cat >conftest.$ac_ext <<_ACEOF
2815#line $LINENO "configure"
2816#include "confdefs.h"
2817$ac_includes_default
2818#include <minix/config.h>
2819_ACEOF
2820rm -f conftest.$ac_objext
2821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2822 (eval $ac_compile) 2>&5
2823 ac_status=$?
2824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2825 (exit $ac_status); } &&
2826 { ac_try='test -s conftest.$ac_objext'
2827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2828 (eval $ac_try) 2>&5
2829 ac_status=$?
2830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2831 (exit $ac_status); }; }; then
2832 ac_header_compiler=yes
2833else
2834 echo "$as_me: failed program was:" >&5
2835cat conftest.$ac_ext >&5
2836ac_header_compiler=no
2837fi
2838rm -f conftest.$ac_objext conftest.$ac_ext
2839echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2840echo "${ECHO_T}$ac_header_compiler" >&6
2841
2842# Is the header present?
2843echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2844echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2845cat >conftest.$ac_ext <<_ACEOF
2846#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002847#include "confdefs.h"
2848#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002849_ACEOF
2850if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2851 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2852 ac_status=$?
2853 egrep -v '^ *\+' conftest.er1 >conftest.err
2854 rm -f conftest.er1
2855 cat conftest.err >&5
2856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2857 (exit $ac_status); } >/dev/null; then
2858 if test -s conftest.err; then
2859 ac_cpp_err=$ac_c_preproc_warn_flag
2860 else
2861 ac_cpp_err=
2862 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002863else
Martin v. Löwis11437992002-04-12 09:54:03 +00002864 ac_cpp_err=yes
2865fi
2866if test -z "$ac_cpp_err"; then
2867 ac_header_preproc=yes
2868else
2869 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002870 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002871 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002872fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002873rm -f conftest.err conftest.$ac_ext
2874echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2875echo "${ECHO_T}$ac_header_preproc" >&6
2876
2877# So? What about this header?
2878case $ac_header_compiler:$ac_header_preproc in
2879 yes:no )
2880 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2881echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2882 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2883echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2884 no:yes )
2885 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2886echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2887 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2888echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2889 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2890echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2891esac
2892echo "$as_me:$LINENO: checking for minix/config.h" >&5
2893echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2894if test "${ac_cv_header_minix_config_h+set}" = set; then
2895 echo $ECHO_N "(cached) $ECHO_C" >&6
2896else
2897 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002898fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002899echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2900echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2901
2902fi
2903if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002904 MINIX=yes
2905else
Martin v. Löwis11437992002-04-12 09:54:03 +00002906 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002907fi
2908
Martin v. Löwis11437992002-04-12 09:54:03 +00002909
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002910if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002911
2912cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002913#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002914_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002915
Martin v. Löwis11437992002-04-12 09:54:03 +00002916
2917cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002918#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002919_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002920
Martin v. Löwis11437992002-04-12 09:54:03 +00002921
2922cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002923#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002924_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002925
2926fi
2927
2928
Michael W. Hudson54241132001-12-07 15:38:26 +00002929
Martin v. Löwis11437992002-04-12 09:54:03 +00002930echo "$as_me:$LINENO: checking for --with-suffix" >&5
2931echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002932
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002933# Check whether --with-suffix or --without-suffix was given.
2934if test "${with_suffix+set}" = set; then
2935 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002936
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002937 case $withval in
2938 no) EXEEXT=;;
2939 yes) EXEEXT=.exe;;
2940 *) EXEEXT=$withval;;
2941 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002942fi;
2943echo "$as_me:$LINENO: result: $EXEEXT" >&5
2944echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002945
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002946# Test whether we're running on a non-case-sensitive system, in which
2947# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2950echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002951if test -d "python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002952then
Martin v. Löwis11437992002-04-12 09:54:03 +00002953 echo "$as_me:$LINENO: result: yes" >&5
2954echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002955 BUILDEXEEXT=.exe
2956else
Martin v. Löwis11437992002-04-12 09:54:03 +00002957 echo "$as_me:$LINENO: result: no" >&5
2958echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002959 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002960fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002961
Guido van Rossumdd997f71998-10-07 19:58:26 +00002962case $MACHDEP in
2963bsdos*)
2964 case $CC in
2965 gcc) CC="$CC -D_HAVE_BSDI";;
2966 esac;;
2967esac
2968
Guido van Rossum24b1e751997-08-21 02:29:16 +00002969case $ac_sys_system in
2970hp*|HP*)
2971 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002972 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002973 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002974Monterey*)
2975 case $CC in
2976 cc) CC="$CC -Wl,-Bexport";;
2977 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002978SunOS*)
2979 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002980
2981cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002982#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002983_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002984
2985 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002986esac
2987
Michael W. Hudson54241132001-12-07 15:38:26 +00002988
2989
Martin v. Löwis11437992002-04-12 09:54:03 +00002990echo "$as_me:$LINENO: checking LIBRARY" >&5
2991echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002992if test -z "$LIBRARY"
2993then
2994 LIBRARY='libpython$(VERSION).a'
2995fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002996echo "$as_me:$LINENO: result: $LIBRARY" >&5
2997echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002998
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002999# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003000# name of the library into which to insert object files). BLDLIBRARY is also
3001# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3002# is blank as the main program is not linked directly against LDLIBRARY.
3003# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3004# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3005# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3006# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003007#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003008# RUNSHARED is used to run shared python without installed libraries
3009#
3010# INSTSONAME is the name of the shared library that will be use to install
3011# on the system - some systems like version suffix, others don't
3012
3013
Michael W. Hudson54241132001-12-07 15:38:26 +00003014
3015
3016
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003017
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003018LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003019BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis1142de32002-03-29 16:28:31 +00003020INSTSONMAE='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003021DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003022LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003023RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003024
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003025# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003026# If CXX is set, and if it is needed to link a main function that was
3027# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3028# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003029# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003030# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003031
Martin v. Löwis11437992002-04-12 09:54:03 +00003032echo "$as_me:$LINENO: checking LINKCC" >&5
3033echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003034if test -z "$LINKCC"
3035then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003036 if test -z "$CXX"; then
3037 LINKCC="\$(PURIFY) \$(CC)"
3038 else
3039 echo 'int main(){return 0;}' > conftest.$ac_ext
3040 $CXX -c conftest.$ac_ext 2>&5
3041 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3042 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3043 then
3044 LINKCC="\$(PURIFY) \$(CC)"
3045 else
3046 LINKCC="\$(PURIFY) \$(CXX)"
3047 fi
3048 rm -fr conftest*
3049 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003050 case $ac_sys_system in
3051 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003052 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003053 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003054 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003055 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003056 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003057 esac
3058fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003059echo "$as_me:$LINENO: result: $LINKCC" >&5
3060echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003061
Martin v. Löwis11437992002-04-12 09:54:03 +00003062echo "$as_me:$LINENO: checking for --enable-shared" >&5
3063echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003064# Check whether --enable-shared or --disable-shared was given.
3065if test "${enable_shared+set}" = set; then
3066 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003067
Martin v. Löwis11437992002-04-12 09:54:03 +00003068fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003069
3070if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003071then
Martin v. Löwis1142de32002-03-29 16:28:31 +00003072 enable_shared="no"
3073fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003074echo "$as_me:$LINENO: result: $enable_shared" >&5
3075echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003076
3077
Martin v. Löwis11437992002-04-12 09:54:03 +00003078echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3079echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003080
Guido van Rossumb8552162001-09-05 14:58:11 +00003081# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3082# library that we build, but we do not want to link against it (we
3083# will find it with a -framework option). For this reason there is an
3084# extra variable BLDLIBRARY against which Python and the extension
3085# modules are linked, BLDLIBRARY. This is normally the same as
3086# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003087if test "$enable_framework"
3088then
3089 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3090 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3091 BLDLIBRARY=''
3092else
3093 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003094fi
Jack Jansene578a632001-08-15 01:27:14 +00003095
Martin v. Löwis1142de32002-03-29 16:28:31 +00003096# Other platforms follow
3097if test $enable_shared = "yes"; then
3098 case $ac_sys_system in
3099 BeOS*)
3100 LDLIBRARY='libpython$(VERSION).so'
3101 ;;
3102 CYGWIN*)
3103 LDLIBRARY='libpython$(VERSION).dll.a'
3104 DLLLIBRARY='libpython$(VERSION).dll'
3105 ;;
3106 SunOS*)
3107 LDLIBRARY='libpython$(VERSION).so'
3108 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3109 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3110 ;;
3111 Linux*)
3112 LDLIBRARY='libpython$(VERSION).so'
3113 BLDLIBRARY='-L. -lpython$(VERSION)'
3114 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3115 INSTSONAME="$LDLIBRARY".$SOVERSION
3116 ;;
3117 hp*|HP*)
3118 LDLIBRARY='libpython$(VERSION).sl'
3119 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3120 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3121 ;;
3122 OSF*)
3123 LDLIBRARY='libpython$(VERSION).so'
3124 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3125 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3126 ;;
3127 esac
3128 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3129 case $MACHDEP in
3130 dguxR4)
3131 LDLIBRARY='libpython$(VERSION).so'
3132 OPT="$OPT -pic"
3133 ;;
3134 esac
3135fi
3136
Martin v. Löwis11437992002-04-12 09:54:03 +00003137echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3138echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003139
Martin v. Löwis11437992002-04-12 09:54:03 +00003140if test -n "$ac_tool_prefix"; then
3141 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3142set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3143echo "$as_me:$LINENO: checking for $ac_word" >&5
3144echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3145if test "${ac_cv_prog_RANLIB+set}" = set; then
3146 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003147else
3148 if test -n "$RANLIB"; then
3149 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3150else
Martin v. Löwis11437992002-04-12 09:54:03 +00003151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3152for as_dir in $PATH
3153do
3154 IFS=$as_save_IFS
3155 test -z "$as_dir" && as_dir=.
3156 for ac_exec_ext in '' $ac_executable_extensions; do
3157 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3158 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3159 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3160 break 2
3161 fi
3162done
3163done
3164
Guido van Rossum627b2d71993-12-24 10:39:16 +00003165fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003166fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003167RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003168if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003169 echo "$as_me:$LINENO: result: $RANLIB" >&5
3170echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003171else
Martin v. Löwis11437992002-04-12 09:54:03 +00003172 echo "$as_me:$LINENO: result: no" >&5
3173echo "${ECHO_T}no" >&6
3174fi
3175
3176fi
3177if test -z "$ac_cv_prog_RANLIB"; then
3178 ac_ct_RANLIB=$RANLIB
3179 # Extract the first word of "ranlib", so it can be a program name with args.
3180set dummy ranlib; ac_word=$2
3181echo "$as_me:$LINENO: checking for $ac_word" >&5
3182echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3183if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3184 echo $ECHO_N "(cached) $ECHO_C" >&6
3185else
3186 if test -n "$ac_ct_RANLIB"; then
3187 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3188else
3189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3190for as_dir in $PATH
3191do
3192 IFS=$as_save_IFS
3193 test -z "$as_dir" && as_dir=.
3194 for ac_exec_ext in '' $ac_executable_extensions; do
3195 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3196 ac_cv_prog_ac_ct_RANLIB="ranlib"
3197 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3198 break 2
3199 fi
3200done
3201done
3202
3203 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3204fi
3205fi
3206ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3207if test -n "$ac_ct_RANLIB"; then
3208 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3209echo "${ECHO_T}$ac_ct_RANLIB" >&6
3210else
3211 echo "$as_me:$LINENO: result: no" >&5
3212echo "${ECHO_T}no" >&6
3213fi
3214
3215 RANLIB=$ac_ct_RANLIB
3216else
3217 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003218fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003219
3220
Guido van Rossum7f43da71994-08-01 12:15:30 +00003221for ac_prog in ar aal
3222do
Martin v. Löwis11437992002-04-12 09:54:03 +00003223 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003224set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003225echo "$as_me:$LINENO: checking for $ac_word" >&5
3226echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3227if test "${ac_cv_prog_AR+set}" = set; then
3228 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003229else
3230 if test -n "$AR"; then
3231 ac_cv_prog_AR="$AR" # Let the user override the test.
3232else
Martin v. Löwis11437992002-04-12 09:54:03 +00003233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3234for as_dir in $PATH
3235do
3236 IFS=$as_save_IFS
3237 test -z "$as_dir" && as_dir=.
3238 for ac_exec_ext in '' $ac_executable_extensions; do
3239 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3240 ac_cv_prog_AR="$ac_prog"
3241 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3242 break 2
3243 fi
3244done
3245done
3246
Guido van Rossum7f43da71994-08-01 12:15:30 +00003247fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003248fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003249AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003250if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003251 echo "$as_me:$LINENO: result: $AR" >&5
3252echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003253else
Martin v. Löwis11437992002-04-12 09:54:03 +00003254 echo "$as_me:$LINENO: result: no" >&5
3255echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003256fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003257
Martin v. Löwis11437992002-04-12 09:54:03 +00003258 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003259done
3260test -n "$AR" || AR="ar"
3261
Michael W. Hudson54241132001-12-07 15:38:26 +00003262
Neil Schemenauera42c8272001-03-31 00:01:55 +00003263case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003264bsdos*|hp*|HP*)
3265 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003266 if test -z "$INSTALL"
3267 then
3268 INSTALL="${srcdir}/install-sh -c"
3269 fi
3270esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003271ac_aux_dir=
3272for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3273 if test -f $ac_dir/install-sh; then
3274 ac_aux_dir=$ac_dir
3275 ac_install_sh="$ac_aux_dir/install-sh -c"
3276 break
3277 elif test -f $ac_dir/install.sh; then
3278 ac_aux_dir=$ac_dir
3279 ac_install_sh="$ac_aux_dir/install.sh -c"
3280 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003281 elif test -f $ac_dir/shtool; then
3282 ac_aux_dir=$ac_dir
3283 ac_install_sh="$ac_aux_dir/shtool install -c"
3284 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003285 fi
3286done
3287if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003288 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3289echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3290 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003291fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003292ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3293ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3294ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003295
3296# Find a good install program. We prefer a C program (faster),
3297# so one script is as good as another. But avoid the broken or
3298# incompatible versions:
3299# SysV /etc/install, /usr/sbin/install
3300# SunOS /usr/etc/install
3301# IRIX /sbin/install
3302# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003303# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003304# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3305# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3306# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3307# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003308echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3309echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003310if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003311if test "${ac_cv_path_install+set}" = set; then
3312 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003313else
Martin v. Löwis11437992002-04-12 09:54:03 +00003314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3315for as_dir in $PATH
3316do
3317 IFS=$as_save_IFS
3318 test -z "$as_dir" && as_dir=.
3319 # Account for people who put trailing slashes in PATH elements.
3320case $as_dir/ in
3321 ./ | .// | /cC/* | \
3322 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3323 /usr/ucb/* ) ;;
3324 *)
3325 # OSF1 and SCO ODT 3.0 have their own names for install.
3326 # Don't use installbsd from OSF since it installs stuff as root
3327 # by default.
3328 for ac_prog in ginstall scoinst install; do
3329 for ac_exec_ext in '' $ac_executable_extensions; do
3330 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3331 if test $ac_prog = install &&
3332 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3333 # AIX install. It has an incompatible calling convention.
3334 :
3335 elif test $ac_prog = install &&
3336 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3337 # program-specific install script used by HP pwplus--don't use.
3338 :
3339 else
3340 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3341 break 3
3342 fi
3343 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003344 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003345 done
3346 ;;
3347esac
3348done
3349
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003350
3351fi
3352 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003353 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003354 else
3355 # As a last resort, use the slow shell script. We don't cache a
3356 # path for INSTALL within a source directory, because that will
3357 # break other packages using the cache if that directory is
3358 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003359 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003360 fi
3361fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003362echo "$as_me:$LINENO: result: $INSTALL" >&5
3363echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003364
3365# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3366# It thinks the first close brace ends the variable substitution.
3367test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3368
Martin v. Löwis11437992002-04-12 09:54:03 +00003369test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003370
3371test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3372
Michael W. Hudson54241132001-12-07 15:38:26 +00003373
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003374# Not every filesystem supports hard links
3375
3376if test -z "$LN" ; then
3377 case $ac_sys_system in
3378 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003379 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003380 *) LN=ln;;
3381 esac
3382fi
3383
Fred Drake109d9862001-07-11 06:27:56 +00003384# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003385echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3386echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3387
Fred Drake109d9862001-07-11 06:27:56 +00003388# Check whether --with-pydebug or --without-pydebug was given.
3389if test "${with_pydebug+set}" = set; then
3390 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003391
Fred Drake109d9862001-07-11 06:27:56 +00003392if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003393then
3394
3395cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003396#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003397_ACEOF
3398
3399 echo "$as_me:$LINENO: result: yes" >&5
3400echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003401 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003402else echo "$as_me:$LINENO: result: no" >&5
3403echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003404fi
3405else
Martin v. Löwis11437992002-04-12 09:54:03 +00003406 echo "$as_me:$LINENO: result: no" >&5
3407echo "${ECHO_T}no" >&6
3408fi;
Fred Drake109d9862001-07-11 06:27:56 +00003409
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003410# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003411
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003412if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003413then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003414 case $GCC in
3415 yes)
3416 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003417 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003418 if test "$Py_DEBUG" = 'true' ; then
3419 # Optimization messes up debuggers, so turn it off for
3420 # debug builds.
3421 OPT="-g -Wall -Wstrict-prototypes"
3422 else
3423 OPT="-g -O3 -Wall -Wstrict-prototypes"
3424 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003425 *)
Fred Drake109d9862001-07-11 06:27:56 +00003426 OPT="-O3 -Wall -Wstrict-prototypes";;
3427 esac
3428 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003429 *)
3430 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003431 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003432 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3433 *)
3434 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003435 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003436 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003437 case $ac_sys_system in
3438 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003439 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003440 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003441fi
3442
Fred Drakee1ceaa02001-12-04 20:55:47 +00003443if test "$Py_DEBUG" = 'true'; then
3444 :
3445else
3446 OPT="-DNDEBUG $OPT"
3447fi
3448
Trent Mick635f6fb2000-08-23 21:33:05 +00003449# The current (beta) Monterey compiler dies with optimizations
3450case $ac_sys_system in
3451Monterey*) OPT="";;
3452esac
3453
Guido van Rossum563e7081996-09-10 18:20:48 +00003454if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003455then
3456 OPT="$OPT $ac_arch_flags"
3457fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003458
Martin v. Löwis11437992002-04-12 09:54:03 +00003459echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3460echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3461if test "${ac_cv_opt_olimit_ok+set}" = set; then
3462 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003463else
3464 ac_save_cc="$CC"
3465CC="$CC -OPT:Olimit=0"
3466if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003467 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003468else
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 cat >conftest.$ac_ext <<_ACEOF
3470#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003471#include "confdefs.h"
3472int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003473_ACEOF
3474rm -f conftest$ac_exeext
3475if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3476 (eval $ac_link) 2>&5
3477 ac_status=$?
3478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3479 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3481 (eval $ac_try) 2>&5
3482 ac_status=$?
3483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3484 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003485 ac_cv_opt_olimit_ok=yes
3486else
Martin v. Löwis11437992002-04-12 09:54:03 +00003487 echo "$as_me: program exited with status $ac_status" >&5
3488echo "$as_me: failed program was:" >&5
3489cat conftest.$ac_ext >&5
3490( exit $ac_status )
3491ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003492fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003493rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003494fi
Guido van Rossum91922671997-10-09 20:24:13 +00003495CC="$ac_save_cc"
3496fi
3497
Martin v. Löwis11437992002-04-12 09:54:03 +00003498echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3499echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003500if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003501 case $ac_sys_system in
3502 Darwin*) OPT="$OPT" ;;
3503 *) OPT="$OPT -OPT:Olimit=0";;
3504 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003505else
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3507echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3508 if test "${ac_cv_olimit_ok+set}" = set; then
3509 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003510else
3511 ac_save_cc="$CC"
3512 CC="$CC -Olimit 1500"
3513 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003514 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003515else
Martin v. Löwis11437992002-04-12 09:54:03 +00003516 cat >conftest.$ac_ext <<_ACEOF
3517#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003518#include "confdefs.h"
3519int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003520_ACEOF
3521rm -f conftest$ac_exeext
3522if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3523 (eval $ac_link) 2>&5
3524 ac_status=$?
3525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3526 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3528 (eval $ac_try) 2>&5
3529 ac_status=$?
3530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3531 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003532 ac_cv_olimit_ok=yes
3533else
Martin v. Löwis11437992002-04-12 09:54:03 +00003534 echo "$as_me: program exited with status $ac_status" >&5
3535echo "$as_me: failed program was:" >&5
3536cat conftest.$ac_ext >&5
3537( exit $ac_status )
3538ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003539fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003540rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003541fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003542 CC="$ac_save_cc"
3543fi
3544
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3546echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003547 if test $ac_cv_olimit_ok = yes; then
3548 OPT="$OPT -Olimit 1500"
3549 fi
3550fi
3551
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003552# On some compilers, pthreads are available without further options
3553# (e.g. MacOS X). On some of these systems, the compiler will not
3554# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3555# So we have to see first whether pthreads are available without
3556# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003557echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3558echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3559if test "${ac_cv_pthread_is_default+set}" = set; then
3560 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003561else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003562 if test "$cross_compiling" = yes; then
3563 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003564else
Martin v. Löwis11437992002-04-12 09:54:03 +00003565 cat >conftest.$ac_ext <<_ACEOF
3566#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003567#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003568
Martin v. Löwis130fb172001-07-19 11:00:41 +00003569#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003570
3571void* routine(void* p){return NULL;}
3572
3573int main(){
3574 pthread_t p;
3575 if(pthread_create(&p,NULL,routine,NULL)!=0)
3576 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003577 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003578 return 0;
3579}
3580
Martin v. Löwis11437992002-04-12 09:54:03 +00003581_ACEOF
3582rm -f conftest$ac_exeext
3583if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3584 (eval $ac_link) 2>&5
3585 ac_status=$?
3586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3587 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3589 (eval $ac_try) 2>&5
3590 ac_status=$?
3591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3592 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003593 ac_cv_pthread_is_default=yes
3594else
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 echo "$as_me: program exited with status $ac_status" >&5
3596echo "$as_me: failed program was:" >&5
3597cat conftest.$ac_ext >&5
3598( exit $ac_status )
3599ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003600fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003601rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003602fi
3603
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003604fi
3605
Martin v. Löwis11437992002-04-12 09:54:03 +00003606echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3607echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003608
Michael W. Hudson54241132001-12-07 15:38:26 +00003609
Martin v. Löwis11437992002-04-12 09:54:03 +00003610if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003611then
3612 ac_cv_kpthread=no
3613else
3614# -Kpthread, if available, provides the right #defines
3615# and linker options to make pthread_create available
3616# Some compilers won't report that they do not support -Kpthread,
3617# so we need to run a program to see whether it really made the
3618# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003619echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3620echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3621if test "${ac_cv_kpthread+set}" = set; then
3622 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003623else
3624 ac_save_cc="$CC"
3625CC="$CC -Kpthread"
3626if test "$cross_compiling" = yes; then
3627 ac_cv_kpthread=no
3628else
Martin v. Löwis11437992002-04-12 09:54:03 +00003629 cat >conftest.$ac_ext <<_ACEOF
3630#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003631#include "confdefs.h"
3632
3633#include <pthread.h>
3634
3635void* routine(void* p){return NULL;}
3636
3637int main(){
3638 pthread_t p;
3639 if(pthread_create(&p,NULL,routine,NULL)!=0)
3640 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003641 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003642 return 0;
3643}
3644
Martin v. Löwis11437992002-04-12 09:54:03 +00003645_ACEOF
3646rm -f conftest$ac_exeext
3647if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3648 (eval $ac_link) 2>&5
3649 ac_status=$?
3650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3651 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3653 (eval $ac_try) 2>&5
3654 ac_status=$?
3655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3656 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003657 ac_cv_kpthread=yes
3658else
Martin v. Löwis11437992002-04-12 09:54:03 +00003659 echo "$as_me: program exited with status $ac_status" >&5
3660echo "$as_me: failed program was:" >&5
3661cat conftest.$ac_ext >&5
3662( exit $ac_status )
3663ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003664fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003665rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003666fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003667CC="$ac_save_cc"
3668fi
3669
Martin v. Löwis11437992002-04-12 09:54:03 +00003670echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3671echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003672fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003673
Michael W. Hudson54241132001-12-07 15:38:26 +00003674
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003675# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003676echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3677echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3678if test "${ac_cv_header_stdc+set}" = set; then
3679 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003680else
Martin v. Löwis11437992002-04-12 09:54:03 +00003681 cat >conftest.$ac_ext <<_ACEOF
3682#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003683#include "confdefs.h"
3684#include <stdlib.h>
3685#include <stdarg.h>
3686#include <string.h>
3687#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003688
3689_ACEOF
3690if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3691 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3692 ac_status=$?
3693 egrep -v '^ *\+' conftest.er1 >conftest.err
3694 rm -f conftest.er1
3695 cat conftest.err >&5
3696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3697 (exit $ac_status); } >/dev/null; then
3698 if test -s conftest.err; then
3699 ac_cpp_err=$ac_c_preproc_warn_flag
3700 else
3701 ac_cpp_err=
3702 fi
3703else
3704 ac_cpp_err=yes
3705fi
3706if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003707 ac_cv_header_stdc=yes
3708else
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003710 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003711 ac_cv_header_stdc=no
3712fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003713rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003714
3715if test $ac_cv_header_stdc = yes; then
3716 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003717 cat >conftest.$ac_ext <<_ACEOF
3718#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003719#include "confdefs.h"
3720#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003721
3722_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3724 egrep "memchr" >/dev/null 2>&1; then
3725 :
3726else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003727 ac_cv_header_stdc=no
3728fi
3729rm -f conftest*
3730
3731fi
3732
3733if test $ac_cv_header_stdc = yes; then
3734 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 cat >conftest.$ac_ext <<_ACEOF
3736#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003737#include "confdefs.h"
3738#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003739
3740_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003741if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3742 egrep "free" >/dev/null 2>&1; then
3743 :
3744else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003745 ac_cv_header_stdc=no
3746fi
3747rm -f conftest*
3748
3749fi
3750
3751if test $ac_cv_header_stdc = yes; then
3752 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003754 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003755else
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 cat >conftest.$ac_ext <<_ACEOF
3757#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003758#include "confdefs.h"
3759#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003760#if ((' ' & 0x0FF) == 0x020)
3761# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3762# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3763#else
3764# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3765 || ('j' <= (c) && (c) <= 'r') \
3766 || ('s' <= (c) && (c) <= 'z'))
3767# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3768#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003769
Martin v. Löwis11437992002-04-12 09:54:03 +00003770#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3771int
3772main ()
3773{
3774 int i;
3775 for (i = 0; i < 256; i++)
3776 if (XOR (islower (i), ISLOWER (i))
3777 || toupper (i) != TOUPPER (i))
3778 exit(2);
3779 exit (0);
3780}
3781_ACEOF
3782rm -f conftest$ac_exeext
3783if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3784 (eval $ac_link) 2>&5
3785 ac_status=$?
3786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3787 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3789 (eval $ac_try) 2>&5
3790 ac_status=$?
3791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3792 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003793 :
3794else
Martin v. Löwis11437992002-04-12 09:54:03 +00003795 echo "$as_me: program exited with status $ac_status" >&5
3796echo "$as_me: failed program was:" >&5
3797cat conftest.$ac_ext >&5
3798( exit $ac_status )
3799ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003800fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003801rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003802fi
3803fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003804fi
3805echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3806echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003807if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003808
3809cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003810#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003811_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003812
3813fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003814
Martin v. Löwis11437992002-04-12 09:54:03 +00003815
3816
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
3856for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003857libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003858signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00003859sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003860sys/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 +00003861sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00003862ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003863do
Martin v. Löwis11437992002-04-12 09:54:03 +00003864as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3865if eval "test \"\${$as_ac_Header+set}\" = set"; then
3866 echo "$as_me:$LINENO: checking for $ac_header" >&5
3867echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3868if eval "test \"\${$as_ac_Header+set}\" = set"; then
3869 echo $ECHO_N "(cached) $ECHO_C" >&6
3870fi
3871echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3872echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003873else
Martin v. Löwis11437992002-04-12 09:54:03 +00003874 # Is the header compilable?
3875echo "$as_me:$LINENO: checking $ac_header usability" >&5
3876echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3877cat >conftest.$ac_ext <<_ACEOF
3878#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003879#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003880$ac_includes_default
3881#include <$ac_header>
3882_ACEOF
3883rm -f conftest.$ac_objext
3884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3885 (eval $ac_compile) 2>&5
3886 ac_status=$?
3887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3888 (exit $ac_status); } &&
3889 { ac_try='test -s conftest.$ac_objext'
3890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3891 (eval $ac_try) 2>&5
3892 ac_status=$?
3893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3894 (exit $ac_status); }; }; then
3895 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003896else
Martin v. Löwis11437992002-04-12 09:54:03 +00003897 echo "$as_me: failed program was:" >&5
3898cat conftest.$ac_ext >&5
3899ac_header_compiler=no
3900fi
3901rm -f conftest.$ac_objext conftest.$ac_ext
3902echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3903echo "${ECHO_T}$ac_header_compiler" >&6
3904
3905# Is the header present?
3906echo "$as_me:$LINENO: checking $ac_header presence" >&5
3907echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3908cat >conftest.$ac_ext <<_ACEOF
3909#line $LINENO "configure"
3910#include "confdefs.h"
3911#include <$ac_header>
3912_ACEOF
3913if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3914 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3915 ac_status=$?
3916 egrep -v '^ *\+' conftest.er1 >conftest.err
3917 rm -f conftest.er1
3918 cat conftest.err >&5
3919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3920 (exit $ac_status); } >/dev/null; then
3921 if test -s conftest.err; then
3922 ac_cpp_err=$ac_c_preproc_warn_flag
3923 else
3924 ac_cpp_err=
3925 fi
3926else
3927 ac_cpp_err=yes
3928fi
3929if test -z "$ac_cpp_err"; then
3930 ac_header_preproc=yes
3931else
3932 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003933 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003934 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003935fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003936rm -f conftest.err conftest.$ac_ext
3937echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3938echo "${ECHO_T}$ac_header_preproc" >&6
3939
3940# So? What about this header?
3941case $ac_header_compiler:$ac_header_preproc in
3942 yes:no )
3943 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3944echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3945 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3946echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3947 no:yes )
3948 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3949echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3950 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3951echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3952 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3953echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3954esac
3955echo "$as_me:$LINENO: checking for $ac_header" >&5
3956echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3957if eval "test \"\${$as_ac_Header+set}\" = set"; then
3958 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003959else
Martin v. Löwis11437992002-04-12 09:54:03 +00003960 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003961fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003962echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3963echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3964
3965fi
3966if test `eval echo '${'$as_ac_Header'}'` = yes; then
3967 cat >>confdefs.h <<_ACEOF
3968#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3969_ACEOF
3970
3971fi
3972
Guido van Rossum627b2d71993-12-24 10:39:16 +00003973done
3974
Martin v. Löwis11437992002-04-12 09:54:03 +00003975
3976
3977
3978
3979
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003980ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003981for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3982 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3983echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3984echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3985if eval "test \"\${$as_ac_Header+set}\" = set"; then
3986 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003987else
Martin v. Löwis11437992002-04-12 09:54:03 +00003988 cat >conftest.$ac_ext <<_ACEOF
3989#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003990#include "confdefs.h"
3991#include <sys/types.h>
3992#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00003993
3994#ifdef F77_DUMMY_MAIN
3995# ifdef __cplusplus
3996 extern "C"
3997# endif
3998 int F77_DUMMY_MAIN() { return 1; }
3999#endif
4000int
4001main ()
4002{
4003if ((DIR *) 0)
4004return 0;
4005 ;
4006 return 0;
4007}
4008_ACEOF
4009rm -f conftest.$ac_objext
4010if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4011 (eval $ac_compile) 2>&5
4012 ac_status=$?
4013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4014 (exit $ac_status); } &&
4015 { ac_try='test -s conftest.$ac_objext'
4016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4017 (eval $ac_try) 2>&5
4018 ac_status=$?
4019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4020 (exit $ac_status); }; }; then
4021 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004022else
Martin v. Löwis11437992002-04-12 09:54:03 +00004023 echo "$as_me: failed program was:" >&5
4024cat conftest.$ac_ext >&5
4025eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004026fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004027rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004028fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004029echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4030echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4031if test `eval echo '${'$as_ac_Header'}'` = yes; then
4032 cat >>confdefs.h <<_ACEOF
4033#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4034_ACEOF
4035
4036ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004037fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004038
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004039done
4040# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4041if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4043echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4044if test "${ac_cv_search_opendir+set}" = set; then
4045 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004046else
Martin v. Löwis11437992002-04-12 09:54:03 +00004047 ac_func_search_save_LIBS=$LIBS
4048ac_cv_search_opendir=no
4049cat >conftest.$ac_ext <<_ACEOF
4050#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004051#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004052
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004053/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004054#ifdef __cplusplus
4055extern "C"
4056#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004057/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004058 builtin and then its argument prototype would still apply. */
4059char opendir ();
4060#ifdef F77_DUMMY_MAIN
4061# ifdef __cplusplus
4062 extern "C"
4063# endif
4064 int F77_DUMMY_MAIN() { return 1; }
4065#endif
4066int
4067main ()
4068{
4069opendir ();
4070 ;
4071 return 0;
4072}
4073_ACEOF
4074rm -f conftest.$ac_objext conftest$ac_exeext
4075if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4076 (eval $ac_link) 2>&5
4077 ac_status=$?
4078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4079 (exit $ac_status); } &&
4080 { ac_try='test -s conftest$ac_exeext'
4081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4082 (eval $ac_try) 2>&5
4083 ac_status=$?
4084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4085 (exit $ac_status); }; }; then
4086 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004087else
Martin v. Löwis11437992002-04-12 09:54:03 +00004088 echo "$as_me: failed program was:" >&5
4089cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004090fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004091rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4092if test "$ac_cv_search_opendir" = no; then
4093 for ac_lib in dir; do
4094 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4095 cat >conftest.$ac_ext <<_ACEOF
4096#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004097#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004098
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004099/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004100#ifdef __cplusplus
4101extern "C"
4102#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004103/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004104 builtin and then its argument prototype would still apply. */
4105char opendir ();
4106#ifdef F77_DUMMY_MAIN
4107# ifdef __cplusplus
4108 extern "C"
4109# endif
4110 int F77_DUMMY_MAIN() { return 1; }
4111#endif
4112int
4113main ()
4114{
4115opendir ();
4116 ;
4117 return 0;
4118}
4119_ACEOF
4120rm -f conftest.$ac_objext conftest$ac_exeext
4121if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4122 (eval $ac_link) 2>&5
4123 ac_status=$?
4124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4125 (exit $ac_status); } &&
4126 { ac_try='test -s conftest$ac_exeext'
4127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4128 (eval $ac_try) 2>&5
4129 ac_status=$?
4130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4131 (exit $ac_status); }; }; then
4132 ac_cv_search_opendir="-l$ac_lib"
4133break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004134else
Martin v. Löwis11437992002-04-12 09:54:03 +00004135 echo "$as_me: failed program was:" >&5
4136cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004137fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004138rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4139 done
4140fi
4141LIBS=$ac_func_search_save_LIBS
4142fi
4143echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4144echo "${ECHO_T}$ac_cv_search_opendir" >&6
4145if test "$ac_cv_search_opendir" != no; then
4146 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004148fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004149
Michael W. Hudson54241132001-12-07 15:38:26 +00004150else
Martin v. Löwis11437992002-04-12 09:54:03 +00004151 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4152echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4153if test "${ac_cv_search_opendir+set}" = set; then
4154 echo $ECHO_N "(cached) $ECHO_C" >&6
4155else
4156 ac_func_search_save_LIBS=$LIBS
4157ac_cv_search_opendir=no
4158cat >conftest.$ac_ext <<_ACEOF
4159#line $LINENO "configure"
4160#include "confdefs.h"
4161
4162/* Override any gcc2 internal prototype to avoid an error. */
4163#ifdef __cplusplus
4164extern "C"
4165#endif
4166/* We use char because int might match the return type of a gcc2
4167 builtin and then its argument prototype would still apply. */
4168char opendir ();
4169#ifdef F77_DUMMY_MAIN
4170# ifdef __cplusplus
4171 extern "C"
4172# endif
4173 int F77_DUMMY_MAIN() { return 1; }
4174#endif
4175int
4176main ()
4177{
4178opendir ();
4179 ;
4180 return 0;
4181}
4182_ACEOF
4183rm -f conftest.$ac_objext conftest$ac_exeext
4184if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4185 (eval $ac_link) 2>&5
4186 ac_status=$?
4187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4188 (exit $ac_status); } &&
4189 { ac_try='test -s conftest$ac_exeext'
4190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4191 (eval $ac_try) 2>&5
4192 ac_status=$?
4193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4194 (exit $ac_status); }; }; then
4195 ac_cv_search_opendir="none required"
4196else
4197 echo "$as_me: failed program was:" >&5
4198cat conftest.$ac_ext >&5
4199fi
4200rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4201if test "$ac_cv_search_opendir" = no; then
4202 for ac_lib in x; do
4203 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4204 cat >conftest.$ac_ext <<_ACEOF
4205#line $LINENO "configure"
4206#include "confdefs.h"
4207
4208/* Override any gcc2 internal prototype to avoid an error. */
4209#ifdef __cplusplus
4210extern "C"
4211#endif
4212/* We use char because int might match the return type of a gcc2
4213 builtin and then its argument prototype would still apply. */
4214char opendir ();
4215#ifdef F77_DUMMY_MAIN
4216# ifdef __cplusplus
4217 extern "C"
4218# endif
4219 int F77_DUMMY_MAIN() { return 1; }
4220#endif
4221int
4222main ()
4223{
4224opendir ();
4225 ;
4226 return 0;
4227}
4228_ACEOF
4229rm -f conftest.$ac_objext conftest$ac_exeext
4230if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4231 (eval $ac_link) 2>&5
4232 ac_status=$?
4233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4234 (exit $ac_status); } &&
4235 { ac_try='test -s conftest$ac_exeext'
4236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4237 (eval $ac_try) 2>&5
4238 ac_status=$?
4239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4240 (exit $ac_status); }; }; then
4241 ac_cv_search_opendir="-l$ac_lib"
4242break
4243else
4244 echo "$as_me: failed program was:" >&5
4245cat conftest.$ac_ext >&5
4246fi
4247rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4248 done
4249fi
4250LIBS=$ac_func_search_save_LIBS
4251fi
4252echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4253echo "${ECHO_T}$ac_cv_search_opendir" >&6
4254if test "$ac_cv_search_opendir" != no; then
4255 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4256
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004257fi
4258
4259fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004260
Michael W. Hudson54241132001-12-07 15:38:26 +00004261
Guido van Rossum627b2d71993-12-24 10:39:16 +00004262# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004263was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004264echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4265echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4266cat >conftest.$ac_ext <<_ACEOF
4267#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268#include "confdefs.h"
4269#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004270
4271_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004272if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4273 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004274 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004275else
Martin v. Löwis11437992002-04-12 09:54:03 +00004276
4277
4278cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004279#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004280_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004281
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004282
Guido van Rossum627b2d71993-12-24 10:39:16 +00004283fi
4284rm -f conftest*
4285
Martin v. Löwis11437992002-04-12 09:54:03 +00004286echo "$as_me:$LINENO: result: $was_it_defined" >&5
4287echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004288
Guido van Rossum810cc512001-09-09 23:51:39 +00004289# Two defines needed to enable largefile support on various platforms
4290# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004291
Martin v. Löwis11437992002-04-12 09:54:03 +00004292cat >>confdefs.h <<\_ACEOF
4293#define _LARGEFILE_SOURCE 1
4294_ACEOF
4295
4296
4297cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004298#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004299_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004300
Michael W. Hudson54241132001-12-07 15:38:26 +00004301
Guido van Rossum84e7b241996-08-19 21:59:00 +00004302# Add some code to confdefs.h so that the test for off_t works on SCO
4303cat >> confdefs.h <<\EOF
4304#if defined(SCO_DS)
4305#undef _OFF_T
4306#endif
4307EOF
4308
Guido van Rossumef2255b2000-03-10 22:30:29 +00004309# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004310echo "$as_me:$LINENO: checking for mode_t" >&5
4311echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4312if test "${ac_cv_type_mode_t+set}" = set; then
4313 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004314else
Martin v. Löwis11437992002-04-12 09:54:03 +00004315 cat >conftest.$ac_ext <<_ACEOF
4316#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004317#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004318$ac_includes_default
4319#ifdef F77_DUMMY_MAIN
4320# ifdef __cplusplus
4321 extern "C"
4322# endif
4323 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004325int
4326main ()
4327{
4328if ((mode_t *) 0)
4329 return 0;
4330if (sizeof (mode_t))
4331 return 0;
4332 ;
4333 return 0;
4334}
4335_ACEOF
4336rm -f conftest.$ac_objext
4337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4338 (eval $ac_compile) 2>&5
4339 ac_status=$?
4340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4341 (exit $ac_status); } &&
4342 { ac_try='test -s conftest.$ac_objext'
4343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4344 (eval $ac_try) 2>&5
4345 ac_status=$?
4346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4347 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004348 ac_cv_type_mode_t=yes
4349else
Martin v. Löwis11437992002-04-12 09:54:03 +00004350 echo "$as_me: failed program was:" >&5
4351cat conftest.$ac_ext >&5
4352ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004353fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004354rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004355fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004356echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4357echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4358if test $ac_cv_type_mode_t = yes; then
4359 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004360else
Martin v. Löwis11437992002-04-12 09:54:03 +00004361
4362cat >>confdefs.h <<_ACEOF
4363#define mode_t int
4364_ACEOF
4365
4366fi
4367
4368echo "$as_me:$LINENO: checking for off_t" >&5
4369echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4370if test "${ac_cv_type_off_t+set}" = set; then
4371 echo $ECHO_N "(cached) $ECHO_C" >&6
4372else
4373 cat >conftest.$ac_ext <<_ACEOF
4374#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004375#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004376$ac_includes_default
4377#ifdef F77_DUMMY_MAIN
4378# ifdef __cplusplus
4379 extern "C"
4380# endif
4381 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004382#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004383int
4384main ()
4385{
4386if ((off_t *) 0)
4387 return 0;
4388if (sizeof (off_t))
4389 return 0;
4390 ;
4391 return 0;
4392}
4393_ACEOF
4394rm -f conftest.$ac_objext
4395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4396 (eval $ac_compile) 2>&5
4397 ac_status=$?
4398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4399 (exit $ac_status); } &&
4400 { ac_try='test -s conftest.$ac_objext'
4401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4402 (eval $ac_try) 2>&5
4403 ac_status=$?
4404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4405 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004406 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004407else
Martin v. Löwis11437992002-04-12 09:54:03 +00004408 echo "$as_me: failed program was:" >&5
4409cat conftest.$ac_ext >&5
4410ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004411fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004412rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004413fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004414echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4415echo "${ECHO_T}$ac_cv_type_off_t" >&6
4416if test $ac_cv_type_off_t = yes; then
4417 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004418else
Martin v. Löwis11437992002-04-12 09:54:03 +00004419
4420cat >>confdefs.h <<_ACEOF
4421#define off_t long
4422_ACEOF
4423
4424fi
4425
4426echo "$as_me:$LINENO: checking for pid_t" >&5
4427echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4428if test "${ac_cv_type_pid_t+set}" = set; then
4429 echo $ECHO_N "(cached) $ECHO_C" >&6
4430else
4431 cat >conftest.$ac_ext <<_ACEOF
4432#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004433#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004434$ac_includes_default
4435#ifdef F77_DUMMY_MAIN
4436# ifdef __cplusplus
4437 extern "C"
4438# endif
4439 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004440#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004441int
4442main ()
4443{
4444if ((pid_t *) 0)
4445 return 0;
4446if (sizeof (pid_t))
4447 return 0;
4448 ;
4449 return 0;
4450}
4451_ACEOF
4452rm -f conftest.$ac_objext
4453if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4454 (eval $ac_compile) 2>&5
4455 ac_status=$?
4456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4457 (exit $ac_status); } &&
4458 { ac_try='test -s conftest.$ac_objext'
4459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4460 (eval $ac_try) 2>&5
4461 ac_status=$?
4462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4463 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004464 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004465else
Martin v. Löwis11437992002-04-12 09:54:03 +00004466 echo "$as_me: failed program was:" >&5
4467cat conftest.$ac_ext >&5
4468ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004469fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004470rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004471fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004472echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4473echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4474if test $ac_cv_type_pid_t = yes; then
4475 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004476else
Martin v. Löwis11437992002-04-12 09:54:03 +00004477
4478cat >>confdefs.h <<_ACEOF
4479#define pid_t int
4480_ACEOF
4481
4482fi
4483
4484echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4485echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4486if test "${ac_cv_type_signal+set}" = set; then
4487 echo $ECHO_N "(cached) $ECHO_C" >&6
4488else
4489 cat >conftest.$ac_ext <<_ACEOF
4490#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004491#include "confdefs.h"
4492#include <sys/types.h>
4493#include <signal.h>
4494#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004495# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004496#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004497#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004498extern "C" void (*signal (int, void (*)(int)))(int);
4499#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004500void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004501#endif
4502
Martin v. Löwis11437992002-04-12 09:54:03 +00004503#ifdef F77_DUMMY_MAIN
4504# ifdef __cplusplus
4505 extern "C"
4506# endif
4507 int F77_DUMMY_MAIN() { return 1; }
4508#endif
4509int
4510main ()
4511{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004512int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004513 ;
4514 return 0;
4515}
4516_ACEOF
4517rm -f conftest.$ac_objext
4518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4519 (eval $ac_compile) 2>&5
4520 ac_status=$?
4521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4522 (exit $ac_status); } &&
4523 { ac_try='test -s conftest.$ac_objext'
4524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4525 (eval $ac_try) 2>&5
4526 ac_status=$?
4527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4528 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004529 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004530else
Martin v. Löwis11437992002-04-12 09:54:03 +00004531 echo "$as_me: failed program was:" >&5
4532cat conftest.$ac_ext >&5
4533ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004534fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004535rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004536fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004537echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4538echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004539
Martin v. Löwis11437992002-04-12 09:54:03 +00004540cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004541#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004542_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004543
Michael W. Hudson54241132001-12-07 15:38:26 +00004544
Martin v. Löwis11437992002-04-12 09:54:03 +00004545echo "$as_me:$LINENO: checking for size_t" >&5
4546echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4547if test "${ac_cv_type_size_t+set}" = set; then
4548 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004549else
Martin v. Löwis11437992002-04-12 09:54:03 +00004550 cat >conftest.$ac_ext <<_ACEOF
4551#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004552#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004553$ac_includes_default
4554#ifdef F77_DUMMY_MAIN
4555# ifdef __cplusplus
4556 extern "C"
4557# endif
4558 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004559#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004560int
4561main ()
4562{
4563if ((size_t *) 0)
4564 return 0;
4565if (sizeof (size_t))
4566 return 0;
4567 ;
4568 return 0;
4569}
4570_ACEOF
4571rm -f conftest.$ac_objext
4572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4573 (eval $ac_compile) 2>&5
4574 ac_status=$?
4575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4576 (exit $ac_status); } &&
4577 { ac_try='test -s conftest.$ac_objext'
4578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4579 (eval $ac_try) 2>&5
4580 ac_status=$?
4581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4582 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004583 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004584else
Martin v. Löwis11437992002-04-12 09:54:03 +00004585 echo "$as_me: failed program was:" >&5
4586cat conftest.$ac_ext >&5
4587ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004589rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004590fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004591echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4592echo "${ECHO_T}$ac_cv_type_size_t" >&6
4593if test $ac_cv_type_size_t = yes; then
4594 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004595else
Martin v. Löwis11437992002-04-12 09:54:03 +00004596
4597cat >>confdefs.h <<_ACEOF
4598#define size_t unsigned
4599_ACEOF
4600
4601fi
4602
4603echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4604echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4605if test "${ac_cv_type_uid_t+set}" = set; then
4606 echo $ECHO_N "(cached) $ECHO_C" >&6
4607else
4608 cat >conftest.$ac_ext <<_ACEOF
4609#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004610#include "confdefs.h"
4611#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004612
4613_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004614if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4615 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004616 ac_cv_type_uid_t=yes
4617else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004618 ac_cv_type_uid_t=no
4619fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004620rm -f conftest*
4621
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004622fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004623echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4624echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004625if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004626
Martin v. Löwis11437992002-04-12 09:54:03 +00004627cat >>confdefs.h <<\_ACEOF
4628#define uid_t int
4629_ACEOF
4630
4631
4632cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004633#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004634_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004635
4636fi
4637
Jack Jansendd19cf82001-12-06 22:36:17 +00004638
Michael W. Hudson54241132001-12-07 15:38:26 +00004639# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004640echo "$as_me:$LINENO: checking for int" >&5
4641echo $ECHO_N "checking for int... $ECHO_C" >&6
4642if test "${ac_cv_type_int+set}" = set; then
4643 echo $ECHO_N "(cached) $ECHO_C" >&6
4644else
4645 cat >conftest.$ac_ext <<_ACEOF
4646#line $LINENO "configure"
4647#include "confdefs.h"
4648$ac_includes_default
4649#ifdef F77_DUMMY_MAIN
4650# ifdef __cplusplus
4651 extern "C"
4652# endif
4653 int F77_DUMMY_MAIN() { return 1; }
4654#endif
4655int
4656main ()
4657{
4658if ((int *) 0)
4659 return 0;
4660if (sizeof (int))
4661 return 0;
4662 ;
4663 return 0;
4664}
4665_ACEOF
4666rm -f conftest.$ac_objext
4667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4668 (eval $ac_compile) 2>&5
4669 ac_status=$?
4670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4671 (exit $ac_status); } &&
4672 { ac_try='test -s conftest.$ac_objext'
4673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4674 (eval $ac_try) 2>&5
4675 ac_status=$?
4676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4677 (exit $ac_status); }; }; then
4678 ac_cv_type_int=yes
4679else
4680 echo "$as_me: failed program was:" >&5
4681cat conftest.$ac_ext >&5
4682ac_cv_type_int=no
4683fi
4684rm -f conftest.$ac_objext conftest.$ac_ext
4685fi
4686echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4687echo "${ECHO_T}$ac_cv_type_int" >&6
4688
4689echo "$as_me:$LINENO: checking size of int" >&5
4690echo $ECHO_N "checking size of int... $ECHO_C" >&6
4691if test "${ac_cv_sizeof_int+set}" = set; then
4692 echo $ECHO_N "(cached) $ECHO_C" >&6
4693else
4694 if test "$ac_cv_type_int" = yes; then
4695 # The cast to unsigned long works around a bug in the HP C Compiler
4696 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4697 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4698 # This bug is HP SR number 8606223364.
4699 if test "$cross_compiling" = yes; then
4700 # Depending upon the size, compute the lo and hi bounds.
4701cat >conftest.$ac_ext <<_ACEOF
4702#line $LINENO "configure"
4703#include "confdefs.h"
4704$ac_includes_default
4705#ifdef F77_DUMMY_MAIN
4706# ifdef __cplusplus
4707 extern "C"
4708# endif
4709 int F77_DUMMY_MAIN() { return 1; }
4710#endif
4711int
4712main ()
4713{
4714static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4715test_array [0] = 0
4716
4717 ;
4718 return 0;
4719}
4720_ACEOF
4721rm -f conftest.$ac_objext
4722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4723 (eval $ac_compile) 2>&5
4724 ac_status=$?
4725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4726 (exit $ac_status); } &&
4727 { ac_try='test -s conftest.$ac_objext'
4728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4729 (eval $ac_try) 2>&5
4730 ac_status=$?
4731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4732 (exit $ac_status); }; }; then
4733 ac_lo=0 ac_mid=0
4734 while :; do
4735 cat >conftest.$ac_ext <<_ACEOF
4736#line $LINENO "configure"
4737#include "confdefs.h"
4738$ac_includes_default
4739#ifdef F77_DUMMY_MAIN
4740# ifdef __cplusplus
4741 extern "C"
4742# endif
4743 int F77_DUMMY_MAIN() { return 1; }
4744#endif
4745int
4746main ()
4747{
4748static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4749test_array [0] = 0
4750
4751 ;
4752 return 0;
4753}
4754_ACEOF
4755rm -f conftest.$ac_objext
4756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4757 (eval $ac_compile) 2>&5
4758 ac_status=$?
4759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4760 (exit $ac_status); } &&
4761 { ac_try='test -s conftest.$ac_objext'
4762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4763 (eval $ac_try) 2>&5
4764 ac_status=$?
4765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4766 (exit $ac_status); }; }; then
4767 ac_hi=$ac_mid; break
4768else
4769 echo "$as_me: failed program was:" >&5
4770cat conftest.$ac_ext >&5
4771ac_lo=`expr $ac_mid + 1`
4772 if test $ac_lo -le $ac_mid; then
4773 ac_lo= ac_hi=
4774 break
4775 fi
4776 ac_mid=`expr 2 '*' $ac_mid + 1`
4777fi
4778rm -f conftest.$ac_objext conftest.$ac_ext
4779 done
4780else
4781 echo "$as_me: failed program was:" >&5
4782cat conftest.$ac_ext >&5
4783cat >conftest.$ac_ext <<_ACEOF
4784#line $LINENO "configure"
4785#include "confdefs.h"
4786$ac_includes_default
4787#ifdef F77_DUMMY_MAIN
4788# ifdef __cplusplus
4789 extern "C"
4790# endif
4791 int F77_DUMMY_MAIN() { return 1; }
4792#endif
4793int
4794main ()
4795{
4796static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4797test_array [0] = 0
4798
4799 ;
4800 return 0;
4801}
4802_ACEOF
4803rm -f conftest.$ac_objext
4804if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4805 (eval $ac_compile) 2>&5
4806 ac_status=$?
4807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4808 (exit $ac_status); } &&
4809 { ac_try='test -s conftest.$ac_objext'
4810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4811 (eval $ac_try) 2>&5
4812 ac_status=$?
4813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4814 (exit $ac_status); }; }; then
4815 ac_hi=-1 ac_mid=-1
4816 while :; do
4817 cat >conftest.$ac_ext <<_ACEOF
4818#line $LINENO "configure"
4819#include "confdefs.h"
4820$ac_includes_default
4821#ifdef F77_DUMMY_MAIN
4822# ifdef __cplusplus
4823 extern "C"
4824# endif
4825 int F77_DUMMY_MAIN() { return 1; }
4826#endif
4827int
4828main ()
4829{
4830static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4831test_array [0] = 0
4832
4833 ;
4834 return 0;
4835}
4836_ACEOF
4837rm -f conftest.$ac_objext
4838if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4839 (eval $ac_compile) 2>&5
4840 ac_status=$?
4841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4842 (exit $ac_status); } &&
4843 { ac_try='test -s conftest.$ac_objext'
4844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4845 (eval $ac_try) 2>&5
4846 ac_status=$?
4847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4848 (exit $ac_status); }; }; then
4849 ac_lo=$ac_mid; break
4850else
4851 echo "$as_me: failed program was:" >&5
4852cat conftest.$ac_ext >&5
4853ac_hi=`expr '(' $ac_mid ')' - 1`
4854 if test $ac_mid -le $ac_hi; then
4855 ac_lo= ac_hi=
4856 break
4857 fi
4858 ac_mid=`expr 2 '*' $ac_mid`
4859fi
4860rm -f conftest.$ac_objext conftest.$ac_ext
4861 done
4862else
4863 echo "$as_me: failed program was:" >&5
4864cat conftest.$ac_ext >&5
4865ac_lo= ac_hi=
4866fi
4867rm -f conftest.$ac_objext conftest.$ac_ext
4868fi
4869rm -f conftest.$ac_objext conftest.$ac_ext
4870# Binary search between lo and hi bounds.
4871while test "x$ac_lo" != "x$ac_hi"; do
4872 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4873 cat >conftest.$ac_ext <<_ACEOF
4874#line $LINENO "configure"
4875#include "confdefs.h"
4876$ac_includes_default
4877#ifdef F77_DUMMY_MAIN
4878# ifdef __cplusplus
4879 extern "C"
4880# endif
4881 int F77_DUMMY_MAIN() { return 1; }
4882#endif
4883int
4884main ()
4885{
4886static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4887test_array [0] = 0
4888
4889 ;
4890 return 0;
4891}
4892_ACEOF
4893rm -f conftest.$ac_objext
4894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4895 (eval $ac_compile) 2>&5
4896 ac_status=$?
4897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4898 (exit $ac_status); } &&
4899 { ac_try='test -s conftest.$ac_objext'
4900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4901 (eval $ac_try) 2>&5
4902 ac_status=$?
4903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4904 (exit $ac_status); }; }; then
4905 ac_hi=$ac_mid
4906else
4907 echo "$as_me: failed program was:" >&5
4908cat conftest.$ac_ext >&5
4909ac_lo=`expr '(' $ac_mid ')' + 1`
4910fi
4911rm -f conftest.$ac_objext conftest.$ac_ext
4912done
4913case $ac_lo in
4914?*) ac_cv_sizeof_int=$ac_lo;;
4915'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4916echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4917 { (exit 1); exit 1; }; } ;;
4918esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004919else
4920 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004921 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4922echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4923 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004924else
Martin v. Löwis11437992002-04-12 09:54:03 +00004925 cat >conftest.$ac_ext <<_ACEOF
4926#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004927#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004928$ac_includes_default
4929long longval () { return (long) (sizeof (int)); }
4930unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004931#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004932#include <stdlib.h>
4933#ifdef F77_DUMMY_MAIN
4934# ifdef __cplusplus
4935 extern "C"
4936# endif
4937 int F77_DUMMY_MAIN() { return 1; }
4938#endif
4939int
4940main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004941{
Martin v. Löwis11437992002-04-12 09:54:03 +00004942
4943 FILE *f = fopen ("conftest.val", "w");
4944 if (! f)
4945 exit (1);
4946 if (((long) (sizeof (int))) < 0)
4947 {
4948 long i = longval ();
4949 if (i != ((long) (sizeof (int))))
4950 exit (1);
4951 fprintf (f, "%ld\n", i);
4952 }
4953 else
4954 {
4955 unsigned long i = ulongval ();
4956 if (i != ((long) (sizeof (int))))
4957 exit (1);
4958 fprintf (f, "%lu\n", i);
4959 }
4960 exit (ferror (f) || fclose (f) != 0);
4961
4962 ;
4963 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004964}
Martin v. Löwis11437992002-04-12 09:54:03 +00004965_ACEOF
4966rm -f conftest$ac_exeext
4967if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4968 (eval $ac_link) 2>&5
4969 ac_status=$?
4970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4971 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4973 (eval $ac_try) 2>&5
4974 ac_status=$?
4975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4976 (exit $ac_status); }; }; then
4977 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004978else
Martin v. Löwis11437992002-04-12 09:54:03 +00004979 echo "$as_me: program exited with status $ac_status" >&5
4980echo "$as_me: failed program was:" >&5
4981cat conftest.$ac_ext >&5
4982( exit $ac_status )
4983{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4984echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4985 { (exit 1); exit 1; }; }
4986fi
4987rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4988fi
4989fi
4990rm -f conftest.val
4991else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004992 ac_cv_sizeof_int=0
4993fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004994fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004995echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4996echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4997cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004998#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00004999_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005000
5001
Martin v. Löwis11437992002-04-12 09:54:03 +00005002echo "$as_me:$LINENO: checking for long" >&5
5003echo $ECHO_N "checking for long... $ECHO_C" >&6
5004if test "${ac_cv_type_long+set}" = set; then
5005 echo $ECHO_N "(cached) $ECHO_C" >&6
5006else
5007 cat >conftest.$ac_ext <<_ACEOF
5008#line $LINENO "configure"
5009#include "confdefs.h"
5010$ac_includes_default
5011#ifdef F77_DUMMY_MAIN
5012# ifdef __cplusplus
5013 extern "C"
5014# endif
5015 int F77_DUMMY_MAIN() { return 1; }
5016#endif
5017int
5018main ()
5019{
5020if ((long *) 0)
5021 return 0;
5022if (sizeof (long))
5023 return 0;
5024 ;
5025 return 0;
5026}
5027_ACEOF
5028rm -f conftest.$ac_objext
5029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5030 (eval $ac_compile) 2>&5
5031 ac_status=$?
5032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5033 (exit $ac_status); } &&
5034 { ac_try='test -s conftest.$ac_objext'
5035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5036 (eval $ac_try) 2>&5
5037 ac_status=$?
5038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5039 (exit $ac_status); }; }; then
5040 ac_cv_type_long=yes
5041else
5042 echo "$as_me: failed program was:" >&5
5043cat conftest.$ac_ext >&5
5044ac_cv_type_long=no
5045fi
5046rm -f conftest.$ac_objext conftest.$ac_ext
5047fi
5048echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5049echo "${ECHO_T}$ac_cv_type_long" >&6
5050
5051echo "$as_me:$LINENO: checking size of long" >&5
5052echo $ECHO_N "checking size of long... $ECHO_C" >&6
5053if test "${ac_cv_sizeof_long+set}" = set; then
5054 echo $ECHO_N "(cached) $ECHO_C" >&6
5055else
5056 if test "$ac_cv_type_long" = yes; then
5057 # The cast to unsigned long works around a bug in the HP C Compiler
5058 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5059 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5060 # This bug is HP SR number 8606223364.
5061 if test "$cross_compiling" = yes; then
5062 # Depending upon the size, compute the lo and hi bounds.
5063cat >conftest.$ac_ext <<_ACEOF
5064#line $LINENO "configure"
5065#include "confdefs.h"
5066$ac_includes_default
5067#ifdef F77_DUMMY_MAIN
5068# ifdef __cplusplus
5069 extern "C"
5070# endif
5071 int F77_DUMMY_MAIN() { return 1; }
5072#endif
5073int
5074main ()
5075{
5076static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5077test_array [0] = 0
5078
5079 ;
5080 return 0;
5081}
5082_ACEOF
5083rm -f conftest.$ac_objext
5084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5085 (eval $ac_compile) 2>&5
5086 ac_status=$?
5087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5088 (exit $ac_status); } &&
5089 { ac_try='test -s conftest.$ac_objext'
5090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5091 (eval $ac_try) 2>&5
5092 ac_status=$?
5093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5094 (exit $ac_status); }; }; then
5095 ac_lo=0 ac_mid=0
5096 while :; do
5097 cat >conftest.$ac_ext <<_ACEOF
5098#line $LINENO "configure"
5099#include "confdefs.h"
5100$ac_includes_default
5101#ifdef F77_DUMMY_MAIN
5102# ifdef __cplusplus
5103 extern "C"
5104# endif
5105 int F77_DUMMY_MAIN() { return 1; }
5106#endif
5107int
5108main ()
5109{
5110static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5111test_array [0] = 0
5112
5113 ;
5114 return 0;
5115}
5116_ACEOF
5117rm -f conftest.$ac_objext
5118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5119 (eval $ac_compile) 2>&5
5120 ac_status=$?
5121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5122 (exit $ac_status); } &&
5123 { ac_try='test -s conftest.$ac_objext'
5124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5125 (eval $ac_try) 2>&5
5126 ac_status=$?
5127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5128 (exit $ac_status); }; }; then
5129 ac_hi=$ac_mid; break
5130else
5131 echo "$as_me: failed program was:" >&5
5132cat conftest.$ac_ext >&5
5133ac_lo=`expr $ac_mid + 1`
5134 if test $ac_lo -le $ac_mid; then
5135 ac_lo= ac_hi=
5136 break
5137 fi
5138 ac_mid=`expr 2 '*' $ac_mid + 1`
5139fi
5140rm -f conftest.$ac_objext conftest.$ac_ext
5141 done
5142else
5143 echo "$as_me: failed program was:" >&5
5144cat conftest.$ac_ext >&5
5145cat >conftest.$ac_ext <<_ACEOF
5146#line $LINENO "configure"
5147#include "confdefs.h"
5148$ac_includes_default
5149#ifdef F77_DUMMY_MAIN
5150# ifdef __cplusplus
5151 extern "C"
5152# endif
5153 int F77_DUMMY_MAIN() { return 1; }
5154#endif
5155int
5156main ()
5157{
5158static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5159test_array [0] = 0
5160
5161 ;
5162 return 0;
5163}
5164_ACEOF
5165rm -f conftest.$ac_objext
5166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5167 (eval $ac_compile) 2>&5
5168 ac_status=$?
5169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5170 (exit $ac_status); } &&
5171 { ac_try='test -s conftest.$ac_objext'
5172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5173 (eval $ac_try) 2>&5
5174 ac_status=$?
5175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5176 (exit $ac_status); }; }; then
5177 ac_hi=-1 ac_mid=-1
5178 while :; do
5179 cat >conftest.$ac_ext <<_ACEOF
5180#line $LINENO "configure"
5181#include "confdefs.h"
5182$ac_includes_default
5183#ifdef F77_DUMMY_MAIN
5184# ifdef __cplusplus
5185 extern "C"
5186# endif
5187 int F77_DUMMY_MAIN() { return 1; }
5188#endif
5189int
5190main ()
5191{
5192static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5193test_array [0] = 0
5194
5195 ;
5196 return 0;
5197}
5198_ACEOF
5199rm -f conftest.$ac_objext
5200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5201 (eval $ac_compile) 2>&5
5202 ac_status=$?
5203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5204 (exit $ac_status); } &&
5205 { ac_try='test -s conftest.$ac_objext'
5206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5207 (eval $ac_try) 2>&5
5208 ac_status=$?
5209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5210 (exit $ac_status); }; }; then
5211 ac_lo=$ac_mid; break
5212else
5213 echo "$as_me: failed program was:" >&5
5214cat conftest.$ac_ext >&5
5215ac_hi=`expr '(' $ac_mid ')' - 1`
5216 if test $ac_mid -le $ac_hi; then
5217 ac_lo= ac_hi=
5218 break
5219 fi
5220 ac_mid=`expr 2 '*' $ac_mid`
5221fi
5222rm -f conftest.$ac_objext conftest.$ac_ext
5223 done
5224else
5225 echo "$as_me: failed program was:" >&5
5226cat conftest.$ac_ext >&5
5227ac_lo= ac_hi=
5228fi
5229rm -f conftest.$ac_objext conftest.$ac_ext
5230fi
5231rm -f conftest.$ac_objext conftest.$ac_ext
5232# Binary search between lo and hi bounds.
5233while test "x$ac_lo" != "x$ac_hi"; do
5234 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5235 cat >conftest.$ac_ext <<_ACEOF
5236#line $LINENO "configure"
5237#include "confdefs.h"
5238$ac_includes_default
5239#ifdef F77_DUMMY_MAIN
5240# ifdef __cplusplus
5241 extern "C"
5242# endif
5243 int F77_DUMMY_MAIN() { return 1; }
5244#endif
5245int
5246main ()
5247{
5248static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5249test_array [0] = 0
5250
5251 ;
5252 return 0;
5253}
5254_ACEOF
5255rm -f conftest.$ac_objext
5256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5257 (eval $ac_compile) 2>&5
5258 ac_status=$?
5259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5260 (exit $ac_status); } &&
5261 { ac_try='test -s conftest.$ac_objext'
5262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5263 (eval $ac_try) 2>&5
5264 ac_status=$?
5265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5266 (exit $ac_status); }; }; then
5267 ac_hi=$ac_mid
5268else
5269 echo "$as_me: failed program was:" >&5
5270cat conftest.$ac_ext >&5
5271ac_lo=`expr '(' $ac_mid ')' + 1`
5272fi
5273rm -f conftest.$ac_objext conftest.$ac_ext
5274done
5275case $ac_lo in
5276?*) ac_cv_sizeof_long=$ac_lo;;
5277'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5278echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5279 { (exit 1); exit 1; }; } ;;
5280esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005281else
5282 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005283 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5284echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5285 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005286else
Martin v. Löwis11437992002-04-12 09:54:03 +00005287 cat >conftest.$ac_ext <<_ACEOF
5288#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005289#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005290$ac_includes_default
5291long longval () { return (long) (sizeof (long)); }
5292unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005293#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005294#include <stdlib.h>
5295#ifdef F77_DUMMY_MAIN
5296# ifdef __cplusplus
5297 extern "C"
5298# endif
5299 int F77_DUMMY_MAIN() { return 1; }
5300#endif
5301int
5302main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005303{
Martin v. Löwis11437992002-04-12 09:54:03 +00005304
5305 FILE *f = fopen ("conftest.val", "w");
5306 if (! f)
5307 exit (1);
5308 if (((long) (sizeof (long))) < 0)
5309 {
5310 long i = longval ();
5311 if (i != ((long) (sizeof (long))))
5312 exit (1);
5313 fprintf (f, "%ld\n", i);
5314 }
5315 else
5316 {
5317 unsigned long i = ulongval ();
5318 if (i != ((long) (sizeof (long))))
5319 exit (1);
5320 fprintf (f, "%lu\n", i);
5321 }
5322 exit (ferror (f) || fclose (f) != 0);
5323
5324 ;
5325 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005326}
Martin v. Löwis11437992002-04-12 09:54:03 +00005327_ACEOF
5328rm -f conftest$ac_exeext
5329if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5330 (eval $ac_link) 2>&5
5331 ac_status=$?
5332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5333 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5335 (eval $ac_try) 2>&5
5336 ac_status=$?
5337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5338 (exit $ac_status); }; }; then
5339 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005340else
Martin v. Löwis11437992002-04-12 09:54:03 +00005341 echo "$as_me: program exited with status $ac_status" >&5
5342echo "$as_me: failed program was:" >&5
5343cat conftest.$ac_ext >&5
5344( exit $ac_status )
5345{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5346echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5347 { (exit 1); exit 1; }; }
5348fi
5349rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5350fi
5351fi
5352rm -f conftest.val
5353else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005354 ac_cv_sizeof_long=0
5355fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005356fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005357echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5358echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5359cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005360#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005361_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005362
5363
Martin v. Löwis11437992002-04-12 09:54:03 +00005364echo "$as_me:$LINENO: checking for void *" >&5
5365echo $ECHO_N "checking for void *... $ECHO_C" >&6
5366if test "${ac_cv_type_void_p+set}" = set; then
5367 echo $ECHO_N "(cached) $ECHO_C" >&6
5368else
5369 cat >conftest.$ac_ext <<_ACEOF
5370#line $LINENO "configure"
5371#include "confdefs.h"
5372$ac_includes_default
5373#ifdef F77_DUMMY_MAIN
5374# ifdef __cplusplus
5375 extern "C"
5376# endif
5377 int F77_DUMMY_MAIN() { return 1; }
5378#endif
5379int
5380main ()
5381{
5382if ((void * *) 0)
5383 return 0;
5384if (sizeof (void *))
5385 return 0;
5386 ;
5387 return 0;
5388}
5389_ACEOF
5390rm -f conftest.$ac_objext
5391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5392 (eval $ac_compile) 2>&5
5393 ac_status=$?
5394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5395 (exit $ac_status); } &&
5396 { ac_try='test -s conftest.$ac_objext'
5397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5398 (eval $ac_try) 2>&5
5399 ac_status=$?
5400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5401 (exit $ac_status); }; }; then
5402 ac_cv_type_void_p=yes
5403else
5404 echo "$as_me: failed program was:" >&5
5405cat conftest.$ac_ext >&5
5406ac_cv_type_void_p=no
5407fi
5408rm -f conftest.$ac_objext conftest.$ac_ext
5409fi
5410echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5411echo "${ECHO_T}$ac_cv_type_void_p" >&6
5412
5413echo "$as_me:$LINENO: checking size of void *" >&5
5414echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5415if test "${ac_cv_sizeof_void_p+set}" = set; then
5416 echo $ECHO_N "(cached) $ECHO_C" >&6
5417else
5418 if test "$ac_cv_type_void_p" = yes; then
5419 # The cast to unsigned long works around a bug in the HP C Compiler
5420 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5421 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5422 # This bug is HP SR number 8606223364.
5423 if test "$cross_compiling" = yes; then
5424 # Depending upon the size, compute the lo and hi bounds.
5425cat >conftest.$ac_ext <<_ACEOF
5426#line $LINENO "configure"
5427#include "confdefs.h"
5428$ac_includes_default
5429#ifdef F77_DUMMY_MAIN
5430# ifdef __cplusplus
5431 extern "C"
5432# endif
5433 int F77_DUMMY_MAIN() { return 1; }
5434#endif
5435int
5436main ()
5437{
5438static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5439test_array [0] = 0
5440
5441 ;
5442 return 0;
5443}
5444_ACEOF
5445rm -f conftest.$ac_objext
5446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5447 (eval $ac_compile) 2>&5
5448 ac_status=$?
5449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5450 (exit $ac_status); } &&
5451 { ac_try='test -s conftest.$ac_objext'
5452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5453 (eval $ac_try) 2>&5
5454 ac_status=$?
5455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5456 (exit $ac_status); }; }; then
5457 ac_lo=0 ac_mid=0
5458 while :; do
5459 cat >conftest.$ac_ext <<_ACEOF
5460#line $LINENO "configure"
5461#include "confdefs.h"
5462$ac_includes_default
5463#ifdef F77_DUMMY_MAIN
5464# ifdef __cplusplus
5465 extern "C"
5466# endif
5467 int F77_DUMMY_MAIN() { return 1; }
5468#endif
5469int
5470main ()
5471{
5472static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5473test_array [0] = 0
5474
5475 ;
5476 return 0;
5477}
5478_ACEOF
5479rm -f conftest.$ac_objext
5480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5481 (eval $ac_compile) 2>&5
5482 ac_status=$?
5483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5484 (exit $ac_status); } &&
5485 { ac_try='test -s conftest.$ac_objext'
5486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5487 (eval $ac_try) 2>&5
5488 ac_status=$?
5489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5490 (exit $ac_status); }; }; then
5491 ac_hi=$ac_mid; break
5492else
5493 echo "$as_me: failed program was:" >&5
5494cat conftest.$ac_ext >&5
5495ac_lo=`expr $ac_mid + 1`
5496 if test $ac_lo -le $ac_mid; then
5497 ac_lo= ac_hi=
5498 break
5499 fi
5500 ac_mid=`expr 2 '*' $ac_mid + 1`
5501fi
5502rm -f conftest.$ac_objext conftest.$ac_ext
5503 done
5504else
5505 echo "$as_me: failed program was:" >&5
5506cat conftest.$ac_ext >&5
5507cat >conftest.$ac_ext <<_ACEOF
5508#line $LINENO "configure"
5509#include "confdefs.h"
5510$ac_includes_default
5511#ifdef F77_DUMMY_MAIN
5512# ifdef __cplusplus
5513 extern "C"
5514# endif
5515 int F77_DUMMY_MAIN() { return 1; }
5516#endif
5517int
5518main ()
5519{
5520static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5521test_array [0] = 0
5522
5523 ;
5524 return 0;
5525}
5526_ACEOF
5527rm -f conftest.$ac_objext
5528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5529 (eval $ac_compile) 2>&5
5530 ac_status=$?
5531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5532 (exit $ac_status); } &&
5533 { ac_try='test -s conftest.$ac_objext'
5534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5535 (eval $ac_try) 2>&5
5536 ac_status=$?
5537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5538 (exit $ac_status); }; }; then
5539 ac_hi=-1 ac_mid=-1
5540 while :; do
5541 cat >conftest.$ac_ext <<_ACEOF
5542#line $LINENO "configure"
5543#include "confdefs.h"
5544$ac_includes_default
5545#ifdef F77_DUMMY_MAIN
5546# ifdef __cplusplus
5547 extern "C"
5548# endif
5549 int F77_DUMMY_MAIN() { return 1; }
5550#endif
5551int
5552main ()
5553{
5554static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5555test_array [0] = 0
5556
5557 ;
5558 return 0;
5559}
5560_ACEOF
5561rm -f conftest.$ac_objext
5562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5563 (eval $ac_compile) 2>&5
5564 ac_status=$?
5565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5566 (exit $ac_status); } &&
5567 { ac_try='test -s conftest.$ac_objext'
5568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5569 (eval $ac_try) 2>&5
5570 ac_status=$?
5571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5572 (exit $ac_status); }; }; then
5573 ac_lo=$ac_mid; break
5574else
5575 echo "$as_me: failed program was:" >&5
5576cat conftest.$ac_ext >&5
5577ac_hi=`expr '(' $ac_mid ')' - 1`
5578 if test $ac_mid -le $ac_hi; then
5579 ac_lo= ac_hi=
5580 break
5581 fi
5582 ac_mid=`expr 2 '*' $ac_mid`
5583fi
5584rm -f conftest.$ac_objext conftest.$ac_ext
5585 done
5586else
5587 echo "$as_me: failed program was:" >&5
5588cat conftest.$ac_ext >&5
5589ac_lo= ac_hi=
5590fi
5591rm -f conftest.$ac_objext conftest.$ac_ext
5592fi
5593rm -f conftest.$ac_objext conftest.$ac_ext
5594# Binary search between lo and hi bounds.
5595while test "x$ac_lo" != "x$ac_hi"; do
5596 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5597 cat >conftest.$ac_ext <<_ACEOF
5598#line $LINENO "configure"
5599#include "confdefs.h"
5600$ac_includes_default
5601#ifdef F77_DUMMY_MAIN
5602# ifdef __cplusplus
5603 extern "C"
5604# endif
5605 int F77_DUMMY_MAIN() { return 1; }
5606#endif
5607int
5608main ()
5609{
5610static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5611test_array [0] = 0
5612
5613 ;
5614 return 0;
5615}
5616_ACEOF
5617rm -f conftest.$ac_objext
5618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5619 (eval $ac_compile) 2>&5
5620 ac_status=$?
5621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5622 (exit $ac_status); } &&
5623 { ac_try='test -s conftest.$ac_objext'
5624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5625 (eval $ac_try) 2>&5
5626 ac_status=$?
5627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5628 (exit $ac_status); }; }; then
5629 ac_hi=$ac_mid
5630else
5631 echo "$as_me: failed program was:" >&5
5632cat conftest.$ac_ext >&5
5633ac_lo=`expr '(' $ac_mid ')' + 1`
5634fi
5635rm -f conftest.$ac_objext conftest.$ac_ext
5636done
5637case $ac_lo in
5638?*) ac_cv_sizeof_void_p=$ac_lo;;
5639'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5640echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5641 { (exit 1); exit 1; }; } ;;
5642esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005643else
5644 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005645 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5646echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5647 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005648else
Martin v. Löwis11437992002-04-12 09:54:03 +00005649 cat >conftest.$ac_ext <<_ACEOF
5650#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005651#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005652$ac_includes_default
5653long longval () { return (long) (sizeof (void *)); }
5654unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005655#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005656#include <stdlib.h>
5657#ifdef F77_DUMMY_MAIN
5658# ifdef __cplusplus
5659 extern "C"
5660# endif
5661 int F77_DUMMY_MAIN() { return 1; }
5662#endif
5663int
5664main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005665{
Martin v. Löwis11437992002-04-12 09:54:03 +00005666
5667 FILE *f = fopen ("conftest.val", "w");
5668 if (! f)
5669 exit (1);
5670 if (((long) (sizeof (void *))) < 0)
5671 {
5672 long i = longval ();
5673 if (i != ((long) (sizeof (void *))))
5674 exit (1);
5675 fprintf (f, "%ld\n", i);
5676 }
5677 else
5678 {
5679 unsigned long i = ulongval ();
5680 if (i != ((long) (sizeof (void *))))
5681 exit (1);
5682 fprintf (f, "%lu\n", i);
5683 }
5684 exit (ferror (f) || fclose (f) != 0);
5685
5686 ;
5687 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005688}
Martin v. Löwis11437992002-04-12 09:54:03 +00005689_ACEOF
5690rm -f conftest$ac_exeext
5691if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5692 (eval $ac_link) 2>&5
5693 ac_status=$?
5694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5695 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5697 (eval $ac_try) 2>&5
5698 ac_status=$?
5699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5700 (exit $ac_status); }; }; then
5701 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005702else
Martin v. Löwis11437992002-04-12 09:54:03 +00005703 echo "$as_me: program exited with status $ac_status" >&5
5704echo "$as_me: failed program was:" >&5
5705cat conftest.$ac_ext >&5
5706( exit $ac_status )
5707{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5708echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5709 { (exit 1); exit 1; }; }
5710fi
5711rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5712fi
5713fi
5714rm -f conftest.val
5715else
Guido van Rossumad678af1998-10-02 14:42:15 +00005716 ac_cv_sizeof_void_p=0
5717fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005718fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005719echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5720echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5721cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005722#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005723_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005724
5725
Martin v. Löwis11437992002-04-12 09:54:03 +00005726echo "$as_me:$LINENO: checking for char" >&5
5727echo $ECHO_N "checking for char... $ECHO_C" >&6
5728if test "${ac_cv_type_char+set}" = set; then
5729 echo $ECHO_N "(cached) $ECHO_C" >&6
5730else
5731 cat >conftest.$ac_ext <<_ACEOF
5732#line $LINENO "configure"
5733#include "confdefs.h"
5734$ac_includes_default
5735#ifdef F77_DUMMY_MAIN
5736# ifdef __cplusplus
5737 extern "C"
5738# endif
5739 int F77_DUMMY_MAIN() { return 1; }
5740#endif
5741int
5742main ()
5743{
5744if ((char *) 0)
5745 return 0;
5746if (sizeof (char))
5747 return 0;
5748 ;
5749 return 0;
5750}
5751_ACEOF
5752rm -f conftest.$ac_objext
5753if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5754 (eval $ac_compile) 2>&5
5755 ac_status=$?
5756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5757 (exit $ac_status); } &&
5758 { ac_try='test -s conftest.$ac_objext'
5759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5760 (eval $ac_try) 2>&5
5761 ac_status=$?
5762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5763 (exit $ac_status); }; }; then
5764 ac_cv_type_char=yes
5765else
5766 echo "$as_me: failed program was:" >&5
5767cat conftest.$ac_ext >&5
5768ac_cv_type_char=no
5769fi
5770rm -f conftest.$ac_objext conftest.$ac_ext
5771fi
5772echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5773echo "${ECHO_T}$ac_cv_type_char" >&6
5774
5775echo "$as_me:$LINENO: checking size of char" >&5
5776echo $ECHO_N "checking size of char... $ECHO_C" >&6
5777if test "${ac_cv_sizeof_char+set}" = set; then
5778 echo $ECHO_N "(cached) $ECHO_C" >&6
5779else
5780 if test "$ac_cv_type_char" = yes; then
5781 # The cast to unsigned long works around a bug in the HP C Compiler
5782 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5783 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5784 # This bug is HP SR number 8606223364.
5785 if test "$cross_compiling" = yes; then
5786 # Depending upon the size, compute the lo and hi bounds.
5787cat >conftest.$ac_ext <<_ACEOF
5788#line $LINENO "configure"
5789#include "confdefs.h"
5790$ac_includes_default
5791#ifdef F77_DUMMY_MAIN
5792# ifdef __cplusplus
5793 extern "C"
5794# endif
5795 int F77_DUMMY_MAIN() { return 1; }
5796#endif
5797int
5798main ()
5799{
5800static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5801test_array [0] = 0
5802
5803 ;
5804 return 0;
5805}
5806_ACEOF
5807rm -f conftest.$ac_objext
5808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5809 (eval $ac_compile) 2>&5
5810 ac_status=$?
5811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5812 (exit $ac_status); } &&
5813 { ac_try='test -s conftest.$ac_objext'
5814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5815 (eval $ac_try) 2>&5
5816 ac_status=$?
5817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5818 (exit $ac_status); }; }; then
5819 ac_lo=0 ac_mid=0
5820 while :; do
5821 cat >conftest.$ac_ext <<_ACEOF
5822#line $LINENO "configure"
5823#include "confdefs.h"
5824$ac_includes_default
5825#ifdef F77_DUMMY_MAIN
5826# ifdef __cplusplus
5827 extern "C"
5828# endif
5829 int F77_DUMMY_MAIN() { return 1; }
5830#endif
5831int
5832main ()
5833{
5834static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5835test_array [0] = 0
5836
5837 ;
5838 return 0;
5839}
5840_ACEOF
5841rm -f conftest.$ac_objext
5842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5843 (eval $ac_compile) 2>&5
5844 ac_status=$?
5845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5846 (exit $ac_status); } &&
5847 { ac_try='test -s conftest.$ac_objext'
5848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5849 (eval $ac_try) 2>&5
5850 ac_status=$?
5851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5852 (exit $ac_status); }; }; then
5853 ac_hi=$ac_mid; break
5854else
5855 echo "$as_me: failed program was:" >&5
5856cat conftest.$ac_ext >&5
5857ac_lo=`expr $ac_mid + 1`
5858 if test $ac_lo -le $ac_mid; then
5859 ac_lo= ac_hi=
5860 break
5861 fi
5862 ac_mid=`expr 2 '*' $ac_mid + 1`
5863fi
5864rm -f conftest.$ac_objext conftest.$ac_ext
5865 done
5866else
5867 echo "$as_me: failed program was:" >&5
5868cat conftest.$ac_ext >&5
5869cat >conftest.$ac_ext <<_ACEOF
5870#line $LINENO "configure"
5871#include "confdefs.h"
5872$ac_includes_default
5873#ifdef F77_DUMMY_MAIN
5874# ifdef __cplusplus
5875 extern "C"
5876# endif
5877 int F77_DUMMY_MAIN() { return 1; }
5878#endif
5879int
5880main ()
5881{
5882static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5883test_array [0] = 0
5884
5885 ;
5886 return 0;
5887}
5888_ACEOF
5889rm -f conftest.$ac_objext
5890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5891 (eval $ac_compile) 2>&5
5892 ac_status=$?
5893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5894 (exit $ac_status); } &&
5895 { ac_try='test -s conftest.$ac_objext'
5896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5897 (eval $ac_try) 2>&5
5898 ac_status=$?
5899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5900 (exit $ac_status); }; }; then
5901 ac_hi=-1 ac_mid=-1
5902 while :; do
5903 cat >conftest.$ac_ext <<_ACEOF
5904#line $LINENO "configure"
5905#include "confdefs.h"
5906$ac_includes_default
5907#ifdef F77_DUMMY_MAIN
5908# ifdef __cplusplus
5909 extern "C"
5910# endif
5911 int F77_DUMMY_MAIN() { return 1; }
5912#endif
5913int
5914main ()
5915{
5916static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5917test_array [0] = 0
5918
5919 ;
5920 return 0;
5921}
5922_ACEOF
5923rm -f conftest.$ac_objext
5924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5925 (eval $ac_compile) 2>&5
5926 ac_status=$?
5927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5928 (exit $ac_status); } &&
5929 { ac_try='test -s conftest.$ac_objext'
5930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5931 (eval $ac_try) 2>&5
5932 ac_status=$?
5933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5934 (exit $ac_status); }; }; then
5935 ac_lo=$ac_mid; break
5936else
5937 echo "$as_me: failed program was:" >&5
5938cat conftest.$ac_ext >&5
5939ac_hi=`expr '(' $ac_mid ')' - 1`
5940 if test $ac_mid -le $ac_hi; then
5941 ac_lo= ac_hi=
5942 break
5943 fi
5944 ac_mid=`expr 2 '*' $ac_mid`
5945fi
5946rm -f conftest.$ac_objext conftest.$ac_ext
5947 done
5948else
5949 echo "$as_me: failed program was:" >&5
5950cat conftest.$ac_ext >&5
5951ac_lo= ac_hi=
5952fi
5953rm -f conftest.$ac_objext conftest.$ac_ext
5954fi
5955rm -f conftest.$ac_objext conftest.$ac_ext
5956# Binary search between lo and hi bounds.
5957while test "x$ac_lo" != "x$ac_hi"; do
5958 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5959 cat >conftest.$ac_ext <<_ACEOF
5960#line $LINENO "configure"
5961#include "confdefs.h"
5962$ac_includes_default
5963#ifdef F77_DUMMY_MAIN
5964# ifdef __cplusplus
5965 extern "C"
5966# endif
5967 int F77_DUMMY_MAIN() { return 1; }
5968#endif
5969int
5970main ()
5971{
5972static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5973test_array [0] = 0
5974
5975 ;
5976 return 0;
5977}
5978_ACEOF
5979rm -f conftest.$ac_objext
5980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5981 (eval $ac_compile) 2>&5
5982 ac_status=$?
5983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5984 (exit $ac_status); } &&
5985 { ac_try='test -s conftest.$ac_objext'
5986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5987 (eval $ac_try) 2>&5
5988 ac_status=$?
5989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5990 (exit $ac_status); }; }; then
5991 ac_hi=$ac_mid
5992else
5993 echo "$as_me: failed program was:" >&5
5994cat conftest.$ac_ext >&5
5995ac_lo=`expr '(' $ac_mid ')' + 1`
5996fi
5997rm -f conftest.$ac_objext conftest.$ac_ext
5998done
5999case $ac_lo in
6000?*) ac_cv_sizeof_char=$ac_lo;;
6001'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6002echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6003 { (exit 1); exit 1; }; } ;;
6004esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006005else
6006 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006007 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6008echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6009 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006010else
Martin v. Löwis11437992002-04-12 09:54:03 +00006011 cat >conftest.$ac_ext <<_ACEOF
6012#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006013#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006014$ac_includes_default
6015long longval () { return (long) (sizeof (char)); }
6016unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006017#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006018#include <stdlib.h>
6019#ifdef F77_DUMMY_MAIN
6020# ifdef __cplusplus
6021 extern "C"
6022# endif
6023 int F77_DUMMY_MAIN() { return 1; }
6024#endif
6025int
6026main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006027{
Martin v. Löwis11437992002-04-12 09:54:03 +00006028
6029 FILE *f = fopen ("conftest.val", "w");
6030 if (! f)
6031 exit (1);
6032 if (((long) (sizeof (char))) < 0)
6033 {
6034 long i = longval ();
6035 if (i != ((long) (sizeof (char))))
6036 exit (1);
6037 fprintf (f, "%ld\n", i);
6038 }
6039 else
6040 {
6041 unsigned long i = ulongval ();
6042 if (i != ((long) (sizeof (char))))
6043 exit (1);
6044 fprintf (f, "%lu\n", i);
6045 }
6046 exit (ferror (f) || fclose (f) != 0);
6047
6048 ;
6049 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006050}
Martin v. Löwis11437992002-04-12 09:54:03 +00006051_ACEOF
6052rm -f conftest$ac_exeext
6053if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6054 (eval $ac_link) 2>&5
6055 ac_status=$?
6056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6057 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6059 (eval $ac_try) 2>&5
6060 ac_status=$?
6061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6062 (exit $ac_status); }; }; then
6063 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006064else
Martin v. Löwis11437992002-04-12 09:54:03 +00006065 echo "$as_me: program exited with status $ac_status" >&5
6066echo "$as_me: failed program was:" >&5
6067cat conftest.$ac_ext >&5
6068( exit $ac_status )
6069{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6070echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6071 { (exit 1); exit 1; }; }
6072fi
6073rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6074fi
6075fi
6076rm -f conftest.val
6077else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006078 ac_cv_sizeof_char=0
6079fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006080fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006081echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6082echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6083cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006084#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006085_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006086
6087
Martin v. Löwis11437992002-04-12 09:54:03 +00006088echo "$as_me:$LINENO: checking for short" >&5
6089echo $ECHO_N "checking for short... $ECHO_C" >&6
6090if test "${ac_cv_type_short+set}" = set; then
6091 echo $ECHO_N "(cached) $ECHO_C" >&6
6092else
6093 cat >conftest.$ac_ext <<_ACEOF
6094#line $LINENO "configure"
6095#include "confdefs.h"
6096$ac_includes_default
6097#ifdef F77_DUMMY_MAIN
6098# ifdef __cplusplus
6099 extern "C"
6100# endif
6101 int F77_DUMMY_MAIN() { return 1; }
6102#endif
6103int
6104main ()
6105{
6106if ((short *) 0)
6107 return 0;
6108if (sizeof (short))
6109 return 0;
6110 ;
6111 return 0;
6112}
6113_ACEOF
6114rm -f conftest.$ac_objext
6115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6116 (eval $ac_compile) 2>&5
6117 ac_status=$?
6118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6119 (exit $ac_status); } &&
6120 { ac_try='test -s conftest.$ac_objext'
6121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6122 (eval $ac_try) 2>&5
6123 ac_status=$?
6124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6125 (exit $ac_status); }; }; then
6126 ac_cv_type_short=yes
6127else
6128 echo "$as_me: failed program was:" >&5
6129cat conftest.$ac_ext >&5
6130ac_cv_type_short=no
6131fi
6132rm -f conftest.$ac_objext conftest.$ac_ext
6133fi
6134echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6135echo "${ECHO_T}$ac_cv_type_short" >&6
6136
6137echo "$as_me:$LINENO: checking size of short" >&5
6138echo $ECHO_N "checking size of short... $ECHO_C" >&6
6139if test "${ac_cv_sizeof_short+set}" = set; then
6140 echo $ECHO_N "(cached) $ECHO_C" >&6
6141else
6142 if test "$ac_cv_type_short" = yes; then
6143 # The cast to unsigned long works around a bug in the HP C Compiler
6144 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6145 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6146 # This bug is HP SR number 8606223364.
6147 if test "$cross_compiling" = yes; then
6148 # Depending upon the size, compute the lo and hi bounds.
6149cat >conftest.$ac_ext <<_ACEOF
6150#line $LINENO "configure"
6151#include "confdefs.h"
6152$ac_includes_default
6153#ifdef F77_DUMMY_MAIN
6154# ifdef __cplusplus
6155 extern "C"
6156# endif
6157 int F77_DUMMY_MAIN() { return 1; }
6158#endif
6159int
6160main ()
6161{
6162static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6163test_array [0] = 0
6164
6165 ;
6166 return 0;
6167}
6168_ACEOF
6169rm -f conftest.$ac_objext
6170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6171 (eval $ac_compile) 2>&5
6172 ac_status=$?
6173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6174 (exit $ac_status); } &&
6175 { ac_try='test -s conftest.$ac_objext'
6176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6177 (eval $ac_try) 2>&5
6178 ac_status=$?
6179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6180 (exit $ac_status); }; }; then
6181 ac_lo=0 ac_mid=0
6182 while :; do
6183 cat >conftest.$ac_ext <<_ACEOF
6184#line $LINENO "configure"
6185#include "confdefs.h"
6186$ac_includes_default
6187#ifdef F77_DUMMY_MAIN
6188# ifdef __cplusplus
6189 extern "C"
6190# endif
6191 int F77_DUMMY_MAIN() { return 1; }
6192#endif
6193int
6194main ()
6195{
6196static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6197test_array [0] = 0
6198
6199 ;
6200 return 0;
6201}
6202_ACEOF
6203rm -f conftest.$ac_objext
6204if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6205 (eval $ac_compile) 2>&5
6206 ac_status=$?
6207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6208 (exit $ac_status); } &&
6209 { ac_try='test -s conftest.$ac_objext'
6210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6211 (eval $ac_try) 2>&5
6212 ac_status=$?
6213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6214 (exit $ac_status); }; }; then
6215 ac_hi=$ac_mid; break
6216else
6217 echo "$as_me: failed program was:" >&5
6218cat conftest.$ac_ext >&5
6219ac_lo=`expr $ac_mid + 1`
6220 if test $ac_lo -le $ac_mid; then
6221 ac_lo= ac_hi=
6222 break
6223 fi
6224 ac_mid=`expr 2 '*' $ac_mid + 1`
6225fi
6226rm -f conftest.$ac_objext conftest.$ac_ext
6227 done
6228else
6229 echo "$as_me: failed program was:" >&5
6230cat conftest.$ac_ext >&5
6231cat >conftest.$ac_ext <<_ACEOF
6232#line $LINENO "configure"
6233#include "confdefs.h"
6234$ac_includes_default
6235#ifdef F77_DUMMY_MAIN
6236# ifdef __cplusplus
6237 extern "C"
6238# endif
6239 int F77_DUMMY_MAIN() { return 1; }
6240#endif
6241int
6242main ()
6243{
6244static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6245test_array [0] = 0
6246
6247 ;
6248 return 0;
6249}
6250_ACEOF
6251rm -f conftest.$ac_objext
6252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6253 (eval $ac_compile) 2>&5
6254 ac_status=$?
6255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6256 (exit $ac_status); } &&
6257 { ac_try='test -s conftest.$ac_objext'
6258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6259 (eval $ac_try) 2>&5
6260 ac_status=$?
6261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6262 (exit $ac_status); }; }; then
6263 ac_hi=-1 ac_mid=-1
6264 while :; do
6265 cat >conftest.$ac_ext <<_ACEOF
6266#line $LINENO "configure"
6267#include "confdefs.h"
6268$ac_includes_default
6269#ifdef F77_DUMMY_MAIN
6270# ifdef __cplusplus
6271 extern "C"
6272# endif
6273 int F77_DUMMY_MAIN() { return 1; }
6274#endif
6275int
6276main ()
6277{
6278static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6279test_array [0] = 0
6280
6281 ;
6282 return 0;
6283}
6284_ACEOF
6285rm -f conftest.$ac_objext
6286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6287 (eval $ac_compile) 2>&5
6288 ac_status=$?
6289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6290 (exit $ac_status); } &&
6291 { ac_try='test -s conftest.$ac_objext'
6292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6293 (eval $ac_try) 2>&5
6294 ac_status=$?
6295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6296 (exit $ac_status); }; }; then
6297 ac_lo=$ac_mid; break
6298else
6299 echo "$as_me: failed program was:" >&5
6300cat conftest.$ac_ext >&5
6301ac_hi=`expr '(' $ac_mid ')' - 1`
6302 if test $ac_mid -le $ac_hi; then
6303 ac_lo= ac_hi=
6304 break
6305 fi
6306 ac_mid=`expr 2 '*' $ac_mid`
6307fi
6308rm -f conftest.$ac_objext conftest.$ac_ext
6309 done
6310else
6311 echo "$as_me: failed program was:" >&5
6312cat conftest.$ac_ext >&5
6313ac_lo= ac_hi=
6314fi
6315rm -f conftest.$ac_objext conftest.$ac_ext
6316fi
6317rm -f conftest.$ac_objext conftest.$ac_ext
6318# Binary search between lo and hi bounds.
6319while test "x$ac_lo" != "x$ac_hi"; do
6320 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6321 cat >conftest.$ac_ext <<_ACEOF
6322#line $LINENO "configure"
6323#include "confdefs.h"
6324$ac_includes_default
6325#ifdef F77_DUMMY_MAIN
6326# ifdef __cplusplus
6327 extern "C"
6328# endif
6329 int F77_DUMMY_MAIN() { return 1; }
6330#endif
6331int
6332main ()
6333{
6334static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6335test_array [0] = 0
6336
6337 ;
6338 return 0;
6339}
6340_ACEOF
6341rm -f conftest.$ac_objext
6342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6343 (eval $ac_compile) 2>&5
6344 ac_status=$?
6345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6346 (exit $ac_status); } &&
6347 { ac_try='test -s conftest.$ac_objext'
6348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6349 (eval $ac_try) 2>&5
6350 ac_status=$?
6351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6352 (exit $ac_status); }; }; then
6353 ac_hi=$ac_mid
6354else
6355 echo "$as_me: failed program was:" >&5
6356cat conftest.$ac_ext >&5
6357ac_lo=`expr '(' $ac_mid ')' + 1`
6358fi
6359rm -f conftest.$ac_objext conftest.$ac_ext
6360done
6361case $ac_lo in
6362?*) ac_cv_sizeof_short=$ac_lo;;
6363'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6364echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6365 { (exit 1); exit 1; }; } ;;
6366esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006367else
6368 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006369 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6370echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6371 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006372else
Martin v. Löwis11437992002-04-12 09:54:03 +00006373 cat >conftest.$ac_ext <<_ACEOF
6374#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006375#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006376$ac_includes_default
6377long longval () { return (long) (sizeof (short)); }
6378unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006379#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006380#include <stdlib.h>
6381#ifdef F77_DUMMY_MAIN
6382# ifdef __cplusplus
6383 extern "C"
6384# endif
6385 int F77_DUMMY_MAIN() { return 1; }
6386#endif
6387int
6388main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006389{
Martin v. Löwis11437992002-04-12 09:54:03 +00006390
6391 FILE *f = fopen ("conftest.val", "w");
6392 if (! f)
6393 exit (1);
6394 if (((long) (sizeof (short))) < 0)
6395 {
6396 long i = longval ();
6397 if (i != ((long) (sizeof (short))))
6398 exit (1);
6399 fprintf (f, "%ld\n", i);
6400 }
6401 else
6402 {
6403 unsigned long i = ulongval ();
6404 if (i != ((long) (sizeof (short))))
6405 exit (1);
6406 fprintf (f, "%lu\n", i);
6407 }
6408 exit (ferror (f) || fclose (f) != 0);
6409
6410 ;
6411 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006412}
Martin v. Löwis11437992002-04-12 09:54:03 +00006413_ACEOF
6414rm -f conftest$ac_exeext
6415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6416 (eval $ac_link) 2>&5
6417 ac_status=$?
6418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6419 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6421 (eval $ac_try) 2>&5
6422 ac_status=$?
6423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6424 (exit $ac_status); }; }; then
6425 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006426else
Martin v. Löwis11437992002-04-12 09:54:03 +00006427 echo "$as_me: program exited with status $ac_status" >&5
6428echo "$as_me: failed program was:" >&5
6429cat conftest.$ac_ext >&5
6430( exit $ac_status )
6431{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6432echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6433 { (exit 1); exit 1; }; }
6434fi
6435rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6436fi
6437fi
6438rm -f conftest.val
6439else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006440 ac_cv_sizeof_short=0
6441fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006442fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006443echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6444echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6445cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006446#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006447_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006448
6449
Martin v. Löwis11437992002-04-12 09:54:03 +00006450echo "$as_me:$LINENO: checking for float" >&5
6451echo $ECHO_N "checking for float... $ECHO_C" >&6
6452if test "${ac_cv_type_float+set}" = set; then
6453 echo $ECHO_N "(cached) $ECHO_C" >&6
6454else
6455 cat >conftest.$ac_ext <<_ACEOF
6456#line $LINENO "configure"
6457#include "confdefs.h"
6458$ac_includes_default
6459#ifdef F77_DUMMY_MAIN
6460# ifdef __cplusplus
6461 extern "C"
6462# endif
6463 int F77_DUMMY_MAIN() { return 1; }
6464#endif
6465int
6466main ()
6467{
6468if ((float *) 0)
6469 return 0;
6470if (sizeof (float))
6471 return 0;
6472 ;
6473 return 0;
6474}
6475_ACEOF
6476rm -f conftest.$ac_objext
6477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6478 (eval $ac_compile) 2>&5
6479 ac_status=$?
6480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6481 (exit $ac_status); } &&
6482 { ac_try='test -s conftest.$ac_objext'
6483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6484 (eval $ac_try) 2>&5
6485 ac_status=$?
6486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6487 (exit $ac_status); }; }; then
6488 ac_cv_type_float=yes
6489else
6490 echo "$as_me: failed program was:" >&5
6491cat conftest.$ac_ext >&5
6492ac_cv_type_float=no
6493fi
6494rm -f conftest.$ac_objext conftest.$ac_ext
6495fi
6496echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6497echo "${ECHO_T}$ac_cv_type_float" >&6
6498
6499echo "$as_me:$LINENO: checking size of float" >&5
6500echo $ECHO_N "checking size of float... $ECHO_C" >&6
6501if test "${ac_cv_sizeof_float+set}" = set; then
6502 echo $ECHO_N "(cached) $ECHO_C" >&6
6503else
6504 if test "$ac_cv_type_float" = yes; then
6505 # The cast to unsigned long works around a bug in the HP C Compiler
6506 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6507 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6508 # This bug is HP SR number 8606223364.
6509 if test "$cross_compiling" = yes; then
6510 # Depending upon the size, compute the lo and hi bounds.
6511cat >conftest.$ac_ext <<_ACEOF
6512#line $LINENO "configure"
6513#include "confdefs.h"
6514$ac_includes_default
6515#ifdef F77_DUMMY_MAIN
6516# ifdef __cplusplus
6517 extern "C"
6518# endif
6519 int F77_DUMMY_MAIN() { return 1; }
6520#endif
6521int
6522main ()
6523{
6524static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6525test_array [0] = 0
6526
6527 ;
6528 return 0;
6529}
6530_ACEOF
6531rm -f conftest.$ac_objext
6532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6533 (eval $ac_compile) 2>&5
6534 ac_status=$?
6535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6536 (exit $ac_status); } &&
6537 { ac_try='test -s conftest.$ac_objext'
6538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6539 (eval $ac_try) 2>&5
6540 ac_status=$?
6541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6542 (exit $ac_status); }; }; then
6543 ac_lo=0 ac_mid=0
6544 while :; do
6545 cat >conftest.$ac_ext <<_ACEOF
6546#line $LINENO "configure"
6547#include "confdefs.h"
6548$ac_includes_default
6549#ifdef F77_DUMMY_MAIN
6550# ifdef __cplusplus
6551 extern "C"
6552# endif
6553 int F77_DUMMY_MAIN() { return 1; }
6554#endif
6555int
6556main ()
6557{
6558static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6559test_array [0] = 0
6560
6561 ;
6562 return 0;
6563}
6564_ACEOF
6565rm -f conftest.$ac_objext
6566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6567 (eval $ac_compile) 2>&5
6568 ac_status=$?
6569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6570 (exit $ac_status); } &&
6571 { ac_try='test -s conftest.$ac_objext'
6572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6573 (eval $ac_try) 2>&5
6574 ac_status=$?
6575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6576 (exit $ac_status); }; }; then
6577 ac_hi=$ac_mid; break
6578else
6579 echo "$as_me: failed program was:" >&5
6580cat conftest.$ac_ext >&5
6581ac_lo=`expr $ac_mid + 1`
6582 if test $ac_lo -le $ac_mid; then
6583 ac_lo= ac_hi=
6584 break
6585 fi
6586 ac_mid=`expr 2 '*' $ac_mid + 1`
6587fi
6588rm -f conftest.$ac_objext conftest.$ac_ext
6589 done
6590else
6591 echo "$as_me: failed program was:" >&5
6592cat conftest.$ac_ext >&5
6593cat >conftest.$ac_ext <<_ACEOF
6594#line $LINENO "configure"
6595#include "confdefs.h"
6596$ac_includes_default
6597#ifdef F77_DUMMY_MAIN
6598# ifdef __cplusplus
6599 extern "C"
6600# endif
6601 int F77_DUMMY_MAIN() { return 1; }
6602#endif
6603int
6604main ()
6605{
6606static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6607test_array [0] = 0
6608
6609 ;
6610 return 0;
6611}
6612_ACEOF
6613rm -f conftest.$ac_objext
6614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6615 (eval $ac_compile) 2>&5
6616 ac_status=$?
6617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6618 (exit $ac_status); } &&
6619 { ac_try='test -s conftest.$ac_objext'
6620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6621 (eval $ac_try) 2>&5
6622 ac_status=$?
6623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6624 (exit $ac_status); }; }; then
6625 ac_hi=-1 ac_mid=-1
6626 while :; do
6627 cat >conftest.$ac_ext <<_ACEOF
6628#line $LINENO "configure"
6629#include "confdefs.h"
6630$ac_includes_default
6631#ifdef F77_DUMMY_MAIN
6632# ifdef __cplusplus
6633 extern "C"
6634# endif
6635 int F77_DUMMY_MAIN() { return 1; }
6636#endif
6637int
6638main ()
6639{
6640static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6641test_array [0] = 0
6642
6643 ;
6644 return 0;
6645}
6646_ACEOF
6647rm -f conftest.$ac_objext
6648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6649 (eval $ac_compile) 2>&5
6650 ac_status=$?
6651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6652 (exit $ac_status); } &&
6653 { ac_try='test -s conftest.$ac_objext'
6654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6655 (eval $ac_try) 2>&5
6656 ac_status=$?
6657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6658 (exit $ac_status); }; }; then
6659 ac_lo=$ac_mid; break
6660else
6661 echo "$as_me: failed program was:" >&5
6662cat conftest.$ac_ext >&5
6663ac_hi=`expr '(' $ac_mid ')' - 1`
6664 if test $ac_mid -le $ac_hi; then
6665 ac_lo= ac_hi=
6666 break
6667 fi
6668 ac_mid=`expr 2 '*' $ac_mid`
6669fi
6670rm -f conftest.$ac_objext conftest.$ac_ext
6671 done
6672else
6673 echo "$as_me: failed program was:" >&5
6674cat conftest.$ac_ext >&5
6675ac_lo= ac_hi=
6676fi
6677rm -f conftest.$ac_objext conftest.$ac_ext
6678fi
6679rm -f conftest.$ac_objext conftest.$ac_ext
6680# Binary search between lo and hi bounds.
6681while test "x$ac_lo" != "x$ac_hi"; do
6682 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6683 cat >conftest.$ac_ext <<_ACEOF
6684#line $LINENO "configure"
6685#include "confdefs.h"
6686$ac_includes_default
6687#ifdef F77_DUMMY_MAIN
6688# ifdef __cplusplus
6689 extern "C"
6690# endif
6691 int F77_DUMMY_MAIN() { return 1; }
6692#endif
6693int
6694main ()
6695{
6696static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6697test_array [0] = 0
6698
6699 ;
6700 return 0;
6701}
6702_ACEOF
6703rm -f conftest.$ac_objext
6704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6705 (eval $ac_compile) 2>&5
6706 ac_status=$?
6707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6708 (exit $ac_status); } &&
6709 { ac_try='test -s conftest.$ac_objext'
6710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6711 (eval $ac_try) 2>&5
6712 ac_status=$?
6713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6714 (exit $ac_status); }; }; then
6715 ac_hi=$ac_mid
6716else
6717 echo "$as_me: failed program was:" >&5
6718cat conftest.$ac_ext >&5
6719ac_lo=`expr '(' $ac_mid ')' + 1`
6720fi
6721rm -f conftest.$ac_objext conftest.$ac_ext
6722done
6723case $ac_lo in
6724?*) ac_cv_sizeof_float=$ac_lo;;
6725'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6726echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6727 { (exit 1); exit 1; }; } ;;
6728esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006729else
6730 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006731 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6732echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6733 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006734else
Martin v. Löwis11437992002-04-12 09:54:03 +00006735 cat >conftest.$ac_ext <<_ACEOF
6736#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006737#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006738$ac_includes_default
6739long longval () { return (long) (sizeof (float)); }
6740unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006741#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006742#include <stdlib.h>
6743#ifdef F77_DUMMY_MAIN
6744# ifdef __cplusplus
6745 extern "C"
6746# endif
6747 int F77_DUMMY_MAIN() { return 1; }
6748#endif
6749int
6750main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006751{
Martin v. Löwis11437992002-04-12 09:54:03 +00006752
6753 FILE *f = fopen ("conftest.val", "w");
6754 if (! f)
6755 exit (1);
6756 if (((long) (sizeof (float))) < 0)
6757 {
6758 long i = longval ();
6759 if (i != ((long) (sizeof (float))))
6760 exit (1);
6761 fprintf (f, "%ld\n", i);
6762 }
6763 else
6764 {
6765 unsigned long i = ulongval ();
6766 if (i != ((long) (sizeof (float))))
6767 exit (1);
6768 fprintf (f, "%lu\n", i);
6769 }
6770 exit (ferror (f) || fclose (f) != 0);
6771
6772 ;
6773 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006774}
Martin v. Löwis11437992002-04-12 09:54:03 +00006775_ACEOF
6776rm -f conftest$ac_exeext
6777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6778 (eval $ac_link) 2>&5
6779 ac_status=$?
6780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6781 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6783 (eval $ac_try) 2>&5
6784 ac_status=$?
6785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6786 (exit $ac_status); }; }; then
6787 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006788else
Martin v. Löwis11437992002-04-12 09:54:03 +00006789 echo "$as_me: program exited with status $ac_status" >&5
6790echo "$as_me: failed program was:" >&5
6791cat conftest.$ac_ext >&5
6792( exit $ac_status )
6793{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6794echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6795 { (exit 1); exit 1; }; }
6796fi
6797rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6798fi
6799fi
6800rm -f conftest.val
6801else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006802 ac_cv_sizeof_float=0
6803fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006804fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006805echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6806echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6807cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006808#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006809_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006810
6811
Martin v. Löwis11437992002-04-12 09:54:03 +00006812echo "$as_me:$LINENO: checking for double" >&5
6813echo $ECHO_N "checking for double... $ECHO_C" >&6
6814if test "${ac_cv_type_double+set}" = set; then
6815 echo $ECHO_N "(cached) $ECHO_C" >&6
6816else
6817 cat >conftest.$ac_ext <<_ACEOF
6818#line $LINENO "configure"
6819#include "confdefs.h"
6820$ac_includes_default
6821#ifdef F77_DUMMY_MAIN
6822# ifdef __cplusplus
6823 extern "C"
6824# endif
6825 int F77_DUMMY_MAIN() { return 1; }
6826#endif
6827int
6828main ()
6829{
6830if ((double *) 0)
6831 return 0;
6832if (sizeof (double))
6833 return 0;
6834 ;
6835 return 0;
6836}
6837_ACEOF
6838rm -f conftest.$ac_objext
6839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6840 (eval $ac_compile) 2>&5
6841 ac_status=$?
6842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6843 (exit $ac_status); } &&
6844 { ac_try='test -s conftest.$ac_objext'
6845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6846 (eval $ac_try) 2>&5
6847 ac_status=$?
6848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6849 (exit $ac_status); }; }; then
6850 ac_cv_type_double=yes
6851else
6852 echo "$as_me: failed program was:" >&5
6853cat conftest.$ac_ext >&5
6854ac_cv_type_double=no
6855fi
6856rm -f conftest.$ac_objext conftest.$ac_ext
6857fi
6858echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6859echo "${ECHO_T}$ac_cv_type_double" >&6
6860
6861echo "$as_me:$LINENO: checking size of double" >&5
6862echo $ECHO_N "checking size of double... $ECHO_C" >&6
6863if test "${ac_cv_sizeof_double+set}" = set; then
6864 echo $ECHO_N "(cached) $ECHO_C" >&6
6865else
6866 if test "$ac_cv_type_double" = yes; then
6867 # The cast to unsigned long works around a bug in the HP C Compiler
6868 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6869 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6870 # This bug is HP SR number 8606223364.
6871 if test "$cross_compiling" = yes; then
6872 # Depending upon the size, compute the lo and hi bounds.
6873cat >conftest.$ac_ext <<_ACEOF
6874#line $LINENO "configure"
6875#include "confdefs.h"
6876$ac_includes_default
6877#ifdef F77_DUMMY_MAIN
6878# ifdef __cplusplus
6879 extern "C"
6880# endif
6881 int F77_DUMMY_MAIN() { return 1; }
6882#endif
6883int
6884main ()
6885{
6886static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6887test_array [0] = 0
6888
6889 ;
6890 return 0;
6891}
6892_ACEOF
6893rm -f conftest.$ac_objext
6894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6895 (eval $ac_compile) 2>&5
6896 ac_status=$?
6897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6898 (exit $ac_status); } &&
6899 { ac_try='test -s conftest.$ac_objext'
6900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6901 (eval $ac_try) 2>&5
6902 ac_status=$?
6903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6904 (exit $ac_status); }; }; then
6905 ac_lo=0 ac_mid=0
6906 while :; do
6907 cat >conftest.$ac_ext <<_ACEOF
6908#line $LINENO "configure"
6909#include "confdefs.h"
6910$ac_includes_default
6911#ifdef F77_DUMMY_MAIN
6912# ifdef __cplusplus
6913 extern "C"
6914# endif
6915 int F77_DUMMY_MAIN() { return 1; }
6916#endif
6917int
6918main ()
6919{
6920static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6921test_array [0] = 0
6922
6923 ;
6924 return 0;
6925}
6926_ACEOF
6927rm -f conftest.$ac_objext
6928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6929 (eval $ac_compile) 2>&5
6930 ac_status=$?
6931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6932 (exit $ac_status); } &&
6933 { ac_try='test -s conftest.$ac_objext'
6934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6935 (eval $ac_try) 2>&5
6936 ac_status=$?
6937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6938 (exit $ac_status); }; }; then
6939 ac_hi=$ac_mid; break
6940else
6941 echo "$as_me: failed program was:" >&5
6942cat conftest.$ac_ext >&5
6943ac_lo=`expr $ac_mid + 1`
6944 if test $ac_lo -le $ac_mid; then
6945 ac_lo= ac_hi=
6946 break
6947 fi
6948 ac_mid=`expr 2 '*' $ac_mid + 1`
6949fi
6950rm -f conftest.$ac_objext conftest.$ac_ext
6951 done
6952else
6953 echo "$as_me: failed program was:" >&5
6954cat conftest.$ac_ext >&5
6955cat >conftest.$ac_ext <<_ACEOF
6956#line $LINENO "configure"
6957#include "confdefs.h"
6958$ac_includes_default
6959#ifdef F77_DUMMY_MAIN
6960# ifdef __cplusplus
6961 extern "C"
6962# endif
6963 int F77_DUMMY_MAIN() { return 1; }
6964#endif
6965int
6966main ()
6967{
6968static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6969test_array [0] = 0
6970
6971 ;
6972 return 0;
6973}
6974_ACEOF
6975rm -f conftest.$ac_objext
6976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6977 (eval $ac_compile) 2>&5
6978 ac_status=$?
6979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6980 (exit $ac_status); } &&
6981 { ac_try='test -s conftest.$ac_objext'
6982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6983 (eval $ac_try) 2>&5
6984 ac_status=$?
6985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6986 (exit $ac_status); }; }; then
6987 ac_hi=-1 ac_mid=-1
6988 while :; do
6989 cat >conftest.$ac_ext <<_ACEOF
6990#line $LINENO "configure"
6991#include "confdefs.h"
6992$ac_includes_default
6993#ifdef F77_DUMMY_MAIN
6994# ifdef __cplusplus
6995 extern "C"
6996# endif
6997 int F77_DUMMY_MAIN() { return 1; }
6998#endif
6999int
7000main ()
7001{
7002static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7003test_array [0] = 0
7004
7005 ;
7006 return 0;
7007}
7008_ACEOF
7009rm -f conftest.$ac_objext
7010if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7011 (eval $ac_compile) 2>&5
7012 ac_status=$?
7013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7014 (exit $ac_status); } &&
7015 { ac_try='test -s conftest.$ac_objext'
7016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7017 (eval $ac_try) 2>&5
7018 ac_status=$?
7019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7020 (exit $ac_status); }; }; then
7021 ac_lo=$ac_mid; break
7022else
7023 echo "$as_me: failed program was:" >&5
7024cat conftest.$ac_ext >&5
7025ac_hi=`expr '(' $ac_mid ')' - 1`
7026 if test $ac_mid -le $ac_hi; then
7027 ac_lo= ac_hi=
7028 break
7029 fi
7030 ac_mid=`expr 2 '*' $ac_mid`
7031fi
7032rm -f conftest.$ac_objext conftest.$ac_ext
7033 done
7034else
7035 echo "$as_me: failed program was:" >&5
7036cat conftest.$ac_ext >&5
7037ac_lo= ac_hi=
7038fi
7039rm -f conftest.$ac_objext conftest.$ac_ext
7040fi
7041rm -f conftest.$ac_objext conftest.$ac_ext
7042# Binary search between lo and hi bounds.
7043while test "x$ac_lo" != "x$ac_hi"; do
7044 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7045 cat >conftest.$ac_ext <<_ACEOF
7046#line $LINENO "configure"
7047#include "confdefs.h"
7048$ac_includes_default
7049#ifdef F77_DUMMY_MAIN
7050# ifdef __cplusplus
7051 extern "C"
7052# endif
7053 int F77_DUMMY_MAIN() { return 1; }
7054#endif
7055int
7056main ()
7057{
7058static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7059test_array [0] = 0
7060
7061 ;
7062 return 0;
7063}
7064_ACEOF
7065rm -f conftest.$ac_objext
7066if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7067 (eval $ac_compile) 2>&5
7068 ac_status=$?
7069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7070 (exit $ac_status); } &&
7071 { ac_try='test -s conftest.$ac_objext'
7072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7073 (eval $ac_try) 2>&5
7074 ac_status=$?
7075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7076 (exit $ac_status); }; }; then
7077 ac_hi=$ac_mid
7078else
7079 echo "$as_me: failed program was:" >&5
7080cat conftest.$ac_ext >&5
7081ac_lo=`expr '(' $ac_mid ')' + 1`
7082fi
7083rm -f conftest.$ac_objext conftest.$ac_ext
7084done
7085case $ac_lo in
7086?*) ac_cv_sizeof_double=$ac_lo;;
7087'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7088echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7089 { (exit 1); exit 1; }; } ;;
7090esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007091else
7092 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007093 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7094echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7095 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007096else
Martin v. Löwis11437992002-04-12 09:54:03 +00007097 cat >conftest.$ac_ext <<_ACEOF
7098#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007099#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007100$ac_includes_default
7101long longval () { return (long) (sizeof (double)); }
7102unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007103#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007104#include <stdlib.h>
7105#ifdef F77_DUMMY_MAIN
7106# ifdef __cplusplus
7107 extern "C"
7108# endif
7109 int F77_DUMMY_MAIN() { return 1; }
7110#endif
7111int
7112main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007113{
Martin v. Löwis11437992002-04-12 09:54:03 +00007114
7115 FILE *f = fopen ("conftest.val", "w");
7116 if (! f)
7117 exit (1);
7118 if (((long) (sizeof (double))) < 0)
7119 {
7120 long i = longval ();
7121 if (i != ((long) (sizeof (double))))
7122 exit (1);
7123 fprintf (f, "%ld\n", i);
7124 }
7125 else
7126 {
7127 unsigned long i = ulongval ();
7128 if (i != ((long) (sizeof (double))))
7129 exit (1);
7130 fprintf (f, "%lu\n", i);
7131 }
7132 exit (ferror (f) || fclose (f) != 0);
7133
7134 ;
7135 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007136}
Martin v. Löwis11437992002-04-12 09:54:03 +00007137_ACEOF
7138rm -f conftest$ac_exeext
7139if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7140 (eval $ac_link) 2>&5
7141 ac_status=$?
7142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7143 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7145 (eval $ac_try) 2>&5
7146 ac_status=$?
7147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7148 (exit $ac_status); }; }; then
7149 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007150else
Martin v. Löwis11437992002-04-12 09:54:03 +00007151 echo "$as_me: program exited with status $ac_status" >&5
7152echo "$as_me: failed program was:" >&5
7153cat conftest.$ac_ext >&5
7154( exit $ac_status )
7155{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7156echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7157 { (exit 1); exit 1; }; }
7158fi
7159rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7160fi
7161fi
7162rm -f conftest.val
7163else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007164 ac_cv_sizeof_double=0
7165fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007166fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007167echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7168echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7169cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007170#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007171_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007172
7173
Martin v. Löwis11437992002-04-12 09:54:03 +00007174echo "$as_me:$LINENO: checking for fpos_t" >&5
7175echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7176if test "${ac_cv_type_fpos_t+set}" = set; then
7177 echo $ECHO_N "(cached) $ECHO_C" >&6
7178else
7179 cat >conftest.$ac_ext <<_ACEOF
7180#line $LINENO "configure"
7181#include "confdefs.h"
7182$ac_includes_default
7183#ifdef F77_DUMMY_MAIN
7184# ifdef __cplusplus
7185 extern "C"
7186# endif
7187 int F77_DUMMY_MAIN() { return 1; }
7188#endif
7189int
7190main ()
7191{
7192if ((fpos_t *) 0)
7193 return 0;
7194if (sizeof (fpos_t))
7195 return 0;
7196 ;
7197 return 0;
7198}
7199_ACEOF
7200rm -f conftest.$ac_objext
7201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7202 (eval $ac_compile) 2>&5
7203 ac_status=$?
7204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7205 (exit $ac_status); } &&
7206 { ac_try='test -s conftest.$ac_objext'
7207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7208 (eval $ac_try) 2>&5
7209 ac_status=$?
7210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7211 (exit $ac_status); }; }; then
7212 ac_cv_type_fpos_t=yes
7213else
7214 echo "$as_me: failed program was:" >&5
7215cat conftest.$ac_ext >&5
7216ac_cv_type_fpos_t=no
7217fi
7218rm -f conftest.$ac_objext conftest.$ac_ext
7219fi
7220echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7221echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7222
7223echo "$as_me:$LINENO: checking size of fpos_t" >&5
7224echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7225if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7226 echo $ECHO_N "(cached) $ECHO_C" >&6
7227else
7228 if test "$ac_cv_type_fpos_t" = yes; then
7229 # The cast to unsigned long works around a bug in the HP C Compiler
7230 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7231 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7232 # This bug is HP SR number 8606223364.
7233 if test "$cross_compiling" = yes; then
7234 # Depending upon the size, compute the lo and hi bounds.
7235cat >conftest.$ac_ext <<_ACEOF
7236#line $LINENO "configure"
7237#include "confdefs.h"
7238$ac_includes_default
7239#ifdef F77_DUMMY_MAIN
7240# ifdef __cplusplus
7241 extern "C"
7242# endif
7243 int F77_DUMMY_MAIN() { return 1; }
7244#endif
7245int
7246main ()
7247{
7248static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7249test_array [0] = 0
7250
7251 ;
7252 return 0;
7253}
7254_ACEOF
7255rm -f conftest.$ac_objext
7256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7257 (eval $ac_compile) 2>&5
7258 ac_status=$?
7259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7260 (exit $ac_status); } &&
7261 { ac_try='test -s conftest.$ac_objext'
7262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7263 (eval $ac_try) 2>&5
7264 ac_status=$?
7265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7266 (exit $ac_status); }; }; then
7267 ac_lo=0 ac_mid=0
7268 while :; do
7269 cat >conftest.$ac_ext <<_ACEOF
7270#line $LINENO "configure"
7271#include "confdefs.h"
7272$ac_includes_default
7273#ifdef F77_DUMMY_MAIN
7274# ifdef __cplusplus
7275 extern "C"
7276# endif
7277 int F77_DUMMY_MAIN() { return 1; }
7278#endif
7279int
7280main ()
7281{
7282static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7283test_array [0] = 0
7284
7285 ;
7286 return 0;
7287}
7288_ACEOF
7289rm -f conftest.$ac_objext
7290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7291 (eval $ac_compile) 2>&5
7292 ac_status=$?
7293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7294 (exit $ac_status); } &&
7295 { ac_try='test -s conftest.$ac_objext'
7296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7297 (eval $ac_try) 2>&5
7298 ac_status=$?
7299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7300 (exit $ac_status); }; }; then
7301 ac_hi=$ac_mid; break
7302else
7303 echo "$as_me: failed program was:" >&5
7304cat conftest.$ac_ext >&5
7305ac_lo=`expr $ac_mid + 1`
7306 if test $ac_lo -le $ac_mid; then
7307 ac_lo= ac_hi=
7308 break
7309 fi
7310 ac_mid=`expr 2 '*' $ac_mid + 1`
7311fi
7312rm -f conftest.$ac_objext conftest.$ac_ext
7313 done
7314else
7315 echo "$as_me: failed program was:" >&5
7316cat conftest.$ac_ext >&5
7317cat >conftest.$ac_ext <<_ACEOF
7318#line $LINENO "configure"
7319#include "confdefs.h"
7320$ac_includes_default
7321#ifdef F77_DUMMY_MAIN
7322# ifdef __cplusplus
7323 extern "C"
7324# endif
7325 int F77_DUMMY_MAIN() { return 1; }
7326#endif
7327int
7328main ()
7329{
7330static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7331test_array [0] = 0
7332
7333 ;
7334 return 0;
7335}
7336_ACEOF
7337rm -f conftest.$ac_objext
7338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7339 (eval $ac_compile) 2>&5
7340 ac_status=$?
7341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7342 (exit $ac_status); } &&
7343 { ac_try='test -s conftest.$ac_objext'
7344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7345 (eval $ac_try) 2>&5
7346 ac_status=$?
7347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7348 (exit $ac_status); }; }; then
7349 ac_hi=-1 ac_mid=-1
7350 while :; do
7351 cat >conftest.$ac_ext <<_ACEOF
7352#line $LINENO "configure"
7353#include "confdefs.h"
7354$ac_includes_default
7355#ifdef F77_DUMMY_MAIN
7356# ifdef __cplusplus
7357 extern "C"
7358# endif
7359 int F77_DUMMY_MAIN() { return 1; }
7360#endif
7361int
7362main ()
7363{
7364static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7365test_array [0] = 0
7366
7367 ;
7368 return 0;
7369}
7370_ACEOF
7371rm -f conftest.$ac_objext
7372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7373 (eval $ac_compile) 2>&5
7374 ac_status=$?
7375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7376 (exit $ac_status); } &&
7377 { ac_try='test -s conftest.$ac_objext'
7378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7379 (eval $ac_try) 2>&5
7380 ac_status=$?
7381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7382 (exit $ac_status); }; }; then
7383 ac_lo=$ac_mid; break
7384else
7385 echo "$as_me: failed program was:" >&5
7386cat conftest.$ac_ext >&5
7387ac_hi=`expr '(' $ac_mid ')' - 1`
7388 if test $ac_mid -le $ac_hi; then
7389 ac_lo= ac_hi=
7390 break
7391 fi
7392 ac_mid=`expr 2 '*' $ac_mid`
7393fi
7394rm -f conftest.$ac_objext conftest.$ac_ext
7395 done
7396else
7397 echo "$as_me: failed program was:" >&5
7398cat conftest.$ac_ext >&5
7399ac_lo= ac_hi=
7400fi
7401rm -f conftest.$ac_objext conftest.$ac_ext
7402fi
7403rm -f conftest.$ac_objext conftest.$ac_ext
7404# Binary search between lo and hi bounds.
7405while test "x$ac_lo" != "x$ac_hi"; do
7406 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7407 cat >conftest.$ac_ext <<_ACEOF
7408#line $LINENO "configure"
7409#include "confdefs.h"
7410$ac_includes_default
7411#ifdef F77_DUMMY_MAIN
7412# ifdef __cplusplus
7413 extern "C"
7414# endif
7415 int F77_DUMMY_MAIN() { return 1; }
7416#endif
7417int
7418main ()
7419{
7420static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7421test_array [0] = 0
7422
7423 ;
7424 return 0;
7425}
7426_ACEOF
7427rm -f conftest.$ac_objext
7428if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7429 (eval $ac_compile) 2>&5
7430 ac_status=$?
7431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7432 (exit $ac_status); } &&
7433 { ac_try='test -s conftest.$ac_objext'
7434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7435 (eval $ac_try) 2>&5
7436 ac_status=$?
7437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7438 (exit $ac_status); }; }; then
7439 ac_hi=$ac_mid
7440else
7441 echo "$as_me: failed program was:" >&5
7442cat conftest.$ac_ext >&5
7443ac_lo=`expr '(' $ac_mid ')' + 1`
7444fi
7445rm -f conftest.$ac_objext conftest.$ac_ext
7446done
7447case $ac_lo in
7448?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7449'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7450echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7451 { (exit 1); exit 1; }; } ;;
7452esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007453else
7454 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007455 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7456echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7457 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007458else
Martin v. Löwis11437992002-04-12 09:54:03 +00007459 cat >conftest.$ac_ext <<_ACEOF
7460#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007461#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007462$ac_includes_default
7463long longval () { return (long) (sizeof (fpos_t)); }
7464unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007465#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007466#include <stdlib.h>
7467#ifdef F77_DUMMY_MAIN
7468# ifdef __cplusplus
7469 extern "C"
7470# endif
7471 int F77_DUMMY_MAIN() { return 1; }
7472#endif
7473int
7474main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007475{
Martin v. Löwis11437992002-04-12 09:54:03 +00007476
7477 FILE *f = fopen ("conftest.val", "w");
7478 if (! f)
7479 exit (1);
7480 if (((long) (sizeof (fpos_t))) < 0)
7481 {
7482 long i = longval ();
7483 if (i != ((long) (sizeof (fpos_t))))
7484 exit (1);
7485 fprintf (f, "%ld\n", i);
7486 }
7487 else
7488 {
7489 unsigned long i = ulongval ();
7490 if (i != ((long) (sizeof (fpos_t))))
7491 exit (1);
7492 fprintf (f, "%lu\n", i);
7493 }
7494 exit (ferror (f) || fclose (f) != 0);
7495
7496 ;
7497 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007498}
Martin v. Löwis11437992002-04-12 09:54:03 +00007499_ACEOF
7500rm -f conftest$ac_exeext
7501if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7502 (eval $ac_link) 2>&5
7503 ac_status=$?
7504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7505 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7507 (eval $ac_try) 2>&5
7508 ac_status=$?
7509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7510 (exit $ac_status); }; }; then
7511 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007512else
Martin v. Löwis11437992002-04-12 09:54:03 +00007513 echo "$as_me: program exited with status $ac_status" >&5
7514echo "$as_me: failed program was:" >&5
7515cat conftest.$ac_ext >&5
7516( exit $ac_status )
7517{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7518echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7519 { (exit 1); exit 1; }; }
7520fi
7521rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7522fi
7523fi
7524rm -f conftest.val
7525else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007526 ac_cv_sizeof_fpos_t=0
7527fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007528fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007529echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7530echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7531cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007532#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007533_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007534
Michael W. Hudson54241132001-12-07 15:38:26 +00007535
7536
Martin v. Löwis11437992002-04-12 09:54:03 +00007537echo "$as_me:$LINENO: checking for long long support" >&5
7538echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007539have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007540cat >conftest.$ac_ext <<_ACEOF
7541#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007542#include "confdefs.h"
7543
Martin v. Löwis11437992002-04-12 09:54:03 +00007544#ifdef F77_DUMMY_MAIN
7545# ifdef __cplusplus
7546 extern "C"
7547# endif
7548 int F77_DUMMY_MAIN() { return 1; }
7549#endif
7550int
7551main ()
7552{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007553long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007554 ;
7555 return 0;
7556}
7557_ACEOF
7558rm -f conftest.$ac_objext
7559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7560 (eval $ac_compile) 2>&5
7561 ac_status=$?
7562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7563 (exit $ac_status); } &&
7564 { ac_try='test -s conftest.$ac_objext'
7565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7566 (eval $ac_try) 2>&5
7567 ac_status=$?
7568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7569 (exit $ac_status); }; }; then
7570
7571
7572cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007573#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007574_ACEOF
7575
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007576 have_long_long=yes
7577
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007578else
Martin v. Löwis11437992002-04-12 09:54:03 +00007579 echo "$as_me: failed program was:" >&5
7580cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007581fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007582rm -f conftest.$ac_objext conftest.$ac_ext
7583echo "$as_me:$LINENO: result: $have_long_long" >&5
7584echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007585if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007586echo "$as_me:$LINENO: checking for long long" >&5
7587echo $ECHO_N "checking for long long... $ECHO_C" >&6
7588if test "${ac_cv_type_long_long+set}" = set; then
7589 echo $ECHO_N "(cached) $ECHO_C" >&6
7590else
7591 cat >conftest.$ac_ext <<_ACEOF
7592#line $LINENO "configure"
7593#include "confdefs.h"
7594$ac_includes_default
7595#ifdef F77_DUMMY_MAIN
7596# ifdef __cplusplus
7597 extern "C"
7598# endif
7599 int F77_DUMMY_MAIN() { return 1; }
7600#endif
7601int
7602main ()
7603{
7604if ((long long *) 0)
7605 return 0;
7606if (sizeof (long long))
7607 return 0;
7608 ;
7609 return 0;
7610}
7611_ACEOF
7612rm -f conftest.$ac_objext
7613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7614 (eval $ac_compile) 2>&5
7615 ac_status=$?
7616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7617 (exit $ac_status); } &&
7618 { ac_try='test -s conftest.$ac_objext'
7619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7620 (eval $ac_try) 2>&5
7621 ac_status=$?
7622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7623 (exit $ac_status); }; }; then
7624 ac_cv_type_long_long=yes
7625else
7626 echo "$as_me: failed program was:" >&5
7627cat conftest.$ac_ext >&5
7628ac_cv_type_long_long=no
7629fi
7630rm -f conftest.$ac_objext conftest.$ac_ext
7631fi
7632echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7633echo "${ECHO_T}$ac_cv_type_long_long" >&6
7634
7635echo "$as_me:$LINENO: checking size of long long" >&5
7636echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7637if test "${ac_cv_sizeof_long_long+set}" = set; then
7638 echo $ECHO_N "(cached) $ECHO_C" >&6
7639else
7640 if test "$ac_cv_type_long_long" = yes; then
7641 # The cast to unsigned long works around a bug in the HP C Compiler
7642 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7643 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7644 # This bug is HP SR number 8606223364.
7645 if test "$cross_compiling" = yes; then
7646 # Depending upon the size, compute the lo and hi bounds.
7647cat >conftest.$ac_ext <<_ACEOF
7648#line $LINENO "configure"
7649#include "confdefs.h"
7650$ac_includes_default
7651#ifdef F77_DUMMY_MAIN
7652# ifdef __cplusplus
7653 extern "C"
7654# endif
7655 int F77_DUMMY_MAIN() { return 1; }
7656#endif
7657int
7658main ()
7659{
7660static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7661test_array [0] = 0
7662
7663 ;
7664 return 0;
7665}
7666_ACEOF
7667rm -f conftest.$ac_objext
7668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7669 (eval $ac_compile) 2>&5
7670 ac_status=$?
7671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7672 (exit $ac_status); } &&
7673 { ac_try='test -s conftest.$ac_objext'
7674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7675 (eval $ac_try) 2>&5
7676 ac_status=$?
7677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7678 (exit $ac_status); }; }; then
7679 ac_lo=0 ac_mid=0
7680 while :; do
7681 cat >conftest.$ac_ext <<_ACEOF
7682#line $LINENO "configure"
7683#include "confdefs.h"
7684$ac_includes_default
7685#ifdef F77_DUMMY_MAIN
7686# ifdef __cplusplus
7687 extern "C"
7688# endif
7689 int F77_DUMMY_MAIN() { return 1; }
7690#endif
7691int
7692main ()
7693{
7694static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7695test_array [0] = 0
7696
7697 ;
7698 return 0;
7699}
7700_ACEOF
7701rm -f conftest.$ac_objext
7702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7703 (eval $ac_compile) 2>&5
7704 ac_status=$?
7705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7706 (exit $ac_status); } &&
7707 { ac_try='test -s conftest.$ac_objext'
7708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7709 (eval $ac_try) 2>&5
7710 ac_status=$?
7711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7712 (exit $ac_status); }; }; then
7713 ac_hi=$ac_mid; break
7714else
7715 echo "$as_me: failed program was:" >&5
7716cat conftest.$ac_ext >&5
7717ac_lo=`expr $ac_mid + 1`
7718 if test $ac_lo -le $ac_mid; then
7719 ac_lo= ac_hi=
7720 break
7721 fi
7722 ac_mid=`expr 2 '*' $ac_mid + 1`
7723fi
7724rm -f conftest.$ac_objext conftest.$ac_ext
7725 done
7726else
7727 echo "$as_me: failed program was:" >&5
7728cat conftest.$ac_ext >&5
7729cat >conftest.$ac_ext <<_ACEOF
7730#line $LINENO "configure"
7731#include "confdefs.h"
7732$ac_includes_default
7733#ifdef F77_DUMMY_MAIN
7734# ifdef __cplusplus
7735 extern "C"
7736# endif
7737 int F77_DUMMY_MAIN() { return 1; }
7738#endif
7739int
7740main ()
7741{
7742static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7743test_array [0] = 0
7744
7745 ;
7746 return 0;
7747}
7748_ACEOF
7749rm -f conftest.$ac_objext
7750if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7751 (eval $ac_compile) 2>&5
7752 ac_status=$?
7753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7754 (exit $ac_status); } &&
7755 { ac_try='test -s conftest.$ac_objext'
7756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7757 (eval $ac_try) 2>&5
7758 ac_status=$?
7759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7760 (exit $ac_status); }; }; then
7761 ac_hi=-1 ac_mid=-1
7762 while :; do
7763 cat >conftest.$ac_ext <<_ACEOF
7764#line $LINENO "configure"
7765#include "confdefs.h"
7766$ac_includes_default
7767#ifdef F77_DUMMY_MAIN
7768# ifdef __cplusplus
7769 extern "C"
7770# endif
7771 int F77_DUMMY_MAIN() { return 1; }
7772#endif
7773int
7774main ()
7775{
7776static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7777test_array [0] = 0
7778
7779 ;
7780 return 0;
7781}
7782_ACEOF
7783rm -f conftest.$ac_objext
7784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7785 (eval $ac_compile) 2>&5
7786 ac_status=$?
7787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7788 (exit $ac_status); } &&
7789 { ac_try='test -s conftest.$ac_objext'
7790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7791 (eval $ac_try) 2>&5
7792 ac_status=$?
7793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7794 (exit $ac_status); }; }; then
7795 ac_lo=$ac_mid; break
7796else
7797 echo "$as_me: failed program was:" >&5
7798cat conftest.$ac_ext >&5
7799ac_hi=`expr '(' $ac_mid ')' - 1`
7800 if test $ac_mid -le $ac_hi; then
7801 ac_lo= ac_hi=
7802 break
7803 fi
7804 ac_mid=`expr 2 '*' $ac_mid`
7805fi
7806rm -f conftest.$ac_objext conftest.$ac_ext
7807 done
7808else
7809 echo "$as_me: failed program was:" >&5
7810cat conftest.$ac_ext >&5
7811ac_lo= ac_hi=
7812fi
7813rm -f conftest.$ac_objext conftest.$ac_ext
7814fi
7815rm -f conftest.$ac_objext conftest.$ac_ext
7816# Binary search between lo and hi bounds.
7817while test "x$ac_lo" != "x$ac_hi"; do
7818 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7819 cat >conftest.$ac_ext <<_ACEOF
7820#line $LINENO "configure"
7821#include "confdefs.h"
7822$ac_includes_default
7823#ifdef F77_DUMMY_MAIN
7824# ifdef __cplusplus
7825 extern "C"
7826# endif
7827 int F77_DUMMY_MAIN() { return 1; }
7828#endif
7829int
7830main ()
7831{
7832static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7833test_array [0] = 0
7834
7835 ;
7836 return 0;
7837}
7838_ACEOF
7839rm -f conftest.$ac_objext
7840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7841 (eval $ac_compile) 2>&5
7842 ac_status=$?
7843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7844 (exit $ac_status); } &&
7845 { ac_try='test -s conftest.$ac_objext'
7846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7847 (eval $ac_try) 2>&5
7848 ac_status=$?
7849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7850 (exit $ac_status); }; }; then
7851 ac_hi=$ac_mid
7852else
7853 echo "$as_me: failed program was:" >&5
7854cat conftest.$ac_ext >&5
7855ac_lo=`expr '(' $ac_mid ')' + 1`
7856fi
7857rm -f conftest.$ac_objext conftest.$ac_ext
7858done
7859case $ac_lo in
7860?*) ac_cv_sizeof_long_long=$ac_lo;;
7861'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7862echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7863 { (exit 1); exit 1; }; } ;;
7864esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007865else
7866 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007867 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7868echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7869 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007870else
Martin v. Löwis11437992002-04-12 09:54:03 +00007871 cat >conftest.$ac_ext <<_ACEOF
7872#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007873#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007874$ac_includes_default
7875long longval () { return (long) (sizeof (long long)); }
7876unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007877#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007878#include <stdlib.h>
7879#ifdef F77_DUMMY_MAIN
7880# ifdef __cplusplus
7881 extern "C"
7882# endif
7883 int F77_DUMMY_MAIN() { return 1; }
7884#endif
7885int
7886main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007887{
Martin v. Löwis11437992002-04-12 09:54:03 +00007888
7889 FILE *f = fopen ("conftest.val", "w");
7890 if (! f)
7891 exit (1);
7892 if (((long) (sizeof (long long))) < 0)
7893 {
7894 long i = longval ();
7895 if (i != ((long) (sizeof (long long))))
7896 exit (1);
7897 fprintf (f, "%ld\n", i);
7898 }
7899 else
7900 {
7901 unsigned long i = ulongval ();
7902 if (i != ((long) (sizeof (long long))))
7903 exit (1);
7904 fprintf (f, "%lu\n", i);
7905 }
7906 exit (ferror (f) || fclose (f) != 0);
7907
7908 ;
7909 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007910}
Martin v. Löwis11437992002-04-12 09:54:03 +00007911_ACEOF
7912rm -f conftest$ac_exeext
7913if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7914 (eval $ac_link) 2>&5
7915 ac_status=$?
7916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7917 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7919 (eval $ac_try) 2>&5
7920 ac_status=$?
7921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7922 (exit $ac_status); }; }; then
7923 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007924else
Martin v. Löwis11437992002-04-12 09:54:03 +00007925 echo "$as_me: program exited with status $ac_status" >&5
7926echo "$as_me: failed program was:" >&5
7927cat conftest.$ac_ext >&5
7928( exit $ac_status )
7929{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7930echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7931 { (exit 1); exit 1; }; }
7932fi
7933rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7934fi
7935fi
7936rm -f conftest.val
7937else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007938 ac_cv_sizeof_long_long=0
7939fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007940fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007941echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7942echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7943cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007944#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007945_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007946
Michael W. Hudson54241132001-12-07 15:38:26 +00007947
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007948fi
7949
Martin v. Löwis11437992002-04-12 09:54:03 +00007950echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7951echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007952have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007953cat >conftest.$ac_ext <<_ACEOF
7954#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007955#include "confdefs.h"
7956
Martin v. Löwis11437992002-04-12 09:54:03 +00007957#ifdef F77_DUMMY_MAIN
7958# ifdef __cplusplus
7959 extern "C"
7960# endif
7961 int F77_DUMMY_MAIN() { return 1; }
7962#endif
7963int
7964main ()
7965{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007966uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007967 ;
7968 return 0;
7969}
7970_ACEOF
7971rm -f conftest.$ac_objext
7972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7973 (eval $ac_compile) 2>&5
7974 ac_status=$?
7975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7976 (exit $ac_status); } &&
7977 { ac_try='test -s conftest.$ac_objext'
7978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7979 (eval $ac_try) 2>&5
7980 ac_status=$?
7981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7982 (exit $ac_status); }; }; then
7983
7984
7985cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007986#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007987_ACEOF
7988
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007989 have_uintptr_t=yes
7990
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007991else
Martin v. Löwis11437992002-04-12 09:54:03 +00007992 echo "$as_me: failed program was:" >&5
7993cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007994fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007995rm -f conftest.$ac_objext conftest.$ac_ext
7996echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
7997echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007998if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007999echo "$as_me:$LINENO: checking for uintptr_t" >&5
8000echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8001if test "${ac_cv_type_uintptr_t+set}" = set; then
8002 echo $ECHO_N "(cached) $ECHO_C" >&6
8003else
8004 cat >conftest.$ac_ext <<_ACEOF
8005#line $LINENO "configure"
8006#include "confdefs.h"
8007$ac_includes_default
8008#ifdef F77_DUMMY_MAIN
8009# ifdef __cplusplus
8010 extern "C"
8011# endif
8012 int F77_DUMMY_MAIN() { return 1; }
8013#endif
8014int
8015main ()
8016{
8017if ((uintptr_t *) 0)
8018 return 0;
8019if (sizeof (uintptr_t))
8020 return 0;
8021 ;
8022 return 0;
8023}
8024_ACEOF
8025rm -f conftest.$ac_objext
8026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8027 (eval $ac_compile) 2>&5
8028 ac_status=$?
8029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8030 (exit $ac_status); } &&
8031 { ac_try='test -s conftest.$ac_objext'
8032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8033 (eval $ac_try) 2>&5
8034 ac_status=$?
8035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8036 (exit $ac_status); }; }; then
8037 ac_cv_type_uintptr_t=yes
8038else
8039 echo "$as_me: failed program was:" >&5
8040cat conftest.$ac_ext >&5
8041ac_cv_type_uintptr_t=no
8042fi
8043rm -f conftest.$ac_objext conftest.$ac_ext
8044fi
8045echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8046echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8047
8048echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8049echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8050if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8051 echo $ECHO_N "(cached) $ECHO_C" >&6
8052else
8053 if test "$ac_cv_type_uintptr_t" = yes; then
8054 # The cast to unsigned long works around a bug in the HP C Compiler
8055 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8056 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8057 # This bug is HP SR number 8606223364.
8058 if test "$cross_compiling" = yes; then
8059 # Depending upon the size, compute the lo and hi bounds.
8060cat >conftest.$ac_ext <<_ACEOF
8061#line $LINENO "configure"
8062#include "confdefs.h"
8063$ac_includes_default
8064#ifdef F77_DUMMY_MAIN
8065# ifdef __cplusplus
8066 extern "C"
8067# endif
8068 int F77_DUMMY_MAIN() { return 1; }
8069#endif
8070int
8071main ()
8072{
8073static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8074test_array [0] = 0
8075
8076 ;
8077 return 0;
8078}
8079_ACEOF
8080rm -f conftest.$ac_objext
8081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8082 (eval $ac_compile) 2>&5
8083 ac_status=$?
8084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8085 (exit $ac_status); } &&
8086 { ac_try='test -s conftest.$ac_objext'
8087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8088 (eval $ac_try) 2>&5
8089 ac_status=$?
8090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8091 (exit $ac_status); }; }; then
8092 ac_lo=0 ac_mid=0
8093 while :; do
8094 cat >conftest.$ac_ext <<_ACEOF
8095#line $LINENO "configure"
8096#include "confdefs.h"
8097$ac_includes_default
8098#ifdef F77_DUMMY_MAIN
8099# ifdef __cplusplus
8100 extern "C"
8101# endif
8102 int F77_DUMMY_MAIN() { return 1; }
8103#endif
8104int
8105main ()
8106{
8107static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8108test_array [0] = 0
8109
8110 ;
8111 return 0;
8112}
8113_ACEOF
8114rm -f conftest.$ac_objext
8115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8116 (eval $ac_compile) 2>&5
8117 ac_status=$?
8118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8119 (exit $ac_status); } &&
8120 { ac_try='test -s conftest.$ac_objext'
8121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8122 (eval $ac_try) 2>&5
8123 ac_status=$?
8124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8125 (exit $ac_status); }; }; then
8126 ac_hi=$ac_mid; break
8127else
8128 echo "$as_me: failed program was:" >&5
8129cat conftest.$ac_ext >&5
8130ac_lo=`expr $ac_mid + 1`
8131 if test $ac_lo -le $ac_mid; then
8132 ac_lo= ac_hi=
8133 break
8134 fi
8135 ac_mid=`expr 2 '*' $ac_mid + 1`
8136fi
8137rm -f conftest.$ac_objext conftest.$ac_ext
8138 done
8139else
8140 echo "$as_me: failed program was:" >&5
8141cat conftest.$ac_ext >&5
8142cat >conftest.$ac_ext <<_ACEOF
8143#line $LINENO "configure"
8144#include "confdefs.h"
8145$ac_includes_default
8146#ifdef F77_DUMMY_MAIN
8147# ifdef __cplusplus
8148 extern "C"
8149# endif
8150 int F77_DUMMY_MAIN() { return 1; }
8151#endif
8152int
8153main ()
8154{
8155static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8156test_array [0] = 0
8157
8158 ;
8159 return 0;
8160}
8161_ACEOF
8162rm -f conftest.$ac_objext
8163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8164 (eval $ac_compile) 2>&5
8165 ac_status=$?
8166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8167 (exit $ac_status); } &&
8168 { ac_try='test -s conftest.$ac_objext'
8169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8170 (eval $ac_try) 2>&5
8171 ac_status=$?
8172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173 (exit $ac_status); }; }; then
8174 ac_hi=-1 ac_mid=-1
8175 while :; do
8176 cat >conftest.$ac_ext <<_ACEOF
8177#line $LINENO "configure"
8178#include "confdefs.h"
8179$ac_includes_default
8180#ifdef F77_DUMMY_MAIN
8181# ifdef __cplusplus
8182 extern "C"
8183# endif
8184 int F77_DUMMY_MAIN() { return 1; }
8185#endif
8186int
8187main ()
8188{
8189static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8190test_array [0] = 0
8191
8192 ;
8193 return 0;
8194}
8195_ACEOF
8196rm -f conftest.$ac_objext
8197if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8198 (eval $ac_compile) 2>&5
8199 ac_status=$?
8200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8201 (exit $ac_status); } &&
8202 { ac_try='test -s conftest.$ac_objext'
8203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8204 (eval $ac_try) 2>&5
8205 ac_status=$?
8206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8207 (exit $ac_status); }; }; then
8208 ac_lo=$ac_mid; break
8209else
8210 echo "$as_me: failed program was:" >&5
8211cat conftest.$ac_ext >&5
8212ac_hi=`expr '(' $ac_mid ')' - 1`
8213 if test $ac_mid -le $ac_hi; then
8214 ac_lo= ac_hi=
8215 break
8216 fi
8217 ac_mid=`expr 2 '*' $ac_mid`
8218fi
8219rm -f conftest.$ac_objext conftest.$ac_ext
8220 done
8221else
8222 echo "$as_me: failed program was:" >&5
8223cat conftest.$ac_ext >&5
8224ac_lo= ac_hi=
8225fi
8226rm -f conftest.$ac_objext conftest.$ac_ext
8227fi
8228rm -f conftest.$ac_objext conftest.$ac_ext
8229# Binary search between lo and hi bounds.
8230while test "x$ac_lo" != "x$ac_hi"; do
8231 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8232 cat >conftest.$ac_ext <<_ACEOF
8233#line $LINENO "configure"
8234#include "confdefs.h"
8235$ac_includes_default
8236#ifdef F77_DUMMY_MAIN
8237# ifdef __cplusplus
8238 extern "C"
8239# endif
8240 int F77_DUMMY_MAIN() { return 1; }
8241#endif
8242int
8243main ()
8244{
8245static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8246test_array [0] = 0
8247
8248 ;
8249 return 0;
8250}
8251_ACEOF
8252rm -f conftest.$ac_objext
8253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8254 (eval $ac_compile) 2>&5
8255 ac_status=$?
8256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8257 (exit $ac_status); } &&
8258 { ac_try='test -s conftest.$ac_objext'
8259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8260 (eval $ac_try) 2>&5
8261 ac_status=$?
8262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8263 (exit $ac_status); }; }; then
8264 ac_hi=$ac_mid
8265else
8266 echo "$as_me: failed program was:" >&5
8267cat conftest.$ac_ext >&5
8268ac_lo=`expr '(' $ac_mid ')' + 1`
8269fi
8270rm -f conftest.$ac_objext conftest.$ac_ext
8271done
8272case $ac_lo in
8273?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8274'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8275echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8276 { (exit 1); exit 1; }; } ;;
8277esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008278else
8279 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008280 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8281echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8282 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008283else
Martin v. Löwis11437992002-04-12 09:54:03 +00008284 cat >conftest.$ac_ext <<_ACEOF
8285#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008286#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008287$ac_includes_default
8288long longval () { return (long) (sizeof (uintptr_t)); }
8289unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008290#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008291#include <stdlib.h>
8292#ifdef F77_DUMMY_MAIN
8293# ifdef __cplusplus
8294 extern "C"
8295# endif
8296 int F77_DUMMY_MAIN() { return 1; }
8297#endif
8298int
8299main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008300{
Martin v. Löwis11437992002-04-12 09:54:03 +00008301
8302 FILE *f = fopen ("conftest.val", "w");
8303 if (! f)
8304 exit (1);
8305 if (((long) (sizeof (uintptr_t))) < 0)
8306 {
8307 long i = longval ();
8308 if (i != ((long) (sizeof (uintptr_t))))
8309 exit (1);
8310 fprintf (f, "%ld\n", i);
8311 }
8312 else
8313 {
8314 unsigned long i = ulongval ();
8315 if (i != ((long) (sizeof (uintptr_t))))
8316 exit (1);
8317 fprintf (f, "%lu\n", i);
8318 }
8319 exit (ferror (f) || fclose (f) != 0);
8320
8321 ;
8322 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008323}
Martin v. Löwis11437992002-04-12 09:54:03 +00008324_ACEOF
8325rm -f conftest$ac_exeext
8326if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8327 (eval $ac_link) 2>&5
8328 ac_status=$?
8329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8330 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8332 (eval $ac_try) 2>&5
8333 ac_status=$?
8334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8335 (exit $ac_status); }; }; then
8336 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008337else
Martin v. Löwis11437992002-04-12 09:54:03 +00008338 echo "$as_me: program exited with status $ac_status" >&5
8339echo "$as_me: failed program was:" >&5
8340cat conftest.$ac_ext >&5
8341( exit $ac_status )
8342{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8343echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8344 { (exit 1); exit 1; }; }
8345fi
8346rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8347fi
8348fi
8349rm -f conftest.val
8350else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008351 ac_cv_sizeof_uintptr_t=0
8352fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008353fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008354echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8355echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8356cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008357#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008358_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008359
Michael W. Hudson54241132001-12-07 15:38:26 +00008360
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008361fi
8362
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008363# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008364echo "$as_me:$LINENO: checking size of off_t" >&5
8365echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8366if test "${ac_cv_sizeof_off_t+set}" = set; then
8367 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008368else
8369 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008370 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008371else
Martin v. Löwis11437992002-04-12 09:54:03 +00008372 cat >conftest.$ac_ext <<_ACEOF
8373#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008374#include "confdefs.h"
8375#include <stdio.h>
8376#include <sys/types.h>
8377main()
8378{
8379 FILE *f=fopen("conftestval", "w");
8380 if (!f) exit(1);
8381 fprintf(f, "%d\n", sizeof(off_t));
8382 exit(0);
8383}
Martin v. Löwis11437992002-04-12 09:54:03 +00008384_ACEOF
8385rm -f conftest$ac_exeext
8386if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8387 (eval $ac_link) 2>&5
8388 ac_status=$?
8389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8390 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8392 (eval $ac_try) 2>&5
8393 ac_status=$?
8394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8395 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008396 ac_cv_sizeof_off_t=`cat conftestval`
8397else
Martin v. Löwis11437992002-04-12 09:54:03 +00008398 echo "$as_me: program exited with status $ac_status" >&5
8399echo "$as_me: failed program was:" >&5
8400cat conftest.$ac_ext >&5
8401( exit $ac_status )
8402ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008403fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008404rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008405fi
8406
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008407fi
8408
Martin v. Löwis11437992002-04-12 09:54:03 +00008409echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8410echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8411
8412cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008413#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008414_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008415
Michael W. Hudson54241132001-12-07 15:38:26 +00008416
Martin v. Löwis11437992002-04-12 09:54:03 +00008417echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8418echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008419if test "$have_long_long" = yes -a \
8420 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8421 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008422
Martin v. Löwis11437992002-04-12 09:54:03 +00008423cat >>confdefs.h <<\_ACEOF
8424#define HAVE_LARGEFILE_SUPPORT 1
8425_ACEOF
8426
8427 echo "$as_me:$LINENO: result: yes" >&5
8428echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008429else
Martin v. Löwis11437992002-04-12 09:54:03 +00008430 echo "$as_me:$LINENO: result: no" >&5
8431echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008432fi
8433
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008434# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008435echo "$as_me:$LINENO: checking size of time_t" >&5
8436echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8437if test "${ac_cv_sizeof_time_t+set}" = set; then
8438 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008439else
8440 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008441 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008442else
Martin v. Löwis11437992002-04-12 09:54:03 +00008443 cat >conftest.$ac_ext <<_ACEOF
8444#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008445#include "confdefs.h"
8446#include <stdio.h>
8447#include <time.h>
8448main()
8449{
8450 FILE *f=fopen("conftestval", "w");
8451 if (!f) exit(1);
8452 fprintf(f, "%d\n", sizeof(time_t));
8453 exit(0);
8454}
Martin v. Löwis11437992002-04-12 09:54:03 +00008455_ACEOF
8456rm -f conftest$ac_exeext
8457if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8458 (eval $ac_link) 2>&5
8459 ac_status=$?
8460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8461 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8463 (eval $ac_try) 2>&5
8464 ac_status=$?
8465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8466 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008467 ac_cv_sizeof_time_t=`cat conftestval`
8468else
Martin v. Löwis11437992002-04-12 09:54:03 +00008469 echo "$as_me: program exited with status $ac_status" >&5
8470echo "$as_me: failed program was:" >&5
8471cat conftest.$ac_ext >&5
8472( exit $ac_status )
8473ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008474fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008475rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008476fi
8477
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008478fi
8479
Martin v. Löwis11437992002-04-12 09:54:03 +00008480echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8481echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8482
8483cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008484#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008485_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008486
Michael W. Hudson54241132001-12-07 15:38:26 +00008487
8488
Trent Mick635f6fb2000-08-23 21:33:05 +00008489# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008490ac_save_cc="$CC"
8491if test "$ac_cv_kpthread" = "yes"
8492then CC="$CC -Kpthread"
8493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008494echo "$as_me:$LINENO: checking for pthread_t" >&5
8495echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008496have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008497cat >conftest.$ac_ext <<_ACEOF
8498#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008499#include "confdefs.h"
8500#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008501#ifdef F77_DUMMY_MAIN
8502# ifdef __cplusplus
8503 extern "C"
8504# endif
8505 int F77_DUMMY_MAIN() { return 1; }
8506#endif
8507int
8508main ()
8509{
Guido van Rossum12580492000-09-24 16:47:19 +00008510pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008511 ;
8512 return 0;
8513}
8514_ACEOF
8515rm -f conftest.$ac_objext
8516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8517 (eval $ac_compile) 2>&5
8518 ac_status=$?
8519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8520 (exit $ac_status); } &&
8521 { ac_try='test -s conftest.$ac_objext'
8522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8523 (eval $ac_try) 2>&5
8524 ac_status=$?
8525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8526 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008527 have_pthread_t=yes
8528else
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 echo "$as_me: failed program was:" >&5
8530cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008531fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008532rm -f conftest.$ac_objext conftest.$ac_ext
8533echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8534echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008535if test "$have_pthread_t" = yes ; then
8536 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008537 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8538echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8539 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8540 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008541else
8542 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008543 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008544else
Martin v. Löwis11437992002-04-12 09:54:03 +00008545 cat >conftest.$ac_ext <<_ACEOF
8546#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008547#include "confdefs.h"
8548#include <stdio.h>
8549 #include <pthread.h>
8550 main()
8551 {
8552 FILE *f=fopen("conftestval", "w");
8553 if (!f) exit(1);
8554 fprintf(f, "%d\n", sizeof(pthread_t));
8555 exit(0);
8556 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008557_ACEOF
8558rm -f conftest$ac_exeext
8559if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8560 (eval $ac_link) 2>&5
8561 ac_status=$?
8562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8563 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8565 (eval $ac_try) 2>&5
8566 ac_status=$?
8567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8568 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008569 ac_cv_sizeof_pthread_t=`cat conftestval`
8570else
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 echo "$as_me: program exited with status $ac_status" >&5
8572echo "$as_me: failed program was:" >&5
8573cat conftest.$ac_ext >&5
8574( exit $ac_status )
8575ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008576fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008577rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008578fi
8579
Trent Mick635f6fb2000-08-23 21:33:05 +00008580fi
8581
Martin v. Löwis11437992002-04-12 09:54:03 +00008582 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8583echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8584
8585cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008586#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008587_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008588
8589fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008590CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008591
Martin v. Löwis11437992002-04-12 09:54:03 +00008592echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8593echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008594# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8595if test "${enable_toolbox_glue+set}" = set; then
8596 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598fi;
Jack Jansene578a632001-08-15 01:27:14 +00008599
8600if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008601then
Jack Jansene578a632001-08-15 01:27:14 +00008602 case $ac_sys_system/$ac_sys_release in
8603 Darwin/*)
8604 enable_toolbox_glue="yes";;
8605 *)
8606 enable_toolbox_glue="no";;
8607 esac
8608fi
8609case "$enable_toolbox_glue" in
8610yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008611 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008612 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008613 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008614
8615cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008616#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008617_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008618
8619 ;;
8620*)
8621 extra_frameworks=""
8622 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008623 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008624 ;;
8625esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008626echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8627echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008628
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008629
8630case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008631 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008632 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008633 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8634 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008635 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8636 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008637 Darwin/*)
8638 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008639 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8640 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008641 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8642 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008643esac
8644
Martin v. Löwis11437992002-04-12 09:54:03 +00008645echo "$as_me:$LINENO: checking for --enable-framework" >&5
8646echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008647if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008648then
Jack Jansenca06bc62001-08-03 15:32:23 +00008649 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008650 # -U __environ is needed since bundles don't have access
8651 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008652 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008653 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008654
Jack Jansena3891ea2001-09-07 14:25:12 +00008655 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008656 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8657 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008658 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008659
Martin v. Löwis11437992002-04-12 09:54:03 +00008660cat >>confdefs.h <<\_ACEOF
8661#define WITH_NEXT_FRAMEWORK 1
8662_ACEOF
8663
8664 echo "$as_me:$LINENO: result: yes" >&5
8665echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008666else
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 echo "$as_me:$LINENO: result: no" >&5
8668echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008669fi
8670
Martin v. Löwis11437992002-04-12 09:54:03 +00008671echo "$as_me:$LINENO: checking for dyld" >&5
8672echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008673case $ac_sys_system/$ac_sys_release in
8674 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008675
Martin v. Löwis11437992002-04-12 09:54:03 +00008676cat >>confdefs.h <<\_ACEOF
8677#define WITH_DYLD 1
8678_ACEOF
8679
8680 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8681echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008682 ;;
8683 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 echo "$as_me:$LINENO: result: no" >&5
8685echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008686 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008687esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008688
Guido van Rossum0a516c91994-09-12 10:58:40 +00008689# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008690
Michael W. Hudson54241132001-12-07 15:38:26 +00008691
8692
8693
8694
Guido van Rossum0a516c91994-09-12 10:58:40 +00008695# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008696# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008697echo "$as_me:$LINENO: checking SO" >&5
8698echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008699if test -z "$SO"
8700then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008701 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008702 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008703 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008704 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008705 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008706fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008707echo "$as_me:$LINENO: result: $SO" >&5
8708echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008709# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008710# -- "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 +00008711# (Shared libraries in this instance are shared modules to be loaded into
8712# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008713echo "$as_me:$LINENO: checking LDSHARED" >&5
8714echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008715if test -z "$LDSHARED"
8716then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008717 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008718 AIX*)
8719 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008720 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008721 ;;
8722 BeOS*)
8723 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008724 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008725 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008726 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008727 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008728 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00008730 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008731 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008732 else LDSHARED="$(CC) -G";
Greg Ward57c9a662000-05-26 12:22:54 +00008733 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008734 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008735 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8736 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008737 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008738 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8739 if test "$enable_framework" ; then
8740 # Link against the framework. All externals should be defined.
8741 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8742 else
8743 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008744 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008745 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008746 Darwin/*)
8747 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8748 if test "$enable_framework" ; then
8749 # Link against the framework. All externals should be defined.
8750 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8751 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008752 # No framework, use the Python app as bundle-loader
8753 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8754 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008755 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008756 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008757 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008758 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008759 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008760 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008761 then
8762 LDSHARED="cc -shared ${LDFLAGS}"
8763 else
8764 LDSHARED="ld -Bshareable ${LDFLAGS}"
8765 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008766 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008767 if test "$GCC" = "yes"
8768 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008769 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008770 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008771 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008772 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008773 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008774 *) LDSHARED="ld";;
8775 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008776fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008777echo "$as_me:$LINENO: result: $LDSHARED" >&5
8778echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008779BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008780# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008781# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008782echo "$as_me:$LINENO: checking CCSHARED" >&5
8783echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008784if test -z "$CCSHARED"
8785then
Guido van Rossum07397971997-04-29 21:49:50 +00008786 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008787 SunOS*) if test "$GCC" = yes;
8788 then CCSHARED="-fPIC";
8789 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008790 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008791 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008792 else CCSHARED="+z";
8793 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008794 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008795 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008796 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008797 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008798 if test "$GCC" = "yes"
8799 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008800 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008801 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008802 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008803 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008804 IRIX*/6*) case $CC in
8805 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008806 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008807 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008808 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008809 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008810fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008811echo "$as_me:$LINENO: result: $CCSHARED" >&5
8812echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008813# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008814# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008815echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8816echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008817if test -z "$LINKFORSHARED"
8818then
Guido van Rossum07397971997-04-29 21:49:50 +00008819 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008820 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008821 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008822 LINKFORSHARED="-Wl,-E -Wl,+s";;
8823# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008824 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008825 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008826 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008827 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008828 # -u __dummy makes the linker aware of the objc runtime
8829 # in System.framework; otherwise, __objcInit (referenced in
8830 # crt1.o) gets erroneously defined as common, which breaks dynamic
8831 # loading of any modules which reference it in System.framework.
8832 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8833 # not used by the core itself but which needs to be in the core so
8834 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008835 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008836 if test "$enable_framework"
8837 then
8838 LINKFORSHARED="$LINKFORSHARED -framework Python"
8839 fi
8840 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008841 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008842 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008843 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008845 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8846 then
8847 LINKFORSHARED="-Wl,--export-dynamic"
8848 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008849 SunOS/5*) case $CC in
8850 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00008851 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008852 then
8853 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008854 fi;;
8855 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008856 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008857fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008858echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8859echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008860
Michael W. Hudson54241132001-12-07 15:38:26 +00008861
Martin v. Löwis11437992002-04-12 09:54:03 +00008862echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8863echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008864if test ! "$LIBRARY" = "$LDLIBRARY"
8865then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008866 case $ac_sys_system in
8867 CYGWIN*)
8868 # Cygwin needs CCSHARED when building extension DLLs
8869 # but not when building the interpreter DLL.
8870 CFLAGSFORSHARED='';;
8871 *)
8872 CFLAGSFORSHARED='$(CCSHARED)'
8873 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008874fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008875echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8876echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008877
Guido van Rossum627b2d71993-12-24 10:39:16 +00008878# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008879
8880echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8881echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8882if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8883 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008884else
Martin v. Löwis11437992002-04-12 09:54:03 +00008885 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008886LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008887cat >conftest.$ac_ext <<_ACEOF
8888#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008889#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008890
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008891/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008892#ifdef __cplusplus
8893extern "C"
8894#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008895/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008896 builtin and then its argument prototype would still apply. */
8897char dlopen ();
8898#ifdef F77_DUMMY_MAIN
8899# ifdef __cplusplus
8900 extern "C"
8901# endif
8902 int F77_DUMMY_MAIN() { return 1; }
8903#endif
8904int
8905main ()
8906{
8907dlopen ();
8908 ;
8909 return 0;
8910}
8911_ACEOF
8912rm -f conftest.$ac_objext conftest$ac_exeext
8913if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8914 (eval $ac_link) 2>&5
8915 ac_status=$?
8916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8917 (exit $ac_status); } &&
8918 { ac_try='test -s conftest$ac_exeext'
8919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8920 (eval $ac_try) 2>&5
8921 ac_status=$?
8922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8923 (exit $ac_status); }; }; then
8924 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008925else
Martin v. Löwis11437992002-04-12 09:54:03 +00008926 echo "$as_me: failed program was:" >&5
8927cat conftest.$ac_ext >&5
8928ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008929fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008930rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8931LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008932fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008933echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8934echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8935if test $ac_cv_lib_dl_dlopen = yes; then
8936 cat >>confdefs.h <<_ACEOF
8937#define HAVE_LIBDL 1
8938_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008939
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008940 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008941
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008942fi
8943 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008944
8945echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8946echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8947if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8948 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008949else
Martin v. Löwis11437992002-04-12 09:54:03 +00008950 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008951LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008952cat >conftest.$ac_ext <<_ACEOF
8953#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008954#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008955
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008956/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008957#ifdef __cplusplus
8958extern "C"
8959#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008960/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008961 builtin and then its argument prototype would still apply. */
8962char shl_load ();
8963#ifdef F77_DUMMY_MAIN
8964# ifdef __cplusplus
8965 extern "C"
8966# endif
8967 int F77_DUMMY_MAIN() { return 1; }
8968#endif
8969int
8970main ()
8971{
8972shl_load ();
8973 ;
8974 return 0;
8975}
8976_ACEOF
8977rm -f conftest.$ac_objext conftest$ac_exeext
8978if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8979 (eval $ac_link) 2>&5
8980 ac_status=$?
8981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8982 (exit $ac_status); } &&
8983 { ac_try='test -s conftest$ac_exeext'
8984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8985 (eval $ac_try) 2>&5
8986 ac_status=$?
8987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8988 (exit $ac_status); }; }; then
8989 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008990else
Martin v. Löwis11437992002-04-12 09:54:03 +00008991 echo "$as_me: failed program was:" >&5
8992cat conftest.$ac_ext >&5
8993ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008994fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008995rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8996LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008997fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008998echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8999echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9000if test $ac_cv_lib_dld_shl_load = yes; then
9001 cat >>confdefs.h <<_ACEOF
9002#define HAVE_LIBDLD 1
9003_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009004
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009005 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009006
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009007fi
9008 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009009
9010echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9011echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9012if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9013 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009014else
Martin v. Löwis11437992002-04-12 09:54:03 +00009015 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009016LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009017cat >conftest.$ac_ext <<_ACEOF
9018#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009019#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009020
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009021/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009022#ifdef __cplusplus
9023extern "C"
9024#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009025/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009026 builtin and then its argument prototype would still apply. */
9027char sem_init ();
9028#ifdef F77_DUMMY_MAIN
9029# ifdef __cplusplus
9030 extern "C"
9031# endif
9032 int F77_DUMMY_MAIN() { return 1; }
9033#endif
9034int
9035main ()
9036{
9037sem_init ();
9038 ;
9039 return 0;
9040}
9041_ACEOF
9042rm -f conftest.$ac_objext conftest$ac_exeext
9043if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9044 (eval $ac_link) 2>&5
9045 ac_status=$?
9046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9047 (exit $ac_status); } &&
9048 { ac_try='test -s conftest$ac_exeext'
9049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9050 (eval $ac_try) 2>&5
9051 ac_status=$?
9052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9053 (exit $ac_status); }; }; then
9054 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009055else
Martin v. Löwis11437992002-04-12 09:54:03 +00009056 echo "$as_me: failed program was:" >&5
9057cat conftest.$ac_ext >&5
9058ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009060rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9061LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009062fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009063echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9064echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9065if test $ac_cv_lib_rt_sem_init = yes; then
9066 cat >>confdefs.h <<_ACEOF
9067#define HAVE_LIBRT 1
9068_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009069
9070 LIBS="-lrt $LIBS"
9071
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009072fi
9073 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009074
9075# checks for system dependent C++ extensions support
9076case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9078echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9079 cat >conftest.$ac_ext <<_ACEOF
9080#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009081#include "confdefs.h"
9082#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009083#ifdef F77_DUMMY_MAIN
9084# ifdef __cplusplus
9085 extern "C"
9086# endif
9087 int F77_DUMMY_MAIN() { return 1; }
9088#endif
9089int
9090main ()
9091{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009092loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009093 ;
9094 return 0;
9095}
9096_ACEOF
9097rm -f conftest.$ac_objext conftest$ac_exeext
9098if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9099 (eval $ac_link) 2>&5
9100 ac_status=$?
9101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9102 (exit $ac_status); } &&
9103 { ac_try='test -s conftest$ac_exeext'
9104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9105 (eval $ac_try) 2>&5
9106 ac_status=$?
9107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9108 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009109
Martin v. Löwis11437992002-04-12 09:54:03 +00009110cat >>confdefs.h <<\_ACEOF
9111#define AIX_GENUINE_CPLUSPLUS 1
9112_ACEOF
9113
9114 echo "$as_me:$LINENO: result: yes" >&5
9115echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009116else
Martin v. Löwis11437992002-04-12 09:54:03 +00009117 echo "$as_me: failed program was:" >&5
9118cat conftest.$ac_ext >&5
9119echo "$as_me:$LINENO: result: no" >&5
9120echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009121fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009122rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009123 *) ;;
9124esac
9125
Guido van Rossum70c7f481998-03-26 18:44:10 +00009126# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9127# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009128# BeOS' sockets are stashed in libnet.
9129case "$ac_sys_system" in
9130IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009131*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009132echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9133echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9134if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9135 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009136else
Martin v. Löwis11437992002-04-12 09:54:03 +00009137 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009138LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009139cat >conftest.$ac_ext <<_ACEOF
9140#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009141#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009142
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009143/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009144#ifdef __cplusplus
9145extern "C"
9146#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009147/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009148 builtin and then its argument prototype would still apply. */
9149char t_open ();
9150#ifdef F77_DUMMY_MAIN
9151# ifdef __cplusplus
9152 extern "C"
9153# endif
9154 int F77_DUMMY_MAIN() { return 1; }
9155#endif
9156int
9157main ()
9158{
9159t_open ();
9160 ;
9161 return 0;
9162}
9163_ACEOF
9164rm -f conftest.$ac_objext conftest$ac_exeext
9165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9166 (eval $ac_link) 2>&5
9167 ac_status=$?
9168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9169 (exit $ac_status); } &&
9170 { ac_try='test -s conftest$ac_exeext'
9171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9172 (eval $ac_try) 2>&5
9173 ac_status=$?
9174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9175 (exit $ac_status); }; }; then
9176 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009177else
Martin v. Löwis11437992002-04-12 09:54:03 +00009178 echo "$as_me: failed program was:" >&5
9179cat conftest.$ac_ext >&5
9180ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009182rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9183LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009184fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009185echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9186echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9187if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009188 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009189fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009190 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009191echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9192echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9193if test "${ac_cv_lib_socket_socket+set}" = set; then
9194 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009195else
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009197LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009198cat >conftest.$ac_ext <<_ACEOF
9199#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009200#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009201
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009202/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009203#ifdef __cplusplus
9204extern "C"
9205#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009206/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009207 builtin and then its argument prototype would still apply. */
9208char socket ();
9209#ifdef F77_DUMMY_MAIN
9210# ifdef __cplusplus
9211 extern "C"
9212# endif
9213 int F77_DUMMY_MAIN() { return 1; }
9214#endif
9215int
9216main ()
9217{
9218socket ();
9219 ;
9220 return 0;
9221}
9222_ACEOF
9223rm -f conftest.$ac_objext conftest$ac_exeext
9224if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9225 (eval $ac_link) 2>&5
9226 ac_status=$?
9227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9228 (exit $ac_status); } &&
9229 { ac_try='test -s conftest$ac_exeext'
9230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9231 (eval $ac_try) 2>&5
9232 ac_status=$?
9233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9234 (exit $ac_status); }; }; then
9235 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009236else
Martin v. Löwis11437992002-04-12 09:54:03 +00009237 echo "$as_me: failed program was:" >&5
9238cat conftest.$ac_ext >&5
9239ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009240fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009241rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9242LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009243fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009244echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9245echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9246if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009247 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009248fi
9249 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009250;;
9251esac
9252case "$ac_sys_system" in
9253BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009254echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9255echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9256if test "${ac_cv_lib_net_socket+set}" = set; then
9257 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009258else
Martin v. Löwis11437992002-04-12 09:54:03 +00009259 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009260LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009261cat >conftest.$ac_ext <<_ACEOF
9262#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009263#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009264
Guido van Rossumad678af1998-10-02 14:42:15 +00009265/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009266#ifdef __cplusplus
9267extern "C"
9268#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009269/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 builtin and then its argument prototype would still apply. */
9271char socket ();
9272#ifdef F77_DUMMY_MAIN
9273# ifdef __cplusplus
9274 extern "C"
9275# endif
9276 int F77_DUMMY_MAIN() { return 1; }
9277#endif
9278int
9279main ()
9280{
9281socket ();
9282 ;
9283 return 0;
9284}
9285_ACEOF
9286rm -f conftest.$ac_objext conftest$ac_exeext
9287if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9288 (eval $ac_link) 2>&5
9289 ac_status=$?
9290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9291 (exit $ac_status); } &&
9292 { ac_try='test -s conftest$ac_exeext'
9293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9294 (eval $ac_try) 2>&5
9295 ac_status=$?
9296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9297 (exit $ac_status); }; }; then
9298 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009299else
Martin v. Löwis11437992002-04-12 09:54:03 +00009300 echo "$as_me: failed program was:" >&5
9301cat conftest.$ac_ext >&5
9302ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009303fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009304rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9305LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009306fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009307echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9308echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9309if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009310 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009311fi
9312 # BeOS
9313;;
9314esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009315
Martin v. Löwis11437992002-04-12 09:54:03 +00009316echo "$as_me:$LINENO: checking for --with-libs" >&5
9317echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9318
Guido van Rossuma68acba1996-07-31 17:36:39 +00009319# Check whether --with-libs or --without-libs was given.
9320if test "${with_libs+set}" = set; then
9321 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009322
9323echo "$as_me:$LINENO: result: $withval" >&5
9324echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009325LIBS="$withval $LIBS"
9326
9327else
Martin v. Löwis11437992002-04-12 09:54:03 +00009328 echo "$as_me:$LINENO: result: no" >&5
9329echo "${ECHO_T}no" >&6
9330fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009331
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009332# Determine if signalmodule should be used.
9333
9334
Martin v. Löwis11437992002-04-12 09:54:03 +00009335echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9336echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9337
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009338# Check whether --with-signal-module or --without-signal-module was given.
9339if test "${with_signal_module+set}" = set; then
9340 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009341
Martin v. Löwis11437992002-04-12 09:54:03 +00009342fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009343
9344if test -z "$with_signal_module"
9345then with_signal_module="yes"
9346fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009347echo "$as_me:$LINENO: result: $with_signal_module" >&5
9348echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009349
9350if test "${with_signal_module}" = "yes"; then
9351 USE_SIGNAL_MODULE=""
9352 SIGNAL_OBJS=""
9353else
9354 USE_SIGNAL_MODULE="#"
9355 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9356fi
9357
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009358# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009359
Barry Warsawc0d24d82000-06-29 16:12:00 +00009360USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009361
Martin v. Löwis11437992002-04-12 09:54:03 +00009362echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9363echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9364
Guido van Rossumec2f0731997-01-22 20:54:01 +00009365
9366# Check whether --with-dec-threads or --without-dec-threads was given.
9367if test "${with_dec_threads+set}" = set; then
9368 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009369
9370echo "$as_me:$LINENO: result: $withval" >&5
9371echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009372LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009373if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009374 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009375fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009376else
Martin v. Löwis11437992002-04-12 09:54:03 +00009377 echo "$as_me:$LINENO: result: no" >&5
9378echo "${ECHO_T}no" >&6
9379fi;
9380
9381# Templates for things AC_DEFINEd more than once.
9382# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009383
9384
Martin v. Löwis11437992002-04-12 09:54:03 +00009385
9386
9387
9388
9389
9390echo "$as_me:$LINENO: checking for --with-threads" >&5
9391echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9392
Guido van Rossumec2f0731997-01-22 20:54:01 +00009393# Check whether --with-threads or --without-threads was given.
9394if test "${with_threads+set}" = set; then
9395 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009396
Martin v. Löwis11437992002-04-12 09:54:03 +00009397fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009398
Barry Warsawc0d24d82000-06-29 16:12:00 +00009399# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009400
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009401# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009402if test "${with_thread+set}" = set; then
9403 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009404
Martin v. Löwis11437992002-04-12 09:54:03 +00009405with_threads=$with_thread
9406fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +00009407
9408if test -z "$with_threads"
9409then with_threads="yes"
9410fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009411echo "$as_me:$LINENO: result: $with_threads" >&5
9412echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00009413
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009414
Barry Warsawc0d24d82000-06-29 16:12:00 +00009415if test "$with_threads" = "no"
9416then
9417 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009418elif test "$ac_cv_pthread_is_default" = yes
9419then
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009421#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009422_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009423
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009424 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009426#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009427_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009428
9429 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009431elif test "$ac_cv_kpthread" = "yes"
9432then
9433 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009435#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009436_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009437
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009438 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009439 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009440else
9441 if test ! -z "$with_threads" -a -d "$with_threads"
9442 then LDFLAGS="$LDFLAGS -L$with_threads"
9443 fi
9444 if test ! -z "$withval" -a -d "$withval"
9445 then LDFLAGS="$LDFLAGS -L$withval"
9446 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009447
9448 # According to the POSIX spec, a pthreads implementation must
9449 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009450 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9451echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9452 cat >conftest.$ac_ext <<_ACEOF
9453#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009454#include "confdefs.h"
9455#include <unistd.h>
9456 #ifdef _POSIX_THREADS
9457 yes
9458 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009459
9460_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009461if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9462 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009463 unistd_defines_pthreads=yes
9464else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009465 unistd_defines_pthreads=no
9466fi
9467rm -f conftest*
9468
Martin v. Löwis11437992002-04-12 09:54:03 +00009469 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9470echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009471
Martin v. Löwis11437992002-04-12 09:54:03 +00009472 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009473#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009474_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009475
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 if test "${ac_cv_header_cthreads_h+set}" = set; then
9477 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9478echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9479if test "${ac_cv_header_cthreads_h+set}" = set; then
9480 echo $ECHO_N "(cached) $ECHO_C" >&6
9481fi
9482echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9483echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009484else
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 # Is the header compilable?
9486echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9487echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9488cat >conftest.$ac_ext <<_ACEOF
9489#line $LINENO "configure"
9490#include "confdefs.h"
9491$ac_includes_default
9492#include <cthreads.h>
9493_ACEOF
9494rm -f conftest.$ac_objext
9495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9496 (eval $ac_compile) 2>&5
9497 ac_status=$?
9498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9499 (exit $ac_status); } &&
9500 { ac_try='test -s conftest.$ac_objext'
9501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9502 (eval $ac_try) 2>&5
9503 ac_status=$?
9504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9505 (exit $ac_status); }; }; then
9506 ac_header_compiler=yes
9507else
9508 echo "$as_me: failed program was:" >&5
9509cat conftest.$ac_ext >&5
9510ac_header_compiler=no
9511fi
9512rm -f conftest.$ac_objext conftest.$ac_ext
9513echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9514echo "${ECHO_T}$ac_header_compiler" >&6
9515
9516# Is the header present?
9517echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9518echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9519cat >conftest.$ac_ext <<_ACEOF
9520#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009521#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009522#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009523_ACEOF
9524if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9525 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9526 ac_status=$?
9527 egrep -v '^ *\+' conftest.er1 >conftest.err
9528 rm -f conftest.er1
9529 cat conftest.err >&5
9530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9531 (exit $ac_status); } >/dev/null; then
9532 if test -s conftest.err; then
9533 ac_cpp_err=$ac_c_preproc_warn_flag
9534 else
9535 ac_cpp_err=
9536 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009537else
Martin v. Löwis11437992002-04-12 09:54:03 +00009538 ac_cpp_err=yes
9539fi
9540if test -z "$ac_cpp_err"; then
9541 ac_header_preproc=yes
9542else
9543 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009544 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009546fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009547rm -f conftest.err conftest.$ac_ext
9548echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9549echo "${ECHO_T}$ac_header_preproc" >&6
9550
9551# So? What about this header?
9552case $ac_header_compiler:$ac_header_preproc in
9553 yes:no )
9554 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9555echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9556 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9557echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9558 no:yes )
9559 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9560echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9561 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9562echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9563 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9564echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9565esac
9566echo "$as_me:$LINENO: checking for cthreads.h" >&5
9567echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9568if test "${ac_cv_header_cthreads_h+set}" = set; then
9569 echo $ECHO_N "(cached) $ECHO_C" >&6
9570else
9571 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009572fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009573echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9574echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9575
9576fi
9577if test $ac_cv_header_cthreads_h = yes; then
9578 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009579#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009580_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009581
Martin v. Löwis11437992002-04-12 09:54:03 +00009582 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009583#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009584_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009585
Martin v. Löwis11437992002-04-12 09:54:03 +00009586
9587cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009588#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009589_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009590
9591 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009592 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009593else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009594
Martin v. Löwis11437992002-04-12 09:54:03 +00009595 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9596 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9597echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9598if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9599 echo $ECHO_N "(cached) $ECHO_C" >&6
9600fi
9601echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9602echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009603else
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 # Is the header compilable?
9605echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9606echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9607cat >conftest.$ac_ext <<_ACEOF
9608#line $LINENO "configure"
9609#include "confdefs.h"
9610$ac_includes_default
9611#include <mach/cthreads.h>
9612_ACEOF
9613rm -f conftest.$ac_objext
9614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9615 (eval $ac_compile) 2>&5
9616 ac_status=$?
9617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9618 (exit $ac_status); } &&
9619 { ac_try='test -s conftest.$ac_objext'
9620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9621 (eval $ac_try) 2>&5
9622 ac_status=$?
9623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9624 (exit $ac_status); }; }; then
9625 ac_header_compiler=yes
9626else
9627 echo "$as_me: failed program was:" >&5
9628cat conftest.$ac_ext >&5
9629ac_header_compiler=no
9630fi
9631rm -f conftest.$ac_objext conftest.$ac_ext
9632echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9633echo "${ECHO_T}$ac_header_compiler" >&6
9634
9635# Is the header present?
9636echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9637echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9638cat >conftest.$ac_ext <<_ACEOF
9639#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009640#include "confdefs.h"
9641#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009642_ACEOF
9643if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9644 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9645 ac_status=$?
9646 egrep -v '^ *\+' conftest.er1 >conftest.err
9647 rm -f conftest.er1
9648 cat conftest.err >&5
9649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9650 (exit $ac_status); } >/dev/null; then
9651 if test -s conftest.err; then
9652 ac_cpp_err=$ac_c_preproc_warn_flag
9653 else
9654 ac_cpp_err=
9655 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009656else
Martin v. Löwis11437992002-04-12 09:54:03 +00009657 ac_cpp_err=yes
9658fi
9659if test -z "$ac_cpp_err"; then
9660 ac_header_preproc=yes
9661else
9662 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009663 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009664 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009665fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009666rm -f conftest.err conftest.$ac_ext
9667echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9668echo "${ECHO_T}$ac_header_preproc" >&6
9669
9670# So? What about this header?
9671case $ac_header_compiler:$ac_header_preproc in
9672 yes:no )
9673 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9674echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9675 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9676echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9677 no:yes )
9678 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9679echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9680 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9681echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9682 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9683echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9684esac
9685echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9686echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9687if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9688 echo $ECHO_N "(cached) $ECHO_C" >&6
9689else
9690 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009691fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009692echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9693echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9694
9695fi
9696if test $ac_cv_header_mach_cthreads_h = yes; then
9697 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009698#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009699_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009700
Martin v. Löwis11437992002-04-12 09:54:03 +00009701 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009702#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009703_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009704
Martin v. Löwis11437992002-04-12 09:54:03 +00009705
9706cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009707#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009708_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009709
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009710 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009711else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009712
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 echo "$as_me:$LINENO: checking for --with-pth" >&5
9714echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9715
9716# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009717if test "${with_pth+set}" = set; then
9718 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009719
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 echo "$as_me:$LINENO: result: $withval" >&5
9721echo "${ECHO_T}$withval" >&6
9722 cat >>confdefs.h <<\_ACEOF
9723#define WITH_THREAD 1
9724_ACEOF
9725
9726
9727cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009728#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009729_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009730
Martin v. Löwis130fb172001-07-19 11:00:41 +00009731 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009732 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009733else
Martin v. Löwis11437992002-04-12 09:54:03 +00009734
9735 echo "$as_me:$LINENO: result: no" >&5
9736echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009737
9738 # Just looking for pthread_create in libpthread is not enough:
9739 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9740 # So we really have to include pthread.h, and then link.
9741 _libs=$LIBS
9742 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9744echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9745 cat >conftest.$ac_ext <<_ACEOF
9746#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009747#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009748#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009749
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009750void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009751#ifdef F77_DUMMY_MAIN
9752# ifdef __cplusplus
9753 extern "C"
9754# endif
9755 int F77_DUMMY_MAIN() { return 1; }
9756#endif
9757int
9758main ()
9759{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009760
9761pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009762 ;
9763 return 0;
9764}
9765_ACEOF
9766rm -f conftest.$ac_objext conftest$ac_exeext
9767if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9768 (eval $ac_link) 2>&5
9769 ac_status=$?
9770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9771 (exit $ac_status); } &&
9772 { ac_try='test -s conftest$ac_exeext'
9773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9774 (eval $ac_try) 2>&5
9775 ac_status=$?
9776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9777 (exit $ac_status); }; }; then
9778
9779 echo "$as_me:$LINENO: result: yes" >&5
9780echo "${ECHO_T}yes" >&6
9781 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009782#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009783_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009784
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009785 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009786 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009787else
Martin v. Löwis11437992002-04-12 09:54:03 +00009788 echo "$as_me: failed program was:" >&5
9789cat conftest.$ac_ext >&5
9790
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009791 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9793echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9794if test "${ac_cv_func_pthread_detach+set}" = set; then
9795 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009796else
Martin v. Löwis11437992002-04-12 09:54:03 +00009797 cat >conftest.$ac_ext <<_ACEOF
9798#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009799#include "confdefs.h"
9800/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009801 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009802#include <assert.h>
9803/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009804#ifdef __cplusplus
9805extern "C"
9806#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009807/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009808 builtin and then its argument prototype would still apply. */
9809char pthread_detach ();
9810char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009811
Martin v. Löwis11437992002-04-12 09:54:03 +00009812#ifdef F77_DUMMY_MAIN
9813# ifdef __cplusplus
9814 extern "C"
9815# endif
9816 int F77_DUMMY_MAIN() { return 1; }
9817#endif
9818int
9819main ()
9820{
Guido van Rossumad678af1998-10-02 14:42:15 +00009821/* The GNU C library defines this for functions which it implements
9822 to always fail with ENOSYS. Some functions are actually named
9823 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009824#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009825choke me
9826#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009827f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009828#endif
9829
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 ;
9831 return 0;
9832}
9833_ACEOF
9834rm -f conftest.$ac_objext conftest$ac_exeext
9835if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9836 (eval $ac_link) 2>&5
9837 ac_status=$?
9838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9839 (exit $ac_status); } &&
9840 { ac_try='test -s conftest$ac_exeext'
9841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9842 (eval $ac_try) 2>&5
9843 ac_status=$?
9844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9845 (exit $ac_status); }; }; then
9846 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009847else
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 echo "$as_me: failed program was:" >&5
9849cat conftest.$ac_ext >&5
9850ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009851fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009852rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009853fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009854echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9855echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9856if test $ac_cv_func_pthread_detach = yes; then
9857 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009858#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009859_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009860
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009861 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009862 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009863else
Guido van Rossumad678af1998-10-02 14:42:15 +00009864
Martin v. Löwis11437992002-04-12 09:54:03 +00009865 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9866 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9867echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9868if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9869 echo $ECHO_N "(cached) $ECHO_C" >&6
9870fi
9871echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9872echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009873else
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 # Is the header compilable?
9875echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
9876echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
9877cat >conftest.$ac_ext <<_ACEOF
9878#line $LINENO "configure"
9879#include "confdefs.h"
9880$ac_includes_default
9881#include <kernel/OS.h>
9882_ACEOF
9883rm -f conftest.$ac_objext
9884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9885 (eval $ac_compile) 2>&5
9886 ac_status=$?
9887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9888 (exit $ac_status); } &&
9889 { ac_try='test -s conftest.$ac_objext'
9890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9891 (eval $ac_try) 2>&5
9892 ac_status=$?
9893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9894 (exit $ac_status); }; }; then
9895 ac_header_compiler=yes
9896else
9897 echo "$as_me: failed program was:" >&5
9898cat conftest.$ac_ext >&5
9899ac_header_compiler=no
9900fi
9901rm -f conftest.$ac_objext conftest.$ac_ext
9902echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9903echo "${ECHO_T}$ac_header_compiler" >&6
9904
9905# Is the header present?
9906echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
9907echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
9908cat >conftest.$ac_ext <<_ACEOF
9909#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009910#include "confdefs.h"
9911#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009912_ACEOF
9913if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9914 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9915 ac_status=$?
9916 egrep -v '^ *\+' conftest.er1 >conftest.err
9917 rm -f conftest.er1
9918 cat conftest.err >&5
9919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9920 (exit $ac_status); } >/dev/null; then
9921 if test -s conftest.err; then
9922 ac_cpp_err=$ac_c_preproc_warn_flag
9923 else
9924 ac_cpp_err=
9925 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009926else
Martin v. Löwis11437992002-04-12 09:54:03 +00009927 ac_cpp_err=yes
9928fi
9929if test -z "$ac_cpp_err"; then
9930 ac_header_preproc=yes
9931else
9932 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009933 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009934 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009935fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009936rm -f conftest.err conftest.$ac_ext
9937echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9938echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009939
Martin v. Löwis11437992002-04-12 09:54:03 +00009940# So? What about this header?
9941case $ac_header_compiler:$ac_header_preproc in
9942 yes:no )
9943 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
9944echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9945 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9946echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9947 no:yes )
9948 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
9949echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
9950 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
9951echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
9952 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9953echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9954esac
9955echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9956echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9957if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9958 echo $ECHO_N "(cached) $ECHO_C" >&6
9959else
9960 ac_cv_header_kernel_OS_h=$ac_header_preproc
9961fi
9962echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9963echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
9964
9965fi
9966if test $ac_cv_header_kernel_OS_h = yes; then
9967 cat >>confdefs.h <<\_ACEOF
9968#define WITH_THREAD 1
9969_ACEOF
9970
9971
9972cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009973#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009974_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009975
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009976 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009977else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009978
Martin v. Löwis11437992002-04-12 09:54:03 +00009979 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
9980echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
9981if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
9982 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009983else
Martin v. Löwis11437992002-04-12 09:54:03 +00009984 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009985LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009986cat >conftest.$ac_ext <<_ACEOF
9987#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00009988#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009989
Greg Steinadf63d62000-07-05 10:38:09 +00009990/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009991#ifdef __cplusplus
9992extern "C"
9993#endif
Greg Steinadf63d62000-07-05 10:38:09 +00009994/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009995 builtin and then its argument prototype would still apply. */
9996char pthread_create ();
9997#ifdef F77_DUMMY_MAIN
9998# ifdef __cplusplus
9999 extern "C"
10000# endif
10001 int F77_DUMMY_MAIN() { return 1; }
10002#endif
10003int
10004main ()
10005{
10006pthread_create ();
10007 ;
10008 return 0;
10009}
10010_ACEOF
10011rm -f conftest.$ac_objext conftest$ac_exeext
10012if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10013 (eval $ac_link) 2>&5
10014 ac_status=$?
10015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10016 (exit $ac_status); } &&
10017 { ac_try='test -s conftest$ac_exeext'
10018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10019 (eval $ac_try) 2>&5
10020 ac_status=$?
10021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10022 (exit $ac_status); }; }; then
10023 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010024else
Martin v. Löwis11437992002-04-12 09:54:03 +000010025 echo "$as_me: failed program was:" >&5
10026cat conftest.$ac_ext >&5
10027ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010028fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010029rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10030LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010031fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010032echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10033echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10034if test $ac_cv_lib_pthreads_pthread_create = yes; then
10035 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010036#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010037_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010038
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010039 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010040 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010041 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010042else
Greg Steinadf63d62000-07-05 10:38:09 +000010043
Martin v. Löwis11437992002-04-12 09:54:03 +000010044 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10045echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10046if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10047 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010048else
Martin v. Löwis11437992002-04-12 09:54:03 +000010049 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010050LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010051cat >conftest.$ac_ext <<_ACEOF
10052#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010053#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010054
Guido van Rossum49545951997-12-02 19:28:29 +000010055/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010056#ifdef __cplusplus
10057extern "C"
10058#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010059/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010060 builtin and then its argument prototype would still apply. */
10061char pthread_create ();
10062#ifdef F77_DUMMY_MAIN
10063# ifdef __cplusplus
10064 extern "C"
10065# endif
10066 int F77_DUMMY_MAIN() { return 1; }
10067#endif
10068int
10069main ()
10070{
10071pthread_create ();
10072 ;
10073 return 0;
10074}
10075_ACEOF
10076rm -f conftest.$ac_objext conftest$ac_exeext
10077if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10078 (eval $ac_link) 2>&5
10079 ac_status=$?
10080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10081 (exit $ac_status); } &&
10082 { ac_try='test -s conftest$ac_exeext'
10083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10084 (eval $ac_try) 2>&5
10085 ac_status=$?
10086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10087 (exit $ac_status); }; }; then
10088 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010089else
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 echo "$as_me: failed program was:" >&5
10091cat conftest.$ac_ext >&5
10092ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010093fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010094rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10095LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010096fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010097echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10098echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10099if test $ac_cv_lib_c_r_pthread_create = yes; then
10100 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010101#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010102_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010103
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010104 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010105 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010106 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010107else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010108
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10110echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10111if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10112 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010113else
Martin v. Löwis11437992002-04-12 09:54:03 +000010114 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010115LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010116cat >conftest.$ac_ext <<_ACEOF
10117#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010118#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010119
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010120/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010121#ifdef __cplusplus
10122extern "C"
10123#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010124/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 builtin and then its argument prototype would still apply. */
10126char __d6_pthread_create ();
10127#ifdef F77_DUMMY_MAIN
10128# ifdef __cplusplus
10129 extern "C"
10130# endif
10131 int F77_DUMMY_MAIN() { return 1; }
10132#endif
10133int
10134main ()
10135{
10136__d6_pthread_create ();
10137 ;
10138 return 0;
10139}
10140_ACEOF
10141rm -f conftest.$ac_objext conftest$ac_exeext
10142if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10143 (eval $ac_link) 2>&5
10144 ac_status=$?
10145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10146 (exit $ac_status); } &&
10147 { ac_try='test -s conftest$ac_exeext'
10148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10149 (eval $ac_try) 2>&5
10150 ac_status=$?
10151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10152 (exit $ac_status); }; }; then
10153 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010154else
Martin v. Löwis11437992002-04-12 09:54:03 +000010155 echo "$as_me: failed program was:" >&5
10156cat conftest.$ac_ext >&5
10157ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010158fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010159rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10160LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010161fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010162echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10163echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10164if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10165 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010166#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010167_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010168
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010169 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010170 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010171 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010172else
Guido van Rossum49545951997-12-02 19:28:29 +000010173
Martin v. Löwis11437992002-04-12 09:54:03 +000010174 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10175echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10176if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10177 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010178else
Martin v. Löwis11437992002-04-12 09:54:03 +000010179 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010180LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010181cat >conftest.$ac_ext <<_ACEOF
10182#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010183#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010184
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010185/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010186#ifdef __cplusplus
10187extern "C"
10188#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010189/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010190 builtin and then its argument prototype would still apply. */
10191char __pthread_create_system ();
10192#ifdef F77_DUMMY_MAIN
10193# ifdef __cplusplus
10194 extern "C"
10195# endif
10196 int F77_DUMMY_MAIN() { return 1; }
10197#endif
10198int
10199main ()
10200{
10201__pthread_create_system ();
10202 ;
10203 return 0;
10204}
10205_ACEOF
10206rm -f conftest.$ac_objext conftest$ac_exeext
10207if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10208 (eval $ac_link) 2>&5
10209 ac_status=$?
10210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10211 (exit $ac_status); } &&
10212 { ac_try='test -s conftest$ac_exeext'
10213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10214 (eval $ac_try) 2>&5
10215 ac_status=$?
10216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10217 (exit $ac_status); }; }; then
10218 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010219else
Martin v. Löwis11437992002-04-12 09:54:03 +000010220 echo "$as_me: failed program was:" >&5
10221cat conftest.$ac_ext >&5
10222ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010223fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010224rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10225LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010226fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010227echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10228echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10229if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10230 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010231#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010232_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010233
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010234 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010235 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010236 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010237else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010238
Martin v. Löwis11437992002-04-12 09:54:03 +000010239 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10240echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10241if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10242 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010243else
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010245LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010246cat >conftest.$ac_ext <<_ACEOF
10247#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010248#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010249
Guido van Rossumb93a8621998-05-07 13:27:32 +000010250/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010251#ifdef __cplusplus
10252extern "C"
10253#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010254/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010255 builtin and then its argument prototype would still apply. */
10256char pthread_create ();
10257#ifdef F77_DUMMY_MAIN
10258# ifdef __cplusplus
10259 extern "C"
10260# endif
10261 int F77_DUMMY_MAIN() { return 1; }
10262#endif
10263int
10264main ()
10265{
10266pthread_create ();
10267 ;
10268 return 0;
10269}
10270_ACEOF
10271rm -f conftest.$ac_objext conftest$ac_exeext
10272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10273 (eval $ac_link) 2>&5
10274 ac_status=$?
10275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10276 (exit $ac_status); } &&
10277 { ac_try='test -s conftest$ac_exeext'
10278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10279 (eval $ac_try) 2>&5
10280 ac_status=$?
10281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10282 (exit $ac_status); }; }; then
10283 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010284else
Martin v. Löwis11437992002-04-12 09:54:03 +000010285 echo "$as_me: failed program was:" >&5
10286cat conftest.$ac_ext >&5
10287ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010288fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010289rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10290LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010291fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010292echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10293echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10294if test $ac_cv_lib_cma_pthread_create = yes; then
10295 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010296#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010297_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010298
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010299 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010300 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010301 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010302else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010303
Martin v. Löwis130fb172001-07-19 11:00:41 +000010304 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010305fi
10306
Guido van Rossum627b2d71993-12-24 10:39:16 +000010307
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010308fi
10309
Guido van Rossum0be3e491997-05-22 20:33:33 +000010310fi
10311
Guido van Rossum49545951997-12-02 19:28:29 +000010312fi
10313
Guido van Rossumb93a8621998-05-07 13:27:32 +000010314fi
10315
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010316fi
10317
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010318
Michael W. Hudson54241132001-12-07 15:38:26 +000010319fi
10320
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010321fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010322rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10323fi;
10324fi
10325
10326
10327fi
10328
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010329
Michael W. Hudson54241132001-12-07 15:38:26 +000010330
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010331 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010332 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010333
10334cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010335#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010336_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010337
10338 fi
10339
Martin v. Löwis11437992002-04-12 09:54:03 +000010340 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10341echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10342 if test "${ac_cv_pthread_system_supported+set}" = set; then
10343 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010344else
10345 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010346 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010347else
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 cat >conftest.$ac_ext <<_ACEOF
10349#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010350#include "confdefs.h"
10351#include <pthread.h>
10352 void *foo(void *parm) {
10353 return NULL;
10354 }
10355 main() {
10356 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010357 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010358 if (pthread_attr_init(&attr)) exit(-1);
10359 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010360 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010361 exit(0);
10362 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010363_ACEOF
10364rm -f conftest$ac_exeext
10365if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10366 (eval $ac_link) 2>&5
10367 ac_status=$?
10368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10369 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10371 (eval $ac_try) 2>&5
10372 ac_status=$?
10373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10374 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010375 ac_cv_pthread_system_supported=yes
10376else
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 echo "$as_me: program exited with status $ac_status" >&5
10378echo "$as_me: failed program was:" >&5
10379cat conftest.$ac_ext >&5
10380( exit $ac_status )
10381ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010382fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010383rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010384fi
10385
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010386fi
10387
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10389echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010390 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010391
10392cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010393#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010394_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010395
10396 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010397
10398for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010399do
Martin v. Löwis11437992002-04-12 09:54:03 +000010400as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10401echo "$as_me:$LINENO: checking for $ac_func" >&5
10402echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10403if eval "test \"\${$as_ac_var+set}\" = set"; then
10404 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010405else
Martin v. Löwis11437992002-04-12 09:54:03 +000010406 cat >conftest.$ac_ext <<_ACEOF
10407#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010408#include "confdefs.h"
10409/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010411#include <assert.h>
10412/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010413#ifdef __cplusplus
10414extern "C"
10415#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010416/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 builtin and then its argument prototype would still apply. */
10418char $ac_func ();
10419char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010420
Martin v. Löwis11437992002-04-12 09:54:03 +000010421#ifdef F77_DUMMY_MAIN
10422# ifdef __cplusplus
10423 extern "C"
10424# endif
10425 int F77_DUMMY_MAIN() { return 1; }
10426#endif
10427int
10428main ()
10429{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010430/* The GNU C library defines this for functions which it implements
10431 to always fail with ENOSYS. Some functions are actually named
10432 something starting with __ and the normal name is an alias. */
10433#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10434choke me
10435#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010436f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010437#endif
10438
Martin v. Löwis11437992002-04-12 09:54:03 +000010439 ;
10440 return 0;
10441}
10442_ACEOF
10443rm -f conftest.$ac_objext conftest$ac_exeext
10444if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10445 (eval $ac_link) 2>&5
10446 ac_status=$?
10447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10448 (exit $ac_status); } &&
10449 { ac_try='test -s conftest$ac_exeext'
10450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10451 (eval $ac_try) 2>&5
10452 ac_status=$?
10453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10454 (exit $ac_status); }; }; then
10455 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010456else
Martin v. Löwis11437992002-04-12 09:54:03 +000010457 echo "$as_me: failed program was:" >&5
10458cat conftest.$ac_ext >&5
10459eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010460fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010461rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010462fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010463echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10464echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10465if test `eval echo '${'$as_ac_var'}'` = yes; then
10466 cat >>confdefs.h <<_ACEOF
10467#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10468_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010469
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010470fi
10471done
10472
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010473 fi
10474
Martin v. Löwis11437992002-04-12 09:54:03 +000010475 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10476echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10477if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10478 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010479else
Martin v. Löwis11437992002-04-12 09:54:03 +000010480 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010481LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010482cat >conftest.$ac_ext <<_ACEOF
10483#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010484#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010485
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010486/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010487#ifdef __cplusplus
10488extern "C"
10489#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010490/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010491 builtin and then its argument prototype would still apply. */
10492char usconfig ();
10493#ifdef F77_DUMMY_MAIN
10494# ifdef __cplusplus
10495 extern "C"
10496# endif
10497 int F77_DUMMY_MAIN() { return 1; }
10498#endif
10499int
10500main ()
10501{
10502usconfig ();
10503 ;
10504 return 0;
10505}
10506_ACEOF
10507rm -f conftest.$ac_objext conftest$ac_exeext
10508if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10509 (eval $ac_link) 2>&5
10510 ac_status=$?
10511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10512 (exit $ac_status); } &&
10513 { ac_try='test -s conftest$ac_exeext'
10514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10515 (eval $ac_try) 2>&5
10516 ac_status=$?
10517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10518 (exit $ac_status); }; }; then
10519 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010520else
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 echo "$as_me: failed program was:" >&5
10522cat conftest.$ac_ext >&5
10523ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010524fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010525rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10526LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010527fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010528echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10529echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10530if test $ac_cv_lib_mpc_usconfig = yes; then
10531 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010532#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010533_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010534
Martin v. Löwis130fb172001-07-19 11:00:41 +000010535 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010536 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010537 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010538fi
10539
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010540
Martin v. Löwis11437992002-04-12 09:54:03 +000010541 if test $posix_threads != "yes"; then
10542 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10543echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10544if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10545 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010546else
Martin v. Löwis11437992002-04-12 09:54:03 +000010547 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010548LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010549cat >conftest.$ac_ext <<_ACEOF
10550#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010551#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010552
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010553/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010554#ifdef __cplusplus
10555extern "C"
10556#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010557/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010558 builtin and then its argument prototype would still apply. */
10559char thr_create ();
10560#ifdef F77_DUMMY_MAIN
10561# ifdef __cplusplus
10562 extern "C"
10563# endif
10564 int F77_DUMMY_MAIN() { return 1; }
10565#endif
10566int
10567main ()
10568{
10569thr_create ();
10570 ;
10571 return 0;
10572}
10573_ACEOF
10574rm -f conftest.$ac_objext conftest$ac_exeext
10575if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10576 (eval $ac_link) 2>&5
10577 ac_status=$?
10578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10579 (exit $ac_status); } &&
10580 { ac_try='test -s conftest$ac_exeext'
10581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10582 (eval $ac_try) 2>&5
10583 ac_status=$?
10584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10585 (exit $ac_status); }; }; then
10586 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010587else
Martin v. Löwis11437992002-04-12 09:54:03 +000010588 echo "$as_me: failed program was:" >&5
10589cat conftest.$ac_ext >&5
10590ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010591fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010592rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10593LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010594fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010595echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10596echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10597if test $ac_cv_lib_thread_thr_create = yes; then
10598 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010599#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010600_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010601
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010602 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010603 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010604 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010605fi
10606
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010607 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010608
Martin v. Löwis130fb172001-07-19 11:00:41 +000010609 if test "$USE_THREAD_MODULE" != "#"
10610 then
10611 # If the above checks didn't disable threads, (at least) OSF1
10612 # needs this '-threads' argument during linking.
10613 case $ac_sys_system in
10614 OSF1) LDLAST=-threads;;
10615 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010616 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010617fi
10618
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010619# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010620
10621
10622echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10623echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010624# Check whether --enable-ipv6 or --disable-ipv6 was given.
10625if test "${enable_ipv6+set}" = set; then
10626 enableval="$enable_ipv6"
10627 case "$enableval" in
10628 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010629 echo "$as_me:$LINENO: result: no" >&5
10630echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010631 ipv6=no
10632 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010633 *) echo "$as_me:$LINENO: result: yes" >&5
10634echo "${ECHO_T}yes" >&6
10635 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010636#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010637_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010638
10639 ipv6=yes
10640 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010642else
Martin v. Löwis11437992002-04-12 09:54:03 +000010643
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010644 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010645 echo "$as_me:$LINENO: result: no" >&5
10646echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010647 ipv6=no
10648
10649else
Martin v. Löwis11437992002-04-12 09:54:03 +000010650 cat >conftest.$ac_ext <<_ACEOF
10651#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010652#include "confdefs.h"
10653 /* AF_INET6 available check */
10654#include <sys/types.h>
10655#include <sys/socket.h>
10656main()
10657{
10658 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10659 exit(1);
10660 else
10661 exit(0);
10662}
10663
Martin v. Löwis11437992002-04-12 09:54:03 +000010664_ACEOF
10665rm -f conftest$ac_exeext
10666if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10667 (eval $ac_link) 2>&5
10668 ac_status=$?
10669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10670 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10672 (eval $ac_try) 2>&5
10673 ac_status=$?
10674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10675 (exit $ac_status); }; }; then
10676 echo "$as_me:$LINENO: result: yes" >&5
10677echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010678 ipv6=yes
10679else
Martin v. Löwis11437992002-04-12 09:54:03 +000010680 echo "$as_me: program exited with status $ac_status" >&5
10681echo "$as_me: failed program was:" >&5
10682cat conftest.$ac_ext >&5
10683( exit $ac_status )
10684echo "$as_me:$LINENO: result: no" >&5
10685echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010686 ipv6=no
10687fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010688rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010689fi
10690
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010691if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010692 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10693echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10694 cat >conftest.$ac_ext <<_ACEOF
10695#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010696#include "confdefs.h"
10697#include <sys/types.h>
10698#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010699#ifdef F77_DUMMY_MAIN
10700# ifdef __cplusplus
10701 extern "C"
10702# endif
10703 int F77_DUMMY_MAIN() { return 1; }
10704#endif
10705int
10706main ()
10707{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010708struct sockaddr_in6 x;
10709x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010710 ;
10711 return 0;
10712}
10713_ACEOF
10714rm -f conftest.$ac_objext
10715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10716 (eval $ac_compile) 2>&5
10717 ac_status=$?
10718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10719 (exit $ac_status); } &&
10720 { ac_try='test -s conftest.$ac_objext'
10721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10722 (eval $ac_try) 2>&5
10723 ac_status=$?
10724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10725 (exit $ac_status); }; }; then
10726 echo "$as_me:$LINENO: result: yes" >&5
10727echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010728 ipv6=yes
10729else
Martin v. Löwis11437992002-04-12 09:54:03 +000010730 echo "$as_me: failed program was:" >&5
10731cat conftest.$ac_ext >&5
10732echo "$as_me:$LINENO: result: no" >&5
10733echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010734 ipv6=no
10735fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010736rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010737fi
10738
10739if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010740 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010741#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010742_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010743
10744fi
10745
Martin v. Löwis11437992002-04-12 09:54:03 +000010746fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010747
10748ipv6type=unknown
10749ipv6lib=none
10750ipv6trylibc=no
10751
10752if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010753 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10754echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010755 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10756 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010757 case $i in
10758 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010759 cat >conftest.$ac_ext <<_ACEOF
10760#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010761#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010762
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763#include <netinet/in.h>
10764#ifdef IPV6_INRIA_VERSION
10765yes
10766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010767_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010768if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10769 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010770 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010771fi
10772rm -f conftest*
10773
10774 ;;
10775 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010776 cat >conftest.$ac_ext <<_ACEOF
10777#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010779
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010780#include <netinet/in.h>
10781#ifdef __KAME__
10782yes
10783#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010784_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10786 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787 ipv6type=$i;
10788 ipv6lib=inet6
10789 ipv6libdir=/usr/local/v6/lib
10790 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791fi
10792rm -f conftest*
10793
10794 ;;
10795 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010796 cat >conftest.$ac_ext <<_ACEOF
10797#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010799
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800#include <features.h>
10801#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10802yes
10803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010804_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10806 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807 ipv6type=$i;
10808 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809fi
10810rm -f conftest*
10811
10812 ;;
10813 linux-inet6)
10814 if test -d /usr/inet6; then
10815 ipv6type=$i
10816 ipv6lib=inet6
10817 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010818 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819 fi
10820 ;;
10821 solaris)
10822 if test -f /etc/netconfig; then
10823 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10824 ipv6type=$i
10825 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010826 fi
10827 fi
10828 ;;
10829 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010830 cat >conftest.$ac_ext <<_ACEOF
10831#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010832#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010833
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010834#include <sys/param.h>
10835#ifdef _TOSHIBA_INET6
10836yes
10837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010838_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10840 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841 ipv6type=$i;
10842 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010843 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844fi
10845rm -f conftest*
10846
10847 ;;
10848 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000010849 cat >conftest.$ac_ext <<_ACEOF
10850#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010852
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010853#include </usr/local/v6/include/sys/v6config.h>
10854#ifdef __V6D__
10855yes
10856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010857_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10859 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860 ipv6type=$i;
10861 ipv6lib=v6;
10862 ipv6libdir=/usr/local/v6/lib;
10863 OPT="-I/usr/local/v6/include $OPT"
10864fi
10865rm -f conftest*
10866
10867 ;;
10868 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000010869 cat >conftest.$ac_ext <<_ACEOF
10870#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010871#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010872
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873#include <sys/param.h>
10874#ifdef _ZETA_MINAMI_INET6
10875yes
10876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010877_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010878if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10879 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880 ipv6type=$i;
10881 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010882 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010883fi
10884rm -f conftest*
10885
10886 ;;
10887 esac
10888 if test "$ipv6type" != "unknown"; then
10889 break
10890 fi
10891 done
Martin v. Löwis11437992002-04-12 09:54:03 +000010892 echo "$as_me:$LINENO: result: $ipv6type" >&5
10893echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010894fi
10895
10896if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10897 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10898 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10899 echo "using lib$ipv6lib"
10900 else
10901 if test $ipv6trylibc = "yes"; then
10902 echo "using libc"
10903 else
10904 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10905 echo "You need to fetch lib$ipv6lib.a from appropriate"
10906 echo 'ipv6 kit and compile beforehand.'
10907 exit 1
10908 fi
10909 fi
10910fi
10911
Barry Warsawef82cd72000-06-30 16:21:01 +000010912# Check for GC support
Martin v. Löwis11437992002-04-12 09:54:03 +000010913echo "$as_me:$LINENO: checking for --with-cycle-gc" >&5
10914echo $ECHO_N "checking for --with-cycle-gc... $ECHO_C" >&6
10915
Barry Warsawef82cd72000-06-30 16:21:01 +000010916# Check whether --with-cycle-gc or --without-cycle-gc was given.
10917if test "${with_cycle_gc+set}" = set; then
10918 withval="$with_cycle_gc"
Barry Warsawef82cd72000-06-30 16:21:01 +000010919
Martin v. Löwis11437992002-04-12 09:54:03 +000010920fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000010921
10922if test -z "$with_cycle_gc"
10923then with_cycle_gc="yes"
10924fi
Neil Schemenauercf229462001-08-29 23:58:47 +000010925if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +000010926then
Martin v. Löwis11437992002-04-12 09:54:03 +000010927
10928cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010929#define WITH_CYCLE_GC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010930_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010931
10932fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010933echo "$as_me:$LINENO: result: $with_cycle_gc" >&5
10934echo "${ECHO_T}$with_cycle_gc" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000010935
Neil Schemenauera35c6882001-02-27 04:45:05 +000010936# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000010937echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
10938echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
10939
Neil Schemenauera35c6882001-02-27 04:45:05 +000010940# Check whether --with-pymalloc or --without-pymalloc was given.
10941if test "${with_pymalloc+set}" = set; then
10942 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000010943
Martin v. Löwis11437992002-04-12 09:54:03 +000010944fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000010945
Neil Schemenauer16c22972002-03-22 15:34:49 +000010946if test -z "$with_pymalloc"
10947then with_pymalloc="yes"
10948fi
10949if test "$with_pymalloc" != "no"
10950then
Martin v. Löwis11437992002-04-12 09:54:03 +000010951
10952cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000010953#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010954_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000010955
10956fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010957echo "$as_me:$LINENO: result: $with_pymalloc" >&5
10958echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000010959
Barry Warsawef82cd72000-06-30 16:21:01 +000010960# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000010961echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
10962echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
10963
Barry Warsawef82cd72000-06-30 16:21:01 +000010964# Check whether --with-wctype-functions or --without-wctype-functions was given.
10965if test "${with_wctype_functions+set}" = set; then
10966 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000010967
Barry Warsawef82cd72000-06-30 16:21:01 +000010968if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010969then
10970
10971cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010972#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010973_ACEOF
10974
10975 echo "$as_me:$LINENO: result: yes" >&5
10976echo "${ECHO_T}yes" >&6
10977else echo "$as_me:$LINENO: result: no" >&5
10978echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000010979fi
10980else
Martin v. Löwis11437992002-04-12 09:54:03 +000010981 echo "$as_me:$LINENO: result: no" >&5
10982echo "${ECHO_T}no" >&6
10983fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000010984
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010985# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010986
Guido van Rossum98935bf2001-09-05 19:13:16 +000010987DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010988
Martin v. Löwis11437992002-04-12 09:54:03 +000010989echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
10990echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
10991
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010992# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010993if test "${with_sgi_dl+set}" = set; then
10994 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000010995
10996echo "$as_me:$LINENO: result: $withval" >&5
10997echo "${ECHO_T}$withval" >&6
10998
10999cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011000#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011001_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011002
Guido van Rossume97ee181999-12-20 21:27:22 +000011003DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011004dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011005if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011006then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011007else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11008echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11009 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011010fi
11011DLINCLDIR=${dldir}
11012LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011013else
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 echo "$as_me:$LINENO: result: no" >&5
11015echo "${ECHO_T}no" >&6
11016fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011017
Martin v. Löwis11437992002-04-12 09:54:03 +000011018echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11019echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011020
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011021# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011022if test "${with_dl_dld+set}" = set; then
11023 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011024
11025echo "$as_me:$LINENO: result: $withval" >&5
11026echo "${ECHO_T}$withval" >&6
11027
11028cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011029#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011030_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011031
Guido van Rossume97ee181999-12-20 21:27:22 +000011032DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011033dldir=`echo "$withval" | sed 's/,.*//'`
11034dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011035if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011036then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011037else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11038echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11039 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011040fi
11041DLINCLDIR=${dldir}
11042LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011043else
Martin v. Löwis11437992002-04-12 09:54:03 +000011044 echo "$as_me:$LINENO: result: no" >&5
11045echo "${ECHO_T}no" >&6
11046fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011047
Guido van Rossume97ee181999-12-20 21:27:22 +000011048# the dlopen() function means we might want to use dynload_shlib.o. some
11049# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011050
Thomas Wouters3a584202000-08-05 23:28:51 +000011051for ac_func in dlopen
11052do
Martin v. Löwis11437992002-04-12 09:54:03 +000011053as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11054echo "$as_me:$LINENO: checking for $ac_func" >&5
11055echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11056if eval "test \"\${$as_ac_var+set}\" = set"; then
11057 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011058else
Martin v. Löwis11437992002-04-12 09:54:03 +000011059 cat >conftest.$ac_ext <<_ACEOF
11060#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011061#include "confdefs.h"
11062/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011063 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011064#include <assert.h>
11065/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011066#ifdef __cplusplus
11067extern "C"
11068#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011069/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011070 builtin and then its argument prototype would still apply. */
11071char $ac_func ();
11072char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011073
Martin v. Löwis11437992002-04-12 09:54:03 +000011074#ifdef F77_DUMMY_MAIN
11075# ifdef __cplusplus
11076 extern "C"
11077# endif
11078 int F77_DUMMY_MAIN() { return 1; }
11079#endif
11080int
11081main ()
11082{
Guido van Rossume97ee181999-12-20 21:27:22 +000011083/* The GNU C library defines this for functions which it implements
11084 to always fail with ENOSYS. Some functions are actually named
11085 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011086#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011087choke me
11088#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011089f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011090#endif
11091
Martin v. Löwis11437992002-04-12 09:54:03 +000011092 ;
11093 return 0;
11094}
11095_ACEOF
11096rm -f conftest.$ac_objext conftest$ac_exeext
11097if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11098 (eval $ac_link) 2>&5
11099 ac_status=$?
11100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11101 (exit $ac_status); } &&
11102 { ac_try='test -s conftest$ac_exeext'
11103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11104 (eval $ac_try) 2>&5
11105 ac_status=$?
11106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11107 (exit $ac_status); }; }; then
11108 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011109else
Martin v. Löwis11437992002-04-12 09:54:03 +000011110 echo "$as_me: failed program was:" >&5
11111cat conftest.$ac_ext >&5
11112eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011113fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011114rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011115fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011116echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11117echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11118if test `eval echo '${'$as_ac_var'}'` = yes; then
11119 cat >>confdefs.h <<_ACEOF
11120#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11121_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011122
Guido van Rossume97ee181999-12-20 21:27:22 +000011123fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011124done
Guido van Rossume97ee181999-12-20 21:27:22 +000011125
Michael W. Hudson54241132001-12-07 15:38:26 +000011126
Guido van Rossume97ee181999-12-20 21:27:22 +000011127# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11128# loading of modules.
11129
Martin v. Löwis11437992002-04-12 09:54:03 +000011130echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11131echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011132if test -z "$DYNLOADFILE"
11133then
11134 case $ac_sys_system/$ac_sys_release in
11135 AIX*) DYNLOADFILE="dynload_aix.o";;
11136 BeOS*) DYNLOADFILE="dynload_beos.o";;
11137 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011138 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011139 *)
11140 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11141 # out any dynamic loading
11142 if test "$ac_cv_func_dlopen" = yes
11143 then DYNLOADFILE="dynload_shlib.o"
11144 else DYNLOADFILE="dynload_stub.o"
11145 fi
11146 ;;
11147 esac
11148fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011149echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11150echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011151if test "$DYNLOADFILE" != "dynload_stub.o"
11152then
Martin v. Löwis11437992002-04-12 09:54:03 +000011153
11154cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011155#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011156_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011157
11158fi
11159
Neil Schemenauer4e425612001-06-19 15:44:15 +000011160# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11161
Michael W. Hudson54241132001-12-07 15:38:26 +000011162
Martin v. Löwis11437992002-04-12 09:54:03 +000011163echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11164echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011165if test -z "$MACHDEP_OBJS"
11166then
Jack Jansene578a632001-08-15 01:27:14 +000011167 MACHDEP_OBJS=$extra_machdep_objs
11168else
11169 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011170fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011171echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11172echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011173
Guido van Rossum627b2d71993-12-24 10:39:16 +000011174# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
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
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011248
Martin v. Löwis244edc82001-10-04 22:44:26 +000011249for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +000011250 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +000011251 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011252 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011253 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011254 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011255 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011256 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +000011257 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +000011258 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011259 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011260do
Martin v. Löwis11437992002-04-12 09:54:03 +000011261as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11262echo "$as_me:$LINENO: checking for $ac_func" >&5
11263echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11264if eval "test \"\${$as_ac_var+set}\" = set"; then
11265 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011266else
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 cat >conftest.$ac_ext <<_ACEOF
11268#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011269#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011270/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011271 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011272#include <assert.h>
11273/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011274#ifdef __cplusplus
11275extern "C"
11276#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011277/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011278 builtin and then its argument prototype would still apply. */
11279char $ac_func ();
11280char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011281
Martin v. Löwis11437992002-04-12 09:54:03 +000011282#ifdef F77_DUMMY_MAIN
11283# ifdef __cplusplus
11284 extern "C"
11285# endif
11286 int F77_DUMMY_MAIN() { return 1; }
11287#endif
11288int
11289main ()
11290{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011291/* The GNU C library defines this for functions which it implements
11292 to always fail with ENOSYS. Some functions are actually named
11293 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011294#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011295choke me
11296#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011297f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011298#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011299
Martin v. Löwis11437992002-04-12 09:54:03 +000011300 ;
11301 return 0;
11302}
11303_ACEOF
11304rm -f conftest.$ac_objext conftest$ac_exeext
11305if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11306 (eval $ac_link) 2>&5
11307 ac_status=$?
11308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11309 (exit $ac_status); } &&
11310 { ac_try='test -s conftest$ac_exeext'
11311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11312 (eval $ac_try) 2>&5
11313 ac_status=$?
11314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11315 (exit $ac_status); }; }; then
11316 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011317else
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 echo "$as_me: failed program was:" >&5
11319cat conftest.$ac_ext >&5
11320eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011321fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011322rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011324echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11325echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11326if test `eval echo '${'$as_ac_var'}'` = yes; then
11327 cat >>confdefs.h <<_ACEOF
11328#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11329_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011330
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011331fi
11332done
11333
Michael W. Hudson54241132001-12-07 15:38:26 +000011334
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011335# check for openpty and forkpty
11336
Martin v. Löwis11437992002-04-12 09:54:03 +000011337
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011338for ac_func in openpty
11339do
Martin v. Löwis11437992002-04-12 09:54:03 +000011340as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11341echo "$as_me:$LINENO: checking for $ac_func" >&5
11342echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11343if eval "test \"\${$as_ac_var+set}\" = set"; then
11344 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011345else
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 cat >conftest.$ac_ext <<_ACEOF
11347#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011348#include "confdefs.h"
11349/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011351#include <assert.h>
11352/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011353#ifdef __cplusplus
11354extern "C"
11355#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011356/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 builtin and then its argument prototype would still apply. */
11358char $ac_func ();
11359char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011360
Martin v. Löwis11437992002-04-12 09:54:03 +000011361#ifdef F77_DUMMY_MAIN
11362# ifdef __cplusplus
11363 extern "C"
11364# endif
11365 int F77_DUMMY_MAIN() { return 1; }
11366#endif
11367int
11368main ()
11369{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011370/* The GNU C library defines this for functions which it implements
11371 to always fail with ENOSYS. Some functions are actually named
11372 something starting with __ and the normal name is an alias. */
11373#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11374choke me
11375#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011376f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011377#endif
11378
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 ;
11380 return 0;
11381}
11382_ACEOF
11383rm -f conftest.$ac_objext conftest$ac_exeext
11384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11385 (eval $ac_link) 2>&5
11386 ac_status=$?
11387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11388 (exit $ac_status); } &&
11389 { ac_try='test -s conftest$ac_exeext'
11390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11391 (eval $ac_try) 2>&5
11392 ac_status=$?
11393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11394 (exit $ac_status); }; }; then
11395 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011396else
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 echo "$as_me: failed program was:" >&5
11398cat conftest.$ac_ext >&5
11399eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011400fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011401rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011402fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011403echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11404echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11405if test `eval echo '${'$as_ac_var'}'` = yes; then
11406 cat >>confdefs.h <<_ACEOF
11407#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11408_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011409
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011410else
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11412echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11413if test "${ac_cv_lib_util_openpty+set}" = set; then
11414 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011415else
Martin v. Löwis11437992002-04-12 09:54:03 +000011416 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011417LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011418cat >conftest.$ac_ext <<_ACEOF
11419#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011420#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011421
Fred Drake8cef4cf2000-06-28 16:40:38 +000011422/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011423#ifdef __cplusplus
11424extern "C"
11425#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011426/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 builtin and then its argument prototype would still apply. */
11428char openpty ();
11429#ifdef F77_DUMMY_MAIN
11430# ifdef __cplusplus
11431 extern "C"
11432# endif
11433 int F77_DUMMY_MAIN() { return 1; }
11434#endif
11435int
11436main ()
11437{
11438openpty ();
11439 ;
11440 return 0;
11441}
11442_ACEOF
11443rm -f conftest.$ac_objext conftest$ac_exeext
11444if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11445 (eval $ac_link) 2>&5
11446 ac_status=$?
11447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11448 (exit $ac_status); } &&
11449 { ac_try='test -s conftest$ac_exeext'
11450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11451 (eval $ac_try) 2>&5
11452 ac_status=$?
11453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11454 (exit $ac_status); }; }; then
11455 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011456else
Martin v. Löwis11437992002-04-12 09:54:03 +000011457 echo "$as_me: failed program was:" >&5
11458cat conftest.$ac_ext >&5
11459ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011460fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011461rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11462LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011463fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011464echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11465echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11466if test $ac_cv_lib_util_openpty = yes; then
11467 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011468#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011469_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011470 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011471fi
11472
11473fi
11474done
11475
Martin v. Löwis11437992002-04-12 09:54:03 +000011476
Fred Drake8cef4cf2000-06-28 16:40:38 +000011477for ac_func in forkpty
11478do
Martin v. Löwis11437992002-04-12 09:54:03 +000011479as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11480echo "$as_me:$LINENO: checking for $ac_func" >&5
11481echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11482if eval "test \"\${$as_ac_var+set}\" = set"; then
11483 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011484else
Martin v. Löwis11437992002-04-12 09:54:03 +000011485 cat >conftest.$ac_ext <<_ACEOF
11486#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011487#include "confdefs.h"
11488/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011489 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011490#include <assert.h>
11491/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011492#ifdef __cplusplus
11493extern "C"
11494#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011495/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011496 builtin and then its argument prototype would still apply. */
11497char $ac_func ();
11498char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011499
Martin v. Löwis11437992002-04-12 09:54:03 +000011500#ifdef F77_DUMMY_MAIN
11501# ifdef __cplusplus
11502 extern "C"
11503# endif
11504 int F77_DUMMY_MAIN() { return 1; }
11505#endif
11506int
11507main ()
11508{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011509/* The GNU C library defines this for functions which it implements
11510 to always fail with ENOSYS. Some functions are actually named
11511 something starting with __ and the normal name is an alias. */
11512#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11513choke me
11514#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011515f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011516#endif
11517
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 ;
11519 return 0;
11520}
11521_ACEOF
11522rm -f conftest.$ac_objext conftest$ac_exeext
11523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11524 (eval $ac_link) 2>&5
11525 ac_status=$?
11526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11527 (exit $ac_status); } &&
11528 { ac_try='test -s conftest$ac_exeext'
11529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11530 (eval $ac_try) 2>&5
11531 ac_status=$?
11532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11533 (exit $ac_status); }; }; then
11534 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011535else
Martin v. Löwis11437992002-04-12 09:54:03 +000011536 echo "$as_me: failed program was:" >&5
11537cat conftest.$ac_ext >&5
11538eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011539fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011540rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011541fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011542echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11543echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11544if test `eval echo '${'$as_ac_var'}'` = yes; then
11545 cat >>confdefs.h <<_ACEOF
11546#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11547_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011548
Fred Drake8cef4cf2000-06-28 16:40:38 +000011549else
Martin v. Löwis11437992002-04-12 09:54:03 +000011550 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11551echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11552if test "${ac_cv_lib_util_forkpty+set}" = set; then
11553 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011554else
Martin v. Löwis11437992002-04-12 09:54:03 +000011555 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011556LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011557cat >conftest.$ac_ext <<_ACEOF
11558#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011559#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011560
Fred Drake8cef4cf2000-06-28 16:40:38 +000011561/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011562#ifdef __cplusplus
11563extern "C"
11564#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011565/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011566 builtin and then its argument prototype would still apply. */
11567char forkpty ();
11568#ifdef F77_DUMMY_MAIN
11569# ifdef __cplusplus
11570 extern "C"
11571# endif
11572 int F77_DUMMY_MAIN() { return 1; }
11573#endif
11574int
11575main ()
11576{
11577forkpty ();
11578 ;
11579 return 0;
11580}
11581_ACEOF
11582rm -f conftest.$ac_objext conftest$ac_exeext
11583if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11584 (eval $ac_link) 2>&5
11585 ac_status=$?
11586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11587 (exit $ac_status); } &&
11588 { ac_try='test -s conftest$ac_exeext'
11589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11590 (eval $ac_try) 2>&5
11591 ac_status=$?
11592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11593 (exit $ac_status); }; }; then
11594 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011595else
Martin v. Löwis11437992002-04-12 09:54:03 +000011596 echo "$as_me: failed program was:" >&5
11597cat conftest.$ac_ext >&5
11598ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011599fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011600rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11601LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011602fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011603echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11604echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11605if test $ac_cv_lib_util_forkpty = yes; then
11606 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011607#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011608_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011609 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011610fi
11611
11612fi
11613done
11614
Jack Jansendd19cf82001-12-06 22:36:17 +000011615
Michael W. Hudson54241132001-12-07 15:38:26 +000011616# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011617
11618
11619
11620
11621
11622
Fred Drake8cef4cf2000-06-28 16:40:38 +000011623for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11624do
Martin v. Löwis11437992002-04-12 09:54:03 +000011625as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11626echo "$as_me:$LINENO: checking for $ac_func" >&5
11627echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11628if eval "test \"\${$as_ac_var+set}\" = set"; then
11629 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011630else
Martin v. Löwis11437992002-04-12 09:54:03 +000011631 cat >conftest.$ac_ext <<_ACEOF
11632#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011633#include "confdefs.h"
11634/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011635 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011636#include <assert.h>
11637/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011638#ifdef __cplusplus
11639extern "C"
11640#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011641/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011642 builtin and then its argument prototype would still apply. */
11643char $ac_func ();
11644char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011645
Martin v. Löwis11437992002-04-12 09:54:03 +000011646#ifdef F77_DUMMY_MAIN
11647# ifdef __cplusplus
11648 extern "C"
11649# endif
11650 int F77_DUMMY_MAIN() { return 1; }
11651#endif
11652int
11653main ()
11654{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011655/* The GNU C library defines this for functions which it implements
11656 to always fail with ENOSYS. Some functions are actually named
11657 something starting with __ and the normal name is an alias. */
11658#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11659choke me
11660#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011661f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011662#endif
11663
Martin v. Löwis11437992002-04-12 09:54:03 +000011664 ;
11665 return 0;
11666}
11667_ACEOF
11668rm -f conftest.$ac_objext conftest$ac_exeext
11669if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11670 (eval $ac_link) 2>&5
11671 ac_status=$?
11672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11673 (exit $ac_status); } &&
11674 { ac_try='test -s conftest$ac_exeext'
11675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11676 (eval $ac_try) 2>&5
11677 ac_status=$?
11678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11679 (exit $ac_status); }; }; then
11680 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011681else
Martin v. Löwis11437992002-04-12 09:54:03 +000011682 echo "$as_me: failed program was:" >&5
11683cat conftest.$ac_ext >&5
11684eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011685fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011686rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011687fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011688echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11689echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11690if test `eval echo '${'$as_ac_var'}'` = yes; then
11691 cat >>confdefs.h <<_ACEOF
11692#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11693_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011694
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011695fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011696done
11697
Michael W. Hudson54241132001-12-07 15:38:26 +000011698
Martin v. Löwis11437992002-04-12 09:54:03 +000011699
11700
11701
11702
11703
Martin v. Löwis1142de32002-03-29 16:28:31 +000011704for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011705do
Martin v. Löwis11437992002-04-12 09:54:03 +000011706as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11707echo "$as_me:$LINENO: checking for $ac_func" >&5
11708echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11709if eval "test \"\${$as_ac_var+set}\" = set"; then
11710 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011711else
Martin v. Löwis11437992002-04-12 09:54:03 +000011712 cat >conftest.$ac_ext <<_ACEOF
11713#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011714#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011715/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011716 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011717#include <assert.h>
11718/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011719#ifdef __cplusplus
11720extern "C"
11721#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011722/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011723 builtin and then its argument prototype would still apply. */
11724char $ac_func ();
11725char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011726
Martin v. Löwis11437992002-04-12 09:54:03 +000011727#ifdef F77_DUMMY_MAIN
11728# ifdef __cplusplus
11729 extern "C"
11730# endif
11731 int F77_DUMMY_MAIN() { return 1; }
11732#endif
11733int
11734main ()
11735{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011736/* The GNU C library defines this for functions which it implements
11737 to always fail with ENOSYS. Some functions are actually named
11738 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011739#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011740choke me
11741#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011742f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011743#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011744
Martin v. Löwis11437992002-04-12 09:54:03 +000011745 ;
11746 return 0;
11747}
11748_ACEOF
11749rm -f conftest.$ac_objext conftest$ac_exeext
11750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11751 (eval $ac_link) 2>&5
11752 ac_status=$?
11753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11754 (exit $ac_status); } &&
11755 { ac_try='test -s conftest$ac_exeext'
11756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11757 (eval $ac_try) 2>&5
11758 ac_status=$?
11759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11760 (exit $ac_status); }; }; then
11761 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011762else
Martin v. Löwis11437992002-04-12 09:54:03 +000011763 echo "$as_me: failed program was:" >&5
11764cat conftest.$ac_ext >&5
11765eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011766fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011767rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011768fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011769echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11770echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11771if test `eval echo '${'$as_ac_var'}'` = yes; then
11772 cat >>confdefs.h <<_ACEOF
11773#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11774_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011775
Martin v. Löwis1142de32002-03-29 16:28:31 +000011776else
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011778fi
11779done
11780
11781
Martin v. Löwis11437992002-04-12 09:54:03 +000011782
Martin v. Löwis1142de32002-03-29 16:28:31 +000011783for ac_func in getpgrp
11784do
Martin v. Löwis11437992002-04-12 09:54:03 +000011785as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11786echo "$as_me:$LINENO: checking for $ac_func" >&5
11787echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11788if eval "test \"\${$as_ac_var+set}\" = set"; then
11789 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011790else
Martin v. Löwis11437992002-04-12 09:54:03 +000011791 cat >conftest.$ac_ext <<_ACEOF
11792#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011793#include "confdefs.h"
11794/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011795 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011796#include <assert.h>
11797/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011798#ifdef __cplusplus
11799extern "C"
11800#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011801/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011802 builtin and then its argument prototype would still apply. */
11803char $ac_func ();
11804char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011805
Martin v. Löwis11437992002-04-12 09:54:03 +000011806#ifdef F77_DUMMY_MAIN
11807# ifdef __cplusplus
11808 extern "C"
11809# endif
11810 int F77_DUMMY_MAIN() { return 1; }
11811#endif
11812int
11813main ()
11814{
Martin v. Löwis1142de32002-03-29 16:28:31 +000011815/* The GNU C library defines this for functions which it implements
11816 to always fail with ENOSYS. Some functions are actually named
11817 something starting with __ and the normal name is an alias. */
11818#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11819choke me
11820#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011821f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000011822#endif
11823
Martin v. Löwis11437992002-04-12 09:54:03 +000011824 ;
11825 return 0;
11826}
11827_ACEOF
11828rm -f conftest.$ac_objext conftest$ac_exeext
11829if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11830 (eval $ac_link) 2>&5
11831 ac_status=$?
11832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11833 (exit $ac_status); } &&
11834 { ac_try='test -s conftest$ac_exeext'
11835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11836 (eval $ac_try) 2>&5
11837 ac_status=$?
11838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11839 (exit $ac_status); }; }; then
11840 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011841else
Martin v. Löwis11437992002-04-12 09:54:03 +000011842 echo "$as_me: failed program was:" >&5
11843cat conftest.$ac_ext >&5
11844eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011845fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011846rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011847fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011848echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11849echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11850if test `eval echo '${'$as_ac_var'}'` = yes; then
11851 cat >>confdefs.h <<_ACEOF
11852#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11853_ACEOF
11854 cat >conftest.$ac_ext <<_ACEOF
11855#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011856#include "confdefs.h"
11857#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011858#ifdef F77_DUMMY_MAIN
11859# ifdef __cplusplus
11860 extern "C"
11861# endif
11862 int F77_DUMMY_MAIN() { return 1; }
11863#endif
11864int
11865main ()
11866{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011867getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011868 ;
11869 return 0;
11870}
11871_ACEOF
11872rm -f conftest.$ac_objext
11873if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11874 (eval $ac_compile) 2>&5
11875 ac_status=$?
11876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11877 (exit $ac_status); } &&
11878 { ac_try='test -s conftest.$ac_objext'
11879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11880 (eval $ac_try) 2>&5
11881 ac_status=$?
11882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11883 (exit $ac_status); }; }; then
11884
11885cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011886#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011887_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011888
Martin v. Löwis11437992002-04-12 09:54:03 +000011889
Guido van Rossumf78abae1997-01-21 22:02:36 +000011890else
Martin v. Löwis11437992002-04-12 09:54:03 +000011891 echo "$as_me: failed program was:" >&5
11892cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000011893fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011894rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011895
Guido van Rossum627b2d71993-12-24 10:39:16 +000011896fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011897done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011898
Martin v. Löwis11437992002-04-12 09:54:03 +000011899
Thomas Wouters3a584202000-08-05 23:28:51 +000011900for ac_func in setpgrp
11901do
Martin v. Löwis11437992002-04-12 09:54:03 +000011902as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11903echo "$as_me:$LINENO: checking for $ac_func" >&5
11904echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11905if eval "test \"\${$as_ac_var+set}\" = set"; then
11906 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011907else
Martin v. Löwis11437992002-04-12 09:54:03 +000011908 cat >conftest.$ac_ext <<_ACEOF
11909#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011910#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011911/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011912 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011913#include <assert.h>
11914/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011915#ifdef __cplusplus
11916extern "C"
11917#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011918/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011919 builtin and then its argument prototype would still apply. */
11920char $ac_func ();
11921char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011922
Martin v. Löwis11437992002-04-12 09:54:03 +000011923#ifdef F77_DUMMY_MAIN
11924# ifdef __cplusplus
11925 extern "C"
11926# endif
11927 int F77_DUMMY_MAIN() { return 1; }
11928#endif
11929int
11930main ()
11931{
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011932/* The GNU C library defines this for functions which it implements
11933 to always fail with ENOSYS. Some functions are actually named
11934 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011935#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011936choke me
11937#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011938f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011939#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011940
Martin v. Löwis11437992002-04-12 09:54:03 +000011941 ;
11942 return 0;
11943}
11944_ACEOF
11945rm -f conftest.$ac_objext conftest$ac_exeext
11946if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11947 (eval $ac_link) 2>&5
11948 ac_status=$?
11949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11950 (exit $ac_status); } &&
11951 { ac_try='test -s conftest$ac_exeext'
11952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11953 (eval $ac_try) 2>&5
11954 ac_status=$?
11955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11956 (exit $ac_status); }; }; then
11957 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011958else
Martin v. Löwis11437992002-04-12 09:54:03 +000011959 echo "$as_me: failed program was:" >&5
11960cat conftest.$ac_ext >&5
11961eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011962fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011963rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011964fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011965echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11966echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11967if test `eval echo '${'$as_ac_var'}'` = yes; then
11968 cat >>confdefs.h <<_ACEOF
11969#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11970_ACEOF
11971 cat >conftest.$ac_ext <<_ACEOF
11972#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011973#include "confdefs.h"
11974#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011975#ifdef F77_DUMMY_MAIN
11976# ifdef __cplusplus
11977 extern "C"
11978# endif
11979 int F77_DUMMY_MAIN() { return 1; }
11980#endif
11981int
11982main ()
11983{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011984setpgrp(0,0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011985 ;
11986 return 0;
11987}
11988_ACEOF
11989rm -f conftest.$ac_objext
11990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11991 (eval $ac_compile) 2>&5
11992 ac_status=$?
11993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11994 (exit $ac_status); } &&
11995 { ac_try='test -s conftest.$ac_objext'
11996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11997 (eval $ac_try) 2>&5
11998 ac_status=$?
11999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12000 (exit $ac_status); }; }; then
12001
12002cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012003#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012004_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012005
Martin v. Löwis11437992002-04-12 09:54:03 +000012006
Guido van Rossumf78abae1997-01-21 22:02:36 +000012007else
Martin v. Löwis11437992002-04-12 09:54:03 +000012008 echo "$as_me: failed program was:" >&5
12009cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012010fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012011rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012012
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012013fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012014done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012015
Martin v. Löwis11437992002-04-12 09:54:03 +000012016
Thomas Wouters3a584202000-08-05 23:28:51 +000012017for ac_func in gettimeofday
12018do
Martin v. Löwis11437992002-04-12 09:54:03 +000012019as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12020echo "$as_me:$LINENO: checking for $ac_func" >&5
12021echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12022if eval "test \"\${$as_ac_var+set}\" = set"; then
12023 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012024else
Martin v. Löwis11437992002-04-12 09:54:03 +000012025 cat >conftest.$ac_ext <<_ACEOF
12026#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012027#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012028/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012030#include <assert.h>
12031/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012032#ifdef __cplusplus
12033extern "C"
12034#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012035/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012036 builtin and then its argument prototype would still apply. */
12037char $ac_func ();
12038char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012039
Martin v. Löwis11437992002-04-12 09:54:03 +000012040#ifdef F77_DUMMY_MAIN
12041# ifdef __cplusplus
12042 extern "C"
12043# endif
12044 int F77_DUMMY_MAIN() { return 1; }
12045#endif
12046int
12047main ()
12048{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012049/* The GNU C library defines this for functions which it implements
12050 to always fail with ENOSYS. Some functions are actually named
12051 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012052#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012053choke me
12054#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012055f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012056#endif
12057
Martin v. Löwis11437992002-04-12 09:54:03 +000012058 ;
12059 return 0;
12060}
12061_ACEOF
12062rm -f conftest.$ac_objext conftest$ac_exeext
12063if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12064 (eval $ac_link) 2>&5
12065 ac_status=$?
12066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12067 (exit $ac_status); } &&
12068 { ac_try='test -s conftest$ac_exeext'
12069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12070 (eval $ac_try) 2>&5
12071 ac_status=$?
12072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12073 (exit $ac_status); }; }; then
12074 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012075else
Martin v. Löwis11437992002-04-12 09:54:03 +000012076 echo "$as_me: failed program was:" >&5
12077cat conftest.$ac_ext >&5
12078eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012079fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012082echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12083echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12084if test `eval echo '${'$as_ac_var'}'` = yes; then
12085 cat >>confdefs.h <<_ACEOF
12086#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12087_ACEOF
12088 cat >conftest.$ac_ext <<_ACEOF
12089#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012090#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012091#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012092#ifdef F77_DUMMY_MAIN
12093# ifdef __cplusplus
12094 extern "C"
12095# endif
12096 int F77_DUMMY_MAIN() { return 1; }
12097#endif
12098int
12099main ()
12100{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012101gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012102 ;
12103 return 0;
12104}
12105_ACEOF
12106rm -f conftest.$ac_objext
12107if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12108 (eval $ac_compile) 2>&5
12109 ac_status=$?
12110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12111 (exit $ac_status); } &&
12112 { ac_try='test -s conftest.$ac_objext'
12113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12114 (eval $ac_try) 2>&5
12115 ac_status=$?
12116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12117 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012118 :
12119else
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 echo "$as_me: failed program was:" >&5
12121cat conftest.$ac_ext >&5
12122
12123cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012124#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012125_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012126
Martin v. Löwis11437992002-04-12 09:54:03 +000012127
Guido van Rossum627b2d71993-12-24 10:39:16 +000012128fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012129rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012130
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012131fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012132done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012133
Michael W. Hudson54241132001-12-07 15:38:26 +000012134
12135
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012136# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012137# for [no]getaddrinfo in netdb.h.
12138echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12139echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12140cat >conftest.$ac_ext <<_ACEOF
12141#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012142#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012143
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012144#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012145#include <sys/socket.h>
12146#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012147#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012148
Martin v. Löwis11437992002-04-12 09:54:03 +000012149#ifdef F77_DUMMY_MAIN
12150# ifdef __cplusplus
12151 extern "C"
12152# endif
12153 int F77_DUMMY_MAIN() { return 1; }
12154#endif
12155int
12156main ()
12157{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012158
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012159getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012160
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 ;
12162 return 0;
12163}
12164_ACEOF
12165rm -f conftest.$ac_objext conftest$ac_exeext
12166if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12167 (eval $ac_link) 2>&5
12168 ac_status=$?
12169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12170 (exit $ac_status); } &&
12171 { ac_try='test -s conftest$ac_exeext'
12172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12173 (eval $ac_try) 2>&5
12174 ac_status=$?
12175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12176 (exit $ac_status); }; }; then
12177
12178echo "$as_me:$LINENO: result: yes" >&5
12179echo "${ECHO_T}yes" >&6
12180echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12181echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012182if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012183 echo "$as_me:$LINENO: result: buggy" >&5
12184echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012185buggygetaddrinfo=yes
12186else
Martin v. Löwis11437992002-04-12 09:54:03 +000012187 cat >conftest.$ac_ext <<_ACEOF
12188#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012189#include "confdefs.h"
12190
12191#include <sys/types.h>
12192#include <netdb.h>
12193#include <string.h>
12194#include <sys/socket.h>
12195#include <netinet/in.h>
12196
12197main()
12198{
12199 int passive, gaierr, inet4 = 0, inet6 = 0;
12200 struct addrinfo hints, *ai, *aitop;
12201 char straddr[INET6_ADDRSTRLEN], strport[16];
12202
12203 for (passive = 0; passive <= 1; passive++) {
12204 memset(&hints, 0, sizeof(hints));
12205 hints.ai_family = AF_UNSPEC;
12206 hints.ai_flags = passive ? AI_PASSIVE : 0;
12207 hints.ai_socktype = SOCK_STREAM;
12208 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12209 (void)gai_strerror(gaierr);
12210 goto bad;
12211 }
12212 for (ai = aitop; ai; ai = ai->ai_next) {
12213 if (ai->ai_addr == NULL ||
12214 ai->ai_addrlen == 0 ||
12215 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12216 straddr, sizeof(straddr), strport, sizeof(strport),
12217 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12218 goto bad;
12219 }
12220 switch (ai->ai_family) {
12221 case AF_INET:
12222 if (strcmp(strport, "54321") != 0) {
12223 goto bad;
12224 }
12225 if (passive) {
12226 if (strcmp(straddr, "0.0.0.0") != 0) {
12227 goto bad;
12228 }
12229 } else {
12230 if (strcmp(straddr, "127.0.0.1") != 0) {
12231 goto bad;
12232 }
12233 }
12234 inet4++;
12235 break;
12236 case AF_INET6:
12237 if (strcmp(strport, "54321") != 0) {
12238 goto bad;
12239 }
12240 if (passive) {
12241 if (strcmp(straddr, "::") != 0) {
12242 goto bad;
12243 }
12244 } else {
12245 if (strcmp(straddr, "::1") != 0) {
12246 goto bad;
12247 }
12248 }
12249 inet6++;
12250 break;
12251 case AF_UNSPEC:
12252 goto bad;
12253 break;
12254 default:
12255 /* another family support? */
12256 break;
12257 }
12258 }
12259 }
12260
12261 if (!(inet4 == 0 || inet4 == 2))
12262 goto bad;
12263 if (!(inet6 == 0 || inet6 == 2))
12264 goto bad;
12265
12266 if (aitop)
12267 freeaddrinfo(aitop);
12268 exit(0);
12269
12270 bad:
12271 if (aitop)
12272 freeaddrinfo(aitop);
12273 exit(1);
12274}
12275
Martin v. Löwis11437992002-04-12 09:54:03 +000012276_ACEOF
12277rm -f conftest$ac_exeext
12278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12279 (eval $ac_link) 2>&5
12280 ac_status=$?
12281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12284 (eval $ac_try) 2>&5
12285 ac_status=$?
12286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12287 (exit $ac_status); }; }; then
12288 echo "$as_me:$LINENO: result: good" >&5
12289echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012290buggygetaddrinfo=no
12291else
Martin v. Löwis11437992002-04-12 09:54:03 +000012292 echo "$as_me: program exited with status $ac_status" >&5
12293echo "$as_me: failed program was:" >&5
12294cat conftest.$ac_ext >&5
12295( exit $ac_status )
12296echo "$as_me:$LINENO: result: buggy" >&5
12297echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012298buggygetaddrinfo=yes
12299fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012300rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012301fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012302else
Martin v. Löwis11437992002-04-12 09:54:03 +000012303 echo "$as_me: failed program was:" >&5
12304cat conftest.$ac_ext >&5
12305
12306echo "$as_me:$LINENO: result: no" >&5
12307echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012308buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012309
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012310fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012311rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012312
12313if test "$buggygetaddrinfo" = "yes"; then
12314 if test "$ipv6" = "yes"; then
12315 echo 'Fatal: You must get working getaddrinfo() function.'
12316 echo ' or you can specify "--disable-ipv6"'.
12317 exit 1
12318 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012319else
Martin v. Löwis11437992002-04-12 09:54:03 +000012320
12321cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012322#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012323_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012324
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012325fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012326
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012327for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012328do
Martin v. Löwis11437992002-04-12 09:54:03 +000012329as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12330echo "$as_me:$LINENO: checking for $ac_func" >&5
12331echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12332if eval "test \"\${$as_ac_var+set}\" = set"; then
12333 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012334else
Martin v. Löwis11437992002-04-12 09:54:03 +000012335 cat >conftest.$ac_ext <<_ACEOF
12336#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012337#include "confdefs.h"
12338/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012339 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012340#include <assert.h>
12341/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012342#ifdef __cplusplus
12343extern "C"
12344#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012345/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012346 builtin and then its argument prototype would still apply. */
12347char $ac_func ();
12348char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012349
Martin v. Löwis11437992002-04-12 09:54:03 +000012350#ifdef F77_DUMMY_MAIN
12351# ifdef __cplusplus
12352 extern "C"
12353# endif
12354 int F77_DUMMY_MAIN() { return 1; }
12355#endif
12356int
12357main ()
12358{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012359/* The GNU C library defines this for functions which it implements
12360 to always fail with ENOSYS. Some functions are actually named
12361 something starting with __ and the normal name is an alias. */
12362#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12363choke me
12364#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012365f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012366#endif
12367
Martin v. Löwis11437992002-04-12 09:54:03 +000012368 ;
12369 return 0;
12370}
12371_ACEOF
12372rm -f conftest.$ac_objext conftest$ac_exeext
12373if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12374 (eval $ac_link) 2>&5
12375 ac_status=$?
12376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12377 (exit $ac_status); } &&
12378 { ac_try='test -s conftest$ac_exeext'
12379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12380 (eval $ac_try) 2>&5
12381 ac_status=$?
12382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12383 (exit $ac_status); }; }; then
12384 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012385else
Martin v. Löwis11437992002-04-12 09:54:03 +000012386 echo "$as_me: failed program was:" >&5
12387cat conftest.$ac_ext >&5
12388eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012389fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012390rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012391fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012392echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12393echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12394if test `eval echo '${'$as_ac_var'}'` = yes; then
12395 cat >>confdefs.h <<_ACEOF
12396#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12397_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012398
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012399fi
12400done
12401
Michael W. Hudson54241132001-12-07 15:38:26 +000012402
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012403# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012404echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12405echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12406if test "${ac_cv_header_time+set}" = set; then
12407 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012408else
Martin v. Löwis11437992002-04-12 09:54:03 +000012409 cat >conftest.$ac_ext <<_ACEOF
12410#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012411#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012412#include <sys/types.h>
12413#include <sys/time.h>
12414#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012415
12416#ifdef F77_DUMMY_MAIN
12417# ifdef __cplusplus
12418 extern "C"
12419# endif
12420 int F77_DUMMY_MAIN() { return 1; }
12421#endif
12422int
12423main ()
12424{
12425if ((struct tm *) 0)
12426return 0;
12427 ;
12428 return 0;
12429}
12430_ACEOF
12431rm -f conftest.$ac_objext
12432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12433 (eval $ac_compile) 2>&5
12434 ac_status=$?
12435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12436 (exit $ac_status); } &&
12437 { ac_try='test -s conftest.$ac_objext'
12438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12439 (eval $ac_try) 2>&5
12440 ac_status=$?
12441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12442 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012443 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012444else
Martin v. Löwis11437992002-04-12 09:54:03 +000012445 echo "$as_me: failed program was:" >&5
12446cat conftest.$ac_ext >&5
12447ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012448fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012449rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012450fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012451echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12452echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012453if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012454
12455cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012456#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012457_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012458
12459fi
12460
Martin v. Löwis11437992002-04-12 09:54:03 +000012461echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12462echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12463if test "${ac_cv_struct_tm+set}" = set; then
12464 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012465else
Martin v. Löwis11437992002-04-12 09:54:03 +000012466 cat >conftest.$ac_ext <<_ACEOF
12467#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012468#include "confdefs.h"
12469#include <sys/types.h>
12470#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012471
12472#ifdef F77_DUMMY_MAIN
12473# ifdef __cplusplus
12474 extern "C"
12475# endif
12476 int F77_DUMMY_MAIN() { return 1; }
12477#endif
12478int
12479main ()
12480{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012481struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 ;
12483 return 0;
12484}
12485_ACEOF
12486rm -f conftest.$ac_objext
12487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12488 (eval $ac_compile) 2>&5
12489 ac_status=$?
12490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12491 (exit $ac_status); } &&
12492 { ac_try='test -s conftest.$ac_objext'
12493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12494 (eval $ac_try) 2>&5
12495 ac_status=$?
12496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12497 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012498 ac_cv_struct_tm=time.h
12499else
Martin v. Löwis11437992002-04-12 09:54:03 +000012500 echo "$as_me: failed program was:" >&5
12501cat conftest.$ac_ext >&5
12502ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012503fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012504rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012505fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012506echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12507echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012508if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012509
12510cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012511#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012512_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012513
12514fi
12515
Martin v. Löwis11437992002-04-12 09:54:03 +000012516echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12517echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12518if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12519 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012520else
Martin v. Löwis11437992002-04-12 09:54:03 +000012521 cat >conftest.$ac_ext <<_ACEOF
12522#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012523#include "confdefs.h"
12524#include <sys/types.h>
12525#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012526
12527
12528#ifdef F77_DUMMY_MAIN
12529# ifdef __cplusplus
12530 extern "C"
12531# endif
12532 int F77_DUMMY_MAIN() { return 1; }
12533#endif
12534int
12535main ()
12536{
12537static struct tm ac_aggr;
12538if (ac_aggr.tm_zone)
12539return 0;
12540 ;
12541 return 0;
12542}
12543_ACEOF
12544rm -f conftest.$ac_objext
12545if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12546 (eval $ac_compile) 2>&5
12547 ac_status=$?
12548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12549 (exit $ac_status); } &&
12550 { ac_try='test -s conftest.$ac_objext'
12551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12552 (eval $ac_try) 2>&5
12553 ac_status=$?
12554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12555 (exit $ac_status); }; }; then
12556 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012557else
Martin v. Löwis11437992002-04-12 09:54:03 +000012558 echo "$as_me: failed program was:" >&5
12559cat conftest.$ac_ext >&5
12560ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012561fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012562rm -f conftest.$ac_objext conftest.$ac_ext
12563fi
12564echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12565echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12566if test $ac_cv_member_struct_tm_tm_zone = yes; then
12567
12568cat >>confdefs.h <<_ACEOF
12569#define HAVE_STRUCT_TM_TM_ZONE 1
12570_ACEOF
12571
12572
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012573fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012574
Martin v. Löwis11437992002-04-12 09:54:03 +000012575if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12576
12577cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012578#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012579_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012580
12581else
Martin v. Löwis11437992002-04-12 09:54:03 +000012582 echo "$as_me:$LINENO: checking for tzname" >&5
12583echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12584if test "${ac_cv_var_tzname+set}" = set; then
12585 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012586else
Martin v. Löwis11437992002-04-12 09:54:03 +000012587 cat >conftest.$ac_ext <<_ACEOF
12588#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012589#include "confdefs.h"
12590#include <time.h>
12591#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012592extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012594
12595#ifdef F77_DUMMY_MAIN
12596# ifdef __cplusplus
12597 extern "C"
12598# endif
12599 int F77_DUMMY_MAIN() { return 1; }
12600#endif
12601int
12602main ()
12603{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012604atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012605 ;
12606 return 0;
12607}
12608_ACEOF
12609rm -f conftest.$ac_objext conftest$ac_exeext
12610if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12611 (eval $ac_link) 2>&5
12612 ac_status=$?
12613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12614 (exit $ac_status); } &&
12615 { ac_try='test -s conftest$ac_exeext'
12616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12617 (eval $ac_try) 2>&5
12618 ac_status=$?
12619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12620 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012621 ac_cv_var_tzname=yes
12622else
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 echo "$as_me: failed program was:" >&5
12624cat conftest.$ac_ext >&5
12625ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012626fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012627rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012628fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012629echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12630echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012631 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012632
12633cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012634#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012635_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012636
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012637 fi
12638fi
12639
Jack Jansendd19cf82001-12-06 22:36:17 +000012640
Martin v. Löwis11437992002-04-12 09:54:03 +000012641echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12642echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12643if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12644 echo $ECHO_N "(cached) $ECHO_C" >&6
12645else
12646 cat >conftest.$ac_ext <<_ACEOF
12647#line $LINENO "configure"
12648#include "confdefs.h"
12649$ac_includes_default
12650#ifdef F77_DUMMY_MAIN
12651# ifdef __cplusplus
12652 extern "C"
12653# endif
12654 int F77_DUMMY_MAIN() { return 1; }
12655#endif
12656int
12657main ()
12658{
12659static struct stat ac_aggr;
12660if (ac_aggr.st_rdev)
12661return 0;
12662 ;
12663 return 0;
12664}
12665_ACEOF
12666rm -f conftest.$ac_objext
12667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12668 (eval $ac_compile) 2>&5
12669 ac_status=$?
12670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12671 (exit $ac_status); } &&
12672 { ac_try='test -s conftest.$ac_objext'
12673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12674 (eval $ac_try) 2>&5
12675 ac_status=$?
12676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12677 (exit $ac_status); }; }; then
12678 ac_cv_member_struct_stat_st_rdev=yes
12679else
12680 echo "$as_me: failed program was:" >&5
12681cat conftest.$ac_ext >&5
12682ac_cv_member_struct_stat_st_rdev=no
12683fi
12684rm -f conftest.$ac_objext conftest.$ac_ext
12685fi
12686echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12687echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12688if test $ac_cv_member_struct_stat_st_rdev = yes; then
12689
12690cat >>confdefs.h <<_ACEOF
12691#define HAVE_STRUCT_STAT_ST_RDEV 1
12692_ACEOF
12693
12694
12695cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012696#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012697_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012698
12699fi
12700
Martin v. Löwis11437992002-04-12 09:54:03 +000012701
12702
12703echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12704echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12705if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12706 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012707else
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 cat >conftest.$ac_ext <<_ACEOF
12709#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012710#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012711$ac_includes_default
12712#ifdef F77_DUMMY_MAIN
12713# ifdef __cplusplus
12714 extern "C"
12715# endif
12716 int F77_DUMMY_MAIN() { return 1; }
12717#endif
12718int
12719main ()
12720{
12721static struct stat ac_aggr;
12722if (ac_aggr.st_blksize)
12723return 0;
12724 ;
12725 return 0;
12726}
12727_ACEOF
12728rm -f conftest.$ac_objext
12729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12730 (eval $ac_compile) 2>&5
12731 ac_status=$?
12732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12733 (exit $ac_status); } &&
12734 { ac_try='test -s conftest.$ac_objext'
12735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12736 (eval $ac_try) 2>&5
12737 ac_status=$?
12738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12739 (exit $ac_status); }; }; then
12740 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012741else
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 echo "$as_me: failed program was:" >&5
12743cat conftest.$ac_ext >&5
12744ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012745fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012746rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012747fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012748echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12749echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12750if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012751
Martin v. Löwis11437992002-04-12 09:54:03 +000012752cat >>confdefs.h <<_ACEOF
12753#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12754_ACEOF
12755
12756
12757cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012758#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012759_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012760
12761fi
12762
Martin v. Löwis11437992002-04-12 09:54:03 +000012763
12764echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12765echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12766if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12767 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012768else
Martin v. Löwis11437992002-04-12 09:54:03 +000012769 cat >conftest.$ac_ext <<_ACEOF
12770#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012771#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012772$ac_includes_default
12773#ifdef F77_DUMMY_MAIN
12774# ifdef __cplusplus
12775 extern "C"
12776# endif
12777 int F77_DUMMY_MAIN() { return 1; }
12778#endif
12779int
12780main ()
12781{
12782static struct stat ac_aggr;
12783if (ac_aggr.st_blocks)
12784return 0;
12785 ;
12786 return 0;
12787}
12788_ACEOF
12789rm -f conftest.$ac_objext
12790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12791 (eval $ac_compile) 2>&5
12792 ac_status=$?
12793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12794 (exit $ac_status); } &&
12795 { ac_try='test -s conftest.$ac_objext'
12796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12797 (eval $ac_try) 2>&5
12798 ac_status=$?
12799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12800 (exit $ac_status); }; }; then
12801 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012802else
Martin v. Löwis11437992002-04-12 09:54:03 +000012803 echo "$as_me: failed program was:" >&5
12804cat conftest.$ac_ext >&5
12805ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012806fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012807rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012808fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012809echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12810echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12811if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012812
Martin v. Löwis11437992002-04-12 09:54:03 +000012813cat >>confdefs.h <<_ACEOF
12814#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12815_ACEOF
12816
12817
12818cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012819#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012820_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012821
12822else
Martin v. Löwis11437992002-04-12 09:54:03 +000012823 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012824fi
12825
Michael W. Hudson54241132001-12-07 15:38:26 +000012826
Martin v. Löwis11437992002-04-12 09:54:03 +000012827
12828echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
12829echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
12830if test "${ac_cv_header_time_altzone+set}" = set; then
12831 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012832else
Martin v. Löwis11437992002-04-12 09:54:03 +000012833 cat >conftest.$ac_ext <<_ACEOF
12834#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012835#include "confdefs.h"
12836#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012837#ifdef F77_DUMMY_MAIN
12838# ifdef __cplusplus
12839 extern "C"
12840# endif
12841 int F77_DUMMY_MAIN() { return 1; }
12842#endif
12843int
12844main ()
12845{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 ;
12848 return 0;
12849}
12850_ACEOF
12851rm -f conftest.$ac_objext
12852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12853 (eval $ac_compile) 2>&5
12854 ac_status=$?
12855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12856 (exit $ac_status); } &&
12857 { ac_try='test -s conftest.$ac_objext'
12858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12859 (eval $ac_try) 2>&5
12860 ac_status=$?
12861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12862 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012863 ac_cv_header_time_altzone=yes
12864else
Martin v. Löwis11437992002-04-12 09:54:03 +000012865 echo "$as_me: failed program was:" >&5
12866cat conftest.$ac_ext >&5
12867ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012868fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012869rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012870fi
12871
Martin v. Löwis11437992002-04-12 09:54:03 +000012872echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
12873echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012874if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012875
12876cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012877#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012878_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012879
12880fi
12881
Guido van Rossumda88dad1995-01-26 00:46:29 +000012882was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012883echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
12884echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
12885cat >conftest.$ac_ext <<_ACEOF
12886#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012887#include "confdefs.h"
12888
12889#include <sys/types.h>
12890#include <sys/select.h>
12891#include <sys/time.h>
12892
Martin v. Löwis11437992002-04-12 09:54:03 +000012893#ifdef F77_DUMMY_MAIN
12894# ifdef __cplusplus
12895 extern "C"
12896# endif
12897 int F77_DUMMY_MAIN() { return 1; }
12898#endif
12899int
12900main ()
12901{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012902;
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 ;
12904 return 0;
12905}
12906_ACEOF
12907rm -f conftest.$ac_objext
12908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12909 (eval $ac_compile) 2>&5
12910 ac_status=$?
12911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12912 (exit $ac_status); } &&
12913 { ac_try='test -s conftest.$ac_objext'
12914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12915 (eval $ac_try) 2>&5
12916 ac_status=$?
12917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12918 (exit $ac_status); }; }; then
12919
12920
12921cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012922#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012923_ACEOF
12924
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012925 was_it_defined=yes
12926
Guido van Rossumf78abae1997-01-21 22:02:36 +000012927else
Martin v. Löwis11437992002-04-12 09:54:03 +000012928 echo "$as_me: failed program was:" >&5
12929cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012930fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012931rm -f conftest.$ac_objext conftest.$ac_ext
12932echo "$as_me:$LINENO: result: $was_it_defined" >&5
12933echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000012934
Martin v. Löwis11437992002-04-12 09:54:03 +000012935echo "$as_me:$LINENO: checking for addrinfo" >&5
12936echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
12937if test "${ac_cv_struct_addrinfo+set}" = set; then
12938 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012939else
Martin v. Löwis11437992002-04-12 09:54:03 +000012940 cat >conftest.$ac_ext <<_ACEOF
12941#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012942#include "confdefs.h"
12943
12944# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012945#ifdef F77_DUMMY_MAIN
12946# ifdef __cplusplus
12947 extern "C"
12948# endif
12949 int F77_DUMMY_MAIN() { return 1; }
12950#endif
12951int
12952main ()
12953{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012954struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012955 ;
12956 return 0;
12957}
12958_ACEOF
12959rm -f conftest.$ac_objext
12960if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12961 (eval $ac_compile) 2>&5
12962 ac_status=$?
12963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12964 (exit $ac_status); } &&
12965 { ac_try='test -s conftest.$ac_objext'
12966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12967 (eval $ac_try) 2>&5
12968 ac_status=$?
12969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12970 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012971 ac_cv_struct_addrinfo=yes
12972else
Martin v. Löwis11437992002-04-12 09:54:03 +000012973 echo "$as_me: failed program was:" >&5
12974cat conftest.$ac_ext >&5
12975ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012976fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012977rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012978fi
12979
Martin v. Löwis11437992002-04-12 09:54:03 +000012980echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
12981echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012982if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012983
12984cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012985#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012986_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012987
12988fi
12989
Martin v. Löwis11437992002-04-12 09:54:03 +000012990echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
12991echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
12992if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
12993 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012994else
Martin v. Löwis11437992002-04-12 09:54:03 +000012995 cat >conftest.$ac_ext <<_ACEOF
12996#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012997#include "confdefs.h"
12998
12999# include <sys/types.h>
13000# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013001#ifdef F77_DUMMY_MAIN
13002# ifdef __cplusplus
13003 extern "C"
13004# endif
13005 int F77_DUMMY_MAIN() { return 1; }
13006#endif
13007int
13008main ()
13009{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013010struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013011 ;
13012 return 0;
13013}
13014_ACEOF
13015rm -f conftest.$ac_objext
13016if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13017 (eval $ac_compile) 2>&5
13018 ac_status=$?
13019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13020 (exit $ac_status); } &&
13021 { ac_try='test -s conftest.$ac_objext'
13022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13023 (eval $ac_try) 2>&5
13024 ac_status=$?
13025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13026 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013027 ac_cv_struct_sockaddr_storage=yes
13028else
Martin v. Löwis11437992002-04-12 09:54:03 +000013029 echo "$as_me: failed program was:" >&5
13030cat conftest.$ac_ext >&5
13031ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013032fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013033rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013034fi
13035
Martin v. Löwis11437992002-04-12 09:54:03 +000013036echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13037echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013038if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013039
13040cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013041#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013042_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013043
13044fi
13045
Guido van Rossum627b2d71993-12-24 10:39:16 +000013046# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013047
Michael W. Hudson54241132001-12-07 15:38:26 +000013048
Martin v. Löwis11437992002-04-12 09:54:03 +000013049echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13050echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13051if test "${ac_cv_c_char_unsigned+set}" = set; then
13052 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013053else
Martin v. Löwis11437992002-04-12 09:54:03 +000013054 cat >conftest.$ac_ext <<_ACEOF
13055#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013056#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013057$ac_includes_default
13058#ifdef F77_DUMMY_MAIN
13059# ifdef __cplusplus
13060 extern "C"
13061# endif
13062 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013064int
13065main ()
13066{
13067static int test_array [1 - 2 * !(((char) -1) < 0)];
13068test_array [0] = 0
13069
13070 ;
13071 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013072}
Martin v. Löwis11437992002-04-12 09:54:03 +000013073_ACEOF
13074rm -f conftest.$ac_objext
13075if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13076 (eval $ac_compile) 2>&5
13077 ac_status=$?
13078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13079 (exit $ac_status); } &&
13080 { ac_try='test -s conftest.$ac_objext'
13081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13082 (eval $ac_try) 2>&5
13083 ac_status=$?
13084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13085 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013086 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013087else
13088 echo "$as_me: failed program was:" >&5
13089cat conftest.$ac_ext >&5
13090ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013092rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013093fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013094echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13095echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013096if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013097 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013098#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013099_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013100
13101fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013102
Martin v. Löwis11437992002-04-12 09:54:03 +000013103echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13104echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13105if test "${ac_cv_prog_cc_stdc+set}" = set; then
13106 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013107else
Martin v. Löwis11437992002-04-12 09:54:03 +000013108 ac_cv_prog_cc_stdc=no
13109ac_save_CC=$CC
13110cat >conftest.$ac_ext <<_ACEOF
13111#line $LINENO "configure"
13112#include "confdefs.h"
13113#include <stdarg.h>
13114#include <stdio.h>
13115#include <sys/types.h>
13116#include <sys/stat.h>
13117/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13118struct buf { int x; };
13119FILE * (*rcsopen) (struct buf *, struct stat *, int);
13120static char *e (p, i)
13121 char **p;
13122 int i;
13123{
13124 return p[i];
13125}
13126static char *f (char * (*g) (char **, int), char **p, ...)
13127{
13128 char *s;
13129 va_list v;
13130 va_start (v,p);
13131 s = g (p, va_arg (v,int));
13132 va_end (v);
13133 return s;
13134}
13135int test (int i, double x);
13136struct s1 {int (*f) (int a);};
13137struct s2 {int (*f) (double a);};
13138int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13139int argc;
13140char **argv;
13141#ifdef F77_DUMMY_MAIN
13142# ifdef __cplusplus
13143 extern "C"
13144# endif
13145 int F77_DUMMY_MAIN() { return 1; }
13146#endif
13147int
13148main ()
13149{
13150return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13151 ;
13152 return 0;
13153}
13154_ACEOF
13155# Don't try gcc -ansi; that turns off useful extensions and
13156# breaks some systems' header files.
13157# AIX -qlanglvl=ansi
13158# Ultrix and OSF/1 -std1
13159# HP-UX 10.20 and later -Ae
13160# HP-UX older versions -Aa -D_HPUX_SOURCE
13161# SVR4 -Xc -D__EXTENSIONS__
13162for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13163do
13164 CC="$ac_save_CC $ac_arg"
13165 rm -f conftest.$ac_objext
13166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13167 (eval $ac_compile) 2>&5
13168 ac_status=$?
13169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13170 (exit $ac_status); } &&
13171 { ac_try='test -s conftest.$ac_objext'
13172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13173 (eval $ac_try) 2>&5
13174 ac_status=$?
13175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13176 (exit $ac_status); }; }; then
13177 ac_cv_prog_cc_stdc=$ac_arg
13178break
13179else
13180 echo "$as_me: failed program was:" >&5
13181cat conftest.$ac_ext >&5
13182fi
13183rm -f conftest.$ac_objext
13184done
13185rm -f conftest.$ac_ext conftest.$ac_objext
13186CC=$ac_save_CC
13187
13188fi
13189
13190case "x$ac_cv_prog_cc_stdc" in
13191 x|xno)
13192 echo "$as_me:$LINENO: result: none needed" >&5
13193echo "${ECHO_T}none needed" >&6 ;;
13194 *)
13195 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13196echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13197 CC="$CC $ac_cv_prog_cc_stdc" ;;
13198esac
13199
13200echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13201echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13202if test "${ac_cv_c_const+set}" = set; then
13203 echo $ECHO_N "(cached) $ECHO_C" >&6
13204else
13205 cat >conftest.$ac_ext <<_ACEOF
13206#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013207#include "confdefs.h"
13208
Martin v. Löwis11437992002-04-12 09:54:03 +000013209#ifdef F77_DUMMY_MAIN
13210# ifdef __cplusplus
13211 extern "C"
13212# endif
13213 int F77_DUMMY_MAIN() { return 1; }
13214#endif
13215int
13216main ()
13217{
13218/* FIXME: Include the comments suggested by Paul. */
13219#ifndef __cplusplus
13220 /* Ultrix mips cc rejects this. */
13221 typedef int charset[2];
13222 const charset x;
13223 /* SunOS 4.1.1 cc rejects this. */
13224 char const *const *ccp;
13225 char **p;
13226 /* NEC SVR4.0.2 mips cc rejects this. */
13227 struct point {int x, y;};
13228 static struct point const zero = {0,0};
13229 /* AIX XL C 1.02.0.0 rejects this.
13230 It does not let you subtract one const X* pointer from another in
13231 an arm of an if-expression whose if-part is not a constant
13232 expression */
13233 const char *g = "string";
13234 ccp = &g + (g ? g-g : 0);
13235 /* HPUX 7.0 cc rejects these. */
13236 ++ccp;
13237 p = (char**) ccp;
13238 ccp = (char const *const *) p;
13239 { /* SCO 3.2v4 cc rejects this. */
13240 char *t;
13241 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013242
Martin v. Löwis11437992002-04-12 09:54:03 +000013243 *t++ = 0;
13244 }
13245 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13246 int x[] = {25, 17};
13247 const int *foo = &x[0];
13248 ++foo;
13249 }
13250 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13251 typedef const int *iptr;
13252 iptr p = 0;
13253 ++p;
13254 }
13255 { /* AIX XL C 1.02.0.0 rejects this saying
13256 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13257 struct s { int j; const int *ap[3]; };
13258 struct s *b; b->j = 5;
13259 }
13260 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13261 const int foo = 10;
13262 }
13263#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013264
Martin v. Löwis11437992002-04-12 09:54:03 +000013265 ;
13266 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013267}
Martin v. Löwis11437992002-04-12 09:54:03 +000013268_ACEOF
13269rm -f conftest.$ac_objext
13270if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13271 (eval $ac_compile) 2>&5
13272 ac_status=$?
13273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13274 (exit $ac_status); } &&
13275 { ac_try='test -s conftest.$ac_objext'
13276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13277 (eval $ac_try) 2>&5
13278 ac_status=$?
13279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13280 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013281 ac_cv_c_const=yes
13282else
Martin v. Löwis11437992002-04-12 09:54:03 +000013283 echo "$as_me: failed program was:" >&5
13284cat conftest.$ac_ext >&5
13285ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013286fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013287rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013288fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013289echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13290echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013291if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013292
13293cat >>confdefs.h <<\_ACEOF
13294#define const
13295_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013296
13297fi
13298
Michael W. Hudson54241132001-12-07 15:38:26 +000013299
Guido van Rossumda88dad1995-01-26 00:46:29 +000013300works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013301echo "$as_me:$LINENO: checking for working volatile" >&5
13302echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13303cat >conftest.$ac_ext <<_ACEOF
13304#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013305#include "confdefs.h"
13306
Martin v. Löwis11437992002-04-12 09:54:03 +000013307#ifdef F77_DUMMY_MAIN
13308# ifdef __cplusplus
13309 extern "C"
13310# endif
13311 int F77_DUMMY_MAIN() { return 1; }
13312#endif
13313int
13314main ()
13315{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013316volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013317 ;
13318 return 0;
13319}
13320_ACEOF
13321rm -f conftest.$ac_objext
13322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13323 (eval $ac_compile) 2>&5
13324 ac_status=$?
13325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13326 (exit $ac_status); } &&
13327 { ac_try='test -s conftest.$ac_objext'
13328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13329 (eval $ac_try) 2>&5
13330 ac_status=$?
13331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13332 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013333 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013334else
Martin v. Löwis11437992002-04-12 09:54:03 +000013335 echo "$as_me: failed program was:" >&5
13336cat conftest.$ac_ext >&5
13337
13338cat >>confdefs.h <<\_ACEOF
13339#define volatile
13340_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013341
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013342
Guido van Rossum627b2d71993-12-24 10:39:16 +000013343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013344rm -f conftest.$ac_objext conftest.$ac_ext
13345echo "$as_me:$LINENO: result: $works" >&5
13346echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013347
Guido van Rossumda88dad1995-01-26 00:46:29 +000013348works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013349echo "$as_me:$LINENO: checking for working signed char" >&5
13350echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13351cat >conftest.$ac_ext <<_ACEOF
13352#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013353#include "confdefs.h"
13354
Martin v. Löwis11437992002-04-12 09:54:03 +000013355#ifdef F77_DUMMY_MAIN
13356# ifdef __cplusplus
13357 extern "C"
13358# endif
13359 int F77_DUMMY_MAIN() { return 1; }
13360#endif
13361int
13362main ()
13363{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013364signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013365 ;
13366 return 0;
13367}
13368_ACEOF
13369rm -f conftest.$ac_objext
13370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13371 (eval $ac_compile) 2>&5
13372 ac_status=$?
13373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13374 (exit $ac_status); } &&
13375 { ac_try='test -s conftest.$ac_objext'
13376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13377 (eval $ac_try) 2>&5
13378 ac_status=$?
13379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13380 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013381 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013382else
Martin v. Löwis11437992002-04-12 09:54:03 +000013383 echo "$as_me: failed program was:" >&5
13384cat conftest.$ac_ext >&5
13385
13386cat >>confdefs.h <<\_ACEOF
13387#define signed
13388_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013389
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013390
Guido van Rossum7f43da71994-08-01 12:15:30 +000013391fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013392rm -f conftest.$ac_objext conftest.$ac_ext
13393echo "$as_me:$LINENO: result: $works" >&5
13394echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013395
Guido van Rossumda88dad1995-01-26 00:46:29 +000013396have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013397echo "$as_me:$LINENO: checking for prototypes" >&5
13398echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13399cat >conftest.$ac_ext <<_ACEOF
13400#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013401#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013402int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013403#ifdef F77_DUMMY_MAIN
13404# ifdef __cplusplus
13405 extern "C"
13406# endif
13407 int F77_DUMMY_MAIN() { return 1; }
13408#endif
13409int
13410main ()
13411{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013412return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013413 ;
13414 return 0;
13415}
13416_ACEOF
13417rm -f conftest.$ac_objext
13418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13419 (eval $ac_compile) 2>&5
13420 ac_status=$?
13421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13422 (exit $ac_status); } &&
13423 { ac_try='test -s conftest.$ac_objext'
13424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13425 (eval $ac_try) 2>&5
13426 ac_status=$?
13427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13428 (exit $ac_status); }; }; then
13429
13430
13431cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013432#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013433_ACEOF
13434
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013435 have_prototypes=yes
13436
Guido van Rossumf78abae1997-01-21 22:02:36 +000013437else
Martin v. Löwis11437992002-04-12 09:54:03 +000013438 echo "$as_me: failed program was:" >&5
13439cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013440fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013441rm -f conftest.$ac_objext conftest.$ac_ext
13442echo "$as_me:$LINENO: result: $have_prototypes" >&5
13443echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013444
Guido van Rossumda88dad1995-01-26 00:46:29 +000013445works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013446echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13447echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13448cat >conftest.$ac_ext <<_ACEOF
13449#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013450#include "confdefs.h"
13451
13452#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013453int foo(int x, ...) {
13454 va_list va;
13455 va_start(va, x);
13456 va_arg(va, int);
13457 va_arg(va, char *);
13458 va_arg(va, double);
13459 return 0;
13460}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013461
Martin v. Löwis11437992002-04-12 09:54:03 +000013462#ifdef F77_DUMMY_MAIN
13463# ifdef __cplusplus
13464 extern "C"
13465# endif
13466 int F77_DUMMY_MAIN() { return 1; }
13467#endif
13468int
13469main ()
13470{
Guido van Rossum90eea071996-08-30 20:58:57 +000013471return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013472 ;
13473 return 0;
13474}
13475_ACEOF
13476rm -f conftest.$ac_objext
13477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13478 (eval $ac_compile) 2>&5
13479 ac_status=$?
13480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13481 (exit $ac_status); } &&
13482 { ac_try='test -s conftest.$ac_objext'
13483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13484 (eval $ac_try) 2>&5
13485 ac_status=$?
13486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13487 (exit $ac_status); }; }; then
13488
13489
13490cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013491#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013492_ACEOF
13493
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013494 works=yes
13495
Guido van Rossumf78abae1997-01-21 22:02:36 +000013496else
Martin v. Löwis11437992002-04-12 09:54:03 +000013497 echo "$as_me: failed program was:" >&5
13498cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013499fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013500rm -f conftest.$ac_objext conftest.$ac_ext
13501echo "$as_me:$LINENO: result: $works" >&5
13502echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013503
Guido van Rossumda88dad1995-01-26 00:46:29 +000013504if test "$have_prototypes" = yes; then
13505bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013506echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13507echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13508cat >conftest.$ac_ext <<_ACEOF
13509#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013510#include "confdefs.h"
13511#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013512#ifdef F77_DUMMY_MAIN
13513# ifdef __cplusplus
13514 extern "C"
13515# endif
13516 int F77_DUMMY_MAIN() { return 1; }
13517#endif
13518int
13519main ()
13520{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013521char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013522 ;
13523 return 0;
13524}
13525_ACEOF
13526rm -f conftest.$ac_objext
13527if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13528 (eval $ac_compile) 2>&5
13529 ac_status=$?
13530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13531 (exit $ac_status); } &&
13532 { ac_try='test -s conftest.$ac_objext'
13533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13534 (eval $ac_try) 2>&5
13535 ac_status=$?
13536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13537 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013538 :
13539else
Martin v. Löwis11437992002-04-12 09:54:03 +000013540 echo "$as_me: failed program was:" >&5
13541cat conftest.$ac_ext >&5
13542
13543cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013544#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013545_ACEOF
13546
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013547 bad_prototypes=yes
13548
Guido van Rossum627b2d71993-12-24 10:39:16 +000013549fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013550rm -f conftest.$ac_objext conftest.$ac_ext
13551echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13552echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013553fi
13554
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013555# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013556echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13557echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13558cat >conftest.$ac_ext <<_ACEOF
13559#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013560#include "confdefs.h"
13561#include <sys/types.h>
13562#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013563#ifdef F77_DUMMY_MAIN
13564# ifdef __cplusplus
13565 extern "C"
13566# endif
13567 int F77_DUMMY_MAIN() { return 1; }
13568#endif
13569int
13570main ()
13571{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013572struct sockaddr x;
13573x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013574 ;
13575 return 0;
13576}
13577_ACEOF
13578rm -f conftest.$ac_objext
13579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13580 (eval $ac_compile) 2>&5
13581 ac_status=$?
13582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13583 (exit $ac_status); } &&
13584 { ac_try='test -s conftest.$ac_objext'
13585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13586 (eval $ac_try) 2>&5
13587 ac_status=$?
13588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13589 (exit $ac_status); }; }; then
13590 echo "$as_me:$LINENO: result: yes" >&5
13591echo "${ECHO_T}yes" >&6
13592
13593cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013594#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013595_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013596
13597else
Martin v. Löwis11437992002-04-12 09:54:03 +000013598 echo "$as_me: failed program was:" >&5
13599cat conftest.$ac_ext >&5
13600echo "$as_me:$LINENO: result: no" >&5
13601echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013602fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013603rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013604
Martin v. Löwis11437992002-04-12 09:54:03 +000013605echo "$as_me:$LINENO: checking for bad static forward" >&5
13606echo $ECHO_N "checking for bad static forward... $ECHO_C" >&6
13607if test "${ac_cv_bad_static_forward+set}" = set; then
13608 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013609else
13610 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013611 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013612else
Martin v. Löwis11437992002-04-12 09:54:03 +000013613 cat >conftest.$ac_ext <<_ACEOF
13614#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013615#include "confdefs.h"
13616
13617struct s { int a; int b; };
13618static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013619int foobar() {
13620 static int random;
13621 random = (int) &foo;
13622 return random;
13623}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013624static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013625main() {
13626 exit(!((int)&foo == foobar()));
13627}
Martin v. Löwis11437992002-04-12 09:54:03 +000013628_ACEOF
13629rm -f conftest$ac_exeext
13630if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13631 (eval $ac_link) 2>&5
13632 ac_status=$?
13633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13634 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13636 (eval $ac_try) 2>&5
13637 ac_status=$?
13638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13639 (exit $ac_status); }; }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013640 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013641else
Martin v. Löwis11437992002-04-12 09:54:03 +000013642 echo "$as_me: program exited with status $ac_status" >&5
13643echo "$as_me: failed program was:" >&5
13644cat conftest.$ac_ext >&5
13645( exit $ac_status )
13646ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013647fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013648rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13649fi
Guido van Rossumf78abae1997-01-21 22:02:36 +000013650fi
13651
Martin v. Löwis11437992002-04-12 09:54:03 +000013652echo "$as_me:$LINENO: result: $ac_cv_bad_static_forward" >&5
13653echo "${ECHO_T}$ac_cv_bad_static_forward" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013654if test "$ac_cv_bad_static_forward" = yes
13655then
Martin v. Löwis11437992002-04-12 09:54:03 +000013656
13657cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013658#define BAD_STATIC_FORWARD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013659_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013660
13661fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013662
Guido van Rossumda88dad1995-01-26 00:46:29 +000013663va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013664echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13665echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13666cat >conftest.$ac_ext <<_ACEOF
13667#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013668#include "confdefs.h"
13669
13670#ifdef HAVE_STDARG_PROTOTYPES
13671#include <stdarg.h>
13672#else
13673#include <varargs.h>
13674#endif
13675
Martin v. Löwis11437992002-04-12 09:54:03 +000013676#ifdef F77_DUMMY_MAIN
13677# ifdef __cplusplus
13678 extern "C"
13679# endif
13680 int F77_DUMMY_MAIN() { return 1; }
13681#endif
13682int
13683main ()
13684{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013685va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013686 ;
13687 return 0;
13688}
13689_ACEOF
13690rm -f conftest.$ac_objext
13691if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13692 (eval $ac_compile) 2>&5
13693 ac_status=$?
13694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13695 (exit $ac_status); } &&
13696 { ac_try='test -s conftest.$ac_objext'
13697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13698 (eval $ac_try) 2>&5
13699 ac_status=$?
13700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13701 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013702 :
13703else
Martin v. Löwis11437992002-04-12 09:54:03 +000013704 echo "$as_me: failed program was:" >&5
13705cat conftest.$ac_ext >&5
13706
13707
13708cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013709#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013710_ACEOF
13711
Guido van Rossumda88dad1995-01-26 00:46:29 +000013712 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013713
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013714fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013715rm -f conftest.$ac_objext conftest.$ac_ext
13716echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13717echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013718
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013719# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013720
13721
13722
13723echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13724echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13725if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13726 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013727else
Martin v. Löwis11437992002-04-12 09:54:03 +000013728 cat >conftest.$ac_ext <<_ACEOF
13729#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013730#include "confdefs.h"
13731/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013732 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013733#include <assert.h>
13734/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013735#ifdef __cplusplus
13736extern "C"
13737#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013738/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013739 builtin and then its argument prototype would still apply. */
13740char gethostbyname_r ();
13741char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013742
Martin v. Löwis11437992002-04-12 09:54:03 +000013743#ifdef F77_DUMMY_MAIN
13744# ifdef __cplusplus
13745 extern "C"
13746# endif
13747 int F77_DUMMY_MAIN() { return 1; }
13748#endif
13749int
13750main ()
13751{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013752/* The GNU C library defines this for functions which it implements
13753 to always fail with ENOSYS. Some functions are actually named
13754 something starting with __ and the normal name is an alias. */
13755#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13756choke me
13757#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013758f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013759#endif
13760
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 ;
13762 return 0;
13763}
13764_ACEOF
13765rm -f conftest.$ac_objext conftest$ac_exeext
13766if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13767 (eval $ac_link) 2>&5
13768 ac_status=$?
13769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13770 (exit $ac_status); } &&
13771 { ac_try='test -s conftest$ac_exeext'
13772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13773 (eval $ac_try) 2>&5
13774 ac_status=$?
13775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13776 (exit $ac_status); }; }; then
13777 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013778else
Martin v. Löwis11437992002-04-12 09:54:03 +000013779 echo "$as_me: failed program was:" >&5
13780cat conftest.$ac_ext >&5
13781ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013782fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013783rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013784fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013785echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13786echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13787if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013788
Martin v. Löwis11437992002-04-12 09:54:03 +000013789 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013790#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013791_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013792
Martin v. Löwis11437992002-04-12 09:54:03 +000013793 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13794echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013795 OLD_CFLAGS=$CFLAGS
13796 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 cat >conftest.$ac_ext <<_ACEOF
13798#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013799#include "confdefs.h"
13800
13801# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013802
13803#ifdef F77_DUMMY_MAIN
13804# ifdef __cplusplus
13805 extern "C"
13806# endif
13807 int F77_DUMMY_MAIN() { return 1; }
13808#endif
13809int
13810main ()
13811{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013812
13813 char *name;
13814 struct hostent *he, *res;
13815 char buffer[2048];
13816 int buflen = 2048;
13817 int h_errnop;
13818
13819 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013820
13821 ;
13822 return 0;
13823}
13824_ACEOF
13825rm -f conftest.$ac_objext
13826if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13827 (eval $ac_compile) 2>&5
13828 ac_status=$?
13829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13830 (exit $ac_status); } &&
13831 { ac_try='test -s conftest.$ac_objext'
13832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13833 (eval $ac_try) 2>&5
13834 ac_status=$?
13835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13836 (exit $ac_status); }; }; then
13837
13838 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013839#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013840_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013841
Martin v. Löwis11437992002-04-12 09:54:03 +000013842
13843cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013844#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013845_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013846
Martin v. Löwis11437992002-04-12 09:54:03 +000013847 echo "$as_me:$LINENO: result: yes" >&5
13848echo "${ECHO_T}yes" >&6
13849
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013850else
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 echo "$as_me: failed program was:" >&5
13852cat conftest.$ac_ext >&5
13853
13854 echo "$as_me:$LINENO: result: no" >&5
13855echo "${ECHO_T}no" >&6
13856 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
13857echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
13858 cat >conftest.$ac_ext <<_ACEOF
13859#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013860#include "confdefs.h"
13861
13862# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013863
13864#ifdef F77_DUMMY_MAIN
13865# ifdef __cplusplus
13866 extern "C"
13867# endif
13868 int F77_DUMMY_MAIN() { return 1; }
13869#endif
13870int
13871main ()
13872{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013873
13874 char *name;
13875 struct hostent *he;
13876 char buffer[2048];
13877 int buflen = 2048;
13878 int h_errnop;
13879
13880 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013881
13882 ;
13883 return 0;
13884}
13885_ACEOF
13886rm -f conftest.$ac_objext
13887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13888 (eval $ac_compile) 2>&5
13889 ac_status=$?
13890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13891 (exit $ac_status); } &&
13892 { ac_try='test -s conftest.$ac_objext'
13893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13894 (eval $ac_try) 2>&5
13895 ac_status=$?
13896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13897 (exit $ac_status); }; }; then
13898
13899 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013900#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013901_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013902
Martin v. Löwis11437992002-04-12 09:54:03 +000013903
13904cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013905#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013906_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013907
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 echo "$as_me:$LINENO: result: yes" >&5
13909echo "${ECHO_T}yes" >&6
13910
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013911else
Martin v. Löwis11437992002-04-12 09:54:03 +000013912 echo "$as_me: failed program was:" >&5
13913cat conftest.$ac_ext >&5
13914
13915 echo "$as_me:$LINENO: result: no" >&5
13916echo "${ECHO_T}no" >&6
13917 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
13918echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
13919 cat >conftest.$ac_ext <<_ACEOF
13920#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013921#include "confdefs.h"
13922
13923# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013924
13925#ifdef F77_DUMMY_MAIN
13926# ifdef __cplusplus
13927 extern "C"
13928# endif
13929 int F77_DUMMY_MAIN() { return 1; }
13930#endif
13931int
13932main ()
13933{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013934
13935 char *name;
13936 struct hostent *he;
13937 struct hostent_data data;
13938
13939 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000013940
13941 ;
13942 return 0;
13943}
13944_ACEOF
13945rm -f conftest.$ac_objext
13946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13947 (eval $ac_compile) 2>&5
13948 ac_status=$?
13949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13950 (exit $ac_status); } &&
13951 { ac_try='test -s conftest.$ac_objext'
13952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13953 (eval $ac_try) 2>&5
13954 ac_status=$?
13955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13956 (exit $ac_status); }; }; then
13957
13958 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013959#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013960_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013961
Martin v. Löwis11437992002-04-12 09:54:03 +000013962
13963cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013964#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013965_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013966
Martin v. Löwis11437992002-04-12 09:54:03 +000013967 echo "$as_me:$LINENO: result: yes" >&5
13968echo "${ECHO_T}yes" >&6
13969
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013970else
Martin v. Löwis11437992002-04-12 09:54:03 +000013971 echo "$as_me: failed program was:" >&5
13972cat conftest.$ac_ext >&5
13973
13974 echo "$as_me:$LINENO: result: no" >&5
13975echo "${ECHO_T}no" >&6
13976
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013977fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013978rm -f conftest.$ac_objext conftest.$ac_ext
13979
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013980fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013981rm -f conftest.$ac_objext conftest.$ac_ext
13982
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013983fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013984rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013985 CFLAGS=$OLD_CFLAGS
13986
13987else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013988
Martin v. Löwis11437992002-04-12 09:54:03 +000013989
13990for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000013991do
Martin v. Löwis11437992002-04-12 09:54:03 +000013992as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13993echo "$as_me:$LINENO: checking for $ac_func" >&5
13994echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13995if eval "test \"\${$as_ac_var+set}\" = set"; then
13996 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013997else
Martin v. Löwis11437992002-04-12 09:54:03 +000013998 cat >conftest.$ac_ext <<_ACEOF
13999#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014000#include "confdefs.h"
14001/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014002 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014003#include <assert.h>
14004/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014005#ifdef __cplusplus
14006extern "C"
14007#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014008/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014009 builtin and then its argument prototype would still apply. */
14010char $ac_func ();
14011char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014012
Martin v. Löwis11437992002-04-12 09:54:03 +000014013#ifdef F77_DUMMY_MAIN
14014# ifdef __cplusplus
14015 extern "C"
14016# endif
14017 int F77_DUMMY_MAIN() { return 1; }
14018#endif
14019int
14020main ()
14021{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014022/* The GNU C library defines this for functions which it implements
14023 to always fail with ENOSYS. Some functions are actually named
14024 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014025#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014026choke me
14027#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014028f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014029#endif
14030
Martin v. Löwis11437992002-04-12 09:54:03 +000014031 ;
14032 return 0;
14033}
14034_ACEOF
14035rm -f conftest.$ac_objext conftest$ac_exeext
14036if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14037 (eval $ac_link) 2>&5
14038 ac_status=$?
14039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14040 (exit $ac_status); } &&
14041 { ac_try='test -s conftest$ac_exeext'
14042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14043 (eval $ac_try) 2>&5
14044 ac_status=$?
14045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14046 (exit $ac_status); }; }; then
14047 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014048else
Martin v. Löwis11437992002-04-12 09:54:03 +000014049 echo "$as_me: failed program was:" >&5
14050cat conftest.$ac_ext >&5
14051eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014052fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014053rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014054fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014055echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14056echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14057if test `eval echo '${'$as_ac_var'}'` = yes; then
14058 cat >>confdefs.h <<_ACEOF
14059#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14060_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014061
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014062fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014063done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014064
Michael W. Hudson54241132001-12-07 15:38:26 +000014065
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014066fi
14067
Michael W. Hudson54241132001-12-07 15:38:26 +000014068
14069
14070
14071
14072
14073
Guido van Rossum627b2d71993-12-24 10:39:16 +000014074# checks for system services
14075# (none yet)
14076
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014077# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014078echo "$as_me:$LINENO: checking for __fpu_control" >&5
14079echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14080if test "${ac_cv_func___fpu_control+set}" = set; then
14081 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014082else
Martin v. Löwis11437992002-04-12 09:54:03 +000014083 cat >conftest.$ac_ext <<_ACEOF
14084#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014085#include "confdefs.h"
14086/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014087 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014088#include <assert.h>
14089/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014090#ifdef __cplusplus
14091extern "C"
14092#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014093/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014094 builtin and then its argument prototype would still apply. */
14095char __fpu_control ();
14096char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014097
Martin v. Löwis11437992002-04-12 09:54:03 +000014098#ifdef F77_DUMMY_MAIN
14099# ifdef __cplusplus
14100 extern "C"
14101# endif
14102 int F77_DUMMY_MAIN() { return 1; }
14103#endif
14104int
14105main ()
14106{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014107/* The GNU C library defines this for functions which it implements
14108 to always fail with ENOSYS. Some functions are actually named
14109 something starting with __ and the normal name is an alias. */
14110#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14111choke me
14112#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014113f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014114#endif
14115
Martin v. Löwis11437992002-04-12 09:54:03 +000014116 ;
14117 return 0;
14118}
14119_ACEOF
14120rm -f conftest.$ac_objext conftest$ac_exeext
14121if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14122 (eval $ac_link) 2>&5
14123 ac_status=$?
14124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14125 (exit $ac_status); } &&
14126 { ac_try='test -s conftest$ac_exeext'
14127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14128 (eval $ac_try) 2>&5
14129 ac_status=$?
14130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14131 (exit $ac_status); }; }; then
14132 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014133else
Martin v. Löwis11437992002-04-12 09:54:03 +000014134 echo "$as_me: failed program was:" >&5
14135cat conftest.$ac_ext >&5
14136ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014137fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014138rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014139fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014140echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14141echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14142if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014143 :
14144else
Martin v. Löwis11437992002-04-12 09:54:03 +000014145
14146echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14147echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14148if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14149 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014150else
Martin v. Löwis11437992002-04-12 09:54:03 +000014151 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014152LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014153cat >conftest.$ac_ext <<_ACEOF
14154#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014155#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014156
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014157/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014158#ifdef __cplusplus
14159extern "C"
14160#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014161/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014162 builtin and then its argument prototype would still apply. */
14163char __fpu_control ();
14164#ifdef F77_DUMMY_MAIN
14165# ifdef __cplusplus
14166 extern "C"
14167# endif
14168 int F77_DUMMY_MAIN() { return 1; }
14169#endif
14170int
14171main ()
14172{
14173__fpu_control ();
14174 ;
14175 return 0;
14176}
14177_ACEOF
14178rm -f conftest.$ac_objext conftest$ac_exeext
14179if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14180 (eval $ac_link) 2>&5
14181 ac_status=$?
14182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14183 (exit $ac_status); } &&
14184 { ac_try='test -s conftest$ac_exeext'
14185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14186 (eval $ac_try) 2>&5
14187 ac_status=$?
14188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14189 (exit $ac_status); }; }; then
14190 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014191else
Martin v. Löwis11437992002-04-12 09:54:03 +000014192 echo "$as_me: failed program was:" >&5
14193cat conftest.$ac_ext >&5
14194ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014195fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014196rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14197LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014198fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014199echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14200echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14201if test $ac_cv_lib_ieee___fpu_control = yes; then
14202 cat >>confdefs.h <<_ACEOF
14203#define HAVE_LIBIEEE 1
14204_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014205
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014206 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014207
Guido van Rossum627b2d71993-12-24 10:39:16 +000014208fi
14209
Michael W. Hudson54241132001-12-07 15:38:26 +000014210
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014211fi
14212
Michael W. Hudson54241132001-12-07 15:38:26 +000014213
Guido van Rossum7f253911997-05-09 02:42:48 +000014214# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014215echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14216echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14217
Guido van Rossum7f253911997-05-09 02:42:48 +000014218# Check whether --with-fpectl or --without-fpectl was given.
14219if test "${with_fpectl+set}" = set; then
14220 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014221
Guido van Rossum7f253911997-05-09 02:42:48 +000014222if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014223then
14224
14225cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014226#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014227_ACEOF
14228
14229 echo "$as_me:$LINENO: result: yes" >&5
14230echo "${ECHO_T}yes" >&6
14231else echo "$as_me:$LINENO: result: no" >&5
14232echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014233fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014234else
Martin v. Löwis11437992002-04-12 09:54:03 +000014235 echo "$as_me:$LINENO: result: no" >&5
14236echo "${ECHO_T}no" >&6
14237fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014238
Guido van Rossum7f43da71994-08-01 12:15:30 +000014239# check for --with-libm=...
14240
Guido van Rossum563e7081996-09-10 18:20:48 +000014241case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014242Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014243BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014244*) LIBM=-lm
14245esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014246echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14247echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14248
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014249# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014250if test "${with_libm+set}" = set; then
14251 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014252
Guido van Rossum7f253911997-05-09 02:42:48 +000014253if test "$withval" = no
14254then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014255 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14256echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014257elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014258then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014259 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14260echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14261else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14262echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14263 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014264fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014265else
Martin v. Löwis11437992002-04-12 09:54:03 +000014266 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14267echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14268fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014269
14270# check for --with-libc=...
14271
Martin v. Löwis11437992002-04-12 09:54:03 +000014272echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14273echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14274
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014275# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014276if test "${with_libc+set}" = set; then
14277 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014278
Guido van Rossum7f253911997-05-09 02:42:48 +000014279if test "$withval" = no
14280then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014281 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14282echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014283elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014284then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14286echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14287else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14288echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14289 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014290fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014291else
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14293echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14294fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014295
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014296# check for hypot() in math library
14297LIBS_SAVE=$LIBS
14298LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014299
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014300for ac_func in hypot
14301do
Martin v. Löwis11437992002-04-12 09:54:03 +000014302as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14303echo "$as_me:$LINENO: checking for $ac_func" >&5
14304echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14305if eval "test \"\${$as_ac_var+set}\" = set"; then
14306 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014307else
Martin v. Löwis11437992002-04-12 09:54:03 +000014308 cat >conftest.$ac_ext <<_ACEOF
14309#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014310#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014311/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014312 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014313#include <assert.h>
14314/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014315#ifdef __cplusplus
14316extern "C"
14317#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014318/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014319 builtin and then its argument prototype would still apply. */
14320char $ac_func ();
14321char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014322
Martin v. Löwis11437992002-04-12 09:54:03 +000014323#ifdef F77_DUMMY_MAIN
14324# ifdef __cplusplus
14325 extern "C"
14326# endif
14327 int F77_DUMMY_MAIN() { return 1; }
14328#endif
14329int
14330main ()
14331{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014332/* The GNU C library defines this for functions which it implements
14333 to always fail with ENOSYS. Some functions are actually named
14334 something starting with __ and the normal name is an alias. */
14335#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14336choke me
14337#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014338f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014339#endif
14340
Martin v. Löwis11437992002-04-12 09:54:03 +000014341 ;
14342 return 0;
14343}
14344_ACEOF
14345rm -f conftest.$ac_objext conftest$ac_exeext
14346if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14347 (eval $ac_link) 2>&5
14348 ac_status=$?
14349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14350 (exit $ac_status); } &&
14351 { ac_try='test -s conftest$ac_exeext'
14352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14353 (eval $ac_try) 2>&5
14354 ac_status=$?
14355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14356 (exit $ac_status); }; }; then
14357 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014358else
Martin v. Löwis11437992002-04-12 09:54:03 +000014359 echo "$as_me: failed program was:" >&5
14360cat conftest.$ac_ext >&5
14361eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014362fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014363rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014364fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014365echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14366echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14367if test `eval echo '${'$as_ac_var'}'` = yes; then
14368 cat >>confdefs.h <<_ACEOF
14369#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14370_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014371
Michael W. Hudson54241132001-12-07 15:38:26 +000014372else
Martin v. Löwis11437992002-04-12 09:54:03 +000014373 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014374fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014375done
14376
Michael W. Hudson54241132001-12-07 15:38:26 +000014377
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014378LIBS=$LIBS_SAVE
14379
Guido van Rossumad713701997-07-10 22:42:38 +000014380# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014381echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14382echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14383if test "${ac_cv_malloc_zero+set}" = set; then
14384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014385else
14386 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014387 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014388else
Martin v. Löwis11437992002-04-12 09:54:03 +000014389 cat >conftest.$ac_ext <<_ACEOF
14390#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014391#include "confdefs.h"
14392#include <stdio.h>
14393#ifdef HAVE_STDLIB
14394#include <stdlib.h>
14395#else
14396char *malloc(), *realloc();
14397int *free();
14398#endif
14399main() {
14400 char *p;
14401 p = malloc(0);
14402 if (p == NULL) exit(1);
14403 p = realloc(p, 0);
14404 if (p == NULL) exit(1);
14405 free(p);
14406 exit(0);
14407}
Martin v. Löwis11437992002-04-12 09:54:03 +000014408_ACEOF
14409rm -f conftest$ac_exeext
14410if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14411 (eval $ac_link) 2>&5
14412 ac_status=$?
14413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14414 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14416 (eval $ac_try) 2>&5
14417 ac_status=$?
14418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14419 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014420 ac_cv_malloc_zero=nonnull
14421else
Martin v. Löwis11437992002-04-12 09:54:03 +000014422 echo "$as_me: program exited with status $ac_status" >&5
14423echo "$as_me: failed program was:" >&5
14424cat conftest.$ac_ext >&5
14425( exit $ac_status )
14426ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014428rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014429fi
Guido van Rossumad713701997-07-10 22:42:38 +000014430fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014431 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014432echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14433echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014434if test "$ac_cv_malloc_zero" = null
14435then
Martin v. Löwis11437992002-04-12 09:54:03 +000014436
14437cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014438#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014439_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014440
14441fi
14442
Guido van Rossumef2255b2000-03-10 22:30:29 +000014443# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014444if test "${ac_cv_header_wchar_h+set}" = set; then
14445 echo "$as_me:$LINENO: checking for wchar.h" >&5
14446echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14447if test "${ac_cv_header_wchar_h+set}" = set; then
14448 echo $ECHO_N "(cached) $ECHO_C" >&6
14449fi
14450echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14451echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014452else
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 # Is the header compilable?
14454echo "$as_me:$LINENO: checking wchar.h usability" >&5
14455echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14456cat >conftest.$ac_ext <<_ACEOF
14457#line $LINENO "configure"
14458#include "confdefs.h"
14459$ac_includes_default
14460#include <wchar.h>
14461_ACEOF
14462rm -f conftest.$ac_objext
14463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14464 (eval $ac_compile) 2>&5
14465 ac_status=$?
14466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14467 (exit $ac_status); } &&
14468 { ac_try='test -s conftest.$ac_objext'
14469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14470 (eval $ac_try) 2>&5
14471 ac_status=$?
14472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14473 (exit $ac_status); }; }; then
14474 ac_header_compiler=yes
14475else
14476 echo "$as_me: failed program was:" >&5
14477cat conftest.$ac_ext >&5
14478ac_header_compiler=no
14479fi
14480rm -f conftest.$ac_objext conftest.$ac_ext
14481echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14482echo "${ECHO_T}$ac_header_compiler" >&6
14483
14484# Is the header present?
14485echo "$as_me:$LINENO: checking wchar.h presence" >&5
14486echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14487cat >conftest.$ac_ext <<_ACEOF
14488#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014489#include "confdefs.h"
14490#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014491_ACEOF
14492if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14493 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14494 ac_status=$?
14495 egrep -v '^ *\+' conftest.er1 >conftest.err
14496 rm -f conftest.er1
14497 cat conftest.err >&5
14498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14499 (exit $ac_status); } >/dev/null; then
14500 if test -s conftest.err; then
14501 ac_cpp_err=$ac_c_preproc_warn_flag
14502 else
14503 ac_cpp_err=
14504 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014505else
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 ac_cpp_err=yes
14507fi
14508if test -z "$ac_cpp_err"; then
14509 ac_header_preproc=yes
14510else
14511 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014512 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014513 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014514fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014515rm -f conftest.err conftest.$ac_ext
14516echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14517echo "${ECHO_T}$ac_header_preproc" >&6
14518
14519# So? What about this header?
14520case $ac_header_compiler:$ac_header_preproc in
14521 yes:no )
14522 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14523echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14524 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14525echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14526 no:yes )
14527 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14528echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14529 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14530echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14531 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14532echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14533esac
14534echo "$as_me:$LINENO: checking for wchar.h" >&5
14535echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14536if test "${ac_cv_header_wchar_h+set}" = set; then
14537 echo $ECHO_N "(cached) $ECHO_C" >&6
14538else
14539 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014540fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014541echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14542echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14543
14544fi
14545if test $ac_cv_header_wchar_h = yes; then
14546
14547
14548cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014549#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014550_ACEOF
14551
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014552 wchar_h="yes"
14553
Guido van Rossumef2255b2000-03-10 22:30:29 +000014554else
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014556
14557fi
14558
Michael W. Hudson54241132001-12-07 15:38:26 +000014559
Martin v. Löwis11437992002-04-12 09:54:03 +000014560
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014561# determine wchar_t size
14562if test "$wchar_h" = yes
14563then
Martin v. Löwis11437992002-04-12 09:54:03 +000014564 echo "$as_me:$LINENO: checking for wchar_t" >&5
14565echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14566if test "${ac_cv_type_wchar_t+set}" = set; then
14567 echo $ECHO_N "(cached) $ECHO_C" >&6
14568else
14569 cat >conftest.$ac_ext <<_ACEOF
14570#line $LINENO "configure"
14571#include "confdefs.h"
14572#include <wchar.h>
14573
14574#ifdef F77_DUMMY_MAIN
14575# ifdef __cplusplus
14576 extern "C"
14577# endif
14578 int F77_DUMMY_MAIN() { return 1; }
14579#endif
14580int
14581main ()
14582{
14583if ((wchar_t *) 0)
14584 return 0;
14585if (sizeof (wchar_t))
14586 return 0;
14587 ;
14588 return 0;
14589}
14590_ACEOF
14591rm -f conftest.$ac_objext
14592if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14593 (eval $ac_compile) 2>&5
14594 ac_status=$?
14595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14596 (exit $ac_status); } &&
14597 { ac_try='test -s conftest.$ac_objext'
14598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14599 (eval $ac_try) 2>&5
14600 ac_status=$?
14601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14602 (exit $ac_status); }; }; then
14603 ac_cv_type_wchar_t=yes
14604else
14605 echo "$as_me: failed program was:" >&5
14606cat conftest.$ac_ext >&5
14607ac_cv_type_wchar_t=no
14608fi
14609rm -f conftest.$ac_objext conftest.$ac_ext
14610fi
14611echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14612echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14613
14614echo "$as_me:$LINENO: checking size of wchar_t" >&5
14615echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14616if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14617 echo $ECHO_N "(cached) $ECHO_C" >&6
14618else
14619 if test "$ac_cv_type_wchar_t" = yes; then
14620 # The cast to unsigned long works around a bug in the HP C Compiler
14621 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14622 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14623 # This bug is HP SR number 8606223364.
14624 if test "$cross_compiling" = yes; then
14625 # Depending upon the size, compute the lo and hi bounds.
14626cat >conftest.$ac_ext <<_ACEOF
14627#line $LINENO "configure"
14628#include "confdefs.h"
14629#include <wchar.h>
14630
14631#ifdef F77_DUMMY_MAIN
14632# ifdef __cplusplus
14633 extern "C"
14634# endif
14635 int F77_DUMMY_MAIN() { return 1; }
14636#endif
14637int
14638main ()
14639{
14640static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14641test_array [0] = 0
14642
14643 ;
14644 return 0;
14645}
14646_ACEOF
14647rm -f conftest.$ac_objext
14648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14649 (eval $ac_compile) 2>&5
14650 ac_status=$?
14651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14652 (exit $ac_status); } &&
14653 { ac_try='test -s conftest.$ac_objext'
14654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14655 (eval $ac_try) 2>&5
14656 ac_status=$?
14657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14658 (exit $ac_status); }; }; then
14659 ac_lo=0 ac_mid=0
14660 while :; do
14661 cat >conftest.$ac_ext <<_ACEOF
14662#line $LINENO "configure"
14663#include "confdefs.h"
14664#include <wchar.h>
14665
14666#ifdef F77_DUMMY_MAIN
14667# ifdef __cplusplus
14668 extern "C"
14669# endif
14670 int F77_DUMMY_MAIN() { return 1; }
14671#endif
14672int
14673main ()
14674{
14675static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14676test_array [0] = 0
14677
14678 ;
14679 return 0;
14680}
14681_ACEOF
14682rm -f conftest.$ac_objext
14683if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14684 (eval $ac_compile) 2>&5
14685 ac_status=$?
14686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14687 (exit $ac_status); } &&
14688 { ac_try='test -s conftest.$ac_objext'
14689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14690 (eval $ac_try) 2>&5
14691 ac_status=$?
14692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14693 (exit $ac_status); }; }; then
14694 ac_hi=$ac_mid; break
14695else
14696 echo "$as_me: failed program was:" >&5
14697cat conftest.$ac_ext >&5
14698ac_lo=`expr $ac_mid + 1`
14699 if test $ac_lo -le $ac_mid; then
14700 ac_lo= ac_hi=
14701 break
14702 fi
14703 ac_mid=`expr 2 '*' $ac_mid + 1`
14704fi
14705rm -f conftest.$ac_objext conftest.$ac_ext
14706 done
14707else
14708 echo "$as_me: failed program was:" >&5
14709cat conftest.$ac_ext >&5
14710cat >conftest.$ac_ext <<_ACEOF
14711#line $LINENO "configure"
14712#include "confdefs.h"
14713#include <wchar.h>
14714
14715#ifdef F77_DUMMY_MAIN
14716# ifdef __cplusplus
14717 extern "C"
14718# endif
14719 int F77_DUMMY_MAIN() { return 1; }
14720#endif
14721int
14722main ()
14723{
14724static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14725test_array [0] = 0
14726
14727 ;
14728 return 0;
14729}
14730_ACEOF
14731rm -f conftest.$ac_objext
14732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14733 (eval $ac_compile) 2>&5
14734 ac_status=$?
14735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14736 (exit $ac_status); } &&
14737 { ac_try='test -s conftest.$ac_objext'
14738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14739 (eval $ac_try) 2>&5
14740 ac_status=$?
14741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14742 (exit $ac_status); }; }; then
14743 ac_hi=-1 ac_mid=-1
14744 while :; do
14745 cat >conftest.$ac_ext <<_ACEOF
14746#line $LINENO "configure"
14747#include "confdefs.h"
14748#include <wchar.h>
14749
14750#ifdef F77_DUMMY_MAIN
14751# ifdef __cplusplus
14752 extern "C"
14753# endif
14754 int F77_DUMMY_MAIN() { return 1; }
14755#endif
14756int
14757main ()
14758{
14759static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14760test_array [0] = 0
14761
14762 ;
14763 return 0;
14764}
14765_ACEOF
14766rm -f conftest.$ac_objext
14767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14768 (eval $ac_compile) 2>&5
14769 ac_status=$?
14770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14771 (exit $ac_status); } &&
14772 { ac_try='test -s conftest.$ac_objext'
14773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14774 (eval $ac_try) 2>&5
14775 ac_status=$?
14776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14777 (exit $ac_status); }; }; then
14778 ac_lo=$ac_mid; break
14779else
14780 echo "$as_me: failed program was:" >&5
14781cat conftest.$ac_ext >&5
14782ac_hi=`expr '(' $ac_mid ')' - 1`
14783 if test $ac_mid -le $ac_hi; then
14784 ac_lo= ac_hi=
14785 break
14786 fi
14787 ac_mid=`expr 2 '*' $ac_mid`
14788fi
14789rm -f conftest.$ac_objext conftest.$ac_ext
14790 done
14791else
14792 echo "$as_me: failed program was:" >&5
14793cat conftest.$ac_ext >&5
14794ac_lo= ac_hi=
14795fi
14796rm -f conftest.$ac_objext conftest.$ac_ext
14797fi
14798rm -f conftest.$ac_objext conftest.$ac_ext
14799# Binary search between lo and hi bounds.
14800while test "x$ac_lo" != "x$ac_hi"; do
14801 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14802 cat >conftest.$ac_ext <<_ACEOF
14803#line $LINENO "configure"
14804#include "confdefs.h"
14805#include <wchar.h>
14806
14807#ifdef F77_DUMMY_MAIN
14808# ifdef __cplusplus
14809 extern "C"
14810# endif
14811 int F77_DUMMY_MAIN() { return 1; }
14812#endif
14813int
14814main ()
14815{
14816static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14817test_array [0] = 0
14818
14819 ;
14820 return 0;
14821}
14822_ACEOF
14823rm -f conftest.$ac_objext
14824if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14825 (eval $ac_compile) 2>&5
14826 ac_status=$?
14827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14828 (exit $ac_status); } &&
14829 { ac_try='test -s conftest.$ac_objext'
14830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14831 (eval $ac_try) 2>&5
14832 ac_status=$?
14833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14834 (exit $ac_status); }; }; then
14835 ac_hi=$ac_mid
14836else
14837 echo "$as_me: failed program was:" >&5
14838cat conftest.$ac_ext >&5
14839ac_lo=`expr '(' $ac_mid ')' + 1`
14840fi
14841rm -f conftest.$ac_objext conftest.$ac_ext
14842done
14843case $ac_lo in
14844?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14845'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14846echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14847 { (exit 1); exit 1; }; } ;;
14848esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014849else
14850 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014851 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14852echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14853 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014854else
Martin v. Löwis11437992002-04-12 09:54:03 +000014855 cat >conftest.$ac_ext <<_ACEOF
14856#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014857#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014858#include <wchar.h>
14859
14860long longval () { return (long) (sizeof (wchar_t)); }
14861unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000014862#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014863#include <stdlib.h>
14864#ifdef F77_DUMMY_MAIN
14865# ifdef __cplusplus
14866 extern "C"
14867# endif
14868 int F77_DUMMY_MAIN() { return 1; }
14869#endif
14870int
14871main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014872{
Martin v. Löwis11437992002-04-12 09:54:03 +000014873
14874 FILE *f = fopen ("conftest.val", "w");
14875 if (! f)
14876 exit (1);
14877 if (((long) (sizeof (wchar_t))) < 0)
14878 {
14879 long i = longval ();
14880 if (i != ((long) (sizeof (wchar_t))))
14881 exit (1);
14882 fprintf (f, "%ld\n", i);
14883 }
14884 else
14885 {
14886 unsigned long i = ulongval ();
14887 if (i != ((long) (sizeof (wchar_t))))
14888 exit (1);
14889 fprintf (f, "%lu\n", i);
14890 }
14891 exit (ferror (f) || fclose (f) != 0);
14892
14893 ;
14894 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014895}
Martin v. Löwis11437992002-04-12 09:54:03 +000014896_ACEOF
14897rm -f conftest$ac_exeext
14898if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14899 (eval $ac_link) 2>&5
14900 ac_status=$?
14901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14902 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14904 (eval $ac_try) 2>&5
14905 ac_status=$?
14906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14907 (exit $ac_status); }; }; then
14908 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000014909else
Martin v. Löwis11437992002-04-12 09:54:03 +000014910 echo "$as_me: program exited with status $ac_status" >&5
14911echo "$as_me: failed program was:" >&5
14912cat conftest.$ac_ext >&5
14913( exit $ac_status )
14914{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14915echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14916 { (exit 1); exit 1; }; }
14917fi
14918rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14919fi
14920fi
14921rm -f conftest.val
14922else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014923 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000014924fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014925fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014926echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
14927echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
14928cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014929#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014930_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014931
Michael W. Hudson54241132001-12-07 15:38:26 +000014932
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014933fi
14934
Martin v. Löwis11437992002-04-12 09:54:03 +000014935echo "$as_me:$LINENO: checking what type to use for unicode" >&5
14936echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014937# Check whether --enable-unicode or --disable-unicode was given.
14938if test "${enable_unicode+set}" = set; then
14939 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000014940
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014941else
14942 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014943fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014944
14945if test $enable_unicode = yes
14946then
Martin v. Löwisfd917792001-06-27 20:22:04 +000014947 # Without any arguments, Py_UNICODE defaults to two-byte mode
14948 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014949fi
14950
Martin v. Löwis0036cba2002-04-12 09:58:45 +000014951
14952
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014953case "$enable_unicode" in
14954ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014956#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000014957_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014958
14959 ;;
14960ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000014961 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014962#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000014963_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014964
14965 ;;
14966esac
14967
Michael W. Hudson54241132001-12-07 15:38:26 +000014968
Martin v. Löwis11437992002-04-12 09:54:03 +000014969
14970
Martin v. Löwis0036cba2002-04-12 09:58:45 +000014971
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014972if test "$enable_unicode" = "no"
14973then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000014974 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000014975 echo "$as_me:$LINENO: result: not used" >&5
14976echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014977else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000014978 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000014979
14980cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014981#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014982_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014983
14984 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
14985 then
14986 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014987
Martin v. Löwis11437992002-04-12 09:54:03 +000014988cat >>confdefs.h <<\_ACEOF
14989#define HAVE_USABLE_WCHAR_T 1
14990_ACEOF
14991
14992 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014993#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014994_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014995
14996 elif test "$ac_cv_sizeof_short" = "$unicode_size"
14997 then
14998 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000014999 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015000#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015001_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015002
15003 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15004 then
15005 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015006 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015007#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015008_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015009
15010 else
15011 PY_UNICODE_TYPE="no type found"
15012 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015013 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15014echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015015fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015016
15017# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015018echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15019echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15020if test "${ac_cv_c_bigendian+set}" = set; then
15021 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015022else
Martin v. Löwis11437992002-04-12 09:54:03 +000015023 # See if sys/param.h defines the BYTE_ORDER macro.
15024cat >conftest.$ac_ext <<_ACEOF
15025#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015026#include "confdefs.h"
15027#include <sys/types.h>
15028#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015029
Martin v. Löwis11437992002-04-12 09:54:03 +000015030#ifdef F77_DUMMY_MAIN
15031# ifdef __cplusplus
15032 extern "C"
15033# endif
15034 int F77_DUMMY_MAIN() { return 1; }
15035#endif
15036int
15037main ()
15038{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015039#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15040 bogus endian macros
15041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015042
15043 ;
15044 return 0;
15045}
15046_ACEOF
15047rm -f conftest.$ac_objext
15048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15049 (eval $ac_compile) 2>&5
15050 ac_status=$?
15051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15052 (exit $ac_status); } &&
15053 { ac_try='test -s conftest.$ac_objext'
15054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15055 (eval $ac_try) 2>&5
15056 ac_status=$?
15057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15058 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015059 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015060cat >conftest.$ac_ext <<_ACEOF
15061#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015062#include "confdefs.h"
15063#include <sys/types.h>
15064#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015065
Martin v. Löwis11437992002-04-12 09:54:03 +000015066#ifdef F77_DUMMY_MAIN
15067# ifdef __cplusplus
15068 extern "C"
15069# endif
15070 int F77_DUMMY_MAIN() { return 1; }
15071#endif
15072int
15073main ()
15074{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015075#if BYTE_ORDER != BIG_ENDIAN
15076 not big endian
15077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015078
15079 ;
15080 return 0;
15081}
15082_ACEOF
15083rm -f conftest.$ac_objext
15084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15085 (eval $ac_compile) 2>&5
15086 ac_status=$?
15087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15088 (exit $ac_status); } &&
15089 { ac_try='test -s conftest.$ac_objext'
15090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15091 (eval $ac_try) 2>&5
15092 ac_status=$?
15093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15094 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015095 ac_cv_c_bigendian=yes
15096else
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 echo "$as_me: failed program was:" >&5
15098cat conftest.$ac_ext >&5
15099ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015100fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015101rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015102else
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 echo "$as_me: failed program was:" >&5
15104cat conftest.$ac_ext >&5
15105# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015106if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015107 # try to guess the endianess by grep'ing values into an object file
15108 ac_cv_c_bigendian=unknown
15109 cat >conftest.$ac_ext <<_ACEOF
15110#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015111#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015112short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15113short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15114void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15115short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15116short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15117void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15118#ifdef F77_DUMMY_MAIN
15119# ifdef __cplusplus
15120 extern "C"
15121# endif
15122 int F77_DUMMY_MAIN() { return 1; }
15123#endif
15124int
15125main ()
15126{
15127 _ascii (); _ebcdic ();
15128 ;
15129 return 0;
15130}
15131_ACEOF
15132rm -f conftest.$ac_objext
15133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15134 (eval $ac_compile) 2>&5
15135 ac_status=$?
15136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15137 (exit $ac_status); } &&
15138 { ac_try='test -s conftest.$ac_objext'
15139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15140 (eval $ac_try) 2>&5
15141 ac_status=$?
15142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15143 (exit $ac_status); }; }; then
15144 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15145 ac_cv_c_bigendian=yes
15146fi
15147if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15148 if test "$ac_cv_c_bigendian" = unknown; then
15149 ac_cv_c_bigendian=no
15150 else
15151 # finding both strings is unlikely to happen, but who knows?
15152 ac_cv_c_bigendian=unknown
15153 fi
15154fi
15155else
15156 echo "$as_me: failed program was:" >&5
15157cat conftest.$ac_ext >&5
15158fi
15159rm -f conftest.$ac_objext conftest.$ac_ext
15160else
15161 cat >conftest.$ac_ext <<_ACEOF
15162#line $LINENO "configure"
15163#include "confdefs.h"
15164int
15165main ()
15166{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015167 /* Are we little or big endian? From Harbison&Steele. */
15168 union
15169 {
15170 long l;
15171 char c[sizeof (long)];
15172 } u;
15173 u.l = 1;
15174 exit (u.c[sizeof (long) - 1] == 1);
15175}
Martin v. Löwis11437992002-04-12 09:54:03 +000015176_ACEOF
15177rm -f conftest$ac_exeext
15178if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15179 (eval $ac_link) 2>&5
15180 ac_status=$?
15181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15182 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15184 (eval $ac_try) 2>&5
15185 ac_status=$?
15186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15187 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015188 ac_cv_c_bigendian=no
15189else
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 echo "$as_me: program exited with status $ac_status" >&5
15191echo "$as_me: failed program was:" >&5
15192cat conftest.$ac_ext >&5
15193( exit $ac_status )
15194ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015195fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015196rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015197fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015198fi
15199rm -f conftest.$ac_objext conftest.$ac_ext
15200fi
15201echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15202echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15203case $ac_cv_c_bigendian in
15204 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015205
Martin v. Löwis11437992002-04-12 09:54:03 +000015206cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015207#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015208_ACEOF
15209 ;;
15210 no)
15211 ;;
15212 *)
15213 { { echo "$as_me:$LINENO: error: unknown endianess
15214presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15215echo "$as_me: error: unknown endianess
15216presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15217 { (exit 1); exit 1; }; } ;;
15218esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015219
Michael W. Hudson54241132001-12-07 15:38:26 +000015220
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015221# Check whether right shifting a negative integer extends the sign bit
15222# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015223echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15224echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15225if test "${ac_cv_rshift_extends_sign+set}" = set; then
15226 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015227else
Martin v. Löwis11437992002-04-12 09:54:03 +000015228
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015229if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015230 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015231else
Martin v. Löwis11437992002-04-12 09:54:03 +000015232 cat >conftest.$ac_ext <<_ACEOF
15233#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015234#include "confdefs.h"
15235
15236int main()
15237{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015238 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015239}
15240
Martin v. Löwis11437992002-04-12 09:54:03 +000015241_ACEOF
15242rm -f conftest$ac_exeext
15243if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15244 (eval $ac_link) 2>&5
15245 ac_status=$?
15246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15247 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15249 (eval $ac_try) 2>&5
15250 ac_status=$?
15251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15252 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015253 ac_cv_rshift_extends_sign=yes
15254else
Martin v. Löwis11437992002-04-12 09:54:03 +000015255 echo "$as_me: program exited with status $ac_status" >&5
15256echo "$as_me: failed program was:" >&5
15257cat conftest.$ac_ext >&5
15258( exit $ac_status )
15259ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015260fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015261rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15262fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015263fi
15264
Martin v. Löwis11437992002-04-12 09:54:03 +000015265echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15266echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015267if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015268then
Martin v. Löwis11437992002-04-12 09:54:03 +000015269
15270cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015271#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015272_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015273
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015274fi
15275
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015276# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015277echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15278echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15279if test "${ac_cv_have_getc_unlocked+set}" = set; then
15280 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015281else
Martin v. Löwis11437992002-04-12 09:54:03 +000015282
15283cat >conftest.$ac_ext <<_ACEOF
15284#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015285#include "confdefs.h"
15286#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015287#ifdef F77_DUMMY_MAIN
15288# ifdef __cplusplus
15289 extern "C"
15290# endif
15291 int F77_DUMMY_MAIN() { return 1; }
15292#endif
15293int
15294main ()
15295{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015296
15297 FILE *f = fopen("/dev/null", "r");
15298 flockfile(f);
15299 getc_unlocked(f);
15300 funlockfile(f);
15301
Martin v. Löwis11437992002-04-12 09:54:03 +000015302 ;
15303 return 0;
15304}
15305_ACEOF
15306rm -f conftest.$ac_objext conftest$ac_exeext
15307if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15308 (eval $ac_link) 2>&5
15309 ac_status=$?
15310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15311 (exit $ac_status); } &&
15312 { ac_try='test -s conftest$ac_exeext'
15313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15314 (eval $ac_try) 2>&5
15315 ac_status=$?
15316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15317 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015318 ac_cv_have_getc_unlocked=yes
15319else
Martin v. Löwis11437992002-04-12 09:54:03 +000015320 echo "$as_me: failed program was:" >&5
15321cat conftest.$ac_ext >&5
15322ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015324rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015325fi
15326
Martin v. Löwis11437992002-04-12 09:54:03 +000015327echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15328echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015329if test "$ac_cv_have_getc_unlocked" = yes
15330then
Martin v. Löwis11437992002-04-12 09:54:03 +000015331
15332cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015333#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015334_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015335
15336fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015337
Martin v. Löwis0daad592001-09-30 21:09:59 +000015338# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015339echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15340echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15341if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15342 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015343else
Martin v. Löwis11437992002-04-12 09:54:03 +000015344 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015345LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015346cat >conftest.$ac_ext <<_ACEOF
15347#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015348#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015349
Guido van Rossum353ae582001-07-10 16:45:32 +000015350/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015351#ifdef __cplusplus
15352extern "C"
15353#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015354/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 builtin and then its argument prototype would still apply. */
15356char rl_pre_input_hook ();
15357#ifdef F77_DUMMY_MAIN
15358# ifdef __cplusplus
15359 extern "C"
15360# endif
15361 int F77_DUMMY_MAIN() { return 1; }
15362#endif
15363int
15364main ()
15365{
15366rl_pre_input_hook ();
15367 ;
15368 return 0;
15369}
15370_ACEOF
15371rm -f conftest.$ac_objext conftest$ac_exeext
15372if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15373 (eval $ac_link) 2>&5
15374 ac_status=$?
15375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15376 (exit $ac_status); } &&
15377 { ac_try='test -s conftest$ac_exeext'
15378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15379 (eval $ac_try) 2>&5
15380 ac_status=$?
15381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15382 (exit $ac_status); }; }; then
15383 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015384else
Martin v. Löwis11437992002-04-12 09:54:03 +000015385 echo "$as_me: failed program was:" >&5
15386cat conftest.$ac_ext >&5
15387ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015388fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015389rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15390LIBS=$ac_check_lib_save_LIBS
15391fi
15392echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15393echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15394if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015395
Martin v. Löwis11437992002-04-12 09:54:03 +000015396cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015397#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015398_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015399
Martin v. Löwis0daad592001-09-30 21:09:59 +000015400fi
15401
Michael W. Hudson54241132001-12-07 15:38:26 +000015402
Martin v. Löwis0daad592001-09-30 21:09:59 +000015403# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015404echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15405echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15406if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15407 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015408else
Martin v. Löwis11437992002-04-12 09:54:03 +000015409 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015410LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015411cat >conftest.$ac_ext <<_ACEOF
15412#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015413#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015414
Martin v. Löwis0daad592001-09-30 21:09:59 +000015415/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015416#ifdef __cplusplus
15417extern "C"
15418#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015419/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015420 builtin and then its argument prototype would still apply. */
15421char rl_completion_matches ();
15422#ifdef F77_DUMMY_MAIN
15423# ifdef __cplusplus
15424 extern "C"
15425# endif
15426 int F77_DUMMY_MAIN() { return 1; }
15427#endif
15428int
15429main ()
15430{
15431rl_completion_matches ();
15432 ;
15433 return 0;
15434}
15435_ACEOF
15436rm -f conftest.$ac_objext conftest$ac_exeext
15437if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15438 (eval $ac_link) 2>&5
15439 ac_status=$?
15440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15441 (exit $ac_status); } &&
15442 { ac_try='test -s conftest$ac_exeext'
15443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15444 (eval $ac_try) 2>&5
15445 ac_status=$?
15446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15447 (exit $ac_status); }; }; then
15448 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015449else
Martin v. Löwis11437992002-04-12 09:54:03 +000015450 echo "$as_me: failed program was:" >&5
15451cat conftest.$ac_ext >&5
15452ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015453fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015454rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15455LIBS=$ac_check_lib_save_LIBS
15456fi
15457echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15458echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15459if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015460
Martin v. Löwis11437992002-04-12 09:54:03 +000015461cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015462#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015463_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015464
Guido van Rossum353ae582001-07-10 16:45:32 +000015465fi
15466
Jack Jansendd19cf82001-12-06 22:36:17 +000015467
Martin v. Löwis11437992002-04-12 09:54:03 +000015468echo "$as_me:$LINENO: checking for broken nice()" >&5
15469echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15470if test "${ac_cv_broken_nice+set}" = set; then
15471 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015472else
Martin v. Löwis11437992002-04-12 09:54:03 +000015473
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015474if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015475 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015476else
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 cat >conftest.$ac_ext <<_ACEOF
15478#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015479#include "confdefs.h"
15480
15481int main()
15482{
15483 int val1 = nice(1);
15484 if (val1 != -1 && val1 == nice(2))
15485 exit(0);
15486 exit(1);
15487}
15488
Martin v. Löwis11437992002-04-12 09:54:03 +000015489_ACEOF
15490rm -f conftest$ac_exeext
15491if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15492 (eval $ac_link) 2>&5
15493 ac_status=$?
15494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15495 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15497 (eval $ac_try) 2>&5
15498 ac_status=$?
15499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15500 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015501 ac_cv_broken_nice=yes
15502else
Martin v. Löwis11437992002-04-12 09:54:03 +000015503 echo "$as_me: program exited with status $ac_status" >&5
15504echo "$as_me: failed program was:" >&5
15505cat conftest.$ac_ext >&5
15506( exit $ac_status )
15507ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015508fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015509rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15510fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015511fi
15512
Martin v. Löwis11437992002-04-12 09:54:03 +000015513echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15514echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015515if test "$ac_cv_broken_nice" = yes
15516then
Martin v. Löwis11437992002-04-12 09:54:03 +000015517
15518cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015519#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015520_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015521
15522fi
15523
Jack Jansen666b1e72001-10-31 12:11:48 +000015524# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015525echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15526echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15527if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15528 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015529else
Martin v. Löwis11437992002-04-12 09:54:03 +000015530 cat >conftest.$ac_ext <<_ACEOF
15531#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015532#include "confdefs.h"
15533#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015534#ifdef F77_DUMMY_MAIN
15535# ifdef __cplusplus
15536 extern "C"
15537# endif
15538 int F77_DUMMY_MAIN() { return 1; }
15539#endif
15540int
15541main ()
15542{
Jack Jansen666b1e72001-10-31 12:11:48 +000015543
15544 int rtn;
15545 rtn = mvwdelch(0,0,0);
15546
Martin v. Löwis11437992002-04-12 09:54:03 +000015547 ;
15548 return 0;
15549}
15550_ACEOF
15551rm -f conftest.$ac_objext
15552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15553 (eval $ac_compile) 2>&5
15554 ac_status=$?
15555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15556 (exit $ac_status); } &&
15557 { ac_try='test -s conftest.$ac_objext'
15558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15559 (eval $ac_try) 2>&5
15560 ac_status=$?
15561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15562 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015563 ac_cv_mvwdelch_is_expression=yes
15564else
Martin v. Löwis11437992002-04-12 09:54:03 +000015565 echo "$as_me: failed program was:" >&5
15566cat conftest.$ac_ext >&5
15567ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015568fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015569rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015570fi
15571
Martin v. Löwis11437992002-04-12 09:54:03 +000015572echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15573echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015574
15575if test "$ac_cv_mvwdelch_is_expression" = yes
15576then
Martin v. Löwis11437992002-04-12 09:54:03 +000015577
15578cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015579#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015580_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015581
15582fi
15583
Martin v. Löwis11437992002-04-12 09:54:03 +000015584echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15585echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15586if test "${ac_cv_window_has_flags+set}" = set; then
15587 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015588else
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 cat >conftest.$ac_ext <<_ACEOF
15590#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015591#include "confdefs.h"
15592#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015593#ifdef F77_DUMMY_MAIN
15594# ifdef __cplusplus
15595 extern "C"
15596# endif
15597 int F77_DUMMY_MAIN() { return 1; }
15598#endif
15599int
15600main ()
15601{
Jack Jansen666b1e72001-10-31 12:11:48 +000015602
15603 WINDOW *w;
15604 w->_flags = 0;
15605
Martin v. Löwis11437992002-04-12 09:54:03 +000015606 ;
15607 return 0;
15608}
15609_ACEOF
15610rm -f conftest.$ac_objext
15611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15612 (eval $ac_compile) 2>&5
15613 ac_status=$?
15614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15615 (exit $ac_status); } &&
15616 { ac_try='test -s conftest.$ac_objext'
15617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15618 (eval $ac_try) 2>&5
15619 ac_status=$?
15620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15621 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015622 ac_cv_window_has_flags=yes
15623else
Martin v. Löwis11437992002-04-12 09:54:03 +000015624 echo "$as_me: failed program was:" >&5
15625cat conftest.$ac_ext >&5
15626ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015627fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015628rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015629fi
15630
Martin v. Löwis11437992002-04-12 09:54:03 +000015631echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15632echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015633
Jack Jansen666b1e72001-10-31 12:11:48 +000015634
15635if test "$ac_cv_window_has_flags" = yes
15636then
Martin v. Löwis11437992002-04-12 09:54:03 +000015637
15638cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015639#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015640_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015641
15642fi
15643
Guido van Rossum95713eb2000-05-18 20:53:31 +000015644# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15645# Add sys/socket.h to confdefs.h
15646cat >> confdefs.h <<\EOF
15647#ifdef HAVE_SYS_SOCKET_H
15648#include <sys/socket.h>
15649#endif
15650EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015651echo "$as_me:$LINENO: checking for socklen_t" >&5
15652echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15653if test "${ac_cv_type_socklen_t+set}" = set; then
15654 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015655else
Martin v. Löwis11437992002-04-12 09:54:03 +000015656 cat >conftest.$ac_ext <<_ACEOF
15657#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015658#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015659$ac_includes_default
15660#ifdef F77_DUMMY_MAIN
15661# ifdef __cplusplus
15662 extern "C"
15663# endif
15664 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015665#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015666int
15667main ()
15668{
15669if ((socklen_t *) 0)
15670 return 0;
15671if (sizeof (socklen_t))
15672 return 0;
15673 ;
15674 return 0;
15675}
15676_ACEOF
15677rm -f conftest.$ac_objext
15678if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15679 (eval $ac_compile) 2>&5
15680 ac_status=$?
15681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15682 (exit $ac_status); } &&
15683 { ac_try='test -s conftest.$ac_objext'
15684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15685 (eval $ac_try) 2>&5
15686 ac_status=$?
15687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15688 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015689 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015690else
Martin v. Löwis11437992002-04-12 09:54:03 +000015691 echo "$as_me: failed program was:" >&5
15692cat conftest.$ac_ext >&5
15693ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015694fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015695rm -f conftest.$ac_objext conftest.$ac_ext
15696fi
15697echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15698echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15699if test $ac_cv_type_socklen_t = yes; then
15700 :
15701else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015702
Martin v. Löwis11437992002-04-12 09:54:03 +000015703cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015704#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015705_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015706
15707fi
15708
Michael W. Hudson54241132001-12-07 15:38:26 +000015709
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015710#AC_MSG_CHECKING(for Modules/Setup)
15711#if test ! -f Modules/Setup ; then
15712# if test ! -d Modules ; then
15713# mkdir Modules
15714# fi
15715# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15716# AC_MSG_RESULT(creating)
15717#else
15718# AC_MSG_RESULT(already exists)
15719#fi
15720
Michael W. Hudson54241132001-12-07 15:38:26 +000015721
15722
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015723for h in `(cd $srcdir;echo Python/thread_*.h)`
15724do
15725 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15726done
15727
Michael W. Hudson54241132001-12-07 15:38:26 +000015728
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +000015729SRCDIRS="Parser Grammar Objects Python Modules"
Martin v. Löwis11437992002-04-12 09:54:03 +000015730echo "$as_me:$LINENO: checking for build directories" >&5
15731echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015732for dir in $SRCDIRS; do
15733 if test ! -d $dir; then
15734 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015735 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015736done
Martin v. Löwis11437992002-04-12 09:54:03 +000015737echo "$as_me:$LINENO: result: done" >&5
15738echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015739
Guido van Rossum627b2d71993-12-24 10:39:16 +000015740# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015741ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15742cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015743# This file is a shell script that caches the results of configure
15744# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015745# scripts and configure runs, see configure's option --config-cache.
15746# It is not useful on other systems. If it contains results you don't
15747# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015748#
Martin v. Löwis11437992002-04-12 09:54:03 +000015749# config.status only pays attention to the cache file if you give it
15750# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015751#
Martin v. Löwis11437992002-04-12 09:54:03 +000015752# `ac_cv_env_foo' variables (set or unset) will be overriden when
15753# loading this file, other *unset* `ac_cv_foo' will be assigned the
15754# following values.
15755
15756_ACEOF
15757
Guido van Rossumf78abae1997-01-21 22:02:36 +000015758# The following way of writing the cache mishandles newlines in values,
15759# but we know of no workaround that is simple, portable, and efficient.
15760# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015761# Ultrix sh set writes to stderr and can't be redirected directly,
15762# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015763{
15764 (set) 2>&1 |
15765 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15766 *ac_space=\ *)
15767 # `set' does not quote correctly, so add quotes (double-quote
15768 # substitution turns \\\\ into \\, and sed turns \\ into \).
15769 sed -n \
15770 "s/'/'\\\\''/g;
15771 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15772 ;;
15773 *)
15774 # `set' quotes correctly as required by POSIX, so do not add quotes.
15775 sed -n \
15776 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15777 ;;
15778 esac;
15779} |
15780 sed '
15781 t clear
15782 : clear
15783 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15784 t end
15785 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15786 : end' >>confcache
15787if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015788 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015789 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15790 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015791 else
15792 echo "not updating unwritable cache $cache_file"
15793 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015794fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015795rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015796
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015797test "x$prefix" = xNONE && prefix=$ac_default_prefix
15798# Let make expand exec_prefix.
15799test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015800
Martin v. Löwis11437992002-04-12 09:54:03 +000015801# VPATH may cause trouble with some makes, so we remove $(srcdir),
15802# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15803# trailing colons and then remove the whole line if VPATH becomes empty
15804# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015805if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015806 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15807s/:*\$(srcdir):*/:/;
15808s/:*\${srcdir}:*/:/;
15809s/:*@srcdir@:*/:/;
15810s/^\([^=]*=[ ]*\):*/\1/;
15811s/:*$//;
15812s/^[^=]*=[ ]*$//;
15813}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015814fi
15815
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015816DEFS=-DHAVE_CONFIG_H
15817
Martin v. Löwis11437992002-04-12 09:54:03 +000015818
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015819: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015820ac_clean_files_save=$ac_clean_files
15821ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15822{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15823echo "$as_me: creating $CONFIG_STATUS" >&6;}
15824cat >$CONFIG_STATUS <<_ACEOF
15825#! $SHELL
15826# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015827# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015828# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015829# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015830
Martin v. Löwis11437992002-04-12 09:54:03 +000015831debug=false
15832SHELL=\${CONFIG_SHELL-$SHELL}
15833_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015834
Martin v. Löwis11437992002-04-12 09:54:03 +000015835cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015836
Martin v. Löwis11437992002-04-12 09:54:03 +000015837## --------------------- ##
15838## M4sh Initialization. ##
15839## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015840
Martin v. Löwis11437992002-04-12 09:54:03 +000015841# Be Bourne compatible
15842if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15843 emulate sh
15844 NULLCMD=:
15845elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15846 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000015847fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015848
Martin v. Löwis11437992002-04-12 09:54:03 +000015849# NLS nuisances.
15850# Support unset when possible.
15851if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15852 as_unset=unset
15853else
15854 as_unset=false
15855fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015856
Martin v. Löwis11437992002-04-12 09:54:03 +000015857(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
15858 { $as_unset LANG || test "${LANG+set}" != set; } ||
15859 { LANG=C; export LANG; }
15860(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
15861 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
15862 { LC_ALL=C; export LC_ALL; }
15863(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
15864 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
15865 { LC_TIME=C; export LC_TIME; }
15866(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
15867 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
15868 { LC_CTYPE=C; export LC_CTYPE; }
15869(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
15870 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
15871 { LANGUAGE=C; export LANGUAGE; }
15872(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
15873 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
15874 { LC_COLLATE=C; export LC_COLLATE; }
15875(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
15876 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
15877 { LC_NUMERIC=C; export LC_NUMERIC; }
15878(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
15879 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
15880 { LC_MESSAGES=C; export LC_MESSAGES; }
15881
15882
15883# Name of the executable.
15884as_me=`(basename "$0") 2>/dev/null ||
15885$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15886 X"$0" : 'X\(//\)$' \| \
15887 X"$0" : 'X\(/\)$' \| \
15888 . : '\(.\)' 2>/dev/null ||
15889echo X/"$0" |
15890 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15891 /^X\/\(\/\/\)$/{ s//\1/; q; }
15892 /^X\/\(\/\).*/{ s//\1/; q; }
15893 s/.*/./; q'`
15894
15895# PATH needs CR, and LINENO needs CR and PATH.
15896# Avoid depending upon Character Ranges.
15897as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15898as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15899as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15900as_cr_digits='0123456789'
15901as_cr_alnum=$as_cr_Letters$as_cr_digits
15902
15903# The user is always right.
15904if test "${PATH_SEPARATOR+set}" != set; then
15905 echo "#! /bin/sh" >conftest.sh
15906 echo "exit 0" >>conftest.sh
15907 chmod +x conftest.sh
15908 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
15909 PATH_SEPARATOR=';'
15910 else
15911 PATH_SEPARATOR=:
15912 fi
15913 rm -f conftest.sh
15914fi
15915
15916
15917 as_lineno_1=$LINENO
15918 as_lineno_2=$LINENO
15919 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15920 test "x$as_lineno_1" != "x$as_lineno_2" &&
15921 test "x$as_lineno_3" = "x$as_lineno_2" || {
15922 # Find who we are. Look in the path if we contain no path at all
15923 # relative or not.
15924 case $0 in
15925 *[\\/]* ) as_myself=$0 ;;
15926 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15927for as_dir in $PATH
15928do
15929 IFS=$as_save_IFS
15930 test -z "$as_dir" && as_dir=.
15931 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15932done
15933
15934 ;;
15935 esac
15936 # We did not find ourselves, most probably we were run as `sh COMMAND'
15937 # in which case we are not to be found in the path.
15938 if test "x$as_myself" = x; then
15939 as_myself=$0
15940 fi
15941 if test ! -f "$as_myself"; then
15942 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
15943echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
15944 { (exit 1); exit 1; }; }
15945 fi
15946 case $CONFIG_SHELL in
15947 '')
15948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15949for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
15950do
15951 IFS=$as_save_IFS
15952 test -z "$as_dir" && as_dir=.
15953 for as_base in sh bash ksh sh5; do
15954 case $as_dir in
15955 /*)
15956 if ("$as_dir/$as_base" -c '
15957 as_lineno_1=$LINENO
15958 as_lineno_2=$LINENO
15959 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15960 test "x$as_lineno_1" != "x$as_lineno_2" &&
15961 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
15962 CONFIG_SHELL=$as_dir/$as_base
15963 export CONFIG_SHELL
15964 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
15965 fi;;
15966 esac
15967 done
15968done
15969;;
Jack Jansendd19cf82001-12-06 22:36:17 +000015970 esac
15971
Martin v. Löwis11437992002-04-12 09:54:03 +000015972 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
15973 # uniformly replaced by the line number. The first 'sed' inserts a
15974 # line-number line before each line; the second 'sed' does the real
15975 # work. The second script uses 'N' to pair each line-number line
15976 # with the numbered line, and appends trailing '-' during
15977 # substitution so that $LINENO is not a special case at line end.
15978 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
15979 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
15980 sed '=' <$as_myself |
15981 sed '
15982 N
15983 s,$,-,
15984 : loop
15985 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
15986 t loop
15987 s,-$,,
15988 s,^['$as_cr_digits']*\n,,
15989 ' >$as_me.lineno &&
15990 chmod +x $as_me.lineno ||
15991 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
15992echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
15993 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015994
Martin v. Löwis11437992002-04-12 09:54:03 +000015995 # Don't try to exec as it changes $[0], causing all sort of problems
15996 # (the dirname of $[0] is not the place where we might find the
15997 # original and so on. Autoconf is especially sensible to this).
15998 . ./$as_me.lineno
15999 # Exit status is that of the last command.
16000 exit
16001}
16002
16003
16004case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16005 *c*,-n*) ECHO_N= ECHO_C='
16006' ECHO_T=' ' ;;
16007 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16008 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16009esac
16010
16011if expr a : '\(a\)' >/dev/null 2>&1; then
16012 as_expr=expr
16013else
16014 as_expr=false
16015fi
16016
16017rm -f conf$$ conf$$.exe conf$$.file
16018echo >conf$$.file
16019if ln -s conf$$.file conf$$ 2>/dev/null; then
16020 # We could just check for DJGPP; but this test a) works b) is more generic
16021 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16022 if test -f conf$$.exe; then
16023 # Don't use ln at all; we don't have any links
16024 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016025 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016026 as_ln_s='ln -s'
16027 fi
16028elif ln conf$$.file conf$$ 2>/dev/null; then
16029 as_ln_s=ln
16030else
16031 as_ln_s='cp -p'
16032fi
16033rm -f conf$$ conf$$.exe conf$$.file
16034
16035as_executable_p="test -f"
16036
16037# Sed expression to map a string onto a valid CPP name.
16038as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16039
16040# Sed expression to map a string onto a valid variable name.
16041as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16042
16043
16044# IFS
16045# We need space, tab and new line, in precisely that order.
16046as_nl='
16047'
16048IFS=" $as_nl"
16049
16050# CDPATH.
16051$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16052
16053exec 6>&1
16054
16055# Open the log real soon, to keep \$[0] and so on meaningful, and to
16056# report actual input values of CONFIG_FILES etc. instead of their
16057# values after options handling. Logging --version etc. is OK.
16058exec 5>>config.log
16059{
16060 echo
16061 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16062## Running $as_me. ##
16063_ASBOX
16064} >&5
16065cat >&5 <<_CSEOF
16066
16067This file was extended by $as_me, which was
16068generated by GNU Autoconf 2.53. Invocation command line was
16069
16070 CONFIG_FILES = $CONFIG_FILES
16071 CONFIG_HEADERS = $CONFIG_HEADERS
16072 CONFIG_LINKS = $CONFIG_LINKS
16073 CONFIG_COMMANDS = $CONFIG_COMMANDS
16074 $ $0 $@
16075
16076_CSEOF
16077echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16078echo >&5
16079_ACEOF
16080
16081# Files that config.status was made for.
16082if test -n "$ac_config_files"; then
16083 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16084fi
16085
16086if test -n "$ac_config_headers"; then
16087 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16088fi
16089
16090if test -n "$ac_config_links"; then
16091 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16092fi
16093
16094if test -n "$ac_config_commands"; then
16095 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16096fi
16097
16098cat >>$CONFIG_STATUS <<\_ACEOF
16099
16100ac_cs_usage="\
16101\`$as_me' instantiates files from templates according to the
16102current configuration.
16103
16104Usage: $0 [OPTIONS] [FILE]...
16105
16106 -h, --help print this help, then exit
16107 -V, --version print version number, then exit
16108 -d, --debug don't remove temporary files
16109 --recheck update $as_me by reconfiguring in the same conditions
16110 --file=FILE[:TEMPLATE]
16111 instantiate the configuration file FILE
16112 --header=FILE[:TEMPLATE]
16113 instantiate the configuration header FILE
16114
16115Configuration files:
16116$config_files
16117
16118Configuration headers:
16119$config_headers
16120
16121Report bugs to <bug-autoconf@gnu.org>."
16122_ACEOF
16123
16124cat >>$CONFIG_STATUS <<_ACEOF
16125ac_cs_version="\\
16126config.status
16127configured by $0, generated by GNU Autoconf 2.53,
16128 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16129
16130Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16131Free Software Foundation, Inc.
16132This config.status script is free software; the Free Software Foundation
16133gives unlimited permission to copy, distribute and modify it."
16134srcdir=$srcdir
16135INSTALL="$INSTALL"
16136_ACEOF
16137
16138cat >>$CONFIG_STATUS <<\_ACEOF
16139# If no file are specified by the user, then we need to provide default
16140# value. By we need to know if files were specified by the user.
16141ac_need_defaults=:
16142while test $# != 0
16143do
16144 case $1 in
16145 --*=*)
16146 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16147 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16148 shift
16149 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16150 shift
16151 ;;
16152 -*);;
16153 *) # This is not an option, so the user has probably given explicit
16154 # arguments.
16155 ac_need_defaults=false;;
16156 esac
16157
16158 case $1 in
16159 # Handling of the options.
16160_ACEOF
16161cat >>$CONFIG_STATUS <<_ACEOF
16162 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16163 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16164 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16165_ACEOF
16166cat >>$CONFIG_STATUS <<\_ACEOF
16167 --version | --vers* | -V )
16168 echo "$ac_cs_version"; exit 0 ;;
16169 --he | --h)
16170 # Conflict between --help and --header
16171 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16172Try \`$0 --help' for more information." >&5
16173echo "$as_me: error: ambiguous option: $1
16174Try \`$0 --help' for more information." >&2;}
16175 { (exit 1); exit 1; }; };;
16176 --help | --hel | -h )
16177 echo "$ac_cs_usage"; exit 0 ;;
16178 --debug | --d* | -d )
16179 debug=: ;;
16180 --file | --fil | --fi | --f )
16181 shift
16182 CONFIG_FILES="$CONFIG_FILES $1"
16183 ac_need_defaults=false;;
16184 --header | --heade | --head | --hea )
16185 shift
16186 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16187 ac_need_defaults=false;;
16188
16189 # This is an error.
16190 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16191Try \`$0 --help' for more information." >&5
16192echo "$as_me: error: unrecognized option: $1
16193Try \`$0 --help' for more information." >&2;}
16194 { (exit 1); exit 1; }; } ;;
16195
16196 *) ac_config_targets="$ac_config_targets $1" ;;
16197
16198 esac
16199 shift
16200done
16201
16202_ACEOF
16203
16204
16205
16206
16207
16208cat >>$CONFIG_STATUS <<\_ACEOF
16209for ac_config_target in $ac_config_targets
16210do
16211 case "$ac_config_target" in
16212 # Handling of arguments.
16213 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16214 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16215 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16216 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16217echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16218 { (exit 1); exit 1; }; };;
16219 esac
16220done
16221
16222# If the user did not use the arguments to specify the items to instantiate,
16223# then the envvar interface is used. Set only those that are not.
16224# We use the long form for the default assignment because of an extremely
16225# bizarre bug on SunOS 4.1.3.
16226if $ac_need_defaults; then
16227 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16228 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16229fi
16230
16231# Create a temporary directory, and hook for its removal unless debugging.
16232$debug ||
16233{
16234 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16235 trap '{ (exit 1); exit 1; }' 1 2 13 15
16236}
16237
16238# Create a (secure) tmp directory for tmp files.
16239: ${TMPDIR=/tmp}
16240{
16241 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16242 test -n "$tmp" && test -d "$tmp"
16243} ||
16244{
16245 tmp=$TMPDIR/cs$$-$RANDOM
16246 (umask 077 && mkdir $tmp)
16247} ||
16248{
16249 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16250 { (exit 1); exit 1; }
16251}
16252
16253_ACEOF
16254
16255cat >>$CONFIG_STATUS <<_ACEOF
16256
16257#
16258# CONFIG_FILES section.
16259#
16260
16261# No need to generate the scripts if there are no CONFIG_FILES.
16262# This happens for instance when ./config.status config.h
16263if test -n "\$CONFIG_FILES"; then
16264 # Protect against being on the right side of a sed subst in config.status.
16265 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16266 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16267s,@SHELL@,$SHELL,;t t
16268s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16269s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16270s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16271s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16272s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16273s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16274s,@exec_prefix@,$exec_prefix,;t t
16275s,@prefix@,$prefix,;t t
16276s,@program_transform_name@,$program_transform_name,;t t
16277s,@bindir@,$bindir,;t t
16278s,@sbindir@,$sbindir,;t t
16279s,@libexecdir@,$libexecdir,;t t
16280s,@datadir@,$datadir,;t t
16281s,@sysconfdir@,$sysconfdir,;t t
16282s,@sharedstatedir@,$sharedstatedir,;t t
16283s,@localstatedir@,$localstatedir,;t t
16284s,@libdir@,$libdir,;t t
16285s,@includedir@,$includedir,;t t
16286s,@oldincludedir@,$oldincludedir,;t t
16287s,@infodir@,$infodir,;t t
16288s,@mandir@,$mandir,;t t
16289s,@build_alias@,$build_alias,;t t
16290s,@host_alias@,$host_alias,;t t
16291s,@target_alias@,$target_alias,;t t
16292s,@DEFS@,$DEFS,;t t
16293s,@ECHO_C@,$ECHO_C,;t t
16294s,@ECHO_N@,$ECHO_N,;t t
16295s,@ECHO_T@,$ECHO_T,;t t
16296s,@LIBS@,$LIBS,;t t
16297s,@VERSION@,$VERSION,;t t
16298s,@SOVERSION@,$SOVERSION,;t t
16299s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16300s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16301s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16302s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16303s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16304s,@MACHDEP@,$MACHDEP,;t t
16305s,@SGI_ABI@,$SGI_ABI,;t t
16306s,@CXX@,$CXX,;t t
16307s,@MAINOBJ@,$MAINOBJ,;t t
16308s,@EXEEXT@,$EXEEXT,;t t
16309s,@CC@,$CC,;t t
16310s,@CFLAGS@,$CFLAGS,;t t
16311s,@LDFLAGS@,$LDFLAGS,;t t
16312s,@CPPFLAGS@,$CPPFLAGS,;t t
16313s,@ac_ct_CC@,$ac_ct_CC,;t t
16314s,@OBJEXT@,$OBJEXT,;t t
16315s,@CPP@,$CPP,;t t
16316s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16317s,@LIBRARY@,$LIBRARY,;t t
16318s,@LDLIBRARY@,$LDLIBRARY,;t t
16319s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16320s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16321s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16322s,@INSTSONAME@,$INSTSONAME,;t t
16323s,@RUNSHARED@,$RUNSHARED,;t t
16324s,@LINKCC@,$LINKCC,;t t
16325s,@RANLIB@,$RANLIB,;t t
16326s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16327s,@AR@,$AR,;t t
16328s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16329s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16330s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16331s,@LN@,$LN,;t t
16332s,@OPT@,$OPT,;t t
16333s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16334s,@SO@,$SO,;t t
16335s,@LDSHARED@,$LDSHARED,;t t
16336s,@BLDSHARED@,$BLDSHARED,;t t
16337s,@CCSHARED@,$CCSHARED,;t t
16338s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16339s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
16340s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16341s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16342s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16343s,@LDLAST@,$LDLAST,;t t
16344s,@THREADOBJ@,$THREADOBJ,;t t
16345s,@DLINCLDIR@,$DLINCLDIR,;t t
16346s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16347s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16348s,@LIBOBJS@,$LIBOBJS,;t t
16349s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16350s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16351s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16352s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16353s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16354s,@LIBM@,$LIBM,;t t
16355s,@LIBC@,$LIBC,;t t
16356s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16357s,@THREADHEADERS@,$THREADHEADERS,;t t
16358s,@SRCDIRS@,$SRCDIRS,;t t
16359CEOF
16360
16361_ACEOF
16362
16363 cat >>$CONFIG_STATUS <<\_ACEOF
16364 # Split the substitutions into bite-sized pieces for seds with
16365 # small command number limits, like on Digital OSF/1 and HP-UX.
16366 ac_max_sed_lines=48
16367 ac_sed_frag=1 # Number of current file.
16368 ac_beg=1 # First line for current file.
16369 ac_end=$ac_max_sed_lines # Line after last line for current file.
16370 ac_more_lines=:
16371 ac_sed_cmds=
16372 while $ac_more_lines; do
16373 if test $ac_beg -gt 1; then
16374 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16375 else
16376 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16377 fi
16378 if test ! -s $tmp/subs.frag; then
16379 ac_more_lines=false
16380 else
16381 # The purpose of the label and of the branching condition is to
16382 # speed up the sed processing (if there are no `@' at all, there
16383 # is no need to browse any of the substitutions).
16384 # These are the two extra sed commands mentioned above.
16385 (echo ':t
16386 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16387 if test -z "$ac_sed_cmds"; then
16388 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16389 else
16390 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16391 fi
16392 ac_sed_frag=`expr $ac_sed_frag + 1`
16393 ac_beg=$ac_end
16394 ac_end=`expr $ac_end + $ac_max_sed_lines`
16395 fi
16396 done
16397 if test -z "$ac_sed_cmds"; then
16398 ac_sed_cmds=cat
16399 fi
16400fi # test -n "$CONFIG_FILES"
16401
16402_ACEOF
16403cat >>$CONFIG_STATUS <<\_ACEOF
16404for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16405 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16406 case $ac_file in
16407 - | *:- | *:-:* ) # input from stdin
16408 cat >$tmp/stdin
16409 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16410 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16411 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16412 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16413 * ) ac_file_in=$ac_file.in ;;
16414 esac
16415
16416 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16417 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16418$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16419 X"$ac_file" : 'X\(//\)[^/]' \| \
16420 X"$ac_file" : 'X\(//\)$' \| \
16421 X"$ac_file" : 'X\(/\)' \| \
16422 . : '\(.\)' 2>/dev/null ||
16423echo X"$ac_file" |
16424 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16425 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16426 /^X\(\/\/\)$/{ s//\1/; q; }
16427 /^X\(\/\).*/{ s//\1/; q; }
16428 s/.*/./; q'`
16429 { case "$ac_dir" in
16430 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16431 *) as_incr_dir=.;;
16432esac
16433as_dummy="$ac_dir"
16434for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16435 case $as_mkdir_dir in
16436 # Skip DOS drivespec
16437 ?:) as_incr_dir=$as_mkdir_dir ;;
16438 *)
16439 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16440 test -d "$as_incr_dir" ||
16441 mkdir "$as_incr_dir" ||
16442 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16443echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16444 { (exit 1); exit 1; }; }
16445 ;;
16446 esac
16447done; }
16448
16449 ac_builddir=.
16450
16451if test "$ac_dir" != .; then
16452 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16453 # A "../" for each directory in $ac_dir_suffix.
16454 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16455else
16456 ac_dir_suffix= ac_top_builddir=
16457fi
16458
16459case $srcdir in
16460 .) # No --srcdir option. We are building in place.
16461 ac_srcdir=.
16462 if test -z "$ac_top_builddir"; then
16463 ac_top_srcdir=.
16464 else
16465 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16466 fi ;;
16467 [\\/]* | ?:[\\/]* ) # Absolute path.
16468 ac_srcdir=$srcdir$ac_dir_suffix;
16469 ac_top_srcdir=$srcdir ;;
16470 *) # Relative path.
16471 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16472 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16473esac
16474# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16475# absolute.
16476ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16477ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16478ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16479ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16480
16481
16482 case $INSTALL in
16483 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16484 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16485 esac
16486
16487 if test x"$ac_file" != x-; then
16488 { echo "$as_me:$LINENO: creating $ac_file" >&5
16489echo "$as_me: creating $ac_file" >&6;}
16490 rm -f "$ac_file"
16491 fi
16492 # Let's still pretend it is `configure' which instantiates (i.e., don't
16493 # use $as_me), people would be surprised to read:
16494 # /* config.h. Generated by config.status. */
16495 if test x"$ac_file" = x-; then
16496 configure_input=
16497 else
16498 configure_input="$ac_file. "
16499 fi
16500 configure_input=$configure_input"Generated from `echo $ac_file_in |
16501 sed 's,.*/,,'` by configure."
16502
16503 # First look for the input files in the build tree, otherwise in the
16504 # src tree.
16505 ac_file_inputs=`IFS=:
16506 for f in $ac_file_in; do
16507 case $f in
16508 -) echo $tmp/stdin ;;
16509 [\\/$]*)
16510 # Absolute (can't be DOS-style, as IFS=:)
16511 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16512echo "$as_me: error: cannot find input file: $f" >&2;}
16513 { (exit 1); exit 1; }; }
16514 echo $f;;
16515 *) # Relative
16516 if test -f "$f"; then
16517 # Build tree
16518 echo $f
16519 elif test -f "$srcdir/$f"; then
16520 # Source tree
16521 echo $srcdir/$f
16522 else
16523 # /dev/null tree
16524 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16525echo "$as_me: error: cannot find input file: $f" >&2;}
16526 { (exit 1); exit 1; }; }
16527 fi;;
16528 esac
16529 done` || { (exit 1); exit 1; }
16530_ACEOF
16531cat >>$CONFIG_STATUS <<_ACEOF
16532 sed "$ac_vpsub
16533$extrasub
16534_ACEOF
16535cat >>$CONFIG_STATUS <<\_ACEOF
16536:t
16537/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16538s,@configure_input@,$configure_input,;t t
16539s,@srcdir@,$ac_srcdir,;t t
16540s,@abs_srcdir@,$ac_abs_srcdir,;t t
16541s,@top_srcdir@,$ac_top_srcdir,;t t
16542s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16543s,@builddir@,$ac_builddir,;t t
16544s,@abs_builddir@,$ac_abs_builddir,;t t
16545s,@top_builddir@,$ac_top_builddir,;t t
16546s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16547s,@INSTALL@,$ac_INSTALL,;t t
16548" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16549 rm -f $tmp/stdin
16550 if test x"$ac_file" != x-; then
16551 mv $tmp/out $ac_file
16552 else
16553 cat $tmp/out
16554 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016555 fi
16556
Martin v. Löwis11437992002-04-12 09:54:03 +000016557done
16558_ACEOF
16559cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016560
Martin v. Löwis11437992002-04-12 09:54:03 +000016561#
16562# CONFIG_HEADER section.
16563#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016564
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016565# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16566# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016567#
16568# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016569ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16570ac_dB='[ ].*$,\1#\2'
16571ac_dC=' '
16572ac_dD=',;t'
16573# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16574ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16575ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016576ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016577ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016578
Martin v. Löwis11437992002-04-12 09:54:03 +000016579for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016580 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016581 case $ac_file in
16582 - | *:- | *:-:* ) # input from stdin
16583 cat >$tmp/stdin
16584 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16585 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16586 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16587 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16588 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016589 esac
16590
Martin v. Löwis11437992002-04-12 09:54:03 +000016591 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16592echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016593
Martin v. Löwis11437992002-04-12 09:54:03 +000016594 # First look for the input files in the build tree, otherwise in the
16595 # src tree.
16596 ac_file_inputs=`IFS=:
16597 for f in $ac_file_in; do
16598 case $f in
16599 -) echo $tmp/stdin ;;
16600 [\\/$]*)
16601 # Absolute (can't be DOS-style, as IFS=:)
16602 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16603echo "$as_me: error: cannot find input file: $f" >&2;}
16604 { (exit 1); exit 1; }; }
16605 echo $f;;
16606 *) # Relative
16607 if test -f "$f"; then
16608 # Build tree
16609 echo $f
16610 elif test -f "$srcdir/$f"; then
16611 # Source tree
16612 echo $srcdir/$f
16613 else
16614 # /dev/null tree
16615 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16616echo "$as_me: error: cannot find input file: $f" >&2;}
16617 { (exit 1); exit 1; }; }
16618 fi;;
16619 esac
16620 done` || { (exit 1); exit 1; }
16621 # Remove the trailing spaces.
16622 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016623
Martin v. Löwis11437992002-04-12 09:54:03 +000016624_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016625
Martin v. Löwis11437992002-04-12 09:54:03 +000016626# Transform confdefs.h into two sed scripts, `conftest.defines' and
16627# `conftest.undefs', that substitutes the proper values into
16628# config.h.in to produce config.h. The first handles `#define'
16629# templates, and the second `#undef' templates.
16630# And first: Protect against being on the right side of a sed subst in
16631# config.status. Protect against being in an unquoted here document
16632# in config.status.
16633rm -f conftest.defines conftest.undefs
16634# Using a here document instead of a string reduces the quoting nightmare.
16635# Putting comments in sed scripts is not portable.
16636#
16637# `end' is used to avoid that the second main sed command (meant for
16638# 0-ary CPP macros) applies to n-ary macro definitions.
16639# See the Autoconf documentation for `clear'.
16640cat >confdef2sed.sed <<\_ACEOF
16641s/[\\&,]/\\&/g
16642s,[\\$`],\\&,g
16643t clear
16644: clear
16645s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16646t end
16647s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16648: end
16649_ACEOF
16650# If some macros were called several times there might be several times
16651# the same #defines, which is useless. Nevertheless, we may not want to
16652# sort them, since we want the *last* AC-DEFINE to be honored.
16653uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16654sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16655rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016656
16657# This sed command replaces #undef with comments. This is necessary, for
16658# example, in the case of _POSIX_SOURCE, which is predefined and required
16659# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016660cat >>conftest.undefs <<\_ACEOF
16661s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16662_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016663
Martin v. Löwis11437992002-04-12 09:54:03 +000016664# Break up conftest.defines because some shells have a limit on the size
16665# of here documents, and old seds have small limits too (100 cmds).
16666echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16667echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16668echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16669echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016670rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016671while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016672do
Martin v. Löwis11437992002-04-12 09:54:03 +000016673 # Write a limited-size here document to $tmp/defines.sed.
16674 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16675 # Speed up: don't consider the non `#define' lines.
16676 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16677 # Work around the forget-to-reset-the-flag bug.
16678 echo 't clr' >>$CONFIG_STATUS
16679 echo ': clr' >>$CONFIG_STATUS
16680 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016681 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016682 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16683 rm -f $tmp/in
16684 mv $tmp/out $tmp/in
16685' >>$CONFIG_STATUS
16686 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16687 rm -f conftest.defines
16688 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016689done
Martin v. Löwis11437992002-04-12 09:54:03 +000016690rm -f conftest.defines
16691echo ' fi # egrep' >>$CONFIG_STATUS
16692echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016693
Martin v. Löwis11437992002-04-12 09:54:03 +000016694# Break up conftest.undefs because some shells have a limit on the size
16695# of here documents, and old seds have small limits too (100 cmds).
16696echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16697rm -f conftest.tail
16698while grep . conftest.undefs >/dev/null
16699do
16700 # Write a limited-size here document to $tmp/undefs.sed.
16701 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16702 # Speed up: don't consider the non `#undef'
16703 echo '/^[ ]*#[ ]*undef/!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.undefs >>$CONFIG_STATUS
16708 echo 'CEOF
16709 sed -f $tmp/undefs.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.undefs >conftest.tail
16714 rm -f conftest.undefs
16715 mv conftest.tail conftest.undefs
16716done
16717rm -f conftest.undefs
16718
16719cat >>$CONFIG_STATUS <<\_ACEOF
16720 # Let's still pretend it is `configure' which instantiates (i.e., don't
16721 # use $as_me), people would be surprised to read:
16722 # /* config.h. Generated by config.status. */
16723 if test x"$ac_file" = x-; then
16724 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016725 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016726 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016727 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016728 cat $tmp/in >>$tmp/config.h
16729 rm -f $tmp/in
16730 if test x"$ac_file" != x-; then
16731 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16732 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16733echo "$as_me: $ac_file is unchanged" >&6;}
16734 else
16735 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16736$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16737 X"$ac_file" : 'X\(//\)[^/]' \| \
16738 X"$ac_file" : 'X\(//\)$' \| \
16739 X"$ac_file" : 'X\(/\)' \| \
16740 . : '\(.\)' 2>/dev/null ||
16741echo X"$ac_file" |
16742 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16743 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16744 /^X\(\/\/\)$/{ s//\1/; q; }
16745 /^X\(\/\).*/{ s//\1/; q; }
16746 s/.*/./; q'`
16747 { case "$ac_dir" in
16748 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16749 *) as_incr_dir=.;;
16750esac
16751as_dummy="$ac_dir"
16752for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16753 case $as_mkdir_dir in
16754 # Skip DOS drivespec
16755 ?:) as_incr_dir=$as_mkdir_dir ;;
16756 *)
16757 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16758 test -d "$as_incr_dir" ||
16759 mkdir "$as_incr_dir" ||
16760 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16761echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16762 { (exit 1); exit 1; }; }
16763 ;;
16764 esac
16765done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016766
Martin v. Löwis11437992002-04-12 09:54:03 +000016767 rm -f $ac_file
16768 mv $tmp/config.h $ac_file
16769 fi
16770 else
16771 cat $tmp/config.h
16772 rm -f $tmp/config.h
16773 fi
16774done
16775_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016776
Martin v. Löwis11437992002-04-12 09:54:03 +000016777cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016778
Martin v. Löwis11437992002-04-12 09:54:03 +000016779{ (exit 0); exit 0; }
16780_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016781chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016782ac_clean_files=$ac_clean_files_save
16783
16784
16785# configure is writing to config.log, and then calls config.status.
16786# config.status does its own redirection, appending to config.log.
16787# Unfortunately, on DOS this fails, as config.log is still kept open
16788# by configure, so config.status won't be able to write to it; its
16789# output is simply discarded. So we exec the FD to /dev/null,
16790# effectively closing config.log, so it can be properly (re)opened and
16791# appended to by config.status. When coming back to configure, we
16792# need to make the FD available again.
16793if test "$no_create" != yes; then
16794 ac_cs_success=:
16795 exec 5>/dev/null
16796 $SHELL $CONFIG_STATUS || ac_cs_success=false
16797 exec 5>>config.log
16798 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16799 # would make configure fail if this is the last instruction.
16800 $ac_cs_success || { (exit 1); exit 1; }
16801fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016802
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016803
16804echo "creating Setup"
16805if test ! -f Modules/Setup
16806then
16807 cp $srcdir/Modules/Setup.dist Modules/Setup
16808fi
16809
16810echo "creating Setup.local"
16811if test ! -f Modules/Setup.local
16812then
16813 echo "# Edit this file for local setup changes" >Modules/Setup.local
16814fi
16815
16816echo "creating Makefile"
16817$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16818 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016819 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016820mv config.c Modules