blob: bc0928cbec2f3f55bd58097f196182e29e2bfebd [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis11437992002-04-12 09:54:03 +00002# From configure.in Revision: 1.304 .
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 Ward57c9a6632000-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 Ward57c9a6632000-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 Warsawc0d24d8b2000-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 Warsawc0d24d8b2000-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 Warsawc0d24d8b2000-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 Warsawc0d24d8b2000-06-29 16:12:00 +00009413
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009414
Barry Warsawc0d24d8b2000-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öwis244edc82001-10-04 22:44:26 +000011248for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +000011249 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +000011250 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwisb2c92f42002-02-16 23:35:41 +000011251 hstrerror inet_pton kill killpg link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011252 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011253 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011254 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011255 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +000011256 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +000011257 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011258 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011259do
Martin v. Löwis11437992002-04-12 09:54:03 +000011260as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11261echo "$as_me:$LINENO: checking for $ac_func" >&5
11262echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11263if eval "test \"\${$as_ac_var+set}\" = set"; then
11264 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011265else
Martin v. Löwis11437992002-04-12 09:54:03 +000011266 cat >conftest.$ac_ext <<_ACEOF
11267#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011268#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011269/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011270 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011271#include <assert.h>
11272/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011273#ifdef __cplusplus
11274extern "C"
11275#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011276/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011277 builtin and then its argument prototype would still apply. */
11278char $ac_func ();
11279char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011280
Martin v. Löwis11437992002-04-12 09:54:03 +000011281#ifdef F77_DUMMY_MAIN
11282# ifdef __cplusplus
11283 extern "C"
11284# endif
11285 int F77_DUMMY_MAIN() { return 1; }
11286#endif
11287int
11288main ()
11289{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011290/* The GNU C library defines this for functions which it implements
11291 to always fail with ENOSYS. Some functions are actually named
11292 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011293#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011294choke me
11295#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011296f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011297#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011298
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 ;
11300 return 0;
11301}
11302_ACEOF
11303rm -f conftest.$ac_objext conftest$ac_exeext
11304if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11305 (eval $ac_link) 2>&5
11306 ac_status=$?
11307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11308 (exit $ac_status); } &&
11309 { ac_try='test -s conftest$ac_exeext'
11310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11311 (eval $ac_try) 2>&5
11312 ac_status=$?
11313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11314 (exit $ac_status); }; }; then
11315 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011316else
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 echo "$as_me: failed program was:" >&5
11318cat conftest.$ac_ext >&5
11319eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011320fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011321rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011322fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011323echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11324echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11325if test `eval echo '${'$as_ac_var'}'` = yes; then
11326 cat >>confdefs.h <<_ACEOF
11327#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11328_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011329
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011330fi
11331done
11332
Michael W. Hudson54241132001-12-07 15:38:26 +000011333
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011334# check for openpty and forkpty
11335
Martin v. Löwis11437992002-04-12 09:54:03 +000011336
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011337for ac_func in openpty
11338do
Martin v. Löwis11437992002-04-12 09:54:03 +000011339as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11340echo "$as_me:$LINENO: checking for $ac_func" >&5
11341echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11342if eval "test \"\${$as_ac_var+set}\" = set"; then
11343 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011344else
Martin v. Löwis11437992002-04-12 09:54:03 +000011345 cat >conftest.$ac_ext <<_ACEOF
11346#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011347#include "confdefs.h"
11348/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011349 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011350#include <assert.h>
11351/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011352#ifdef __cplusplus
11353extern "C"
11354#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011355/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011356 builtin and then its argument prototype would still apply. */
11357char $ac_func ();
11358char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011359
Martin v. Löwis11437992002-04-12 09:54:03 +000011360#ifdef F77_DUMMY_MAIN
11361# ifdef __cplusplus
11362 extern "C"
11363# endif
11364 int F77_DUMMY_MAIN() { return 1; }
11365#endif
11366int
11367main ()
11368{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011369/* The GNU C library defines this for functions which it implements
11370 to always fail with ENOSYS. Some functions are actually named
11371 something starting with __ and the normal name is an alias. */
11372#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11373choke me
11374#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011375f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011376#endif
11377
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 ;
11379 return 0;
11380}
11381_ACEOF
11382rm -f conftest.$ac_objext conftest$ac_exeext
11383if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11384 (eval $ac_link) 2>&5
11385 ac_status=$?
11386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11387 (exit $ac_status); } &&
11388 { ac_try='test -s conftest$ac_exeext'
11389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11390 (eval $ac_try) 2>&5
11391 ac_status=$?
11392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11393 (exit $ac_status); }; }; then
11394 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011395else
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 echo "$as_me: failed program was:" >&5
11397cat conftest.$ac_ext >&5
11398eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011399fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011400rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011401fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011402echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11403echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11404if test `eval echo '${'$as_ac_var'}'` = yes; then
11405 cat >>confdefs.h <<_ACEOF
11406#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11407_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011408
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011409else
Martin v. Löwis11437992002-04-12 09:54:03 +000011410 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11411echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11412if test "${ac_cv_lib_util_openpty+set}" = set; then
11413 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011414else
Martin v. Löwis11437992002-04-12 09:54:03 +000011415 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011416LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011417cat >conftest.$ac_ext <<_ACEOF
11418#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011419#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011420
Fred Drake8cef4cf2000-06-28 16:40:38 +000011421/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011422#ifdef __cplusplus
11423extern "C"
11424#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011425/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011426 builtin and then its argument prototype would still apply. */
11427char openpty ();
11428#ifdef F77_DUMMY_MAIN
11429# ifdef __cplusplus
11430 extern "C"
11431# endif
11432 int F77_DUMMY_MAIN() { return 1; }
11433#endif
11434int
11435main ()
11436{
11437openpty ();
11438 ;
11439 return 0;
11440}
11441_ACEOF
11442rm -f conftest.$ac_objext conftest$ac_exeext
11443if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11444 (eval $ac_link) 2>&5
11445 ac_status=$?
11446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11447 (exit $ac_status); } &&
11448 { ac_try='test -s conftest$ac_exeext'
11449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11450 (eval $ac_try) 2>&5
11451 ac_status=$?
11452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11453 (exit $ac_status); }; }; then
11454 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011455else
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 echo "$as_me: failed program was:" >&5
11457cat conftest.$ac_ext >&5
11458ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011459fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011460rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11461LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011462fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011463echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11464echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11465if test $ac_cv_lib_util_openpty = yes; then
11466 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011467#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011468_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011469 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011470fi
11471
11472fi
11473done
11474
Martin v. Löwis11437992002-04-12 09:54:03 +000011475
Fred Drake8cef4cf2000-06-28 16:40:38 +000011476for ac_func in forkpty
11477do
Martin v. Löwis11437992002-04-12 09:54:03 +000011478as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11479echo "$as_me:$LINENO: checking for $ac_func" >&5
11480echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11481if eval "test \"\${$as_ac_var+set}\" = set"; then
11482 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011483else
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 cat >conftest.$ac_ext <<_ACEOF
11485#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011486#include "confdefs.h"
11487/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011488 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011489#include <assert.h>
11490/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011491#ifdef __cplusplus
11492extern "C"
11493#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011494/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011495 builtin and then its argument prototype would still apply. */
11496char $ac_func ();
11497char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011498
Martin v. Löwis11437992002-04-12 09:54:03 +000011499#ifdef F77_DUMMY_MAIN
11500# ifdef __cplusplus
11501 extern "C"
11502# endif
11503 int F77_DUMMY_MAIN() { return 1; }
11504#endif
11505int
11506main ()
11507{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011508/* The GNU C library defines this for functions which it implements
11509 to always fail with ENOSYS. Some functions are actually named
11510 something starting with __ and the normal name is an alias. */
11511#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11512choke me
11513#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011514f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011515#endif
11516
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 ;
11518 return 0;
11519}
11520_ACEOF
11521rm -f conftest.$ac_objext conftest$ac_exeext
11522if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11523 (eval $ac_link) 2>&5
11524 ac_status=$?
11525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11526 (exit $ac_status); } &&
11527 { ac_try='test -s conftest$ac_exeext'
11528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11529 (eval $ac_try) 2>&5
11530 ac_status=$?
11531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11532 (exit $ac_status); }; }; then
11533 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011534else
Martin v. Löwis11437992002-04-12 09:54:03 +000011535 echo "$as_me: failed program was:" >&5
11536cat conftest.$ac_ext >&5
11537eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011538fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011539rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011540fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011541echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11542echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11543if test `eval echo '${'$as_ac_var'}'` = yes; then
11544 cat >>confdefs.h <<_ACEOF
11545#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11546_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011547
Fred Drake8cef4cf2000-06-28 16:40:38 +000011548else
Martin v. Löwis11437992002-04-12 09:54:03 +000011549 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11550echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11551if test "${ac_cv_lib_util_forkpty+set}" = set; then
11552 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011553else
Martin v. Löwis11437992002-04-12 09:54:03 +000011554 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011555LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011556cat >conftest.$ac_ext <<_ACEOF
11557#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011558#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011559
Fred Drake8cef4cf2000-06-28 16:40:38 +000011560/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011561#ifdef __cplusplus
11562extern "C"
11563#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011564/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011565 builtin and then its argument prototype would still apply. */
11566char forkpty ();
11567#ifdef F77_DUMMY_MAIN
11568# ifdef __cplusplus
11569 extern "C"
11570# endif
11571 int F77_DUMMY_MAIN() { return 1; }
11572#endif
11573int
11574main ()
11575{
11576forkpty ();
11577 ;
11578 return 0;
11579}
11580_ACEOF
11581rm -f conftest.$ac_objext conftest$ac_exeext
11582if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11583 (eval $ac_link) 2>&5
11584 ac_status=$?
11585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11586 (exit $ac_status); } &&
11587 { ac_try='test -s conftest$ac_exeext'
11588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11589 (eval $ac_try) 2>&5
11590 ac_status=$?
11591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11592 (exit $ac_status); }; }; then
11593 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011594else
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 echo "$as_me: failed program was:" >&5
11596cat conftest.$ac_ext >&5
11597ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011598fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011599rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11600LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011601fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011602echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11603echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11604if test $ac_cv_lib_util_forkpty = yes; then
11605 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011606#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011607_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011608 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011609fi
11610
11611fi
11612done
11613
Jack Jansendd19cf82001-12-06 22:36:17 +000011614
Michael W. Hudson54241132001-12-07 15:38:26 +000011615# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011616
11617
11618
11619
11620
11621
Fred Drake8cef4cf2000-06-28 16:40:38 +000011622for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11623do
Martin v. Löwis11437992002-04-12 09:54:03 +000011624as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11625echo "$as_me:$LINENO: checking for $ac_func" >&5
11626echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11627if eval "test \"\${$as_ac_var+set}\" = set"; then
11628 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011629else
Martin v. Löwis11437992002-04-12 09:54:03 +000011630 cat >conftest.$ac_ext <<_ACEOF
11631#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011632#include "confdefs.h"
11633/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011634 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011635#include <assert.h>
11636/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011637#ifdef __cplusplus
11638extern "C"
11639#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011640/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011641 builtin and then its argument prototype would still apply. */
11642char $ac_func ();
11643char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011644
Martin v. Löwis11437992002-04-12 09:54:03 +000011645#ifdef F77_DUMMY_MAIN
11646# ifdef __cplusplus
11647 extern "C"
11648# endif
11649 int F77_DUMMY_MAIN() { return 1; }
11650#endif
11651int
11652main ()
11653{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011654/* The GNU C library defines this for functions which it implements
11655 to always fail with ENOSYS. Some functions are actually named
11656 something starting with __ and the normal name is an alias. */
11657#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11658choke me
11659#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011660f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011661#endif
11662
Martin v. Löwis11437992002-04-12 09:54:03 +000011663 ;
11664 return 0;
11665}
11666_ACEOF
11667rm -f conftest.$ac_objext conftest$ac_exeext
11668if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11669 (eval $ac_link) 2>&5
11670 ac_status=$?
11671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11672 (exit $ac_status); } &&
11673 { ac_try='test -s conftest$ac_exeext'
11674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11675 (eval $ac_try) 2>&5
11676 ac_status=$?
11677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11678 (exit $ac_status); }; }; then
11679 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011680else
Martin v. Löwis11437992002-04-12 09:54:03 +000011681 echo "$as_me: failed program was:" >&5
11682cat conftest.$ac_ext >&5
11683eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011684fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011685rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011686fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011687echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11688echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11689if test `eval echo '${'$as_ac_var'}'` = yes; then
11690 cat >>confdefs.h <<_ACEOF
11691#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11692_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011693
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011694fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011695done
11696
Michael W. Hudson54241132001-12-07 15:38:26 +000011697
Martin v. Löwis11437992002-04-12 09:54:03 +000011698
11699
11700
11701
11702
Martin v. Löwis1142de32002-03-29 16:28:31 +000011703for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011704do
Martin v. Löwis11437992002-04-12 09:54:03 +000011705as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11706echo "$as_me:$LINENO: checking for $ac_func" >&5
11707echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11708if eval "test \"\${$as_ac_var+set}\" = set"; then
11709 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011710else
Martin v. Löwis11437992002-04-12 09:54:03 +000011711 cat >conftest.$ac_ext <<_ACEOF
11712#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011713#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011714/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011715 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011716#include <assert.h>
11717/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011718#ifdef __cplusplus
11719extern "C"
11720#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011721/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011722 builtin and then its argument prototype would still apply. */
11723char $ac_func ();
11724char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011725
Martin v. Löwis11437992002-04-12 09:54:03 +000011726#ifdef F77_DUMMY_MAIN
11727# ifdef __cplusplus
11728 extern "C"
11729# endif
11730 int F77_DUMMY_MAIN() { return 1; }
11731#endif
11732int
11733main ()
11734{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011735/* The GNU C library defines this for functions which it implements
11736 to always fail with ENOSYS. Some functions are actually named
11737 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011738#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011739choke me
11740#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011741f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011742#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011743
Martin v. Löwis11437992002-04-12 09:54:03 +000011744 ;
11745 return 0;
11746}
11747_ACEOF
11748rm -f conftest.$ac_objext conftest$ac_exeext
11749if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11750 (eval $ac_link) 2>&5
11751 ac_status=$?
11752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11753 (exit $ac_status); } &&
11754 { ac_try='test -s conftest$ac_exeext'
11755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11756 (eval $ac_try) 2>&5
11757 ac_status=$?
11758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11759 (exit $ac_status); }; }; then
11760 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011761else
Martin v. Löwis11437992002-04-12 09:54:03 +000011762 echo "$as_me: failed program was:" >&5
11763cat conftest.$ac_ext >&5
11764eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011765fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011766rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011767fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011768echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11769echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11770if test `eval echo '${'$as_ac_var'}'` = yes; then
11771 cat >>confdefs.h <<_ACEOF
11772#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11773_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011774
Martin v. Löwis1142de32002-03-29 16:28:31 +000011775else
Martin v. Löwis11437992002-04-12 09:54:03 +000011776 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011777fi
11778done
11779
11780
Martin v. Löwis11437992002-04-12 09:54:03 +000011781
Martin v. Löwis1142de32002-03-29 16:28:31 +000011782for ac_func in getpgrp
11783do
Martin v. Löwis11437992002-04-12 09:54:03 +000011784as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11785echo "$as_me:$LINENO: checking for $ac_func" >&5
11786echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11787if eval "test \"\${$as_ac_var+set}\" = set"; then
11788 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011789else
Martin v. Löwis11437992002-04-12 09:54:03 +000011790 cat >conftest.$ac_ext <<_ACEOF
11791#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011792#include "confdefs.h"
11793/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011794 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011795#include <assert.h>
11796/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011797#ifdef __cplusplus
11798extern "C"
11799#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011800/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011801 builtin and then its argument prototype would still apply. */
11802char $ac_func ();
11803char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011804
Martin v. Löwis11437992002-04-12 09:54:03 +000011805#ifdef F77_DUMMY_MAIN
11806# ifdef __cplusplus
11807 extern "C"
11808# endif
11809 int F77_DUMMY_MAIN() { return 1; }
11810#endif
11811int
11812main ()
11813{
Martin v. Löwis1142de32002-03-29 16:28:31 +000011814/* The GNU C library defines this for functions which it implements
11815 to always fail with ENOSYS. Some functions are actually named
11816 something starting with __ and the normal name is an alias. */
11817#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11818choke me
11819#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011820f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000011821#endif
11822
Martin v. Löwis11437992002-04-12 09:54:03 +000011823 ;
11824 return 0;
11825}
11826_ACEOF
11827rm -f conftest.$ac_objext conftest$ac_exeext
11828if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11829 (eval $ac_link) 2>&5
11830 ac_status=$?
11831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11832 (exit $ac_status); } &&
11833 { ac_try='test -s conftest$ac_exeext'
11834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11835 (eval $ac_try) 2>&5
11836 ac_status=$?
11837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11838 (exit $ac_status); }; }; then
11839 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011840else
Martin v. Löwis11437992002-04-12 09:54:03 +000011841 echo "$as_me: failed program was:" >&5
11842cat conftest.$ac_ext >&5
11843eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011844fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011845rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011846fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011847echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11848echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11849if test `eval echo '${'$as_ac_var'}'` = yes; then
11850 cat >>confdefs.h <<_ACEOF
11851#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11852_ACEOF
11853 cat >conftest.$ac_ext <<_ACEOF
11854#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011855#include "confdefs.h"
11856#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011857#ifdef F77_DUMMY_MAIN
11858# ifdef __cplusplus
11859 extern "C"
11860# endif
11861 int F77_DUMMY_MAIN() { return 1; }
11862#endif
11863int
11864main ()
11865{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011866getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011867 ;
11868 return 0;
11869}
11870_ACEOF
11871rm -f conftest.$ac_objext
11872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11873 (eval $ac_compile) 2>&5
11874 ac_status=$?
11875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11876 (exit $ac_status); } &&
11877 { ac_try='test -s conftest.$ac_objext'
11878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11879 (eval $ac_try) 2>&5
11880 ac_status=$?
11881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11882 (exit $ac_status); }; }; then
11883
11884cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011885#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011886_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011887
Martin v. Löwis11437992002-04-12 09:54:03 +000011888
Guido van Rossumf78abae1997-01-21 22:02:36 +000011889else
Martin v. Löwis11437992002-04-12 09:54:03 +000011890 echo "$as_me: failed program was:" >&5
11891cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000011892fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011893rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011894
Guido van Rossum627b2d71993-12-24 10:39:16 +000011895fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011896done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011897
Martin v. Löwis11437992002-04-12 09:54:03 +000011898
Thomas Wouters3a584202000-08-05 23:28:51 +000011899for ac_func in setpgrp
11900do
Martin v. Löwis11437992002-04-12 09:54:03 +000011901as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11902echo "$as_me:$LINENO: checking for $ac_func" >&5
11903echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11904if eval "test \"\${$as_ac_var+set}\" = set"; then
11905 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011906else
Martin v. Löwis11437992002-04-12 09:54:03 +000011907 cat >conftest.$ac_ext <<_ACEOF
11908#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011909#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011910/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011911 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011912#include <assert.h>
11913/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011914#ifdef __cplusplus
11915extern "C"
11916#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011917/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011918 builtin and then its argument prototype would still apply. */
11919char $ac_func ();
11920char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011921
Martin v. Löwis11437992002-04-12 09:54:03 +000011922#ifdef F77_DUMMY_MAIN
11923# ifdef __cplusplus
11924 extern "C"
11925# endif
11926 int F77_DUMMY_MAIN() { return 1; }
11927#endif
11928int
11929main ()
11930{
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011931/* The GNU C library defines this for functions which it implements
11932 to always fail with ENOSYS. Some functions are actually named
11933 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011934#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011935choke me
11936#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011937f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011938#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011939
Martin v. Löwis11437992002-04-12 09:54:03 +000011940 ;
11941 return 0;
11942}
11943_ACEOF
11944rm -f conftest.$ac_objext conftest$ac_exeext
11945if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11946 (eval $ac_link) 2>&5
11947 ac_status=$?
11948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11949 (exit $ac_status); } &&
11950 { ac_try='test -s conftest$ac_exeext'
11951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11952 (eval $ac_try) 2>&5
11953 ac_status=$?
11954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11955 (exit $ac_status); }; }; then
11956 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011957else
Martin v. Löwis11437992002-04-12 09:54:03 +000011958 echo "$as_me: failed program was:" >&5
11959cat conftest.$ac_ext >&5
11960eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011961fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011962rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011963fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011964echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11965echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11966if test `eval echo '${'$as_ac_var'}'` = yes; then
11967 cat >>confdefs.h <<_ACEOF
11968#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11969_ACEOF
11970 cat >conftest.$ac_ext <<_ACEOF
11971#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011972#include "confdefs.h"
11973#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011974#ifdef F77_DUMMY_MAIN
11975# ifdef __cplusplus
11976 extern "C"
11977# endif
11978 int F77_DUMMY_MAIN() { return 1; }
11979#endif
11980int
11981main ()
11982{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011983setpgrp(0,0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011984 ;
11985 return 0;
11986}
11987_ACEOF
11988rm -f conftest.$ac_objext
11989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11990 (eval $ac_compile) 2>&5
11991 ac_status=$?
11992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11993 (exit $ac_status); } &&
11994 { ac_try='test -s conftest.$ac_objext'
11995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11996 (eval $ac_try) 2>&5
11997 ac_status=$?
11998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11999 (exit $ac_status); }; }; then
12000
12001cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012002#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012003_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012004
Martin v. Löwis11437992002-04-12 09:54:03 +000012005
Guido van Rossumf78abae1997-01-21 22:02:36 +000012006else
Martin v. Löwis11437992002-04-12 09:54:03 +000012007 echo "$as_me: failed program was:" >&5
12008cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012009fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012010rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012011
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012012fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012013done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012014
Martin v. Löwis11437992002-04-12 09:54:03 +000012015
Thomas Wouters3a584202000-08-05 23:28:51 +000012016for ac_func in gettimeofday
12017do
Martin v. Löwis11437992002-04-12 09:54:03 +000012018as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12019echo "$as_me:$LINENO: checking for $ac_func" >&5
12020echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12021if eval "test \"\${$as_ac_var+set}\" = set"; then
12022 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012023else
Martin v. Löwis11437992002-04-12 09:54:03 +000012024 cat >conftest.$ac_ext <<_ACEOF
12025#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012026#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012027/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012028 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012029#include <assert.h>
12030/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012031#ifdef __cplusplus
12032extern "C"
12033#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012034/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012035 builtin and then its argument prototype would still apply. */
12036char $ac_func ();
12037char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012038
Martin v. Löwis11437992002-04-12 09:54:03 +000012039#ifdef F77_DUMMY_MAIN
12040# ifdef __cplusplus
12041 extern "C"
12042# endif
12043 int F77_DUMMY_MAIN() { return 1; }
12044#endif
12045int
12046main ()
12047{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012048/* The GNU C library defines this for functions which it implements
12049 to always fail with ENOSYS. Some functions are actually named
12050 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012051#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012052choke me
12053#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012054f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012055#endif
12056
Martin v. Löwis11437992002-04-12 09:54:03 +000012057 ;
12058 return 0;
12059}
12060_ACEOF
12061rm -f conftest.$ac_objext conftest$ac_exeext
12062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12063 (eval $ac_link) 2>&5
12064 ac_status=$?
12065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12066 (exit $ac_status); } &&
12067 { ac_try='test -s conftest$ac_exeext'
12068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12069 (eval $ac_try) 2>&5
12070 ac_status=$?
12071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12072 (exit $ac_status); }; }; then
12073 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012074else
Martin v. Löwis11437992002-04-12 09:54:03 +000012075 echo "$as_me: failed program was:" >&5
12076cat conftest.$ac_ext >&5
12077eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012078fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012079rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012081echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12082echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12083if test `eval echo '${'$as_ac_var'}'` = yes; then
12084 cat >>confdefs.h <<_ACEOF
12085#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12086_ACEOF
12087 cat >conftest.$ac_ext <<_ACEOF
12088#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012089#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012090#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012091#ifdef F77_DUMMY_MAIN
12092# ifdef __cplusplus
12093 extern "C"
12094# endif
12095 int F77_DUMMY_MAIN() { return 1; }
12096#endif
12097int
12098main ()
12099{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012100gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 ;
12102 return 0;
12103}
12104_ACEOF
12105rm -f conftest.$ac_objext
12106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12107 (eval $ac_compile) 2>&5
12108 ac_status=$?
12109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12110 (exit $ac_status); } &&
12111 { ac_try='test -s conftest.$ac_objext'
12112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12113 (eval $ac_try) 2>&5
12114 ac_status=$?
12115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12116 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012117 :
12118else
Martin v. Löwis11437992002-04-12 09:54:03 +000012119 echo "$as_me: failed program was:" >&5
12120cat conftest.$ac_ext >&5
12121
12122cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012123#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012124_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012125
Martin v. Löwis11437992002-04-12 09:54:03 +000012126
Guido van Rossum627b2d71993-12-24 10:39:16 +000012127fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012128rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012129
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012130fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012131done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012132
Michael W. Hudson54241132001-12-07 15:38:26 +000012133
12134
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012135# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012136# for [no]getaddrinfo in netdb.h.
12137echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12138echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12139cat >conftest.$ac_ext <<_ACEOF
12140#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012141#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012142
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012143#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012144#include <sys/socket.h>
12145#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012146#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012147
Martin v. Löwis11437992002-04-12 09:54:03 +000012148#ifdef F77_DUMMY_MAIN
12149# ifdef __cplusplus
12150 extern "C"
12151# endif
12152 int F77_DUMMY_MAIN() { return 1; }
12153#endif
12154int
12155main ()
12156{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012157
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012158getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012159
Martin v. Löwis11437992002-04-12 09:54:03 +000012160 ;
12161 return 0;
12162}
12163_ACEOF
12164rm -f conftest.$ac_objext conftest$ac_exeext
12165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12166 (eval $ac_link) 2>&5
12167 ac_status=$?
12168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12169 (exit $ac_status); } &&
12170 { ac_try='test -s conftest$ac_exeext'
12171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12172 (eval $ac_try) 2>&5
12173 ac_status=$?
12174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12175 (exit $ac_status); }; }; then
12176
12177echo "$as_me:$LINENO: result: yes" >&5
12178echo "${ECHO_T}yes" >&6
12179echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12180echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012181if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012182 echo "$as_me:$LINENO: result: buggy" >&5
12183echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012184buggygetaddrinfo=yes
12185else
Martin v. Löwis11437992002-04-12 09:54:03 +000012186 cat >conftest.$ac_ext <<_ACEOF
12187#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012188#include "confdefs.h"
12189
12190#include <sys/types.h>
12191#include <netdb.h>
12192#include <string.h>
12193#include <sys/socket.h>
12194#include <netinet/in.h>
12195
12196main()
12197{
12198 int passive, gaierr, inet4 = 0, inet6 = 0;
12199 struct addrinfo hints, *ai, *aitop;
12200 char straddr[INET6_ADDRSTRLEN], strport[16];
12201
12202 for (passive = 0; passive <= 1; passive++) {
12203 memset(&hints, 0, sizeof(hints));
12204 hints.ai_family = AF_UNSPEC;
12205 hints.ai_flags = passive ? AI_PASSIVE : 0;
12206 hints.ai_socktype = SOCK_STREAM;
12207 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12208 (void)gai_strerror(gaierr);
12209 goto bad;
12210 }
12211 for (ai = aitop; ai; ai = ai->ai_next) {
12212 if (ai->ai_addr == NULL ||
12213 ai->ai_addrlen == 0 ||
12214 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12215 straddr, sizeof(straddr), strport, sizeof(strport),
12216 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12217 goto bad;
12218 }
12219 switch (ai->ai_family) {
12220 case AF_INET:
12221 if (strcmp(strport, "54321") != 0) {
12222 goto bad;
12223 }
12224 if (passive) {
12225 if (strcmp(straddr, "0.0.0.0") != 0) {
12226 goto bad;
12227 }
12228 } else {
12229 if (strcmp(straddr, "127.0.0.1") != 0) {
12230 goto bad;
12231 }
12232 }
12233 inet4++;
12234 break;
12235 case AF_INET6:
12236 if (strcmp(strport, "54321") != 0) {
12237 goto bad;
12238 }
12239 if (passive) {
12240 if (strcmp(straddr, "::") != 0) {
12241 goto bad;
12242 }
12243 } else {
12244 if (strcmp(straddr, "::1") != 0) {
12245 goto bad;
12246 }
12247 }
12248 inet6++;
12249 break;
12250 case AF_UNSPEC:
12251 goto bad;
12252 break;
12253 default:
12254 /* another family support? */
12255 break;
12256 }
12257 }
12258 }
12259
12260 if (!(inet4 == 0 || inet4 == 2))
12261 goto bad;
12262 if (!(inet6 == 0 || inet6 == 2))
12263 goto bad;
12264
12265 if (aitop)
12266 freeaddrinfo(aitop);
12267 exit(0);
12268
12269 bad:
12270 if (aitop)
12271 freeaddrinfo(aitop);
12272 exit(1);
12273}
12274
Martin v. Löwis11437992002-04-12 09:54:03 +000012275_ACEOF
12276rm -f conftest$ac_exeext
12277if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12278 (eval $ac_link) 2>&5
12279 ac_status=$?
12280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12281 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12283 (eval $ac_try) 2>&5
12284 ac_status=$?
12285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12286 (exit $ac_status); }; }; then
12287 echo "$as_me:$LINENO: result: good" >&5
12288echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012289buggygetaddrinfo=no
12290else
Martin v. Löwis11437992002-04-12 09:54:03 +000012291 echo "$as_me: program exited with status $ac_status" >&5
12292echo "$as_me: failed program was:" >&5
12293cat conftest.$ac_ext >&5
12294( exit $ac_status )
12295echo "$as_me:$LINENO: result: buggy" >&5
12296echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012297buggygetaddrinfo=yes
12298fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012299rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012300fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012301else
Martin v. Löwis11437992002-04-12 09:54:03 +000012302 echo "$as_me: failed program was:" >&5
12303cat conftest.$ac_ext >&5
12304
12305echo "$as_me:$LINENO: result: no" >&5
12306echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012307buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012308
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012310rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012311
12312if test "$buggygetaddrinfo" = "yes"; then
12313 if test "$ipv6" = "yes"; then
12314 echo 'Fatal: You must get working getaddrinfo() function.'
12315 echo ' or you can specify "--disable-ipv6"'.
12316 exit 1
12317 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012318else
Martin v. Löwis11437992002-04-12 09:54:03 +000012319
12320cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012321#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012322_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012323
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012324fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012325
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012326for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012327do
Martin v. Löwis11437992002-04-12 09:54:03 +000012328as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12329echo "$as_me:$LINENO: checking for $ac_func" >&5
12330echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12331if eval "test \"\${$as_ac_var+set}\" = set"; then
12332 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012333else
Martin v. Löwis11437992002-04-12 09:54:03 +000012334 cat >conftest.$ac_ext <<_ACEOF
12335#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012336#include "confdefs.h"
12337/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012339#include <assert.h>
12340/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012341#ifdef __cplusplus
12342extern "C"
12343#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012344/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 builtin and then its argument prototype would still apply. */
12346char $ac_func ();
12347char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012348
Martin v. Löwis11437992002-04-12 09:54:03 +000012349#ifdef F77_DUMMY_MAIN
12350# ifdef __cplusplus
12351 extern "C"
12352# endif
12353 int F77_DUMMY_MAIN() { return 1; }
12354#endif
12355int
12356main ()
12357{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012358/* The GNU C library defines this for functions which it implements
12359 to always fail with ENOSYS. Some functions are actually named
12360 something starting with __ and the normal name is an alias. */
12361#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12362choke me
12363#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012364f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012365#endif
12366
Martin v. Löwis11437992002-04-12 09:54:03 +000012367 ;
12368 return 0;
12369}
12370_ACEOF
12371rm -f conftest.$ac_objext conftest$ac_exeext
12372if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12373 (eval $ac_link) 2>&5
12374 ac_status=$?
12375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12376 (exit $ac_status); } &&
12377 { ac_try='test -s conftest$ac_exeext'
12378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12379 (eval $ac_try) 2>&5
12380 ac_status=$?
12381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12382 (exit $ac_status); }; }; then
12383 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012384else
Martin v. Löwis11437992002-04-12 09:54:03 +000012385 echo "$as_me: failed program was:" >&5
12386cat conftest.$ac_ext >&5
12387eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012388fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012389rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012390fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012391echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12392echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12393if test `eval echo '${'$as_ac_var'}'` = yes; then
12394 cat >>confdefs.h <<_ACEOF
12395#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12396_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012397
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012398fi
12399done
12400
Michael W. Hudson54241132001-12-07 15:38:26 +000012401
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012402# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012403echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12404echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12405if test "${ac_cv_header_time+set}" = set; then
12406 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012407else
Martin v. Löwis11437992002-04-12 09:54:03 +000012408 cat >conftest.$ac_ext <<_ACEOF
12409#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012410#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012411#include <sys/types.h>
12412#include <sys/time.h>
12413#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012414
12415#ifdef F77_DUMMY_MAIN
12416# ifdef __cplusplus
12417 extern "C"
12418# endif
12419 int F77_DUMMY_MAIN() { return 1; }
12420#endif
12421int
12422main ()
12423{
12424if ((struct tm *) 0)
12425return 0;
12426 ;
12427 return 0;
12428}
12429_ACEOF
12430rm -f conftest.$ac_objext
12431if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12432 (eval $ac_compile) 2>&5
12433 ac_status=$?
12434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12435 (exit $ac_status); } &&
12436 { ac_try='test -s conftest.$ac_objext'
12437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12438 (eval $ac_try) 2>&5
12439 ac_status=$?
12440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12441 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012442 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012443else
Martin v. Löwis11437992002-04-12 09:54:03 +000012444 echo "$as_me: failed program was:" >&5
12445cat conftest.$ac_ext >&5
12446ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012447fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012448rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012450echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12451echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012452if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012453
12454cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012455#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012456_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012457
12458fi
12459
Martin v. Löwis11437992002-04-12 09:54:03 +000012460echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12461echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12462if test "${ac_cv_struct_tm+set}" = set; then
12463 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012464else
Martin v. Löwis11437992002-04-12 09:54:03 +000012465 cat >conftest.$ac_ext <<_ACEOF
12466#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012467#include "confdefs.h"
12468#include <sys/types.h>
12469#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012470
12471#ifdef F77_DUMMY_MAIN
12472# ifdef __cplusplus
12473 extern "C"
12474# endif
12475 int F77_DUMMY_MAIN() { return 1; }
12476#endif
12477int
12478main ()
12479{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012480struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012481 ;
12482 return 0;
12483}
12484_ACEOF
12485rm -f conftest.$ac_objext
12486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12487 (eval $ac_compile) 2>&5
12488 ac_status=$?
12489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12490 (exit $ac_status); } &&
12491 { ac_try='test -s conftest.$ac_objext'
12492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12493 (eval $ac_try) 2>&5
12494 ac_status=$?
12495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12496 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012497 ac_cv_struct_tm=time.h
12498else
Martin v. Löwis11437992002-04-12 09:54:03 +000012499 echo "$as_me: failed program was:" >&5
12500cat conftest.$ac_ext >&5
12501ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012502fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012503rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012504fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012505echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12506echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012507if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012508
12509cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012510#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012511_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012512
12513fi
12514
Martin v. Löwis11437992002-04-12 09:54:03 +000012515echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12516echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12517if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12518 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012519else
Martin v. Löwis11437992002-04-12 09:54:03 +000012520 cat >conftest.$ac_ext <<_ACEOF
12521#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012522#include "confdefs.h"
12523#include <sys/types.h>
12524#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012525
12526
12527#ifdef F77_DUMMY_MAIN
12528# ifdef __cplusplus
12529 extern "C"
12530# endif
12531 int F77_DUMMY_MAIN() { return 1; }
12532#endif
12533int
12534main ()
12535{
12536static struct tm ac_aggr;
12537if (ac_aggr.tm_zone)
12538return 0;
12539 ;
12540 return 0;
12541}
12542_ACEOF
12543rm -f conftest.$ac_objext
12544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12545 (eval $ac_compile) 2>&5
12546 ac_status=$?
12547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12548 (exit $ac_status); } &&
12549 { ac_try='test -s conftest.$ac_objext'
12550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12551 (eval $ac_try) 2>&5
12552 ac_status=$?
12553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12554 (exit $ac_status); }; }; then
12555 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012556else
Martin v. Löwis11437992002-04-12 09:54:03 +000012557 echo "$as_me: failed program was:" >&5
12558cat conftest.$ac_ext >&5
12559ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012561rm -f conftest.$ac_objext conftest.$ac_ext
12562fi
12563echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12564echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12565if test $ac_cv_member_struct_tm_tm_zone = yes; then
12566
12567cat >>confdefs.h <<_ACEOF
12568#define HAVE_STRUCT_TM_TM_ZONE 1
12569_ACEOF
12570
12571
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012572fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012573
Martin v. Löwis11437992002-04-12 09:54:03 +000012574if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12575
12576cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012577#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012578_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012579
12580else
Martin v. Löwis11437992002-04-12 09:54:03 +000012581 echo "$as_me:$LINENO: checking for tzname" >&5
12582echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12583if test "${ac_cv_var_tzname+set}" = set; then
12584 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012585else
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 cat >conftest.$ac_ext <<_ACEOF
12587#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012588#include "confdefs.h"
12589#include <time.h>
12590#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012591extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012593
12594#ifdef F77_DUMMY_MAIN
12595# ifdef __cplusplus
12596 extern "C"
12597# endif
12598 int F77_DUMMY_MAIN() { return 1; }
12599#endif
12600int
12601main ()
12602{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012603atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012604 ;
12605 return 0;
12606}
12607_ACEOF
12608rm -f conftest.$ac_objext conftest$ac_exeext
12609if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12610 (eval $ac_link) 2>&5
12611 ac_status=$?
12612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12613 (exit $ac_status); } &&
12614 { ac_try='test -s conftest$ac_exeext'
12615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12616 (eval $ac_try) 2>&5
12617 ac_status=$?
12618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12619 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012620 ac_cv_var_tzname=yes
12621else
Martin v. Löwis11437992002-04-12 09:54:03 +000012622 echo "$as_me: failed program was:" >&5
12623cat conftest.$ac_ext >&5
12624ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012625fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012626rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012627fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012628echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12629echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012630 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012631
12632cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012633#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012634_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012635
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012636 fi
12637fi
12638
Jack Jansendd19cf82001-12-06 22:36:17 +000012639
Martin v. Löwis11437992002-04-12 09:54:03 +000012640echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12641echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12642if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12643 echo $ECHO_N "(cached) $ECHO_C" >&6
12644else
12645 cat >conftest.$ac_ext <<_ACEOF
12646#line $LINENO "configure"
12647#include "confdefs.h"
12648$ac_includes_default
12649#ifdef F77_DUMMY_MAIN
12650# ifdef __cplusplus
12651 extern "C"
12652# endif
12653 int F77_DUMMY_MAIN() { return 1; }
12654#endif
12655int
12656main ()
12657{
12658static struct stat ac_aggr;
12659if (ac_aggr.st_rdev)
12660return 0;
12661 ;
12662 return 0;
12663}
12664_ACEOF
12665rm -f conftest.$ac_objext
12666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12667 (eval $ac_compile) 2>&5
12668 ac_status=$?
12669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12670 (exit $ac_status); } &&
12671 { ac_try='test -s conftest.$ac_objext'
12672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12673 (eval $ac_try) 2>&5
12674 ac_status=$?
12675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12676 (exit $ac_status); }; }; then
12677 ac_cv_member_struct_stat_st_rdev=yes
12678else
12679 echo "$as_me: failed program was:" >&5
12680cat conftest.$ac_ext >&5
12681ac_cv_member_struct_stat_st_rdev=no
12682fi
12683rm -f conftest.$ac_objext conftest.$ac_ext
12684fi
12685echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12686echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12687if test $ac_cv_member_struct_stat_st_rdev = yes; then
12688
12689cat >>confdefs.h <<_ACEOF
12690#define HAVE_STRUCT_STAT_ST_RDEV 1
12691_ACEOF
12692
12693
12694cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012695#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012696_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012697
12698fi
12699
Martin v. Löwis11437992002-04-12 09:54:03 +000012700
12701
12702echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12703echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12704if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12705 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012706else
Martin v. Löwis11437992002-04-12 09:54:03 +000012707 cat >conftest.$ac_ext <<_ACEOF
12708#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012709#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012710$ac_includes_default
12711#ifdef F77_DUMMY_MAIN
12712# ifdef __cplusplus
12713 extern "C"
12714# endif
12715 int F77_DUMMY_MAIN() { return 1; }
12716#endif
12717int
12718main ()
12719{
12720static struct stat ac_aggr;
12721if (ac_aggr.st_blksize)
12722return 0;
12723 ;
12724 return 0;
12725}
12726_ACEOF
12727rm -f conftest.$ac_objext
12728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12729 (eval $ac_compile) 2>&5
12730 ac_status=$?
12731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12732 (exit $ac_status); } &&
12733 { ac_try='test -s conftest.$ac_objext'
12734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12735 (eval $ac_try) 2>&5
12736 ac_status=$?
12737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12738 (exit $ac_status); }; }; then
12739 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012740else
Martin v. Löwis11437992002-04-12 09:54:03 +000012741 echo "$as_me: failed program was:" >&5
12742cat conftest.$ac_ext >&5
12743ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012744fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012745rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012746fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012747echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12748echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12749if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012750
Martin v. Löwis11437992002-04-12 09:54:03 +000012751cat >>confdefs.h <<_ACEOF
12752#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12753_ACEOF
12754
12755
12756cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012757#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012758_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012759
12760fi
12761
Martin v. Löwis11437992002-04-12 09:54:03 +000012762
12763echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12764echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12765if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12766 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012767else
Martin v. Löwis11437992002-04-12 09:54:03 +000012768 cat >conftest.$ac_ext <<_ACEOF
12769#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012770#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012771$ac_includes_default
12772#ifdef F77_DUMMY_MAIN
12773# ifdef __cplusplus
12774 extern "C"
12775# endif
12776 int F77_DUMMY_MAIN() { return 1; }
12777#endif
12778int
12779main ()
12780{
12781static struct stat ac_aggr;
12782if (ac_aggr.st_blocks)
12783return 0;
12784 ;
12785 return 0;
12786}
12787_ACEOF
12788rm -f conftest.$ac_objext
12789if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12790 (eval $ac_compile) 2>&5
12791 ac_status=$?
12792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12793 (exit $ac_status); } &&
12794 { ac_try='test -s conftest.$ac_objext'
12795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12796 (eval $ac_try) 2>&5
12797 ac_status=$?
12798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12799 (exit $ac_status); }; }; then
12800 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012801else
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 echo "$as_me: failed program was:" >&5
12803cat conftest.$ac_ext >&5
12804ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012805fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012806rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012807fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012808echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12809echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12810if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012811
Martin v. Löwis11437992002-04-12 09:54:03 +000012812cat >>confdefs.h <<_ACEOF
12813#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12814_ACEOF
12815
12816
12817cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012818#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012819_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012820
12821else
Martin v. Löwis11437992002-04-12 09:54:03 +000012822 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012823fi
12824
Michael W. Hudson54241132001-12-07 15:38:26 +000012825
Martin v. Löwis11437992002-04-12 09:54:03 +000012826
12827echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
12828echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
12829if test "${ac_cv_header_time_altzone+set}" = set; then
12830 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012831else
Martin v. Löwis11437992002-04-12 09:54:03 +000012832 cat >conftest.$ac_ext <<_ACEOF
12833#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012834#include "confdefs.h"
12835#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012836#ifdef F77_DUMMY_MAIN
12837# ifdef __cplusplus
12838 extern "C"
12839# endif
12840 int F77_DUMMY_MAIN() { return 1; }
12841#endif
12842int
12843main ()
12844{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012845return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012846 ;
12847 return 0;
12848}
12849_ACEOF
12850rm -f conftest.$ac_objext
12851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12852 (eval $ac_compile) 2>&5
12853 ac_status=$?
12854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12855 (exit $ac_status); } &&
12856 { ac_try='test -s conftest.$ac_objext'
12857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12858 (eval $ac_try) 2>&5
12859 ac_status=$?
12860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12861 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012862 ac_cv_header_time_altzone=yes
12863else
Martin v. Löwis11437992002-04-12 09:54:03 +000012864 echo "$as_me: failed program was:" >&5
12865cat conftest.$ac_ext >&5
12866ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012867fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012868rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012869fi
12870
Martin v. Löwis11437992002-04-12 09:54:03 +000012871echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
12872echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012873if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012874
12875cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012876#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012877_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012878
12879fi
12880
Guido van Rossumda88dad1995-01-26 00:46:29 +000012881was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012882echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
12883echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
12884cat >conftest.$ac_ext <<_ACEOF
12885#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012886#include "confdefs.h"
12887
12888#include <sys/types.h>
12889#include <sys/select.h>
12890#include <sys/time.h>
12891
Martin v. Löwis11437992002-04-12 09:54:03 +000012892#ifdef F77_DUMMY_MAIN
12893# ifdef __cplusplus
12894 extern "C"
12895# endif
12896 int F77_DUMMY_MAIN() { return 1; }
12897#endif
12898int
12899main ()
12900{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012901;
Martin v. Löwis11437992002-04-12 09:54:03 +000012902 ;
12903 return 0;
12904}
12905_ACEOF
12906rm -f conftest.$ac_objext
12907if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12908 (eval $ac_compile) 2>&5
12909 ac_status=$?
12910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12911 (exit $ac_status); } &&
12912 { ac_try='test -s conftest.$ac_objext'
12913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12914 (eval $ac_try) 2>&5
12915 ac_status=$?
12916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12917 (exit $ac_status); }; }; then
12918
12919
12920cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012921#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012922_ACEOF
12923
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012924 was_it_defined=yes
12925
Guido van Rossumf78abae1997-01-21 22:02:36 +000012926else
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 echo "$as_me: failed program was:" >&5
12928cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012929fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012930rm -f conftest.$ac_objext conftest.$ac_ext
12931echo "$as_me:$LINENO: result: $was_it_defined" >&5
12932echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000012933
Martin v. Löwis11437992002-04-12 09:54:03 +000012934echo "$as_me:$LINENO: checking for addrinfo" >&5
12935echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
12936if test "${ac_cv_struct_addrinfo+set}" = set; then
12937 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012938else
Martin v. Löwis11437992002-04-12 09:54:03 +000012939 cat >conftest.$ac_ext <<_ACEOF
12940#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012941#include "confdefs.h"
12942
12943# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012944#ifdef F77_DUMMY_MAIN
12945# ifdef __cplusplus
12946 extern "C"
12947# endif
12948 int F77_DUMMY_MAIN() { return 1; }
12949#endif
12950int
12951main ()
12952{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012953struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 ;
12955 return 0;
12956}
12957_ACEOF
12958rm -f conftest.$ac_objext
12959if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12960 (eval $ac_compile) 2>&5
12961 ac_status=$?
12962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12963 (exit $ac_status); } &&
12964 { ac_try='test -s conftest.$ac_objext'
12965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12966 (eval $ac_try) 2>&5
12967 ac_status=$?
12968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12969 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012970 ac_cv_struct_addrinfo=yes
12971else
Martin v. Löwis11437992002-04-12 09:54:03 +000012972 echo "$as_me: failed program was:" >&5
12973cat conftest.$ac_ext >&5
12974ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012975fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012976rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012977fi
12978
Martin v. Löwis11437992002-04-12 09:54:03 +000012979echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
12980echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012981if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012982
12983cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012984#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012985_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012986
12987fi
12988
Martin v. Löwis11437992002-04-12 09:54:03 +000012989echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
12990echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
12991if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
12992 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012993else
Martin v. Löwis11437992002-04-12 09:54:03 +000012994 cat >conftest.$ac_ext <<_ACEOF
12995#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012996#include "confdefs.h"
12997
12998# include <sys/types.h>
12999# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013000#ifdef F77_DUMMY_MAIN
13001# ifdef __cplusplus
13002 extern "C"
13003# endif
13004 int F77_DUMMY_MAIN() { return 1; }
13005#endif
13006int
13007main ()
13008{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013009struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013010 ;
13011 return 0;
13012}
13013_ACEOF
13014rm -f conftest.$ac_objext
13015if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13016 (eval $ac_compile) 2>&5
13017 ac_status=$?
13018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13019 (exit $ac_status); } &&
13020 { ac_try='test -s conftest.$ac_objext'
13021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13022 (eval $ac_try) 2>&5
13023 ac_status=$?
13024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13025 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013026 ac_cv_struct_sockaddr_storage=yes
13027else
Martin v. Löwis11437992002-04-12 09:54:03 +000013028 echo "$as_me: failed program was:" >&5
13029cat conftest.$ac_ext >&5
13030ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013031fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013032rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013033fi
13034
Martin v. Löwis11437992002-04-12 09:54:03 +000013035echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13036echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013037if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013038
13039cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013040#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013041_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013042
13043fi
13044
Guido van Rossum627b2d71993-12-24 10:39:16 +000013045# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013046
Michael W. Hudson54241132001-12-07 15:38:26 +000013047
Martin v. Löwis11437992002-04-12 09:54:03 +000013048echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13049echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13050if test "${ac_cv_c_char_unsigned+set}" = set; then
13051 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013052else
Martin v. Löwis11437992002-04-12 09:54:03 +000013053 cat >conftest.$ac_ext <<_ACEOF
13054#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013055#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013056$ac_includes_default
13057#ifdef F77_DUMMY_MAIN
13058# ifdef __cplusplus
13059 extern "C"
13060# endif
13061 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013062#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013063int
13064main ()
13065{
13066static int test_array [1 - 2 * !(((char) -1) < 0)];
13067test_array [0] = 0
13068
13069 ;
13070 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013071}
Martin v. Löwis11437992002-04-12 09:54:03 +000013072_ACEOF
13073rm -f conftest.$ac_objext
13074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13075 (eval $ac_compile) 2>&5
13076 ac_status=$?
13077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13078 (exit $ac_status); } &&
13079 { ac_try='test -s conftest.$ac_objext'
13080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13081 (eval $ac_try) 2>&5
13082 ac_status=$?
13083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13084 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013085 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013086else
13087 echo "$as_me: failed program was:" >&5
13088cat conftest.$ac_ext >&5
13089ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013090fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013091rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013092fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013093echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13094echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013095if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013096 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013097#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013098_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013099
13100fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013101
Martin v. Löwis11437992002-04-12 09:54:03 +000013102echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13103echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13104if test "${ac_cv_prog_cc_stdc+set}" = set; then
13105 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013106else
Martin v. Löwis11437992002-04-12 09:54:03 +000013107 ac_cv_prog_cc_stdc=no
13108ac_save_CC=$CC
13109cat >conftest.$ac_ext <<_ACEOF
13110#line $LINENO "configure"
13111#include "confdefs.h"
13112#include <stdarg.h>
13113#include <stdio.h>
13114#include <sys/types.h>
13115#include <sys/stat.h>
13116/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13117struct buf { int x; };
13118FILE * (*rcsopen) (struct buf *, struct stat *, int);
13119static char *e (p, i)
13120 char **p;
13121 int i;
13122{
13123 return p[i];
13124}
13125static char *f (char * (*g) (char **, int), char **p, ...)
13126{
13127 char *s;
13128 va_list v;
13129 va_start (v,p);
13130 s = g (p, va_arg (v,int));
13131 va_end (v);
13132 return s;
13133}
13134int test (int i, double x);
13135struct s1 {int (*f) (int a);};
13136struct s2 {int (*f) (double a);};
13137int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13138int argc;
13139char **argv;
13140#ifdef F77_DUMMY_MAIN
13141# ifdef __cplusplus
13142 extern "C"
13143# endif
13144 int F77_DUMMY_MAIN() { return 1; }
13145#endif
13146int
13147main ()
13148{
13149return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13150 ;
13151 return 0;
13152}
13153_ACEOF
13154# Don't try gcc -ansi; that turns off useful extensions and
13155# breaks some systems' header files.
13156# AIX -qlanglvl=ansi
13157# Ultrix and OSF/1 -std1
13158# HP-UX 10.20 and later -Ae
13159# HP-UX older versions -Aa -D_HPUX_SOURCE
13160# SVR4 -Xc -D__EXTENSIONS__
13161for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13162do
13163 CC="$ac_save_CC $ac_arg"
13164 rm -f conftest.$ac_objext
13165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13166 (eval $ac_compile) 2>&5
13167 ac_status=$?
13168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13169 (exit $ac_status); } &&
13170 { ac_try='test -s conftest.$ac_objext'
13171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13172 (eval $ac_try) 2>&5
13173 ac_status=$?
13174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13175 (exit $ac_status); }; }; then
13176 ac_cv_prog_cc_stdc=$ac_arg
13177break
13178else
13179 echo "$as_me: failed program was:" >&5
13180cat conftest.$ac_ext >&5
13181fi
13182rm -f conftest.$ac_objext
13183done
13184rm -f conftest.$ac_ext conftest.$ac_objext
13185CC=$ac_save_CC
13186
13187fi
13188
13189case "x$ac_cv_prog_cc_stdc" in
13190 x|xno)
13191 echo "$as_me:$LINENO: result: none needed" >&5
13192echo "${ECHO_T}none needed" >&6 ;;
13193 *)
13194 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13195echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13196 CC="$CC $ac_cv_prog_cc_stdc" ;;
13197esac
13198
13199echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13200echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13201if test "${ac_cv_c_const+set}" = set; then
13202 echo $ECHO_N "(cached) $ECHO_C" >&6
13203else
13204 cat >conftest.$ac_ext <<_ACEOF
13205#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013206#include "confdefs.h"
13207
Martin v. Löwis11437992002-04-12 09:54:03 +000013208#ifdef F77_DUMMY_MAIN
13209# ifdef __cplusplus
13210 extern "C"
13211# endif
13212 int F77_DUMMY_MAIN() { return 1; }
13213#endif
13214int
13215main ()
13216{
13217/* FIXME: Include the comments suggested by Paul. */
13218#ifndef __cplusplus
13219 /* Ultrix mips cc rejects this. */
13220 typedef int charset[2];
13221 const charset x;
13222 /* SunOS 4.1.1 cc rejects this. */
13223 char const *const *ccp;
13224 char **p;
13225 /* NEC SVR4.0.2 mips cc rejects this. */
13226 struct point {int x, y;};
13227 static struct point const zero = {0,0};
13228 /* AIX XL C 1.02.0.0 rejects this.
13229 It does not let you subtract one const X* pointer from another in
13230 an arm of an if-expression whose if-part is not a constant
13231 expression */
13232 const char *g = "string";
13233 ccp = &g + (g ? g-g : 0);
13234 /* HPUX 7.0 cc rejects these. */
13235 ++ccp;
13236 p = (char**) ccp;
13237 ccp = (char const *const *) p;
13238 { /* SCO 3.2v4 cc rejects this. */
13239 char *t;
13240 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013241
Martin v. Löwis11437992002-04-12 09:54:03 +000013242 *t++ = 0;
13243 }
13244 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13245 int x[] = {25, 17};
13246 const int *foo = &x[0];
13247 ++foo;
13248 }
13249 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13250 typedef const int *iptr;
13251 iptr p = 0;
13252 ++p;
13253 }
13254 { /* AIX XL C 1.02.0.0 rejects this saying
13255 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13256 struct s { int j; const int *ap[3]; };
13257 struct s *b; b->j = 5;
13258 }
13259 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13260 const int foo = 10;
13261 }
13262#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013263
Martin v. Löwis11437992002-04-12 09:54:03 +000013264 ;
13265 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013266}
Martin v. Löwis11437992002-04-12 09:54:03 +000013267_ACEOF
13268rm -f conftest.$ac_objext
13269if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13270 (eval $ac_compile) 2>&5
13271 ac_status=$?
13272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13273 (exit $ac_status); } &&
13274 { ac_try='test -s conftest.$ac_objext'
13275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13276 (eval $ac_try) 2>&5
13277 ac_status=$?
13278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13279 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013280 ac_cv_c_const=yes
13281else
Martin v. Löwis11437992002-04-12 09:54:03 +000013282 echo "$as_me: failed program was:" >&5
13283cat conftest.$ac_ext >&5
13284ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013285fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013286rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013287fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013288echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13289echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013290if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013291
13292cat >>confdefs.h <<\_ACEOF
13293#define const
13294_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013295
13296fi
13297
Michael W. Hudson54241132001-12-07 15:38:26 +000013298
Guido van Rossumda88dad1995-01-26 00:46:29 +000013299works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013300echo "$as_me:$LINENO: checking for working volatile" >&5
13301echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13302cat >conftest.$ac_ext <<_ACEOF
13303#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013304#include "confdefs.h"
13305
Martin v. Löwis11437992002-04-12 09:54:03 +000013306#ifdef F77_DUMMY_MAIN
13307# ifdef __cplusplus
13308 extern "C"
13309# endif
13310 int F77_DUMMY_MAIN() { return 1; }
13311#endif
13312int
13313main ()
13314{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013315volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013316 ;
13317 return 0;
13318}
13319_ACEOF
13320rm -f conftest.$ac_objext
13321if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13322 (eval $ac_compile) 2>&5
13323 ac_status=$?
13324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13325 (exit $ac_status); } &&
13326 { ac_try='test -s conftest.$ac_objext'
13327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13328 (eval $ac_try) 2>&5
13329 ac_status=$?
13330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13331 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013332 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013333else
Martin v. Löwis11437992002-04-12 09:54:03 +000013334 echo "$as_me: failed program was:" >&5
13335cat conftest.$ac_ext >&5
13336
13337cat >>confdefs.h <<\_ACEOF
13338#define volatile
13339_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013340
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013341
Guido van Rossum627b2d71993-12-24 10:39:16 +000013342fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013343rm -f conftest.$ac_objext conftest.$ac_ext
13344echo "$as_me:$LINENO: result: $works" >&5
13345echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013346
Guido van Rossumda88dad1995-01-26 00:46:29 +000013347works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013348echo "$as_me:$LINENO: checking for working signed char" >&5
13349echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13350cat >conftest.$ac_ext <<_ACEOF
13351#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013352#include "confdefs.h"
13353
Martin v. Löwis11437992002-04-12 09:54:03 +000013354#ifdef F77_DUMMY_MAIN
13355# ifdef __cplusplus
13356 extern "C"
13357# endif
13358 int F77_DUMMY_MAIN() { return 1; }
13359#endif
13360int
13361main ()
13362{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013363signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013364 ;
13365 return 0;
13366}
13367_ACEOF
13368rm -f conftest.$ac_objext
13369if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13370 (eval $ac_compile) 2>&5
13371 ac_status=$?
13372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13373 (exit $ac_status); } &&
13374 { ac_try='test -s conftest.$ac_objext'
13375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13376 (eval $ac_try) 2>&5
13377 ac_status=$?
13378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13379 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013380 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013381else
Martin v. Löwis11437992002-04-12 09:54:03 +000013382 echo "$as_me: failed program was:" >&5
13383cat conftest.$ac_ext >&5
13384
13385cat >>confdefs.h <<\_ACEOF
13386#define signed
13387_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013388
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013389
Guido van Rossum7f43da71994-08-01 12:15:30 +000013390fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013391rm -f conftest.$ac_objext conftest.$ac_ext
13392echo "$as_me:$LINENO: result: $works" >&5
13393echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013394
Guido van Rossumda88dad1995-01-26 00:46:29 +000013395have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013396echo "$as_me:$LINENO: checking for prototypes" >&5
13397echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13398cat >conftest.$ac_ext <<_ACEOF
13399#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013400#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013401int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013402#ifdef F77_DUMMY_MAIN
13403# ifdef __cplusplus
13404 extern "C"
13405# endif
13406 int F77_DUMMY_MAIN() { return 1; }
13407#endif
13408int
13409main ()
13410{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013411return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013412 ;
13413 return 0;
13414}
13415_ACEOF
13416rm -f conftest.$ac_objext
13417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13418 (eval $ac_compile) 2>&5
13419 ac_status=$?
13420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13421 (exit $ac_status); } &&
13422 { ac_try='test -s conftest.$ac_objext'
13423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13424 (eval $ac_try) 2>&5
13425 ac_status=$?
13426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13427 (exit $ac_status); }; }; then
13428
13429
13430cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013431#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013432_ACEOF
13433
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013434 have_prototypes=yes
13435
Guido van Rossumf78abae1997-01-21 22:02:36 +000013436else
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 echo "$as_me: failed program was:" >&5
13438cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013440rm -f conftest.$ac_objext conftest.$ac_ext
13441echo "$as_me:$LINENO: result: $have_prototypes" >&5
13442echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013443
Guido van Rossumda88dad1995-01-26 00:46:29 +000013444works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013445echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13446echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13447cat >conftest.$ac_ext <<_ACEOF
13448#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013449#include "confdefs.h"
13450
13451#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013452int foo(int x, ...) {
13453 va_list va;
13454 va_start(va, x);
13455 va_arg(va, int);
13456 va_arg(va, char *);
13457 va_arg(va, double);
13458 return 0;
13459}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013460
Martin v. Löwis11437992002-04-12 09:54:03 +000013461#ifdef F77_DUMMY_MAIN
13462# ifdef __cplusplus
13463 extern "C"
13464# endif
13465 int F77_DUMMY_MAIN() { return 1; }
13466#endif
13467int
13468main ()
13469{
Guido van Rossum90eea071996-08-30 20:58:57 +000013470return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013471 ;
13472 return 0;
13473}
13474_ACEOF
13475rm -f conftest.$ac_objext
13476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13477 (eval $ac_compile) 2>&5
13478 ac_status=$?
13479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13480 (exit $ac_status); } &&
13481 { ac_try='test -s conftest.$ac_objext'
13482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13483 (eval $ac_try) 2>&5
13484 ac_status=$?
13485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13486 (exit $ac_status); }; }; then
13487
13488
13489cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013490#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013491_ACEOF
13492
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013493 works=yes
13494
Guido van Rossumf78abae1997-01-21 22:02:36 +000013495else
Martin v. Löwis11437992002-04-12 09:54:03 +000013496 echo "$as_me: failed program was:" >&5
13497cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013498fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013499rm -f conftest.$ac_objext conftest.$ac_ext
13500echo "$as_me:$LINENO: result: $works" >&5
13501echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013502
Guido van Rossumda88dad1995-01-26 00:46:29 +000013503if test "$have_prototypes" = yes; then
13504bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013505echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13506echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13507cat >conftest.$ac_ext <<_ACEOF
13508#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013509#include "confdefs.h"
13510#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013511#ifdef F77_DUMMY_MAIN
13512# ifdef __cplusplus
13513 extern "C"
13514# endif
13515 int F77_DUMMY_MAIN() { return 1; }
13516#endif
13517int
13518main ()
13519{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013520char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 ;
13522 return 0;
13523}
13524_ACEOF
13525rm -f conftest.$ac_objext
13526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13527 (eval $ac_compile) 2>&5
13528 ac_status=$?
13529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13530 (exit $ac_status); } &&
13531 { ac_try='test -s conftest.$ac_objext'
13532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13533 (eval $ac_try) 2>&5
13534 ac_status=$?
13535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13536 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013537 :
13538else
Martin v. Löwis11437992002-04-12 09:54:03 +000013539 echo "$as_me: failed program was:" >&5
13540cat conftest.$ac_ext >&5
13541
13542cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013543#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013544_ACEOF
13545
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013546 bad_prototypes=yes
13547
Guido van Rossum627b2d71993-12-24 10:39:16 +000013548fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013549rm -f conftest.$ac_objext conftest.$ac_ext
13550echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13551echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013552fi
13553
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013554# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013555echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13556echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13557cat >conftest.$ac_ext <<_ACEOF
13558#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013559#include "confdefs.h"
13560#include <sys/types.h>
13561#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013562#ifdef F77_DUMMY_MAIN
13563# ifdef __cplusplus
13564 extern "C"
13565# endif
13566 int F77_DUMMY_MAIN() { return 1; }
13567#endif
13568int
13569main ()
13570{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013571struct sockaddr x;
13572x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013573 ;
13574 return 0;
13575}
13576_ACEOF
13577rm -f conftest.$ac_objext
13578if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13579 (eval $ac_compile) 2>&5
13580 ac_status=$?
13581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13582 (exit $ac_status); } &&
13583 { ac_try='test -s conftest.$ac_objext'
13584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13585 (eval $ac_try) 2>&5
13586 ac_status=$?
13587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13588 (exit $ac_status); }; }; then
13589 echo "$as_me:$LINENO: result: yes" >&5
13590echo "${ECHO_T}yes" >&6
13591
13592cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013593#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013594_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013595
13596else
Martin v. Löwis11437992002-04-12 09:54:03 +000013597 echo "$as_me: failed program was:" >&5
13598cat conftest.$ac_ext >&5
13599echo "$as_me:$LINENO: result: no" >&5
13600echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013601fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013602rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013603
Martin v. Löwis11437992002-04-12 09:54:03 +000013604echo "$as_me:$LINENO: checking for bad static forward" >&5
13605echo $ECHO_N "checking for bad static forward... $ECHO_C" >&6
13606if test "${ac_cv_bad_static_forward+set}" = set; then
13607 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013608else
13609 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013610 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013611else
Martin v. Löwis11437992002-04-12 09:54:03 +000013612 cat >conftest.$ac_ext <<_ACEOF
13613#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013614#include "confdefs.h"
13615
13616struct s { int a; int b; };
13617static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013618int foobar() {
13619 static int random;
13620 random = (int) &foo;
13621 return random;
13622}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013623static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013624main() {
13625 exit(!((int)&foo == foobar()));
13626}
Martin v. Löwis11437992002-04-12 09:54:03 +000013627_ACEOF
13628rm -f conftest$ac_exeext
13629if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13630 (eval $ac_link) 2>&5
13631 ac_status=$?
13632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13633 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13635 (eval $ac_try) 2>&5
13636 ac_status=$?
13637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13638 (exit $ac_status); }; }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013639 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013640else
Martin v. Löwis11437992002-04-12 09:54:03 +000013641 echo "$as_me: program exited with status $ac_status" >&5
13642echo "$as_me: failed program was:" >&5
13643cat conftest.$ac_ext >&5
13644( exit $ac_status )
13645ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013646fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013647rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13648fi
Guido van Rossumf78abae1997-01-21 22:02:36 +000013649fi
13650
Martin v. Löwis11437992002-04-12 09:54:03 +000013651echo "$as_me:$LINENO: result: $ac_cv_bad_static_forward" >&5
13652echo "${ECHO_T}$ac_cv_bad_static_forward" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013653if test "$ac_cv_bad_static_forward" = yes
13654then
Martin v. Löwis11437992002-04-12 09:54:03 +000013655
13656cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013657#define BAD_STATIC_FORWARD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013658_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013659
13660fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013661
Guido van Rossumda88dad1995-01-26 00:46:29 +000013662va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013663echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13664echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13665cat >conftest.$ac_ext <<_ACEOF
13666#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013667#include "confdefs.h"
13668
13669#ifdef HAVE_STDARG_PROTOTYPES
13670#include <stdarg.h>
13671#else
13672#include <varargs.h>
13673#endif
13674
Martin v. Löwis11437992002-04-12 09:54:03 +000013675#ifdef F77_DUMMY_MAIN
13676# ifdef __cplusplus
13677 extern "C"
13678# endif
13679 int F77_DUMMY_MAIN() { return 1; }
13680#endif
13681int
13682main ()
13683{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013684va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013685 ;
13686 return 0;
13687}
13688_ACEOF
13689rm -f conftest.$ac_objext
13690if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13691 (eval $ac_compile) 2>&5
13692 ac_status=$?
13693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13694 (exit $ac_status); } &&
13695 { ac_try='test -s conftest.$ac_objext'
13696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13697 (eval $ac_try) 2>&5
13698 ac_status=$?
13699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13700 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013701 :
13702else
Martin v. Löwis11437992002-04-12 09:54:03 +000013703 echo "$as_me: failed program was:" >&5
13704cat conftest.$ac_ext >&5
13705
13706
13707cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013708#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013709_ACEOF
13710
Guido van Rossumda88dad1995-01-26 00:46:29 +000013711 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013712
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013713fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013714rm -f conftest.$ac_objext conftest.$ac_ext
13715echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13716echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013717
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013718# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013719
13720
13721
13722echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13723echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13724if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13725 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013726else
Martin v. Löwis11437992002-04-12 09:54:03 +000013727 cat >conftest.$ac_ext <<_ACEOF
13728#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013729#include "confdefs.h"
13730/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013731 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013732#include <assert.h>
13733/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013734#ifdef __cplusplus
13735extern "C"
13736#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013737/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013738 builtin and then its argument prototype would still apply. */
13739char gethostbyname_r ();
13740char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013741
Martin v. Löwis11437992002-04-12 09:54:03 +000013742#ifdef F77_DUMMY_MAIN
13743# ifdef __cplusplus
13744 extern "C"
13745# endif
13746 int F77_DUMMY_MAIN() { return 1; }
13747#endif
13748int
13749main ()
13750{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013751/* The GNU C library defines this for functions which it implements
13752 to always fail with ENOSYS. Some functions are actually named
13753 something starting with __ and the normal name is an alias. */
13754#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13755choke me
13756#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013757f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013758#endif
13759
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 ;
13761 return 0;
13762}
13763_ACEOF
13764rm -f conftest.$ac_objext conftest$ac_exeext
13765if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13766 (eval $ac_link) 2>&5
13767 ac_status=$?
13768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13769 (exit $ac_status); } &&
13770 { ac_try='test -s conftest$ac_exeext'
13771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13772 (eval $ac_try) 2>&5
13773 ac_status=$?
13774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13775 (exit $ac_status); }; }; then
13776 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013777else
Martin v. Löwis11437992002-04-12 09:54:03 +000013778 echo "$as_me: failed program was:" >&5
13779cat conftest.$ac_ext >&5
13780ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013781fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013782rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013783fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013784echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13785echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13786if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013787
Martin v. Löwis11437992002-04-12 09:54:03 +000013788 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013789#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013790_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013791
Martin v. Löwis11437992002-04-12 09:54:03 +000013792 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13793echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013794 OLD_CFLAGS=$CFLAGS
13795 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 cat >conftest.$ac_ext <<_ACEOF
13797#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013798#include "confdefs.h"
13799
13800# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013801
13802#ifdef F77_DUMMY_MAIN
13803# ifdef __cplusplus
13804 extern "C"
13805# endif
13806 int F77_DUMMY_MAIN() { return 1; }
13807#endif
13808int
13809main ()
13810{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013811
13812 char *name;
13813 struct hostent *he, *res;
13814 char buffer[2048];
13815 int buflen = 2048;
13816 int h_errnop;
13817
13818 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013819
13820 ;
13821 return 0;
13822}
13823_ACEOF
13824rm -f conftest.$ac_objext
13825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13826 (eval $ac_compile) 2>&5
13827 ac_status=$?
13828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13829 (exit $ac_status); } &&
13830 { ac_try='test -s conftest.$ac_objext'
13831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13832 (eval $ac_try) 2>&5
13833 ac_status=$?
13834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13835 (exit $ac_status); }; }; then
13836
13837 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013838#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013839_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013840
Martin v. Löwis11437992002-04-12 09:54:03 +000013841
13842cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013843#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013844_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013845
Martin v. Löwis11437992002-04-12 09:54:03 +000013846 echo "$as_me:$LINENO: result: yes" >&5
13847echo "${ECHO_T}yes" >&6
13848
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013849else
Martin v. Löwis11437992002-04-12 09:54:03 +000013850 echo "$as_me: failed program was:" >&5
13851cat conftest.$ac_ext >&5
13852
13853 echo "$as_me:$LINENO: result: no" >&5
13854echo "${ECHO_T}no" >&6
13855 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
13856echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
13857 cat >conftest.$ac_ext <<_ACEOF
13858#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013859#include "confdefs.h"
13860
13861# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013862
13863#ifdef F77_DUMMY_MAIN
13864# ifdef __cplusplus
13865 extern "C"
13866# endif
13867 int F77_DUMMY_MAIN() { return 1; }
13868#endif
13869int
13870main ()
13871{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013872
13873 char *name;
13874 struct hostent *he;
13875 char buffer[2048];
13876 int buflen = 2048;
13877 int h_errnop;
13878
13879 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013880
13881 ;
13882 return 0;
13883}
13884_ACEOF
13885rm -f conftest.$ac_objext
13886if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13887 (eval $ac_compile) 2>&5
13888 ac_status=$?
13889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13890 (exit $ac_status); } &&
13891 { ac_try='test -s conftest.$ac_objext'
13892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13893 (eval $ac_try) 2>&5
13894 ac_status=$?
13895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13896 (exit $ac_status); }; }; then
13897
13898 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013899#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013900_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013901
Martin v. Löwis11437992002-04-12 09:54:03 +000013902
13903cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013904#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013905_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013906
Martin v. Löwis11437992002-04-12 09:54:03 +000013907 echo "$as_me:$LINENO: result: yes" >&5
13908echo "${ECHO_T}yes" >&6
13909
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013910else
Martin v. Löwis11437992002-04-12 09:54:03 +000013911 echo "$as_me: failed program was:" >&5
13912cat conftest.$ac_ext >&5
13913
13914 echo "$as_me:$LINENO: result: no" >&5
13915echo "${ECHO_T}no" >&6
13916 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
13917echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
13918 cat >conftest.$ac_ext <<_ACEOF
13919#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013920#include "confdefs.h"
13921
13922# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013923
13924#ifdef F77_DUMMY_MAIN
13925# ifdef __cplusplus
13926 extern "C"
13927# endif
13928 int F77_DUMMY_MAIN() { return 1; }
13929#endif
13930int
13931main ()
13932{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013933
13934 char *name;
13935 struct hostent *he;
13936 struct hostent_data data;
13937
13938 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000013939
13940 ;
13941 return 0;
13942}
13943_ACEOF
13944rm -f conftest.$ac_objext
13945if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13946 (eval $ac_compile) 2>&5
13947 ac_status=$?
13948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13949 (exit $ac_status); } &&
13950 { ac_try='test -s conftest.$ac_objext'
13951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13952 (eval $ac_try) 2>&5
13953 ac_status=$?
13954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13955 (exit $ac_status); }; }; then
13956
13957 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013958#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013959_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013960
Martin v. Löwis11437992002-04-12 09:54:03 +000013961
13962cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013963#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013964_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013965
Martin v. Löwis11437992002-04-12 09:54:03 +000013966 echo "$as_me:$LINENO: result: yes" >&5
13967echo "${ECHO_T}yes" >&6
13968
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013969else
Martin v. Löwis11437992002-04-12 09:54:03 +000013970 echo "$as_me: failed program was:" >&5
13971cat conftest.$ac_ext >&5
13972
13973 echo "$as_me:$LINENO: result: no" >&5
13974echo "${ECHO_T}no" >&6
13975
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013976fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013977rm -f conftest.$ac_objext conftest.$ac_ext
13978
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013979fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013980rm -f conftest.$ac_objext conftest.$ac_ext
13981
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013982fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013983rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013984 CFLAGS=$OLD_CFLAGS
13985
13986else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013987
Martin v. Löwis11437992002-04-12 09:54:03 +000013988
13989for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000013990do
Martin v. Löwis11437992002-04-12 09:54:03 +000013991as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13992echo "$as_me:$LINENO: checking for $ac_func" >&5
13993echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13994if eval "test \"\${$as_ac_var+set}\" = set"; then
13995 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013996else
Martin v. Löwis11437992002-04-12 09:54:03 +000013997 cat >conftest.$ac_ext <<_ACEOF
13998#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013999#include "confdefs.h"
14000/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014001 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014002#include <assert.h>
14003/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014004#ifdef __cplusplus
14005extern "C"
14006#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014007/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014008 builtin and then its argument prototype would still apply. */
14009char $ac_func ();
14010char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014011
Martin v. Löwis11437992002-04-12 09:54:03 +000014012#ifdef F77_DUMMY_MAIN
14013# ifdef __cplusplus
14014 extern "C"
14015# endif
14016 int F77_DUMMY_MAIN() { return 1; }
14017#endif
14018int
14019main ()
14020{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014021/* The GNU C library defines this for functions which it implements
14022 to always fail with ENOSYS. Some functions are actually named
14023 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014024#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014025choke me
14026#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014027f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014028#endif
14029
Martin v. Löwis11437992002-04-12 09:54:03 +000014030 ;
14031 return 0;
14032}
14033_ACEOF
14034rm -f conftest.$ac_objext conftest$ac_exeext
14035if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14036 (eval $ac_link) 2>&5
14037 ac_status=$?
14038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14039 (exit $ac_status); } &&
14040 { ac_try='test -s conftest$ac_exeext'
14041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14042 (eval $ac_try) 2>&5
14043 ac_status=$?
14044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14045 (exit $ac_status); }; }; then
14046 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014047else
Martin v. Löwis11437992002-04-12 09:54:03 +000014048 echo "$as_me: failed program was:" >&5
14049cat conftest.$ac_ext >&5
14050eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014051fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014052rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014053fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014054echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14055echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14056if test `eval echo '${'$as_ac_var'}'` = yes; then
14057 cat >>confdefs.h <<_ACEOF
14058#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14059_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014060
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014061fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014062done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014063
Michael W. Hudson54241132001-12-07 15:38:26 +000014064
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014065fi
14066
Michael W. Hudson54241132001-12-07 15:38:26 +000014067
14068
14069
14070
14071
14072
Guido van Rossum627b2d71993-12-24 10:39:16 +000014073# checks for system services
14074# (none yet)
14075
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014076# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014077echo "$as_me:$LINENO: checking for __fpu_control" >&5
14078echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14079if test "${ac_cv_func___fpu_control+set}" = set; then
14080 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014081else
Martin v. Löwis11437992002-04-12 09:54:03 +000014082 cat >conftest.$ac_ext <<_ACEOF
14083#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014084#include "confdefs.h"
14085/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014086 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014087#include <assert.h>
14088/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014089#ifdef __cplusplus
14090extern "C"
14091#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014092/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014093 builtin and then its argument prototype would still apply. */
14094char __fpu_control ();
14095char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014096
Martin v. Löwis11437992002-04-12 09:54:03 +000014097#ifdef F77_DUMMY_MAIN
14098# ifdef __cplusplus
14099 extern "C"
14100# endif
14101 int F77_DUMMY_MAIN() { return 1; }
14102#endif
14103int
14104main ()
14105{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014106/* The GNU C library defines this for functions which it implements
14107 to always fail with ENOSYS. Some functions are actually named
14108 something starting with __ and the normal name is an alias. */
14109#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14110choke me
14111#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014112f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014113#endif
14114
Martin v. Löwis11437992002-04-12 09:54:03 +000014115 ;
14116 return 0;
14117}
14118_ACEOF
14119rm -f conftest.$ac_objext conftest$ac_exeext
14120if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14121 (eval $ac_link) 2>&5
14122 ac_status=$?
14123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14124 (exit $ac_status); } &&
14125 { ac_try='test -s conftest$ac_exeext'
14126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14127 (eval $ac_try) 2>&5
14128 ac_status=$?
14129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14130 (exit $ac_status); }; }; then
14131 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014132else
Martin v. Löwis11437992002-04-12 09:54:03 +000014133 echo "$as_me: failed program was:" >&5
14134cat conftest.$ac_ext >&5
14135ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014137rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014138fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014139echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14140echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14141if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014142 :
14143else
Martin v. Löwis11437992002-04-12 09:54:03 +000014144
14145echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14146echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14147if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14148 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014149else
Martin v. Löwis11437992002-04-12 09:54:03 +000014150 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014151LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014152cat >conftest.$ac_ext <<_ACEOF
14153#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014154#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014155
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014156/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014157#ifdef __cplusplus
14158extern "C"
14159#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014160/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014161 builtin and then its argument prototype would still apply. */
14162char __fpu_control ();
14163#ifdef F77_DUMMY_MAIN
14164# ifdef __cplusplus
14165 extern "C"
14166# endif
14167 int F77_DUMMY_MAIN() { return 1; }
14168#endif
14169int
14170main ()
14171{
14172__fpu_control ();
14173 ;
14174 return 0;
14175}
14176_ACEOF
14177rm -f conftest.$ac_objext conftest$ac_exeext
14178if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14179 (eval $ac_link) 2>&5
14180 ac_status=$?
14181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14182 (exit $ac_status); } &&
14183 { ac_try='test -s conftest$ac_exeext'
14184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14185 (eval $ac_try) 2>&5
14186 ac_status=$?
14187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14188 (exit $ac_status); }; }; then
14189 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014190else
Martin v. Löwis11437992002-04-12 09:54:03 +000014191 echo "$as_me: failed program was:" >&5
14192cat conftest.$ac_ext >&5
14193ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014194fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014195rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14196LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014197fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014198echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14199echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14200if test $ac_cv_lib_ieee___fpu_control = yes; then
14201 cat >>confdefs.h <<_ACEOF
14202#define HAVE_LIBIEEE 1
14203_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014204
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014205 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014206
Guido van Rossum627b2d71993-12-24 10:39:16 +000014207fi
14208
Michael W. Hudson54241132001-12-07 15:38:26 +000014209
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014210fi
14211
Michael W. Hudson54241132001-12-07 15:38:26 +000014212
Guido van Rossum7f253911997-05-09 02:42:48 +000014213# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014214echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14215echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14216
Guido van Rossum7f253911997-05-09 02:42:48 +000014217# Check whether --with-fpectl or --without-fpectl was given.
14218if test "${with_fpectl+set}" = set; then
14219 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014220
Guido van Rossum7f253911997-05-09 02:42:48 +000014221if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014222then
14223
14224cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014225#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014226_ACEOF
14227
14228 echo "$as_me:$LINENO: result: yes" >&5
14229echo "${ECHO_T}yes" >&6
14230else echo "$as_me:$LINENO: result: no" >&5
14231echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014232fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014233else
Martin v. Löwis11437992002-04-12 09:54:03 +000014234 echo "$as_me:$LINENO: result: no" >&5
14235echo "${ECHO_T}no" >&6
14236fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014237
Guido van Rossum7f43da71994-08-01 12:15:30 +000014238# check for --with-libm=...
14239
Guido van Rossum563e7081996-09-10 18:20:48 +000014240case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014241Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014242BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014243*) LIBM=-lm
14244esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014245echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14246echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14247
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014248# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014249if test "${with_libm+set}" = set; then
14250 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014251
Guido van Rossum7f253911997-05-09 02:42:48 +000014252if test "$withval" = no
14253then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014254 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14255echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014256elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014257then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014258 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14259echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14260else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14261echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14262 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014263fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014264else
Martin v. Löwis11437992002-04-12 09:54:03 +000014265 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14266echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14267fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014268
14269# check for --with-libc=...
14270
Martin v. Löwis11437992002-04-12 09:54:03 +000014271echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14272echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14273
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014274# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014275if test "${with_libc+set}" = set; then
14276 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014277
Guido van Rossum7f253911997-05-09 02:42:48 +000014278if test "$withval" = no
14279then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014280 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14281echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014282elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014283then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014284 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14285echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14286else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14287echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14288 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014289fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014290else
Martin v. Löwis11437992002-04-12 09:54:03 +000014291 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14292echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14293fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014294
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014295# check for hypot() in math library
14296LIBS_SAVE=$LIBS
14297LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014298
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014299for ac_func in hypot
14300do
Martin v. Löwis11437992002-04-12 09:54:03 +000014301as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14302echo "$as_me:$LINENO: checking for $ac_func" >&5
14303echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14304if eval "test \"\${$as_ac_var+set}\" = set"; then
14305 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014306else
Martin v. Löwis11437992002-04-12 09:54:03 +000014307 cat >conftest.$ac_ext <<_ACEOF
14308#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014309#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014310/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014311 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014312#include <assert.h>
14313/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014314#ifdef __cplusplus
14315extern "C"
14316#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014317/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014318 builtin and then its argument prototype would still apply. */
14319char $ac_func ();
14320char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014321
Martin v. Löwis11437992002-04-12 09:54:03 +000014322#ifdef F77_DUMMY_MAIN
14323# ifdef __cplusplus
14324 extern "C"
14325# endif
14326 int F77_DUMMY_MAIN() { return 1; }
14327#endif
14328int
14329main ()
14330{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014331/* The GNU C library defines this for functions which it implements
14332 to always fail with ENOSYS. Some functions are actually named
14333 something starting with __ and the normal name is an alias. */
14334#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14335choke me
14336#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014337f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014338#endif
14339
Martin v. Löwis11437992002-04-12 09:54:03 +000014340 ;
14341 return 0;
14342}
14343_ACEOF
14344rm -f conftest.$ac_objext conftest$ac_exeext
14345if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14346 (eval $ac_link) 2>&5
14347 ac_status=$?
14348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14349 (exit $ac_status); } &&
14350 { ac_try='test -s conftest$ac_exeext'
14351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14352 (eval $ac_try) 2>&5
14353 ac_status=$?
14354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14355 (exit $ac_status); }; }; then
14356 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014357else
Martin v. Löwis11437992002-04-12 09:54:03 +000014358 echo "$as_me: failed program was:" >&5
14359cat conftest.$ac_ext >&5
14360eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014361fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014362rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014363fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014364echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14365echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14366if test `eval echo '${'$as_ac_var'}'` = yes; then
14367 cat >>confdefs.h <<_ACEOF
14368#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14369_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014370
Michael W. Hudson54241132001-12-07 15:38:26 +000014371else
Martin v. Löwis11437992002-04-12 09:54:03 +000014372 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014373fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014374done
14375
Michael W. Hudson54241132001-12-07 15:38:26 +000014376
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014377LIBS=$LIBS_SAVE
14378
Guido van Rossumad713701997-07-10 22:42:38 +000014379# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014380echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14381echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14382if test "${ac_cv_malloc_zero+set}" = set; then
14383 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014384else
14385 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014386 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014387else
Martin v. Löwis11437992002-04-12 09:54:03 +000014388 cat >conftest.$ac_ext <<_ACEOF
14389#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014390#include "confdefs.h"
14391#include <stdio.h>
14392#ifdef HAVE_STDLIB
14393#include <stdlib.h>
14394#else
14395char *malloc(), *realloc();
14396int *free();
14397#endif
14398main() {
14399 char *p;
14400 p = malloc(0);
14401 if (p == NULL) exit(1);
14402 p = realloc(p, 0);
14403 if (p == NULL) exit(1);
14404 free(p);
14405 exit(0);
14406}
Martin v. Löwis11437992002-04-12 09:54:03 +000014407_ACEOF
14408rm -f conftest$ac_exeext
14409if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14410 (eval $ac_link) 2>&5
14411 ac_status=$?
14412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14413 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14415 (eval $ac_try) 2>&5
14416 ac_status=$?
14417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14418 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014419 ac_cv_malloc_zero=nonnull
14420else
Martin v. Löwis11437992002-04-12 09:54:03 +000014421 echo "$as_me: program exited with status $ac_status" >&5
14422echo "$as_me: failed program was:" >&5
14423cat conftest.$ac_ext >&5
14424( exit $ac_status )
14425ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014426fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014427rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014428fi
Guido van Rossumad713701997-07-10 22:42:38 +000014429fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014430 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014431echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14432echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014433if test "$ac_cv_malloc_zero" = null
14434then
Martin v. Löwis11437992002-04-12 09:54:03 +000014435
14436cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014437#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014438_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014439
14440fi
14441
Guido van Rossumef2255b2000-03-10 22:30:29 +000014442# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014443if test "${ac_cv_header_wchar_h+set}" = set; then
14444 echo "$as_me:$LINENO: checking for wchar.h" >&5
14445echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14446if test "${ac_cv_header_wchar_h+set}" = set; then
14447 echo $ECHO_N "(cached) $ECHO_C" >&6
14448fi
14449echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14450echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014451else
Martin v. Löwis11437992002-04-12 09:54:03 +000014452 # Is the header compilable?
14453echo "$as_me:$LINENO: checking wchar.h usability" >&5
14454echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14455cat >conftest.$ac_ext <<_ACEOF
14456#line $LINENO "configure"
14457#include "confdefs.h"
14458$ac_includes_default
14459#include <wchar.h>
14460_ACEOF
14461rm -f conftest.$ac_objext
14462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14463 (eval $ac_compile) 2>&5
14464 ac_status=$?
14465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14466 (exit $ac_status); } &&
14467 { ac_try='test -s conftest.$ac_objext'
14468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14469 (eval $ac_try) 2>&5
14470 ac_status=$?
14471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14472 (exit $ac_status); }; }; then
14473 ac_header_compiler=yes
14474else
14475 echo "$as_me: failed program was:" >&5
14476cat conftest.$ac_ext >&5
14477ac_header_compiler=no
14478fi
14479rm -f conftest.$ac_objext conftest.$ac_ext
14480echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14481echo "${ECHO_T}$ac_header_compiler" >&6
14482
14483# Is the header present?
14484echo "$as_me:$LINENO: checking wchar.h presence" >&5
14485echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14486cat >conftest.$ac_ext <<_ACEOF
14487#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014488#include "confdefs.h"
14489#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014490_ACEOF
14491if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14492 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14493 ac_status=$?
14494 egrep -v '^ *\+' conftest.er1 >conftest.err
14495 rm -f conftest.er1
14496 cat conftest.err >&5
14497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14498 (exit $ac_status); } >/dev/null; then
14499 if test -s conftest.err; then
14500 ac_cpp_err=$ac_c_preproc_warn_flag
14501 else
14502 ac_cpp_err=
14503 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014504else
Martin v. Löwis11437992002-04-12 09:54:03 +000014505 ac_cpp_err=yes
14506fi
14507if test -z "$ac_cpp_err"; then
14508 ac_header_preproc=yes
14509else
14510 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014511 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014512 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014513fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014514rm -f conftest.err conftest.$ac_ext
14515echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14516echo "${ECHO_T}$ac_header_preproc" >&6
14517
14518# So? What about this header?
14519case $ac_header_compiler:$ac_header_preproc in
14520 yes:no )
14521 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14522echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14523 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14524echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14525 no:yes )
14526 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14527echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14528 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14529echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14530 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14531echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14532esac
14533echo "$as_me:$LINENO: checking for wchar.h" >&5
14534echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14535if test "${ac_cv_header_wchar_h+set}" = set; then
14536 echo $ECHO_N "(cached) $ECHO_C" >&6
14537else
14538 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014539fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014540echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14541echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14542
14543fi
14544if test $ac_cv_header_wchar_h = yes; then
14545
14546
14547cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014548#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014549_ACEOF
14550
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014551 wchar_h="yes"
14552
Guido van Rossumef2255b2000-03-10 22:30:29 +000014553else
Martin v. Löwis11437992002-04-12 09:54:03 +000014554 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014555
14556fi
14557
Michael W. Hudson54241132001-12-07 15:38:26 +000014558
Martin v. Löwis11437992002-04-12 09:54:03 +000014559
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014560# determine wchar_t size
14561if test "$wchar_h" = yes
14562then
Martin v. Löwis11437992002-04-12 09:54:03 +000014563 echo "$as_me:$LINENO: checking for wchar_t" >&5
14564echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14565if test "${ac_cv_type_wchar_t+set}" = set; then
14566 echo $ECHO_N "(cached) $ECHO_C" >&6
14567else
14568 cat >conftest.$ac_ext <<_ACEOF
14569#line $LINENO "configure"
14570#include "confdefs.h"
14571#include <wchar.h>
14572
14573#ifdef F77_DUMMY_MAIN
14574# ifdef __cplusplus
14575 extern "C"
14576# endif
14577 int F77_DUMMY_MAIN() { return 1; }
14578#endif
14579int
14580main ()
14581{
14582if ((wchar_t *) 0)
14583 return 0;
14584if (sizeof (wchar_t))
14585 return 0;
14586 ;
14587 return 0;
14588}
14589_ACEOF
14590rm -f conftest.$ac_objext
14591if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14592 (eval $ac_compile) 2>&5
14593 ac_status=$?
14594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14595 (exit $ac_status); } &&
14596 { ac_try='test -s conftest.$ac_objext'
14597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14598 (eval $ac_try) 2>&5
14599 ac_status=$?
14600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14601 (exit $ac_status); }; }; then
14602 ac_cv_type_wchar_t=yes
14603else
14604 echo "$as_me: failed program was:" >&5
14605cat conftest.$ac_ext >&5
14606ac_cv_type_wchar_t=no
14607fi
14608rm -f conftest.$ac_objext conftest.$ac_ext
14609fi
14610echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14611echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14612
14613echo "$as_me:$LINENO: checking size of wchar_t" >&5
14614echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14615if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14616 echo $ECHO_N "(cached) $ECHO_C" >&6
14617else
14618 if test "$ac_cv_type_wchar_t" = yes; then
14619 # The cast to unsigned long works around a bug in the HP C Compiler
14620 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14621 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14622 # This bug is HP SR number 8606223364.
14623 if test "$cross_compiling" = yes; then
14624 # Depending upon the size, compute the lo and hi bounds.
14625cat >conftest.$ac_ext <<_ACEOF
14626#line $LINENO "configure"
14627#include "confdefs.h"
14628#include <wchar.h>
14629
14630#ifdef F77_DUMMY_MAIN
14631# ifdef __cplusplus
14632 extern "C"
14633# endif
14634 int F77_DUMMY_MAIN() { return 1; }
14635#endif
14636int
14637main ()
14638{
14639static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14640test_array [0] = 0
14641
14642 ;
14643 return 0;
14644}
14645_ACEOF
14646rm -f conftest.$ac_objext
14647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14648 (eval $ac_compile) 2>&5
14649 ac_status=$?
14650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14651 (exit $ac_status); } &&
14652 { ac_try='test -s conftest.$ac_objext'
14653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14654 (eval $ac_try) 2>&5
14655 ac_status=$?
14656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14657 (exit $ac_status); }; }; then
14658 ac_lo=0 ac_mid=0
14659 while :; do
14660 cat >conftest.$ac_ext <<_ACEOF
14661#line $LINENO "configure"
14662#include "confdefs.h"
14663#include <wchar.h>
14664
14665#ifdef F77_DUMMY_MAIN
14666# ifdef __cplusplus
14667 extern "C"
14668# endif
14669 int F77_DUMMY_MAIN() { return 1; }
14670#endif
14671int
14672main ()
14673{
14674static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14675test_array [0] = 0
14676
14677 ;
14678 return 0;
14679}
14680_ACEOF
14681rm -f conftest.$ac_objext
14682if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14683 (eval $ac_compile) 2>&5
14684 ac_status=$?
14685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14686 (exit $ac_status); } &&
14687 { ac_try='test -s conftest.$ac_objext'
14688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14689 (eval $ac_try) 2>&5
14690 ac_status=$?
14691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14692 (exit $ac_status); }; }; then
14693 ac_hi=$ac_mid; break
14694else
14695 echo "$as_me: failed program was:" >&5
14696cat conftest.$ac_ext >&5
14697ac_lo=`expr $ac_mid + 1`
14698 if test $ac_lo -le $ac_mid; then
14699 ac_lo= ac_hi=
14700 break
14701 fi
14702 ac_mid=`expr 2 '*' $ac_mid + 1`
14703fi
14704rm -f conftest.$ac_objext conftest.$ac_ext
14705 done
14706else
14707 echo "$as_me: failed program was:" >&5
14708cat conftest.$ac_ext >&5
14709cat >conftest.$ac_ext <<_ACEOF
14710#line $LINENO "configure"
14711#include "confdefs.h"
14712#include <wchar.h>
14713
14714#ifdef F77_DUMMY_MAIN
14715# ifdef __cplusplus
14716 extern "C"
14717# endif
14718 int F77_DUMMY_MAIN() { return 1; }
14719#endif
14720int
14721main ()
14722{
14723static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14724test_array [0] = 0
14725
14726 ;
14727 return 0;
14728}
14729_ACEOF
14730rm -f conftest.$ac_objext
14731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14732 (eval $ac_compile) 2>&5
14733 ac_status=$?
14734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14735 (exit $ac_status); } &&
14736 { ac_try='test -s conftest.$ac_objext'
14737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14738 (eval $ac_try) 2>&5
14739 ac_status=$?
14740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14741 (exit $ac_status); }; }; then
14742 ac_hi=-1 ac_mid=-1
14743 while :; do
14744 cat >conftest.$ac_ext <<_ACEOF
14745#line $LINENO "configure"
14746#include "confdefs.h"
14747#include <wchar.h>
14748
14749#ifdef F77_DUMMY_MAIN
14750# ifdef __cplusplus
14751 extern "C"
14752# endif
14753 int F77_DUMMY_MAIN() { return 1; }
14754#endif
14755int
14756main ()
14757{
14758static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14759test_array [0] = 0
14760
14761 ;
14762 return 0;
14763}
14764_ACEOF
14765rm -f conftest.$ac_objext
14766if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14767 (eval $ac_compile) 2>&5
14768 ac_status=$?
14769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14770 (exit $ac_status); } &&
14771 { ac_try='test -s conftest.$ac_objext'
14772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14773 (eval $ac_try) 2>&5
14774 ac_status=$?
14775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14776 (exit $ac_status); }; }; then
14777 ac_lo=$ac_mid; break
14778else
14779 echo "$as_me: failed program was:" >&5
14780cat conftest.$ac_ext >&5
14781ac_hi=`expr '(' $ac_mid ')' - 1`
14782 if test $ac_mid -le $ac_hi; then
14783 ac_lo= ac_hi=
14784 break
14785 fi
14786 ac_mid=`expr 2 '*' $ac_mid`
14787fi
14788rm -f conftest.$ac_objext conftest.$ac_ext
14789 done
14790else
14791 echo "$as_me: failed program was:" >&5
14792cat conftest.$ac_ext >&5
14793ac_lo= ac_hi=
14794fi
14795rm -f conftest.$ac_objext conftest.$ac_ext
14796fi
14797rm -f conftest.$ac_objext conftest.$ac_ext
14798# Binary search between lo and hi bounds.
14799while test "x$ac_lo" != "x$ac_hi"; do
14800 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14801 cat >conftest.$ac_ext <<_ACEOF
14802#line $LINENO "configure"
14803#include "confdefs.h"
14804#include <wchar.h>
14805
14806#ifdef F77_DUMMY_MAIN
14807# ifdef __cplusplus
14808 extern "C"
14809# endif
14810 int F77_DUMMY_MAIN() { return 1; }
14811#endif
14812int
14813main ()
14814{
14815static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14816test_array [0] = 0
14817
14818 ;
14819 return 0;
14820}
14821_ACEOF
14822rm -f conftest.$ac_objext
14823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14824 (eval $ac_compile) 2>&5
14825 ac_status=$?
14826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14827 (exit $ac_status); } &&
14828 { ac_try='test -s conftest.$ac_objext'
14829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14830 (eval $ac_try) 2>&5
14831 ac_status=$?
14832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14833 (exit $ac_status); }; }; then
14834 ac_hi=$ac_mid
14835else
14836 echo "$as_me: failed program was:" >&5
14837cat conftest.$ac_ext >&5
14838ac_lo=`expr '(' $ac_mid ')' + 1`
14839fi
14840rm -f conftest.$ac_objext conftest.$ac_ext
14841done
14842case $ac_lo in
14843?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14844'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14845echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14846 { (exit 1); exit 1; }; } ;;
14847esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014848else
14849 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014850 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14851echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14852 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014853else
Martin v. Löwis11437992002-04-12 09:54:03 +000014854 cat >conftest.$ac_ext <<_ACEOF
14855#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014856#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014857#include <wchar.h>
14858
14859long longval () { return (long) (sizeof (wchar_t)); }
14860unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000014861#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014862#include <stdlib.h>
14863#ifdef F77_DUMMY_MAIN
14864# ifdef __cplusplus
14865 extern "C"
14866# endif
14867 int F77_DUMMY_MAIN() { return 1; }
14868#endif
14869int
14870main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014871{
Martin v. Löwis11437992002-04-12 09:54:03 +000014872
14873 FILE *f = fopen ("conftest.val", "w");
14874 if (! f)
14875 exit (1);
14876 if (((long) (sizeof (wchar_t))) < 0)
14877 {
14878 long i = longval ();
14879 if (i != ((long) (sizeof (wchar_t))))
14880 exit (1);
14881 fprintf (f, "%ld\n", i);
14882 }
14883 else
14884 {
14885 unsigned long i = ulongval ();
14886 if (i != ((long) (sizeof (wchar_t))))
14887 exit (1);
14888 fprintf (f, "%lu\n", i);
14889 }
14890 exit (ferror (f) || fclose (f) != 0);
14891
14892 ;
14893 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014894}
Martin v. Löwis11437992002-04-12 09:54:03 +000014895_ACEOF
14896rm -f conftest$ac_exeext
14897if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14898 (eval $ac_link) 2>&5
14899 ac_status=$?
14900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14901 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14903 (eval $ac_try) 2>&5
14904 ac_status=$?
14905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14906 (exit $ac_status); }; }; then
14907 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000014908else
Martin v. Löwis11437992002-04-12 09:54:03 +000014909 echo "$as_me: program exited with status $ac_status" >&5
14910echo "$as_me: failed program was:" >&5
14911cat conftest.$ac_ext >&5
14912( exit $ac_status )
14913{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14914echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14915 { (exit 1); exit 1; }; }
14916fi
14917rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14918fi
14919fi
14920rm -f conftest.val
14921else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014922 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000014923fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014924fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014925echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
14926echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
14927cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014928#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014929_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014930
Michael W. Hudson54241132001-12-07 15:38:26 +000014931
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014932fi
14933
Martin v. Löwis11437992002-04-12 09:54:03 +000014934echo "$as_me:$LINENO: checking what type to use for unicode" >&5
14935echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014936# Check whether --enable-unicode or --disable-unicode was given.
14937if test "${enable_unicode+set}" = set; then
14938 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000014939
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014940else
14941 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014942fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014943
14944if test $enable_unicode = yes
14945then
Martin v. Löwisfd917792001-06-27 20:22:04 +000014946 # Without any arguments, Py_UNICODE defaults to two-byte mode
14947 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014948fi
14949
14950case "$enable_unicode" in
14951ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000014952 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014953#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000014954_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014955
14956 ;;
14957ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000014958 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014959#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000014960_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014961
14962 ;;
14963esac
14964
Michael W. Hudson54241132001-12-07 15:38:26 +000014965
Martin v. Löwis11437992002-04-12 09:54:03 +000014966
14967
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014968if test "$enable_unicode" = "no"
14969then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000014970 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000014971 echo "$as_me:$LINENO: result: not used" >&5
14972echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014973else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000014974 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000014975
14976cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014977#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014978_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014979
14980 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
14981 then
14982 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014983
Martin v. Löwis11437992002-04-12 09:54:03 +000014984cat >>confdefs.h <<\_ACEOF
14985#define HAVE_USABLE_WCHAR_T 1
14986_ACEOF
14987
14988 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014989#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014990_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014991
14992 elif test "$ac_cv_sizeof_short" = "$unicode_size"
14993 then
14994 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000014995 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014996#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000014997_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014998
14999 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15000 then
15001 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015003#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015004_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015005
15006 else
15007 PY_UNICODE_TYPE="no type found"
15008 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015009 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15010echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015011fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015012
15013# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015014echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15015echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15016if test "${ac_cv_c_bigendian+set}" = set; then
15017 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015018else
Martin v. Löwis11437992002-04-12 09:54:03 +000015019 # See if sys/param.h defines the BYTE_ORDER macro.
15020cat >conftest.$ac_ext <<_ACEOF
15021#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015022#include "confdefs.h"
15023#include <sys/types.h>
15024#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015025
Martin v. Löwis11437992002-04-12 09:54:03 +000015026#ifdef F77_DUMMY_MAIN
15027# ifdef __cplusplus
15028 extern "C"
15029# endif
15030 int F77_DUMMY_MAIN() { return 1; }
15031#endif
15032int
15033main ()
15034{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015035#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15036 bogus endian macros
15037#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015038
15039 ;
15040 return 0;
15041}
15042_ACEOF
15043rm -f conftest.$ac_objext
15044if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15045 (eval $ac_compile) 2>&5
15046 ac_status=$?
15047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15048 (exit $ac_status); } &&
15049 { ac_try='test -s conftest.$ac_objext'
15050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15051 (eval $ac_try) 2>&5
15052 ac_status=$?
15053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15054 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015055 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015056cat >conftest.$ac_ext <<_ACEOF
15057#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015058#include "confdefs.h"
15059#include <sys/types.h>
15060#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015061
Martin v. Löwis11437992002-04-12 09:54:03 +000015062#ifdef F77_DUMMY_MAIN
15063# ifdef __cplusplus
15064 extern "C"
15065# endif
15066 int F77_DUMMY_MAIN() { return 1; }
15067#endif
15068int
15069main ()
15070{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015071#if BYTE_ORDER != BIG_ENDIAN
15072 not big endian
15073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015074
15075 ;
15076 return 0;
15077}
15078_ACEOF
15079rm -f conftest.$ac_objext
15080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15081 (eval $ac_compile) 2>&5
15082 ac_status=$?
15083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15084 (exit $ac_status); } &&
15085 { ac_try='test -s conftest.$ac_objext'
15086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15087 (eval $ac_try) 2>&5
15088 ac_status=$?
15089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15090 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015091 ac_cv_c_bigendian=yes
15092else
Martin v. Löwis11437992002-04-12 09:54:03 +000015093 echo "$as_me: failed program was:" >&5
15094cat conftest.$ac_ext >&5
15095ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015096fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015097rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015098else
Martin v. Löwis11437992002-04-12 09:54:03 +000015099 echo "$as_me: failed program was:" >&5
15100cat conftest.$ac_ext >&5
15101# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015102if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 # try to guess the endianess by grep'ing values into an object file
15104 ac_cv_c_bigendian=unknown
15105 cat >conftest.$ac_ext <<_ACEOF
15106#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015107#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015108short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15109short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15110void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15111short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15112short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15113void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15114#ifdef F77_DUMMY_MAIN
15115# ifdef __cplusplus
15116 extern "C"
15117# endif
15118 int F77_DUMMY_MAIN() { return 1; }
15119#endif
15120int
15121main ()
15122{
15123 _ascii (); _ebcdic ();
15124 ;
15125 return 0;
15126}
15127_ACEOF
15128rm -f conftest.$ac_objext
15129if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15130 (eval $ac_compile) 2>&5
15131 ac_status=$?
15132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15133 (exit $ac_status); } &&
15134 { ac_try='test -s conftest.$ac_objext'
15135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15136 (eval $ac_try) 2>&5
15137 ac_status=$?
15138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15139 (exit $ac_status); }; }; then
15140 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15141 ac_cv_c_bigendian=yes
15142fi
15143if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15144 if test "$ac_cv_c_bigendian" = unknown; then
15145 ac_cv_c_bigendian=no
15146 else
15147 # finding both strings is unlikely to happen, but who knows?
15148 ac_cv_c_bigendian=unknown
15149 fi
15150fi
15151else
15152 echo "$as_me: failed program was:" >&5
15153cat conftest.$ac_ext >&5
15154fi
15155rm -f conftest.$ac_objext conftest.$ac_ext
15156else
15157 cat >conftest.$ac_ext <<_ACEOF
15158#line $LINENO "configure"
15159#include "confdefs.h"
15160int
15161main ()
15162{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015163 /* Are we little or big endian? From Harbison&Steele. */
15164 union
15165 {
15166 long l;
15167 char c[sizeof (long)];
15168 } u;
15169 u.l = 1;
15170 exit (u.c[sizeof (long) - 1] == 1);
15171}
Martin v. Löwis11437992002-04-12 09:54:03 +000015172_ACEOF
15173rm -f conftest$ac_exeext
15174if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15175 (eval $ac_link) 2>&5
15176 ac_status=$?
15177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15178 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15180 (eval $ac_try) 2>&5
15181 ac_status=$?
15182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15183 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015184 ac_cv_c_bigendian=no
15185else
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 echo "$as_me: program exited with status $ac_status" >&5
15187echo "$as_me: failed program was:" >&5
15188cat conftest.$ac_ext >&5
15189( exit $ac_status )
15190ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015191fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015192rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015193fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015194fi
15195rm -f conftest.$ac_objext conftest.$ac_ext
15196fi
15197echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15198echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15199case $ac_cv_c_bigendian in
15200 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015201
Martin v. Löwis11437992002-04-12 09:54:03 +000015202cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015203#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015204_ACEOF
15205 ;;
15206 no)
15207 ;;
15208 *)
15209 { { echo "$as_me:$LINENO: error: unknown endianess
15210presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15211echo "$as_me: error: unknown endianess
15212presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15213 { (exit 1); exit 1; }; } ;;
15214esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015215
Michael W. Hudson54241132001-12-07 15:38:26 +000015216
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015217# Check whether right shifting a negative integer extends the sign bit
15218# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015219echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15220echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15221if test "${ac_cv_rshift_extends_sign+set}" = set; then
15222 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015223else
Martin v. Löwis11437992002-04-12 09:54:03 +000015224
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015225if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015226 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015227else
Martin v. Löwis11437992002-04-12 09:54:03 +000015228 cat >conftest.$ac_ext <<_ACEOF
15229#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015230#include "confdefs.h"
15231
15232int main()
15233{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015234 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015235}
15236
Martin v. Löwis11437992002-04-12 09:54:03 +000015237_ACEOF
15238rm -f conftest$ac_exeext
15239if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15240 (eval $ac_link) 2>&5
15241 ac_status=$?
15242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15243 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15245 (eval $ac_try) 2>&5
15246 ac_status=$?
15247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15248 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015249 ac_cv_rshift_extends_sign=yes
15250else
Martin v. Löwis11437992002-04-12 09:54:03 +000015251 echo "$as_me: program exited with status $ac_status" >&5
15252echo "$as_me: failed program was:" >&5
15253cat conftest.$ac_ext >&5
15254( exit $ac_status )
15255ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015256fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015257rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15258fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015259fi
15260
Martin v. Löwis11437992002-04-12 09:54:03 +000015261echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15262echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015263if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015264then
Martin v. Löwis11437992002-04-12 09:54:03 +000015265
15266cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015267#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015268_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015269
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015270fi
15271
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015272# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015273echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15274echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15275if test "${ac_cv_have_getc_unlocked+set}" = set; then
15276 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015277else
Martin v. Löwis11437992002-04-12 09:54:03 +000015278
15279cat >conftest.$ac_ext <<_ACEOF
15280#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015281#include "confdefs.h"
15282#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015283#ifdef F77_DUMMY_MAIN
15284# ifdef __cplusplus
15285 extern "C"
15286# endif
15287 int F77_DUMMY_MAIN() { return 1; }
15288#endif
15289int
15290main ()
15291{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015292
15293 FILE *f = fopen("/dev/null", "r");
15294 flockfile(f);
15295 getc_unlocked(f);
15296 funlockfile(f);
15297
Martin v. Löwis11437992002-04-12 09:54:03 +000015298 ;
15299 return 0;
15300}
15301_ACEOF
15302rm -f conftest.$ac_objext conftest$ac_exeext
15303if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15304 (eval $ac_link) 2>&5
15305 ac_status=$?
15306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15307 (exit $ac_status); } &&
15308 { ac_try='test -s conftest$ac_exeext'
15309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15310 (eval $ac_try) 2>&5
15311 ac_status=$?
15312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15313 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015314 ac_cv_have_getc_unlocked=yes
15315else
Martin v. Löwis11437992002-04-12 09:54:03 +000015316 echo "$as_me: failed program was:" >&5
15317cat conftest.$ac_ext >&5
15318ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015319fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015320rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015321fi
15322
Martin v. Löwis11437992002-04-12 09:54:03 +000015323echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15324echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015325if test "$ac_cv_have_getc_unlocked" = yes
15326then
Martin v. Löwis11437992002-04-12 09:54:03 +000015327
15328cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015329#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015330_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015331
15332fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015333
Martin v. Löwis0daad592001-09-30 21:09:59 +000015334# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015335echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15336echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15337if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15338 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015339else
Martin v. Löwis11437992002-04-12 09:54:03 +000015340 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015341LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015342cat >conftest.$ac_ext <<_ACEOF
15343#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015344#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015345
Guido van Rossum353ae582001-07-10 16:45:32 +000015346/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015347#ifdef __cplusplus
15348extern "C"
15349#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015350/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015351 builtin and then its argument prototype would still apply. */
15352char rl_pre_input_hook ();
15353#ifdef F77_DUMMY_MAIN
15354# ifdef __cplusplus
15355 extern "C"
15356# endif
15357 int F77_DUMMY_MAIN() { return 1; }
15358#endif
15359int
15360main ()
15361{
15362rl_pre_input_hook ();
15363 ;
15364 return 0;
15365}
15366_ACEOF
15367rm -f conftest.$ac_objext conftest$ac_exeext
15368if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15369 (eval $ac_link) 2>&5
15370 ac_status=$?
15371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15372 (exit $ac_status); } &&
15373 { ac_try='test -s conftest$ac_exeext'
15374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15375 (eval $ac_try) 2>&5
15376 ac_status=$?
15377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15378 (exit $ac_status); }; }; then
15379 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015380else
Martin v. Löwis11437992002-04-12 09:54:03 +000015381 echo "$as_me: failed program was:" >&5
15382cat conftest.$ac_ext >&5
15383ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015385rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15386LIBS=$ac_check_lib_save_LIBS
15387fi
15388echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15389echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15390if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015391
Martin v. Löwis11437992002-04-12 09:54:03 +000015392cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015393#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015394_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015395
Martin v. Löwis0daad592001-09-30 21:09:59 +000015396fi
15397
Michael W. Hudson54241132001-12-07 15:38:26 +000015398
Martin v. Löwis0daad592001-09-30 21:09:59 +000015399# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015400echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15401echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15402if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15403 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015404else
Martin v. Löwis11437992002-04-12 09:54:03 +000015405 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015406LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015407cat >conftest.$ac_ext <<_ACEOF
15408#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015409#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015410
Martin v. Löwis0daad592001-09-30 21:09:59 +000015411/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015412#ifdef __cplusplus
15413extern "C"
15414#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015415/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015416 builtin and then its argument prototype would still apply. */
15417char rl_completion_matches ();
15418#ifdef F77_DUMMY_MAIN
15419# ifdef __cplusplus
15420 extern "C"
15421# endif
15422 int F77_DUMMY_MAIN() { return 1; }
15423#endif
15424int
15425main ()
15426{
15427rl_completion_matches ();
15428 ;
15429 return 0;
15430}
15431_ACEOF
15432rm -f conftest.$ac_objext conftest$ac_exeext
15433if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15434 (eval $ac_link) 2>&5
15435 ac_status=$?
15436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15437 (exit $ac_status); } &&
15438 { ac_try='test -s conftest$ac_exeext'
15439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15440 (eval $ac_try) 2>&5
15441 ac_status=$?
15442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15443 (exit $ac_status); }; }; then
15444 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015445else
Martin v. Löwis11437992002-04-12 09:54:03 +000015446 echo "$as_me: failed program was:" >&5
15447cat conftest.$ac_ext >&5
15448ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015450rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15451LIBS=$ac_check_lib_save_LIBS
15452fi
15453echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15454echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15455if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015456
Martin v. Löwis11437992002-04-12 09:54:03 +000015457cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015458#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015459_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015460
Guido van Rossum353ae582001-07-10 16:45:32 +000015461fi
15462
Jack Jansendd19cf82001-12-06 22:36:17 +000015463
Martin v. Löwis11437992002-04-12 09:54:03 +000015464echo "$as_me:$LINENO: checking for broken nice()" >&5
15465echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15466if test "${ac_cv_broken_nice+set}" = set; then
15467 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015468else
Martin v. Löwis11437992002-04-12 09:54:03 +000015469
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015470if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015471 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015472else
Martin v. Löwis11437992002-04-12 09:54:03 +000015473 cat >conftest.$ac_ext <<_ACEOF
15474#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015475#include "confdefs.h"
15476
15477int main()
15478{
15479 int val1 = nice(1);
15480 if (val1 != -1 && val1 == nice(2))
15481 exit(0);
15482 exit(1);
15483}
15484
Martin v. Löwis11437992002-04-12 09:54:03 +000015485_ACEOF
15486rm -f conftest$ac_exeext
15487if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15488 (eval $ac_link) 2>&5
15489 ac_status=$?
15490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15491 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15493 (eval $ac_try) 2>&5
15494 ac_status=$?
15495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15496 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015497 ac_cv_broken_nice=yes
15498else
Martin v. Löwis11437992002-04-12 09:54:03 +000015499 echo "$as_me: program exited with status $ac_status" >&5
15500echo "$as_me: failed program was:" >&5
15501cat conftest.$ac_ext >&5
15502( exit $ac_status )
15503ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015504fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015505rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15506fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015507fi
15508
Martin v. Löwis11437992002-04-12 09:54:03 +000015509echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15510echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015511if test "$ac_cv_broken_nice" = yes
15512then
Martin v. Löwis11437992002-04-12 09:54:03 +000015513
15514cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015515#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015516_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015517
15518fi
15519
Jack Jansen666b1e72001-10-31 12:11:48 +000015520# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015521echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15522echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15523if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15524 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015525else
Martin v. Löwis11437992002-04-12 09:54:03 +000015526 cat >conftest.$ac_ext <<_ACEOF
15527#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015528#include "confdefs.h"
15529#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015530#ifdef F77_DUMMY_MAIN
15531# ifdef __cplusplus
15532 extern "C"
15533# endif
15534 int F77_DUMMY_MAIN() { return 1; }
15535#endif
15536int
15537main ()
15538{
Jack Jansen666b1e72001-10-31 12:11:48 +000015539
15540 int rtn;
15541 rtn = mvwdelch(0,0,0);
15542
Martin v. Löwis11437992002-04-12 09:54:03 +000015543 ;
15544 return 0;
15545}
15546_ACEOF
15547rm -f conftest.$ac_objext
15548if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15549 (eval $ac_compile) 2>&5
15550 ac_status=$?
15551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15552 (exit $ac_status); } &&
15553 { ac_try='test -s conftest.$ac_objext'
15554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15555 (eval $ac_try) 2>&5
15556 ac_status=$?
15557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15558 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015559 ac_cv_mvwdelch_is_expression=yes
15560else
Martin v. Löwis11437992002-04-12 09:54:03 +000015561 echo "$as_me: failed program was:" >&5
15562cat conftest.$ac_ext >&5
15563ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015564fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015565rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015566fi
15567
Martin v. Löwis11437992002-04-12 09:54:03 +000015568echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15569echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015570
15571if test "$ac_cv_mvwdelch_is_expression" = yes
15572then
Martin v. Löwis11437992002-04-12 09:54:03 +000015573
15574cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015575#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015576_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015577
15578fi
15579
Martin v. Löwis11437992002-04-12 09:54:03 +000015580echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15581echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15582if test "${ac_cv_window_has_flags+set}" = set; then
15583 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015584else
Martin v. Löwis11437992002-04-12 09:54:03 +000015585 cat >conftest.$ac_ext <<_ACEOF
15586#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015587#include "confdefs.h"
15588#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015589#ifdef F77_DUMMY_MAIN
15590# ifdef __cplusplus
15591 extern "C"
15592# endif
15593 int F77_DUMMY_MAIN() { return 1; }
15594#endif
15595int
15596main ()
15597{
Jack Jansen666b1e72001-10-31 12:11:48 +000015598
15599 WINDOW *w;
15600 w->_flags = 0;
15601
Martin v. Löwis11437992002-04-12 09:54:03 +000015602 ;
15603 return 0;
15604}
15605_ACEOF
15606rm -f conftest.$ac_objext
15607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15608 (eval $ac_compile) 2>&5
15609 ac_status=$?
15610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15611 (exit $ac_status); } &&
15612 { ac_try='test -s conftest.$ac_objext'
15613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15614 (eval $ac_try) 2>&5
15615 ac_status=$?
15616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15617 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015618 ac_cv_window_has_flags=yes
15619else
Martin v. Löwis11437992002-04-12 09:54:03 +000015620 echo "$as_me: failed program was:" >&5
15621cat conftest.$ac_ext >&5
15622ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015623fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015624rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015625fi
15626
Martin v. Löwis11437992002-04-12 09:54:03 +000015627echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15628echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015629
Jack Jansen666b1e72001-10-31 12:11:48 +000015630
15631if test "$ac_cv_window_has_flags" = yes
15632then
Martin v. Löwis11437992002-04-12 09:54:03 +000015633
15634cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015635#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015636_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015637
15638fi
15639
Guido van Rossum95713eb2000-05-18 20:53:31 +000015640# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15641# Add sys/socket.h to confdefs.h
15642cat >> confdefs.h <<\EOF
15643#ifdef HAVE_SYS_SOCKET_H
15644#include <sys/socket.h>
15645#endif
15646EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015647echo "$as_me:$LINENO: checking for socklen_t" >&5
15648echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15649if test "${ac_cv_type_socklen_t+set}" = set; then
15650 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015651else
Martin v. Löwis11437992002-04-12 09:54:03 +000015652 cat >conftest.$ac_ext <<_ACEOF
15653#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015654#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015655$ac_includes_default
15656#ifdef F77_DUMMY_MAIN
15657# ifdef __cplusplus
15658 extern "C"
15659# endif
15660 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015661#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015662int
15663main ()
15664{
15665if ((socklen_t *) 0)
15666 return 0;
15667if (sizeof (socklen_t))
15668 return 0;
15669 ;
15670 return 0;
15671}
15672_ACEOF
15673rm -f conftest.$ac_objext
15674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15675 (eval $ac_compile) 2>&5
15676 ac_status=$?
15677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15678 (exit $ac_status); } &&
15679 { ac_try='test -s conftest.$ac_objext'
15680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15681 (eval $ac_try) 2>&5
15682 ac_status=$?
15683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15684 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015685 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015686else
Martin v. Löwis11437992002-04-12 09:54:03 +000015687 echo "$as_me: failed program was:" >&5
15688cat conftest.$ac_ext >&5
15689ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015690fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015691rm -f conftest.$ac_objext conftest.$ac_ext
15692fi
15693echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15694echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15695if test $ac_cv_type_socklen_t = yes; then
15696 :
15697else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015698
Martin v. Löwis11437992002-04-12 09:54:03 +000015699cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015700#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015701_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015702
15703fi
15704
Michael W. Hudson54241132001-12-07 15:38:26 +000015705
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015706#AC_MSG_CHECKING(for Modules/Setup)
15707#if test ! -f Modules/Setup ; then
15708# if test ! -d Modules ; then
15709# mkdir Modules
15710# fi
15711# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15712# AC_MSG_RESULT(creating)
15713#else
15714# AC_MSG_RESULT(already exists)
15715#fi
15716
Michael W. Hudson54241132001-12-07 15:38:26 +000015717
15718
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015719for h in `(cd $srcdir;echo Python/thread_*.h)`
15720do
15721 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15722done
15723
Michael W. Hudson54241132001-12-07 15:38:26 +000015724
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +000015725SRCDIRS="Parser Grammar Objects Python Modules"
Martin v. Löwis11437992002-04-12 09:54:03 +000015726echo "$as_me:$LINENO: checking for build directories" >&5
15727echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015728for dir in $SRCDIRS; do
15729 if test ! -d $dir; then
15730 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015731 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015732done
Martin v. Löwis11437992002-04-12 09:54:03 +000015733echo "$as_me:$LINENO: result: done" >&5
15734echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015735
Guido van Rossum627b2d71993-12-24 10:39:16 +000015736# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015737ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15738cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015739# This file is a shell script that caches the results of configure
15740# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015741# scripts and configure runs, see configure's option --config-cache.
15742# It is not useful on other systems. If it contains results you don't
15743# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015744#
Martin v. Löwis11437992002-04-12 09:54:03 +000015745# config.status only pays attention to the cache file if you give it
15746# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015747#
Martin v. Löwis11437992002-04-12 09:54:03 +000015748# `ac_cv_env_foo' variables (set or unset) will be overriden when
15749# loading this file, other *unset* `ac_cv_foo' will be assigned the
15750# following values.
15751
15752_ACEOF
15753
Guido van Rossumf78abae1997-01-21 22:02:36 +000015754# The following way of writing the cache mishandles newlines in values,
15755# but we know of no workaround that is simple, portable, and efficient.
15756# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015757# Ultrix sh set writes to stderr and can't be redirected directly,
15758# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015759{
15760 (set) 2>&1 |
15761 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15762 *ac_space=\ *)
15763 # `set' does not quote correctly, so add quotes (double-quote
15764 # substitution turns \\\\ into \\, and sed turns \\ into \).
15765 sed -n \
15766 "s/'/'\\\\''/g;
15767 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15768 ;;
15769 *)
15770 # `set' quotes correctly as required by POSIX, so do not add quotes.
15771 sed -n \
15772 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15773 ;;
15774 esac;
15775} |
15776 sed '
15777 t clear
15778 : clear
15779 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15780 t end
15781 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15782 : end' >>confcache
15783if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015784 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015785 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15786 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015787 else
15788 echo "not updating unwritable cache $cache_file"
15789 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015790fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015791rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015792
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015793test "x$prefix" = xNONE && prefix=$ac_default_prefix
15794# Let make expand exec_prefix.
15795test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015796
Martin v. Löwis11437992002-04-12 09:54:03 +000015797# VPATH may cause trouble with some makes, so we remove $(srcdir),
15798# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15799# trailing colons and then remove the whole line if VPATH becomes empty
15800# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015801if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015802 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15803s/:*\$(srcdir):*/:/;
15804s/:*\${srcdir}:*/:/;
15805s/:*@srcdir@:*/:/;
15806s/^\([^=]*=[ ]*\):*/\1/;
15807s/:*$//;
15808s/^[^=]*=[ ]*$//;
15809}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015810fi
15811
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015812DEFS=-DHAVE_CONFIG_H
15813
Martin v. Löwis11437992002-04-12 09:54:03 +000015814
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015815: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015816ac_clean_files_save=$ac_clean_files
15817ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15818{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15819echo "$as_me: creating $CONFIG_STATUS" >&6;}
15820cat >$CONFIG_STATUS <<_ACEOF
15821#! $SHELL
15822# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015823# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015824# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015825# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015826
Martin v. Löwis11437992002-04-12 09:54:03 +000015827debug=false
15828SHELL=\${CONFIG_SHELL-$SHELL}
15829_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015830
Martin v. Löwis11437992002-04-12 09:54:03 +000015831cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015832
Martin v. Löwis11437992002-04-12 09:54:03 +000015833## --------------------- ##
15834## M4sh Initialization. ##
15835## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015836
Martin v. Löwis11437992002-04-12 09:54:03 +000015837# Be Bourne compatible
15838if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15839 emulate sh
15840 NULLCMD=:
15841elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15842 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000015843fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015844
Martin v. Löwis11437992002-04-12 09:54:03 +000015845# NLS nuisances.
15846# Support unset when possible.
15847if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15848 as_unset=unset
15849else
15850 as_unset=false
15851fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015852
Martin v. Löwis11437992002-04-12 09:54:03 +000015853(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
15854 { $as_unset LANG || test "${LANG+set}" != set; } ||
15855 { LANG=C; export LANG; }
15856(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
15857 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
15858 { LC_ALL=C; export LC_ALL; }
15859(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
15860 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
15861 { LC_TIME=C; export LC_TIME; }
15862(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
15863 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
15864 { LC_CTYPE=C; export LC_CTYPE; }
15865(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
15866 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
15867 { LANGUAGE=C; export LANGUAGE; }
15868(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
15869 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
15870 { LC_COLLATE=C; export LC_COLLATE; }
15871(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
15872 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
15873 { LC_NUMERIC=C; export LC_NUMERIC; }
15874(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
15875 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
15876 { LC_MESSAGES=C; export LC_MESSAGES; }
15877
15878
15879# Name of the executable.
15880as_me=`(basename "$0") 2>/dev/null ||
15881$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15882 X"$0" : 'X\(//\)$' \| \
15883 X"$0" : 'X\(/\)$' \| \
15884 . : '\(.\)' 2>/dev/null ||
15885echo X/"$0" |
15886 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15887 /^X\/\(\/\/\)$/{ s//\1/; q; }
15888 /^X\/\(\/\).*/{ s//\1/; q; }
15889 s/.*/./; q'`
15890
15891# PATH needs CR, and LINENO needs CR and PATH.
15892# Avoid depending upon Character Ranges.
15893as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15894as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15895as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15896as_cr_digits='0123456789'
15897as_cr_alnum=$as_cr_Letters$as_cr_digits
15898
15899# The user is always right.
15900if test "${PATH_SEPARATOR+set}" != set; then
15901 echo "#! /bin/sh" >conftest.sh
15902 echo "exit 0" >>conftest.sh
15903 chmod +x conftest.sh
15904 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
15905 PATH_SEPARATOR=';'
15906 else
15907 PATH_SEPARATOR=:
15908 fi
15909 rm -f conftest.sh
15910fi
15911
15912
15913 as_lineno_1=$LINENO
15914 as_lineno_2=$LINENO
15915 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15916 test "x$as_lineno_1" != "x$as_lineno_2" &&
15917 test "x$as_lineno_3" = "x$as_lineno_2" || {
15918 # Find who we are. Look in the path if we contain no path at all
15919 # relative or not.
15920 case $0 in
15921 *[\\/]* ) as_myself=$0 ;;
15922 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15923for as_dir in $PATH
15924do
15925 IFS=$as_save_IFS
15926 test -z "$as_dir" && as_dir=.
15927 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15928done
15929
15930 ;;
15931 esac
15932 # We did not find ourselves, most probably we were run as `sh COMMAND'
15933 # in which case we are not to be found in the path.
15934 if test "x$as_myself" = x; then
15935 as_myself=$0
15936 fi
15937 if test ! -f "$as_myself"; then
15938 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
15939echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
15940 { (exit 1); exit 1; }; }
15941 fi
15942 case $CONFIG_SHELL in
15943 '')
15944 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15945for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
15946do
15947 IFS=$as_save_IFS
15948 test -z "$as_dir" && as_dir=.
15949 for as_base in sh bash ksh sh5; do
15950 case $as_dir in
15951 /*)
15952 if ("$as_dir/$as_base" -c '
15953 as_lineno_1=$LINENO
15954 as_lineno_2=$LINENO
15955 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15956 test "x$as_lineno_1" != "x$as_lineno_2" &&
15957 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
15958 CONFIG_SHELL=$as_dir/$as_base
15959 export CONFIG_SHELL
15960 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
15961 fi;;
15962 esac
15963 done
15964done
15965;;
Jack Jansendd19cf82001-12-06 22:36:17 +000015966 esac
15967
Martin v. Löwis11437992002-04-12 09:54:03 +000015968 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
15969 # uniformly replaced by the line number. The first 'sed' inserts a
15970 # line-number line before each line; the second 'sed' does the real
15971 # work. The second script uses 'N' to pair each line-number line
15972 # with the numbered line, and appends trailing '-' during
15973 # substitution so that $LINENO is not a special case at line end.
15974 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
15975 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
15976 sed '=' <$as_myself |
15977 sed '
15978 N
15979 s,$,-,
15980 : loop
15981 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
15982 t loop
15983 s,-$,,
15984 s,^['$as_cr_digits']*\n,,
15985 ' >$as_me.lineno &&
15986 chmod +x $as_me.lineno ||
15987 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
15988echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
15989 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015990
Martin v. Löwis11437992002-04-12 09:54:03 +000015991 # Don't try to exec as it changes $[0], causing all sort of problems
15992 # (the dirname of $[0] is not the place where we might find the
15993 # original and so on. Autoconf is especially sensible to this).
15994 . ./$as_me.lineno
15995 # Exit status is that of the last command.
15996 exit
15997}
15998
15999
16000case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16001 *c*,-n*) ECHO_N= ECHO_C='
16002' ECHO_T=' ' ;;
16003 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16004 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16005esac
16006
16007if expr a : '\(a\)' >/dev/null 2>&1; then
16008 as_expr=expr
16009else
16010 as_expr=false
16011fi
16012
16013rm -f conf$$ conf$$.exe conf$$.file
16014echo >conf$$.file
16015if ln -s conf$$.file conf$$ 2>/dev/null; then
16016 # We could just check for DJGPP; but this test a) works b) is more generic
16017 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16018 if test -f conf$$.exe; then
16019 # Don't use ln at all; we don't have any links
16020 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016021 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016022 as_ln_s='ln -s'
16023 fi
16024elif ln conf$$.file conf$$ 2>/dev/null; then
16025 as_ln_s=ln
16026else
16027 as_ln_s='cp -p'
16028fi
16029rm -f conf$$ conf$$.exe conf$$.file
16030
16031as_executable_p="test -f"
16032
16033# Sed expression to map a string onto a valid CPP name.
16034as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16035
16036# Sed expression to map a string onto a valid variable name.
16037as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16038
16039
16040# IFS
16041# We need space, tab and new line, in precisely that order.
16042as_nl='
16043'
16044IFS=" $as_nl"
16045
16046# CDPATH.
16047$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16048
16049exec 6>&1
16050
16051# Open the log real soon, to keep \$[0] and so on meaningful, and to
16052# report actual input values of CONFIG_FILES etc. instead of their
16053# values after options handling. Logging --version etc. is OK.
16054exec 5>>config.log
16055{
16056 echo
16057 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16058## Running $as_me. ##
16059_ASBOX
16060} >&5
16061cat >&5 <<_CSEOF
16062
16063This file was extended by $as_me, which was
16064generated by GNU Autoconf 2.53. Invocation command line was
16065
16066 CONFIG_FILES = $CONFIG_FILES
16067 CONFIG_HEADERS = $CONFIG_HEADERS
16068 CONFIG_LINKS = $CONFIG_LINKS
16069 CONFIG_COMMANDS = $CONFIG_COMMANDS
16070 $ $0 $@
16071
16072_CSEOF
16073echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16074echo >&5
16075_ACEOF
16076
16077# Files that config.status was made for.
16078if test -n "$ac_config_files"; then
16079 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16080fi
16081
16082if test -n "$ac_config_headers"; then
16083 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16084fi
16085
16086if test -n "$ac_config_links"; then
16087 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16088fi
16089
16090if test -n "$ac_config_commands"; then
16091 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16092fi
16093
16094cat >>$CONFIG_STATUS <<\_ACEOF
16095
16096ac_cs_usage="\
16097\`$as_me' instantiates files from templates according to the
16098current configuration.
16099
16100Usage: $0 [OPTIONS] [FILE]...
16101
16102 -h, --help print this help, then exit
16103 -V, --version print version number, then exit
16104 -d, --debug don't remove temporary files
16105 --recheck update $as_me by reconfiguring in the same conditions
16106 --file=FILE[:TEMPLATE]
16107 instantiate the configuration file FILE
16108 --header=FILE[:TEMPLATE]
16109 instantiate the configuration header FILE
16110
16111Configuration files:
16112$config_files
16113
16114Configuration headers:
16115$config_headers
16116
16117Report bugs to <bug-autoconf@gnu.org>."
16118_ACEOF
16119
16120cat >>$CONFIG_STATUS <<_ACEOF
16121ac_cs_version="\\
16122config.status
16123configured by $0, generated by GNU Autoconf 2.53,
16124 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16125
16126Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16127Free Software Foundation, Inc.
16128This config.status script is free software; the Free Software Foundation
16129gives unlimited permission to copy, distribute and modify it."
16130srcdir=$srcdir
16131INSTALL="$INSTALL"
16132_ACEOF
16133
16134cat >>$CONFIG_STATUS <<\_ACEOF
16135# If no file are specified by the user, then we need to provide default
16136# value. By we need to know if files were specified by the user.
16137ac_need_defaults=:
16138while test $# != 0
16139do
16140 case $1 in
16141 --*=*)
16142 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16143 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16144 shift
16145 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16146 shift
16147 ;;
16148 -*);;
16149 *) # This is not an option, so the user has probably given explicit
16150 # arguments.
16151 ac_need_defaults=false;;
16152 esac
16153
16154 case $1 in
16155 # Handling of the options.
16156_ACEOF
16157cat >>$CONFIG_STATUS <<_ACEOF
16158 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16159 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16160 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16161_ACEOF
16162cat >>$CONFIG_STATUS <<\_ACEOF
16163 --version | --vers* | -V )
16164 echo "$ac_cs_version"; exit 0 ;;
16165 --he | --h)
16166 # Conflict between --help and --header
16167 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16168Try \`$0 --help' for more information." >&5
16169echo "$as_me: error: ambiguous option: $1
16170Try \`$0 --help' for more information." >&2;}
16171 { (exit 1); exit 1; }; };;
16172 --help | --hel | -h )
16173 echo "$ac_cs_usage"; exit 0 ;;
16174 --debug | --d* | -d )
16175 debug=: ;;
16176 --file | --fil | --fi | --f )
16177 shift
16178 CONFIG_FILES="$CONFIG_FILES $1"
16179 ac_need_defaults=false;;
16180 --header | --heade | --head | --hea )
16181 shift
16182 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16183 ac_need_defaults=false;;
16184
16185 # This is an error.
16186 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16187Try \`$0 --help' for more information." >&5
16188echo "$as_me: error: unrecognized option: $1
16189Try \`$0 --help' for more information." >&2;}
16190 { (exit 1); exit 1; }; } ;;
16191
16192 *) ac_config_targets="$ac_config_targets $1" ;;
16193
16194 esac
16195 shift
16196done
16197
16198_ACEOF
16199
16200
16201
16202
16203
16204cat >>$CONFIG_STATUS <<\_ACEOF
16205for ac_config_target in $ac_config_targets
16206do
16207 case "$ac_config_target" in
16208 # Handling of arguments.
16209 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16210 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16211 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16212 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16213echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16214 { (exit 1); exit 1; }; };;
16215 esac
16216done
16217
16218# If the user did not use the arguments to specify the items to instantiate,
16219# then the envvar interface is used. Set only those that are not.
16220# We use the long form for the default assignment because of an extremely
16221# bizarre bug on SunOS 4.1.3.
16222if $ac_need_defaults; then
16223 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16224 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16225fi
16226
16227# Create a temporary directory, and hook for its removal unless debugging.
16228$debug ||
16229{
16230 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16231 trap '{ (exit 1); exit 1; }' 1 2 13 15
16232}
16233
16234# Create a (secure) tmp directory for tmp files.
16235: ${TMPDIR=/tmp}
16236{
16237 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16238 test -n "$tmp" && test -d "$tmp"
16239} ||
16240{
16241 tmp=$TMPDIR/cs$$-$RANDOM
16242 (umask 077 && mkdir $tmp)
16243} ||
16244{
16245 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16246 { (exit 1); exit 1; }
16247}
16248
16249_ACEOF
16250
16251cat >>$CONFIG_STATUS <<_ACEOF
16252
16253#
16254# CONFIG_FILES section.
16255#
16256
16257# No need to generate the scripts if there are no CONFIG_FILES.
16258# This happens for instance when ./config.status config.h
16259if test -n "\$CONFIG_FILES"; then
16260 # Protect against being on the right side of a sed subst in config.status.
16261 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16262 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16263s,@SHELL@,$SHELL,;t t
16264s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16265s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16266s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16267s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16268s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16269s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16270s,@exec_prefix@,$exec_prefix,;t t
16271s,@prefix@,$prefix,;t t
16272s,@program_transform_name@,$program_transform_name,;t t
16273s,@bindir@,$bindir,;t t
16274s,@sbindir@,$sbindir,;t t
16275s,@libexecdir@,$libexecdir,;t t
16276s,@datadir@,$datadir,;t t
16277s,@sysconfdir@,$sysconfdir,;t t
16278s,@sharedstatedir@,$sharedstatedir,;t t
16279s,@localstatedir@,$localstatedir,;t t
16280s,@libdir@,$libdir,;t t
16281s,@includedir@,$includedir,;t t
16282s,@oldincludedir@,$oldincludedir,;t t
16283s,@infodir@,$infodir,;t t
16284s,@mandir@,$mandir,;t t
16285s,@build_alias@,$build_alias,;t t
16286s,@host_alias@,$host_alias,;t t
16287s,@target_alias@,$target_alias,;t t
16288s,@DEFS@,$DEFS,;t t
16289s,@ECHO_C@,$ECHO_C,;t t
16290s,@ECHO_N@,$ECHO_N,;t t
16291s,@ECHO_T@,$ECHO_T,;t t
16292s,@LIBS@,$LIBS,;t t
16293s,@VERSION@,$VERSION,;t t
16294s,@SOVERSION@,$SOVERSION,;t t
16295s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16296s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16297s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16298s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16299s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16300s,@MACHDEP@,$MACHDEP,;t t
16301s,@SGI_ABI@,$SGI_ABI,;t t
16302s,@CXX@,$CXX,;t t
16303s,@MAINOBJ@,$MAINOBJ,;t t
16304s,@EXEEXT@,$EXEEXT,;t t
16305s,@CC@,$CC,;t t
16306s,@CFLAGS@,$CFLAGS,;t t
16307s,@LDFLAGS@,$LDFLAGS,;t t
16308s,@CPPFLAGS@,$CPPFLAGS,;t t
16309s,@ac_ct_CC@,$ac_ct_CC,;t t
16310s,@OBJEXT@,$OBJEXT,;t t
16311s,@CPP@,$CPP,;t t
16312s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16313s,@LIBRARY@,$LIBRARY,;t t
16314s,@LDLIBRARY@,$LDLIBRARY,;t t
16315s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16316s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16317s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16318s,@INSTSONAME@,$INSTSONAME,;t t
16319s,@RUNSHARED@,$RUNSHARED,;t t
16320s,@LINKCC@,$LINKCC,;t t
16321s,@RANLIB@,$RANLIB,;t t
16322s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16323s,@AR@,$AR,;t t
16324s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16325s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16326s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16327s,@LN@,$LN,;t t
16328s,@OPT@,$OPT,;t t
16329s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16330s,@SO@,$SO,;t t
16331s,@LDSHARED@,$LDSHARED,;t t
16332s,@BLDSHARED@,$BLDSHARED,;t t
16333s,@CCSHARED@,$CCSHARED,;t t
16334s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16335s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
16336s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16337s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16338s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16339s,@LDLAST@,$LDLAST,;t t
16340s,@THREADOBJ@,$THREADOBJ,;t t
16341s,@DLINCLDIR@,$DLINCLDIR,;t t
16342s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16343s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16344s,@LIBOBJS@,$LIBOBJS,;t t
16345s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16346s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16347s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16348s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16349s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16350s,@LIBM@,$LIBM,;t t
16351s,@LIBC@,$LIBC,;t t
16352s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16353s,@THREADHEADERS@,$THREADHEADERS,;t t
16354s,@SRCDIRS@,$SRCDIRS,;t t
16355CEOF
16356
16357_ACEOF
16358
16359 cat >>$CONFIG_STATUS <<\_ACEOF
16360 # Split the substitutions into bite-sized pieces for seds with
16361 # small command number limits, like on Digital OSF/1 and HP-UX.
16362 ac_max_sed_lines=48
16363 ac_sed_frag=1 # Number of current file.
16364 ac_beg=1 # First line for current file.
16365 ac_end=$ac_max_sed_lines # Line after last line for current file.
16366 ac_more_lines=:
16367 ac_sed_cmds=
16368 while $ac_more_lines; do
16369 if test $ac_beg -gt 1; then
16370 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16371 else
16372 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16373 fi
16374 if test ! -s $tmp/subs.frag; then
16375 ac_more_lines=false
16376 else
16377 # The purpose of the label and of the branching condition is to
16378 # speed up the sed processing (if there are no `@' at all, there
16379 # is no need to browse any of the substitutions).
16380 # These are the two extra sed commands mentioned above.
16381 (echo ':t
16382 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16383 if test -z "$ac_sed_cmds"; then
16384 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16385 else
16386 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16387 fi
16388 ac_sed_frag=`expr $ac_sed_frag + 1`
16389 ac_beg=$ac_end
16390 ac_end=`expr $ac_end + $ac_max_sed_lines`
16391 fi
16392 done
16393 if test -z "$ac_sed_cmds"; then
16394 ac_sed_cmds=cat
16395 fi
16396fi # test -n "$CONFIG_FILES"
16397
16398_ACEOF
16399cat >>$CONFIG_STATUS <<\_ACEOF
16400for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16401 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16402 case $ac_file in
16403 - | *:- | *:-:* ) # input from stdin
16404 cat >$tmp/stdin
16405 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16406 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16407 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16408 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16409 * ) ac_file_in=$ac_file.in ;;
16410 esac
16411
16412 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16413 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16414$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16415 X"$ac_file" : 'X\(//\)[^/]' \| \
16416 X"$ac_file" : 'X\(//\)$' \| \
16417 X"$ac_file" : 'X\(/\)' \| \
16418 . : '\(.\)' 2>/dev/null ||
16419echo X"$ac_file" |
16420 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16421 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16422 /^X\(\/\/\)$/{ s//\1/; q; }
16423 /^X\(\/\).*/{ s//\1/; q; }
16424 s/.*/./; q'`
16425 { case "$ac_dir" in
16426 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16427 *) as_incr_dir=.;;
16428esac
16429as_dummy="$ac_dir"
16430for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16431 case $as_mkdir_dir in
16432 # Skip DOS drivespec
16433 ?:) as_incr_dir=$as_mkdir_dir ;;
16434 *)
16435 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16436 test -d "$as_incr_dir" ||
16437 mkdir "$as_incr_dir" ||
16438 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16439echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16440 { (exit 1); exit 1; }; }
16441 ;;
16442 esac
16443done; }
16444
16445 ac_builddir=.
16446
16447if test "$ac_dir" != .; then
16448 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16449 # A "../" for each directory in $ac_dir_suffix.
16450 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16451else
16452 ac_dir_suffix= ac_top_builddir=
16453fi
16454
16455case $srcdir in
16456 .) # No --srcdir option. We are building in place.
16457 ac_srcdir=.
16458 if test -z "$ac_top_builddir"; then
16459 ac_top_srcdir=.
16460 else
16461 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16462 fi ;;
16463 [\\/]* | ?:[\\/]* ) # Absolute path.
16464 ac_srcdir=$srcdir$ac_dir_suffix;
16465 ac_top_srcdir=$srcdir ;;
16466 *) # Relative path.
16467 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16468 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16469esac
16470# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16471# absolute.
16472ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16473ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16474ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16475ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16476
16477
16478 case $INSTALL in
16479 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16480 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16481 esac
16482
16483 if test x"$ac_file" != x-; then
16484 { echo "$as_me:$LINENO: creating $ac_file" >&5
16485echo "$as_me: creating $ac_file" >&6;}
16486 rm -f "$ac_file"
16487 fi
16488 # Let's still pretend it is `configure' which instantiates (i.e., don't
16489 # use $as_me), people would be surprised to read:
16490 # /* config.h. Generated by config.status. */
16491 if test x"$ac_file" = x-; then
16492 configure_input=
16493 else
16494 configure_input="$ac_file. "
16495 fi
16496 configure_input=$configure_input"Generated from `echo $ac_file_in |
16497 sed 's,.*/,,'` by configure."
16498
16499 # First look for the input files in the build tree, otherwise in the
16500 # src tree.
16501 ac_file_inputs=`IFS=:
16502 for f in $ac_file_in; do
16503 case $f in
16504 -) echo $tmp/stdin ;;
16505 [\\/$]*)
16506 # Absolute (can't be DOS-style, as IFS=:)
16507 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16508echo "$as_me: error: cannot find input file: $f" >&2;}
16509 { (exit 1); exit 1; }; }
16510 echo $f;;
16511 *) # Relative
16512 if test -f "$f"; then
16513 # Build tree
16514 echo $f
16515 elif test -f "$srcdir/$f"; then
16516 # Source tree
16517 echo $srcdir/$f
16518 else
16519 # /dev/null tree
16520 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16521echo "$as_me: error: cannot find input file: $f" >&2;}
16522 { (exit 1); exit 1; }; }
16523 fi;;
16524 esac
16525 done` || { (exit 1); exit 1; }
16526_ACEOF
16527cat >>$CONFIG_STATUS <<_ACEOF
16528 sed "$ac_vpsub
16529$extrasub
16530_ACEOF
16531cat >>$CONFIG_STATUS <<\_ACEOF
16532:t
16533/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16534s,@configure_input@,$configure_input,;t t
16535s,@srcdir@,$ac_srcdir,;t t
16536s,@abs_srcdir@,$ac_abs_srcdir,;t t
16537s,@top_srcdir@,$ac_top_srcdir,;t t
16538s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16539s,@builddir@,$ac_builddir,;t t
16540s,@abs_builddir@,$ac_abs_builddir,;t t
16541s,@top_builddir@,$ac_top_builddir,;t t
16542s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16543s,@INSTALL@,$ac_INSTALL,;t t
16544" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16545 rm -f $tmp/stdin
16546 if test x"$ac_file" != x-; then
16547 mv $tmp/out $ac_file
16548 else
16549 cat $tmp/out
16550 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016551 fi
16552
Martin v. Löwis11437992002-04-12 09:54:03 +000016553done
16554_ACEOF
16555cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016556
Martin v. Löwis11437992002-04-12 09:54:03 +000016557#
16558# CONFIG_HEADER section.
16559#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016560
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016561# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16562# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016563#
16564# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016565ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16566ac_dB='[ ].*$,\1#\2'
16567ac_dC=' '
16568ac_dD=',;t'
16569# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16570ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16571ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016572ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016573ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016574
Martin v. Löwis11437992002-04-12 09:54:03 +000016575for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016576 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016577 case $ac_file in
16578 - | *:- | *:-:* ) # input from stdin
16579 cat >$tmp/stdin
16580 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16581 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16582 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16583 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16584 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016585 esac
16586
Martin v. Löwis11437992002-04-12 09:54:03 +000016587 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16588echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016589
Martin v. Löwis11437992002-04-12 09:54:03 +000016590 # First look for the input files in the build tree, otherwise in the
16591 # src tree.
16592 ac_file_inputs=`IFS=:
16593 for f in $ac_file_in; do
16594 case $f in
16595 -) echo $tmp/stdin ;;
16596 [\\/$]*)
16597 # Absolute (can't be DOS-style, as IFS=:)
16598 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16599echo "$as_me: error: cannot find input file: $f" >&2;}
16600 { (exit 1); exit 1; }; }
16601 echo $f;;
16602 *) # Relative
16603 if test -f "$f"; then
16604 # Build tree
16605 echo $f
16606 elif test -f "$srcdir/$f"; then
16607 # Source tree
16608 echo $srcdir/$f
16609 else
16610 # /dev/null tree
16611 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16612echo "$as_me: error: cannot find input file: $f" >&2;}
16613 { (exit 1); exit 1; }; }
16614 fi;;
16615 esac
16616 done` || { (exit 1); exit 1; }
16617 # Remove the trailing spaces.
16618 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016619
Martin v. Löwis11437992002-04-12 09:54:03 +000016620_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016621
Martin v. Löwis11437992002-04-12 09:54:03 +000016622# Transform confdefs.h into two sed scripts, `conftest.defines' and
16623# `conftest.undefs', that substitutes the proper values into
16624# config.h.in to produce config.h. The first handles `#define'
16625# templates, and the second `#undef' templates.
16626# And first: Protect against being on the right side of a sed subst in
16627# config.status. Protect against being in an unquoted here document
16628# in config.status.
16629rm -f conftest.defines conftest.undefs
16630# Using a here document instead of a string reduces the quoting nightmare.
16631# Putting comments in sed scripts is not portable.
16632#
16633# `end' is used to avoid that the second main sed command (meant for
16634# 0-ary CPP macros) applies to n-ary macro definitions.
16635# See the Autoconf documentation for `clear'.
16636cat >confdef2sed.sed <<\_ACEOF
16637s/[\\&,]/\\&/g
16638s,[\\$`],\\&,g
16639t clear
16640: clear
16641s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16642t end
16643s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16644: end
16645_ACEOF
16646# If some macros were called several times there might be several times
16647# the same #defines, which is useless. Nevertheless, we may not want to
16648# sort them, since we want the *last* AC-DEFINE to be honored.
16649uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16650sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16651rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016652
16653# This sed command replaces #undef with comments. This is necessary, for
16654# example, in the case of _POSIX_SOURCE, which is predefined and required
16655# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016656cat >>conftest.undefs <<\_ACEOF
16657s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16658_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016659
Martin v. Löwis11437992002-04-12 09:54:03 +000016660# Break up conftest.defines because some shells have a limit on the size
16661# of here documents, and old seds have small limits too (100 cmds).
16662echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16663echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16664echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16665echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016666rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016667while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016668do
Martin v. Löwis11437992002-04-12 09:54:03 +000016669 # Write a limited-size here document to $tmp/defines.sed.
16670 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16671 # Speed up: don't consider the non `#define' lines.
16672 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16673 # Work around the forget-to-reset-the-flag bug.
16674 echo 't clr' >>$CONFIG_STATUS
16675 echo ': clr' >>$CONFIG_STATUS
16676 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016677 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016678 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16679 rm -f $tmp/in
16680 mv $tmp/out $tmp/in
16681' >>$CONFIG_STATUS
16682 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16683 rm -f conftest.defines
16684 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016685done
Martin v. Löwis11437992002-04-12 09:54:03 +000016686rm -f conftest.defines
16687echo ' fi # egrep' >>$CONFIG_STATUS
16688echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016689
Martin v. Löwis11437992002-04-12 09:54:03 +000016690# Break up conftest.undefs because some shells have a limit on the size
16691# of here documents, and old seds have small limits too (100 cmds).
16692echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16693rm -f conftest.tail
16694while grep . conftest.undefs >/dev/null
16695do
16696 # Write a limited-size here document to $tmp/undefs.sed.
16697 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16698 # Speed up: don't consider the non `#undef'
16699 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16700 # Work around the forget-to-reset-the-flag bug.
16701 echo 't clr' >>$CONFIG_STATUS
16702 echo ': clr' >>$CONFIG_STATUS
16703 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16704 echo 'CEOF
16705 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16706 rm -f $tmp/in
16707 mv $tmp/out $tmp/in
16708' >>$CONFIG_STATUS
16709 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16710 rm -f conftest.undefs
16711 mv conftest.tail conftest.undefs
16712done
16713rm -f conftest.undefs
16714
16715cat >>$CONFIG_STATUS <<\_ACEOF
16716 # Let's still pretend it is `configure' which instantiates (i.e., don't
16717 # use $as_me), people would be surprised to read:
16718 # /* config.h. Generated by config.status. */
16719 if test x"$ac_file" = x-; then
16720 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016721 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016722 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016723 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016724 cat $tmp/in >>$tmp/config.h
16725 rm -f $tmp/in
16726 if test x"$ac_file" != x-; then
16727 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16728 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16729echo "$as_me: $ac_file is unchanged" >&6;}
16730 else
16731 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16732$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16733 X"$ac_file" : 'X\(//\)[^/]' \| \
16734 X"$ac_file" : 'X\(//\)$' \| \
16735 X"$ac_file" : 'X\(/\)' \| \
16736 . : '\(.\)' 2>/dev/null ||
16737echo X"$ac_file" |
16738 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16739 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16740 /^X\(\/\/\)$/{ s//\1/; q; }
16741 /^X\(\/\).*/{ s//\1/; q; }
16742 s/.*/./; q'`
16743 { case "$ac_dir" in
16744 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16745 *) as_incr_dir=.;;
16746esac
16747as_dummy="$ac_dir"
16748for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16749 case $as_mkdir_dir in
16750 # Skip DOS drivespec
16751 ?:) as_incr_dir=$as_mkdir_dir ;;
16752 *)
16753 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16754 test -d "$as_incr_dir" ||
16755 mkdir "$as_incr_dir" ||
16756 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16757echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16758 { (exit 1); exit 1; }; }
16759 ;;
16760 esac
16761done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016762
Martin v. Löwis11437992002-04-12 09:54:03 +000016763 rm -f $ac_file
16764 mv $tmp/config.h $ac_file
16765 fi
16766 else
16767 cat $tmp/config.h
16768 rm -f $tmp/config.h
16769 fi
16770done
16771_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016772
Martin v. Löwis11437992002-04-12 09:54:03 +000016773cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016774
Martin v. Löwis11437992002-04-12 09:54:03 +000016775{ (exit 0); exit 0; }
16776_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016777chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016778ac_clean_files=$ac_clean_files_save
16779
16780
16781# configure is writing to config.log, and then calls config.status.
16782# config.status does its own redirection, appending to config.log.
16783# Unfortunately, on DOS this fails, as config.log is still kept open
16784# by configure, so config.status won't be able to write to it; its
16785# output is simply discarded. So we exec the FD to /dev/null,
16786# effectively closing config.log, so it can be properly (re)opened and
16787# appended to by config.status. When coming back to configure, we
16788# need to make the FD available again.
16789if test "$no_create" != yes; then
16790 ac_cs_success=:
16791 exec 5>/dev/null
16792 $SHELL $CONFIG_STATUS || ac_cs_success=false
16793 exec 5>>config.log
16794 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16795 # would make configure fail if this is the last instruction.
16796 $ac_cs_success || { (exit 1); exit 1; }
16797fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016798
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016799
16800echo "creating Setup"
16801if test ! -f Modules/Setup
16802then
16803 cp $srcdir/Modules/Setup.dist Modules/Setup
16804fi
16805
16806echo "creating Setup.local"
16807if test ! -f Modules/Setup.local
16808then
16809 echo "# Edit this file for local setup changes" >Modules/Setup.local
16810fi
16811
16812echo "creating Makefile"
16813$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16814 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016815 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016816mv config.c Modules