blob: 2a8fa9aceaf2109b05aa4a19cb8931b893c7380e [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis39f59b02002-11-23 09:13:40 +00002# From configure.in Revision: 1.371 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis88afe662002-10-26 13:47:44 +00004# Generated by GNU Autoconf 2.53 for python 2.3.
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.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000256PACKAGE_NAME='python'
257PACKAGE_TARNAME='python'
258PACKAGE_VERSION='2.3'
259PACKAGE_STRING='python 2.3'
260PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000261
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
Martin v. Löwis88afe662002-10-26 13:47:44 +0000764\`configure' configures python 2.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000765
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
Martin v. Löwis88afe662002-10-26 13:47:44 +0000820 case $ac_init_help in
821 short | recursive ) echo "Configuration of python 2.3:";;
822 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 cat <<\_ACEOF
824
825Optional Features:
826 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
827 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000828 --enable-framework[=INSTALLDIR]
829 Build (MacOSX|Darwin) framework
830 --enable-shared disable/enable building shared python library
831 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
832 --enable-ipv6 Enable ipv6 (with ipv4) support
833 --disable-ipv6 Disable ipv6 support
834 --enable-unicode[=ucs[24]]
835 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836
837Optional Packages:
838 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
839 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000840 --without-gcc never use gcc
841 --with-cxx=<compiler> enable C++ support
842 --with-suffix=.exe set executable suffix
843 --with-pydebug build with Py_DEBUG defined
844 --with-libs='lib1 ...' link against additional libs
845 --with-signal-module disable/enable signal module
846 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
847 --with(out)-threads[=DIRECTORY]
848 disable/enable thread support
849 --with(out)-thread[=DIRECTORY]
850 deprecated; use --with(out)-threads
851 --with-pth use GNU pth threading libraries
852 --with(out)-universal-newlines
853 disable/enable foreign newlines
854 --with(out)-doc-strings disable/enable documentation strings
855 --with(out)-pymalloc disable/enable specialized mallocs
856 --with-wctype-functions use wctype.h functions
857 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
858 --with-dl-dld=DL_DIR GNU dynamic linking
859 --with-fpectl enable SIGFPE catching
860 --with-libm=STRING math library
861 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000862
863Some influential environment variables:
864 CC C compiler command
865 CFLAGS C compiler flags
866 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
867 nonstandard directory <lib dir>
868 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
869 headers in a nonstandard directory <include dir>
870 CPP C preprocessor
871
872Use these variables to override the choices made by `configure' or to help
873it to find libraries and programs with nonstandard names/locations.
874
875_ACEOF
876fi
877
878if test "$ac_init_help" = "recursive"; then
879 # If there are subdirs, report their specific --help.
880 ac_popdir=`pwd`
881 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
882 test -d $ac_dir || continue
883 ac_builddir=.
884
885if test "$ac_dir" != .; then
886 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
887 # A "../" for each directory in $ac_dir_suffix.
888 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
889else
890 ac_dir_suffix= ac_top_builddir=
891fi
892
893case $srcdir in
894 .) # No --srcdir option. We are building in place.
895 ac_srcdir=.
896 if test -z "$ac_top_builddir"; then
897 ac_top_srcdir=.
898 else
899 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
900 fi ;;
901 [\\/]* | ?:[\\/]* ) # Absolute path.
902 ac_srcdir=$srcdir$ac_dir_suffix;
903 ac_top_srcdir=$srcdir ;;
904 *) # Relative path.
905 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
906 ac_top_srcdir=$ac_top_builddir$srcdir ;;
907esac
908# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
909# absolute.
910ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise3271202002-11-07 07:42:30 +0000911ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000912ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
913ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
914
915 cd $ac_dir
916 # Check for guested configure; otherwise get Cygnus style configure.
917 if test -f $ac_srcdir/configure.gnu; then
918 echo
919 $SHELL $ac_srcdir/configure.gnu --help=recursive
920 elif test -f $ac_srcdir/configure; then
921 echo
922 $SHELL $ac_srcdir/configure --help=recursive
923 elif test -f $ac_srcdir/configure.ac ||
924 test -f $ac_srcdir/configure.in; then
925 echo
926 $ac_configure --help
927 else
928 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
929 fi
930 cd $ac_popdir
931 done
932fi
933
934test -n "$ac_init_help" && exit 0
935if $ac_init_version; then
936 cat <<\_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000937python configure 2.3
938generated by GNU Autoconf 2.53
Martin v. Löwis11437992002-04-12 09:54:03 +0000939
940Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
941Free Software Foundation, Inc.
942This configure script is free software; the Free Software Foundation
943gives unlimited permission to copy, distribute and modify it.
944_ACEOF
945 exit 0
946fi
947exec 5>config.log
948cat >&5 <<_ACEOF
949This file contains any messages produced by compilers while
950running configure, to aid debugging if configure makes a mistake.
951
Martin v. Löwis88afe662002-10-26 13:47:44 +0000952It was created by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +0000953generated by GNU Autoconf 2.53. Invocation command line was
954
955 $ $0 $@
956
957_ACEOF
958{
959cat <<_ASUNAME
960## --------- ##
961## Platform. ##
962## --------- ##
963
964hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
965uname -m = `(uname -m) 2>/dev/null || echo unknown`
966uname -r = `(uname -r) 2>/dev/null || echo unknown`
967uname -s = `(uname -s) 2>/dev/null || echo unknown`
968uname -v = `(uname -v) 2>/dev/null || echo unknown`
969
970/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
971/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
972
973/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
974/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
975/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
976hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
977/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
978/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
979/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
980
981_ASUNAME
982
983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
984for as_dir in $PATH
985do
986 IFS=$as_save_IFS
987 test -z "$as_dir" && as_dir=.
988 echo "PATH: $as_dir"
989done
990
991} >&5
992
993cat >&5 <<_ACEOF
994
995
996## ----------- ##
997## Core tests. ##
998## ----------- ##
999
1000_ACEOF
1001
1002
1003# Keep a trace of the command line.
1004# Strip out --no-create and --no-recursion so they do not pile up.
1005# Also quote any args containing shell meta-characters.
1006ac_configure_args=
1007ac_sep=
1008for ac_arg
1009do
1010 case $ac_arg in
1011 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1012 | --no-cr | --no-c | -n ) continue ;;
1013 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1014 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1015 continue ;;
1016 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1017 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1018 esac
1019 case " $ac_configure_args " in
1020 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1021 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1022 ac_sep=" " ;;
1023 esac
1024 # Get rid of the leading space.
1025done
1026
1027# When interrupted or exit'd, cleanup temporary files, and complete
1028# config.log. We remove comments because anyway the quotes in there
1029# would cause problems or look ugly.
1030# WARNING: Be sure not to use single quotes in there, as some shells,
1031# such as our DU 5.0 friend, will then `close' the trap.
1032trap 'exit_status=$?
1033 # Save into config.log some information that might help in debugging.
1034 {
1035 echo
1036 cat <<\_ASBOX
1037## ---------------- ##
1038## Cache variables. ##
1039## ---------------- ##
1040_ASBOX
1041 echo
1042 # The following way of writing the cache mishandles newlines in values,
1043{
1044 (set) 2>&1 |
1045 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1046 *ac_space=\ *)
1047 sed -n \
1048 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1049 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1050 ;;
1051 *)
1052 sed -n \
1053 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1054 ;;
1055 esac;
1056}
1057 echo
1058 if test -s confdefs.h; then
1059 cat <<\_ASBOX
1060## ----------- ##
1061## confdefs.h. ##
1062## ----------- ##
1063_ASBOX
1064 echo
1065 sed "/^$/d" confdefs.h
1066 echo
1067 fi
1068 test "$ac_signal" != 0 &&
1069 echo "$as_me: caught signal $ac_signal"
1070 echo "$as_me: exit $exit_status"
1071 } >&5
1072 rm -f core core.* *.core &&
1073 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1074 exit $exit_status
1075 ' 0
1076for ac_signal in 1 2 13 15; do
1077 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1078done
1079ac_signal=0
1080
1081# confdefs.h avoids OS command line length limits that DEFS can exceed.
1082rm -rf conftest* confdefs.h
1083# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1084echo >confdefs.h
1085
1086# Predefined preprocessor variables.
1087
1088cat >>confdefs.h <<_ACEOF
1089#define PACKAGE_NAME "$PACKAGE_NAME"
1090_ACEOF
1091
1092
1093cat >>confdefs.h <<_ACEOF
1094#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1095_ACEOF
1096
1097
1098cat >>confdefs.h <<_ACEOF
1099#define PACKAGE_VERSION "$PACKAGE_VERSION"
1100_ACEOF
1101
1102
1103cat >>confdefs.h <<_ACEOF
1104#define PACKAGE_STRING "$PACKAGE_STRING"
1105_ACEOF
1106
1107
1108cat >>confdefs.h <<_ACEOF
1109#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1110_ACEOF
1111
1112
1113# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114# Prefer explicitly selected file to automatically selected ones.
1115if test -z "$CONFIG_SITE"; then
1116 if test "x$prefix" != xNONE; then
1117 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1118 else
1119 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1120 fi
1121fi
1122for ac_site_file in $CONFIG_SITE; do
1123 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1125echo "$as_me: loading site script $ac_site_file" >&6;}
1126 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 . "$ac_site_file"
1128 fi
1129done
1130
1131if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 # Some versions of bash will fail to source /dev/null (special
1133 # files actually), so we avoid doing that.
1134 if test -f "$cache_file"; then
1135 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1136echo "$as_me: loading cache $cache_file" >&6;}
1137 case $cache_file in
1138 [\\/]* | ?:[\\/]* ) . $cache_file;;
1139 *) . ./$cache_file;;
1140 esac
1141 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142else
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1144echo "$as_me: creating cache $cache_file" >&6;}
1145 >$cache_file
1146fi
1147
1148# Check that the precious variables saved in the cache have kept the same
1149# value.
1150ac_cache_corrupted=false
1151for ac_var in `(set) 2>&1 |
1152 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1153 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1154 eval ac_new_set=\$ac_env_${ac_var}_set
1155 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1156 eval ac_new_val="\$ac_env_${ac_var}_value"
1157 case $ac_old_set,$ac_new_set in
1158 set,)
1159 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1160echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1161 ac_cache_corrupted=: ;;
1162 ,set)
1163 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1164echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1165 ac_cache_corrupted=: ;;
1166 ,);;
1167 *)
1168 if test "x$ac_old_val" != "x$ac_new_val"; then
1169 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1170echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1171 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1172echo "$as_me: former value: $ac_old_val" >&2;}
1173 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1174echo "$as_me: current value: $ac_new_val" >&2;}
1175 ac_cache_corrupted=:
1176 fi;;
1177 esac
1178 # Pass precious variables to config.status.
1179 if test "$ac_new_set" = set; then
1180 case $ac_new_val in
1181 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1182 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1183 *) ac_arg=$ac_var=$ac_new_val ;;
1184 esac
1185 case " $ac_configure_args " in
1186 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1187 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1188 esac
1189 fi
1190done
1191if $ac_cache_corrupted; then
1192 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1193echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1194 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1195echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1196 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197fi
1198
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1203ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204
Guido van Rossum627b2d71993-12-24 10:39:16 +00001205
Michael W. Hudson54241132001-12-07 15:38:26 +00001206
1207
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
Martin v. Löwis88afe662002-10-26 13:47:44 +00001222
1223
1224
1225
1226
1227
1228
1229
1230
Martin v. Löwis11437992002-04-12 09:54:03 +00001231ac_config_headers="$ac_config_headers pyconfig.h"
1232
1233
1234# This is for stuff that absolutely must end up in pyconfig.h.
1235# Please use pyport.h instead, if possible.
1236
1237
1238
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001239
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001240
1241
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001242VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001243
Martin v. Löwis1142de32002-03-29 16:28:31 +00001244
1245SOVERSION=1.0
1246
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001247# The later defininition of _XOPEN_SOURCE disables certain features
1248# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1249
1250cat >>confdefs.h <<\_ACEOF
1251#define _GNU_SOURCE 1
1252_ACEOF
1253
1254
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001255define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001256
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001257# Arguments passed to configure.
1258
1259CONFIG_ARGS="$ac_configure_args"
1260
Jack Jansene578a632001-08-15 01:27:14 +00001261# Check whether --enable-framework or --disable-framework was given.
1262if test "${enable_framework+set}" = set; then
1263 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001264
Jack Jansene578a632001-08-15 01:27:14 +00001265 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001267 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001268 esac
1269 case $enableval in
1270 no)
1271 PYTHONFRAMEWORK=
1272 PYTHONFRAMEWORKDIR=no-framework
1273 PYTHONFRAMEWORKPREFIX=
1274 PYTHONFRAMEWORKINSTALLDIR=
1275 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001276 ;;
1277 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001278 PYTHONFRAMEWORK=Python
1279 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001280 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001281 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1282 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001283 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001284
Guido van Rossum563e7081996-09-10 18:20:48 +00001285else
Martin v. Löwis11437992002-04-12 09:54:03 +00001286
Jack Jansene578a632001-08-15 01:27:14 +00001287 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001288 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001289 PYTHONFRAMEWORKPREFIX=
1290 PYTHONFRAMEWORKINSTALLDIR=
1291 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001292
Martin v. Löwis11437992002-04-12 09:54:03 +00001293fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001294
1295
1296
1297
Jack Jansene578a632001-08-15 01:27:14 +00001298
1299##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001300## AC_HELP_STRING(--with-dyld,
1301## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001302##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001303# Set name for machine-dependent library files
1304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305echo "$as_me:$LINENO: checking MACHDEP" >&5
1306echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001307if test -z "$MACHDEP"
1308then
Guido van Rossum563e7081996-09-10 18:20:48 +00001309 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001310 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1311 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001312 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001313 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001314 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001315 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001316 ac_md_system=`echo $ac_sys_system |
1317 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1318 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001319 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001320 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001321
Guido van Rossum07397971997-04-29 21:49:50 +00001322 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001323 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001324 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001325 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001326 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001327 esac
1328fi
Guido van Rossum91922671997-10-09 20:24:13 +00001329
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001330# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1331# disable features if it is defined, without any means to access these
1332# features as extensions. For these systems, we skip the definition of
1333# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1334# some feature, make sure there is no alternative way to access this
1335# feature. Also, when using wildcards, make sure you have verified the
1336# need for not defining _XOPEN_SOURCE on all systems matching the
1337# wildcard, and that the wildcard does not include future systems
1338# (which may remove their limitations).
1339case $ac_sys_system/$ac_sys_release in
1340 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1341 # even though select is a POSIX function. Reported by J. Ribbens.
1342 OpenBSD/2.* | OpenBSD/3.[012])
1343 define_xopen_source=no;;
1344esac
1345
1346if test $define_xopen_source = yes
1347then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001348
1349cat >>confdefs.h <<\_ACEOF
1350#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001351_ACEOF
1352
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001353
1354 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1355 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1356 # several APIs are not declared. Since this is also needed in some
1357 # cases for HP-UX, we define it globally.
1358
1359
1360cat >>confdefs.h <<\_ACEOF
1361#define _XOPEN_SOURCE_EXTENDED 1
1362_ACEOF
1363
1364
1365cat >>confdefs.h <<\_ACEOF
1366#define _POSIX_C_SOURCE 200112L
1367_ACEOF
1368
1369
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001370fi
1371
Guido van Rossum91922671997-10-09 20:24:13 +00001372#
1373# SGI compilers allow the specification of the both the ABI and the
1374# ISA on the command line. Depending on the values of these switches,
1375# different and often incompatable code will be generated.
1376#
1377# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1378# thus supply support for various ABI/ISA combinations. The MACHDEP
1379# variable is also adjusted.
1380#
1381
1382if test ! -z "$SGI_ABI"
1383then
1384 CC="cc $SGI_ABI"
1385 LDFLAGS="$SGI_ABI $LDFLAGS"
1386 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1387fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001388echo "$as_me:$LINENO: result: $MACHDEP" >&5
1389echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001390
Guido van Rossum627b2d71993-12-24 10:39:16 +00001391# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001392echo "$as_me:$LINENO: checking for --without-gcc" >&5
1393echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1394
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001395# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001396if test "${with_gcc+set}" = set; then
1397 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001398
Guido van Rossum7f43da71994-08-01 12:15:30 +00001399 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001400 no) CC=cc
1401 without_gcc=yes;;
1402 yes) CC=gcc
1403 without_gcc=no;;
1404 *) CC=$withval
1405 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001406 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001407else
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001409 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001410 AIX*) CC=cc_r
1411 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001412 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001413 case $BE_HOST_CPU in
1414 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001415 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001416 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001417 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001418 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001419 ;;
1420 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001421 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001422 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001423 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001424 ;;
1425 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1427echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1428 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001429 ;;
1430 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001431 AR="\$(srcdir)/Modules/ar_beos"
1432 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001433 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001434 Monterey*)
1435 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001436 without_gcc=;;
1437 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001438 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001439fi;
1440echo "$as_me:$LINENO: result: $without_gcc" >&5
1441echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001442
1443
Guido van Rossum95012191999-12-16 17:50:52 +00001444
Fred Drakea1a84e72001-03-06 05:52:16 +00001445MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001446echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1447echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1448
Guido van Rossum95012191999-12-16 17:50:52 +00001449# Check whether --with-cxx or --without-cxx was given.
1450if test "${with_cxx+set}" = set; then
1451 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
Martin v. Löwis22352952000-12-13 17:37:02 +00001453 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001454 case $withval in
1455 no) CXX=
1456 with_cxx=no;;
1457 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001458 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001459 with_cxx=$withval;;
1460 esac
1461else
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
Guido van Rossum95012191999-12-16 17:50:52 +00001463 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001464 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001465
Martin v. Löwis11437992002-04-12 09:54:03 +00001466fi;
1467echo "$as_me:$LINENO: result: $with_cxx" >&5
1468echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001469
1470if test "$with_cxx" = "yes"
1471then
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1473echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1474 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001475fi
1476
1477
1478
1479
Martin v. Löwis11437992002-04-12 09:54:03 +00001480if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001481then
1482 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1483do
Martin v. Löwis11437992002-04-12 09:54:03 +00001484 # 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 +00001485set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001486echo "$as_me:$LINENO: checking for $ac_word" >&5
1487echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1488if test "${ac_cv_prog_CXX+set}" = set; then
1489 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001490else
1491 if test -n "$CXX"; then
1492 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1493else
Martin v. Löwis11437992002-04-12 09:54:03 +00001494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1495for as_dir in $PATH
1496do
1497 IFS=$as_save_IFS
1498 test -z "$as_dir" && as_dir=.
1499 for ac_exec_ext in '' $ac_executable_extensions; do
1500 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1501 ac_cv_prog_CXX="$ac_prog"
1502 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1503 break 2
1504 fi
1505done
1506done
1507
Martin v. Löwis22352952000-12-13 17:37:02 +00001508fi
1509fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001510CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001511if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 echo "$as_me:$LINENO: result: $CXX" >&5
1513echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001514else
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 echo "$as_me:$LINENO: result: no" >&5
1516echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001517fi
1518
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001520done
1521test -n "$CXX" || CXX="notfound"
1522
1523 if test "$CXX" = "notfound"
1524 then
1525 CXX=
1526 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001527 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001528ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1532 cat >conftest.$ac_ext <<_ACEOF
1533#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001534#include "confdefs.h"
1535
Martin v. Löwis11437992002-04-12 09:54:03 +00001536#ifdef F77_DUMMY_MAIN
1537# ifdef __cplusplus
1538 extern "C"
1539# endif
1540 int F77_DUMMY_MAIN() { return 1; }
1541#endif
1542int
1543main ()
1544{
Michael W. Hudson54241132001-12-07 15:38:26 +00001545
Martin v. Löwis11437992002-04-12 09:54:03 +00001546 ;
1547 return 0;
1548}
1549_ACEOF
1550ac_clean_files_save=$ac_clean_files
1551ac_clean_files="$ac_clean_files a.out a.exe"
1552# Try to create an executable without -o first, disregard a.out.
1553# It will help us diagnose broken compilers, and finding out an intuition
1554# of exeext.
1555echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1556echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1557ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1558if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1559 (eval $ac_link_default) 2>&5
1560 ac_status=$?
1561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1562 (exit $ac_status); }; then
1563 # Find the output, starting from the most likely. This scheme is
1564# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1565# resort.
1566
1567# Be careful to initialize this variable, since it used to be cached.
1568# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1569ac_cv_exeext=
1570for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1571 ls a.out conftest 2>/dev/null;
1572 ls a.* conftest.* 2>/dev/null`; do
1573 case $ac_file in
1574 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1575 a.out ) # We found the default executable, but exeext='' is most
1576 # certainly right.
1577 break;;
1578 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1579 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1580 export ac_cv_exeext
1581 break;;
1582 * ) break;;
1583 esac
1584done
1585else
1586 echo "$as_me: failed program was:" >&5
1587cat conftest.$ac_ext >&5
1588{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1589echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1590 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001592
1593ac_exeext=$ac_cv_exeext
1594echo "$as_me:$LINENO: result: $ac_file" >&5
1595echo "${ECHO_T}$ac_file" >&6
1596
1597# Check the compiler produces executables we can run. If not, either
1598# the compiler is broken, or we cross compile.
1599echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1600echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1601# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1602# If not cross compiling, check that we can run a simple program.
1603if test "$cross_compiling" != yes; then
1604 if { ac_try='./$ac_file'
1605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1606 (eval $ac_try) 2>&5
1607 ac_status=$?
1608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1609 (exit $ac_status); }; }; then
1610 cross_compiling=no
1611 else
1612 if test "$cross_compiling" = maybe; then
1613 cross_compiling=yes
1614 else
1615 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1616If you meant to cross compile, use \`--host'." >&5
1617echo "$as_me: error: cannot run C++ compiled programs.
1618If you meant to cross compile, use \`--host'." >&2;}
1619 { (exit 1); exit 1; }; }
1620 fi
1621 fi
1622fi
1623echo "$as_me:$LINENO: result: yes" >&5
1624echo "${ECHO_T}yes" >&6
1625
1626rm -f a.out a.exe conftest$ac_cv_exeext
1627ac_clean_files=$ac_clean_files_save
1628# Check the compiler produces executables we can run. If not, either
1629# the compiler is broken, or we cross compile.
1630echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1631echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1632echo "$as_me:$LINENO: result: $cross_compiling" >&5
1633echo "${ECHO_T}$cross_compiling" >&6
1634
1635echo "$as_me:$LINENO: checking for suffix of executables" >&5
1636echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1638 (eval $ac_link) 2>&5
1639 ac_status=$?
1640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1641 (exit $ac_status); }; then
1642 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1643# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1644# work properly (i.e., refer to `conftest.exe'), while it won't with
1645# `rm'.
1646for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1647 case $ac_file in
1648 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1649 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1650 export ac_cv_exeext
1651 break;;
1652 * ) break;;
1653 esac
1654done
1655else
1656 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1657echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1658 { (exit 1); exit 1; }; }
1659fi
1660
1661rm -f conftest$ac_cv_exeext
1662echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1663echo "${ECHO_T}$ac_cv_exeext" >&6
1664
1665rm -f conftest.$ac_ext
1666EXEEXT=$ac_cv_exeext
1667ac_exeext=$EXEEXT
1668
1669 ac_ext=c
1670ac_cpp='$CPP $CPPFLAGS'
1671ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1672ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1673ac_compiler_gnu=$ac_cv_c_compiler_gnu
1674
1675
Martin v. Löwis22352952000-12-13 17:37:02 +00001676
1677 fi
1678fi
1679
Guido van Rossum8b131c51995-03-09 14:10:13 +00001680# If the user switches compilers, we can't believe the cache
1681if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1682then
Martin v. Löwis11437992002-04-12 09:54:03 +00001683 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1684(it is also a good idea to do 'make clean' before compiling)" >&5
1685echo "$as_me: error: cached CC is different -- throw away $cache_file
1686(it is also a good idea to do 'make clean' before compiling)" >&2;}
1687 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001688fi
1689
Martin v. Löwis11437992002-04-12 09:54:03 +00001690ac_ext=c
1691ac_cpp='$CPP $CPPFLAGS'
1692ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1693ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1694ac_compiler_gnu=$ac_cv_c_compiler_gnu
1695if test -n "$ac_tool_prefix"; then
1696 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1697set dummy ${ac_tool_prefix}gcc; ac_word=$2
1698echo "$as_me:$LINENO: checking for $ac_word" >&5
1699echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1700if test "${ac_cv_prog_CC+set}" = set; then
1701 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001702else
1703 if test -n "$CC"; then
1704 ac_cv_prog_CC="$CC" # Let the user override the test.
1705else
Martin v. Löwis11437992002-04-12 09:54:03 +00001706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1707for as_dir in $PATH
1708do
1709 IFS=$as_save_IFS
1710 test -z "$as_dir" && as_dir=.
1711 for ac_exec_ext in '' $ac_executable_extensions; do
1712 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1713 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1714 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1715 break 2
1716 fi
1717done
1718done
1719
Jack Jansendd19cf82001-12-06 22:36:17 +00001720fi
1721fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001722CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001723if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001724 echo "$as_me:$LINENO: result: $CC" >&5
1725echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001726else
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 echo "$as_me:$LINENO: result: no" >&5
1728echo "${ECHO_T}no" >&6
1729fi
1730
1731fi
1732if test -z "$ac_cv_prog_CC"; then
1733 ac_ct_CC=$CC
1734 # Extract the first word of "gcc", so it can be a program name with args.
1735set dummy gcc; ac_word=$2
1736echo "$as_me:$LINENO: checking for $ac_word" >&5
1737echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1738if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1739 echo $ECHO_N "(cached) $ECHO_C" >&6
1740else
1741 if test -n "$ac_ct_CC"; then
1742 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1743else
1744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1745for as_dir in $PATH
1746do
1747 IFS=$as_save_IFS
1748 test -z "$as_dir" && as_dir=.
1749 for ac_exec_ext in '' $ac_executable_extensions; do
1750 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1751 ac_cv_prog_ac_ct_CC="gcc"
1752 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1753 break 2
1754 fi
1755done
1756done
1757
1758fi
1759fi
1760ac_ct_CC=$ac_cv_prog_ac_ct_CC
1761if test -n "$ac_ct_CC"; then
1762 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1763echo "${ECHO_T}$ac_ct_CC" >&6
1764else
1765 echo "$as_me:$LINENO: result: no" >&5
1766echo "${ECHO_T}no" >&6
1767fi
1768
1769 CC=$ac_ct_CC
1770else
1771 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001772fi
1773
Jack Jansendd19cf82001-12-06 22:36:17 +00001774if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001775 if test -n "$ac_tool_prefix"; then
1776 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1777set dummy ${ac_tool_prefix}cc; ac_word=$2
1778echo "$as_me:$LINENO: checking for $ac_word" >&5
1779echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1780if test "${ac_cv_prog_CC+set}" = set; then
1781 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001782else
1783 if test -n "$CC"; then
1784 ac_cv_prog_CC="$CC" # Let the user override the test.
1785else
Martin v. Löwis11437992002-04-12 09:54:03 +00001786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1787for as_dir in $PATH
1788do
1789 IFS=$as_save_IFS
1790 test -z "$as_dir" && as_dir=.
1791 for ac_exec_ext in '' $ac_executable_extensions; do
1792 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1793 ac_cv_prog_CC="${ac_tool_prefix}cc"
1794 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1795 break 2
1796 fi
1797done
1798done
1799
1800fi
1801fi
1802CC=$ac_cv_prog_CC
1803if test -n "$CC"; then
1804 echo "$as_me:$LINENO: result: $CC" >&5
1805echo "${ECHO_T}$CC" >&6
1806else
1807 echo "$as_me:$LINENO: result: no" >&5
1808echo "${ECHO_T}no" >&6
1809fi
1810
1811fi
1812if test -z "$ac_cv_prog_CC"; then
1813 ac_ct_CC=$CC
1814 # Extract the first word of "cc", so it can be a program name with args.
1815set dummy cc; ac_word=$2
1816echo "$as_me:$LINENO: checking for $ac_word" >&5
1817echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1818if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1819 echo $ECHO_N "(cached) $ECHO_C" >&6
1820else
1821 if test -n "$ac_ct_CC"; then
1822 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1823else
1824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1825for as_dir in $PATH
1826do
1827 IFS=$as_save_IFS
1828 test -z "$as_dir" && as_dir=.
1829 for ac_exec_ext in '' $ac_executable_extensions; do
1830 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1831 ac_cv_prog_ac_ct_CC="cc"
1832 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1833 break 2
1834 fi
1835done
1836done
1837
1838fi
1839fi
1840ac_ct_CC=$ac_cv_prog_ac_ct_CC
1841if test -n "$ac_ct_CC"; then
1842 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1843echo "${ECHO_T}$ac_ct_CC" >&6
1844else
1845 echo "$as_me:$LINENO: result: no" >&5
1846echo "${ECHO_T}no" >&6
1847fi
1848
1849 CC=$ac_ct_CC
1850else
1851 CC="$ac_cv_prog_CC"
1852fi
1853
1854fi
1855if test -z "$CC"; then
1856 # Extract the first word of "cc", so it can be a program name with args.
1857set dummy cc; ac_word=$2
1858echo "$as_me:$LINENO: checking for $ac_word" >&5
1859echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1860if test "${ac_cv_prog_CC+set}" = set; then
1861 echo $ECHO_N "(cached) $ECHO_C" >&6
1862else
1863 if test -n "$CC"; then
1864 ac_cv_prog_CC="$CC" # Let the user override the test.
1865else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001866 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1868for as_dir in $PATH
1869do
1870 IFS=$as_save_IFS
1871 test -z "$as_dir" && as_dir=.
1872 for ac_exec_ext in '' $ac_executable_extensions; do
1873 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1874 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1875 ac_prog_rejected=yes
1876 continue
1877 fi
1878 ac_cv_prog_CC="cc"
1879 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1880 break 2
1881 fi
1882done
1883done
1884
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001885if test $ac_prog_rejected = yes; then
1886 # We found a bogon in the path, so make sure we never use it.
1887 set dummy $ac_cv_prog_CC
1888 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001889 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001890 # We chose a different compiler from the bogus one.
1891 # However, it has the same basename, so the bogon will be chosen
1892 # first if we set CC to just the basename; use the full file name.
1893 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001894 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001895 shift
1896 ac_cv_prog_CC="$@"
1897 fi
1898fi
1899fi
1900fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001901CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001902if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001903 echo "$as_me:$LINENO: result: $CC" >&5
1904echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001905else
Martin v. Löwis11437992002-04-12 09:54:03 +00001906 echo "$as_me:$LINENO: result: no" >&5
1907echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001908fi
1909
Martin v. Löwis11437992002-04-12 09:54:03 +00001910fi
1911if test -z "$CC"; then
1912 if test -n "$ac_tool_prefix"; then
1913 for ac_prog in cl
1914 do
1915 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1916set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1917echo "$as_me:$LINENO: checking for $ac_word" >&5
1918echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1919if test "${ac_cv_prog_CC+set}" = set; then
1920 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001921else
1922 if test -n "$CC"; then
1923 ac_cv_prog_CC="$CC" # Let the user override the test.
1924else
Martin v. Löwis11437992002-04-12 09:54:03 +00001925as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1926for as_dir in $PATH
1927do
1928 IFS=$as_save_IFS
1929 test -z "$as_dir" && as_dir=.
1930 for ac_exec_ext in '' $ac_executable_extensions; do
1931 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1932 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1933 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1934 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001935 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001936done
1937done
1938
1939fi
1940fi
1941CC=$ac_cv_prog_CC
1942if test -n "$CC"; then
1943 echo "$as_me:$LINENO: result: $CC" >&5
1944echo "${ECHO_T}$CC" >&6
1945else
1946 echo "$as_me:$LINENO: result: no" >&5
1947echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001948fi
1949
Martin v. Löwis11437992002-04-12 09:54:03 +00001950 test -n "$CC" && break
1951 done
1952fi
1953if test -z "$CC"; then
1954 ac_ct_CC=$CC
1955 for ac_prog in cl
1956do
1957 # Extract the first word of "$ac_prog", so it can be a program name with args.
1958set dummy $ac_prog; ac_word=$2
1959echo "$as_me:$LINENO: checking for $ac_word" >&5
1960echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1961if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1962 echo $ECHO_N "(cached) $ECHO_C" >&6
1963else
1964 if test -n "$ac_ct_CC"; then
1965 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1966else
1967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1968for as_dir in $PATH
1969do
1970 IFS=$as_save_IFS
1971 test -z "$as_dir" && as_dir=.
1972 for ac_exec_ext in '' $ac_executable_extensions; do
1973 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1974 ac_cv_prog_ac_ct_CC="$ac_prog"
1975 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1976 break 2
1977 fi
1978done
1979done
Jack Jansendd19cf82001-12-06 22:36:17 +00001980
Martin v. Löwis11437992002-04-12 09:54:03 +00001981fi
1982fi
1983ac_ct_CC=$ac_cv_prog_ac_ct_CC
1984if test -n "$ac_ct_CC"; then
1985 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1986echo "${ECHO_T}$ac_ct_CC" >&6
1987else
1988 echo "$as_me:$LINENO: result: no" >&5
1989echo "${ECHO_T}no" >&6
1990fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001991
Martin v. Löwis11437992002-04-12 09:54:03 +00001992 test -n "$ac_ct_CC" && break
1993done
Michael W. Hudson54241132001-12-07 15:38:26 +00001994
Martin v. Löwis11437992002-04-12 09:54:03 +00001995 CC=$ac_ct_CC
1996fi
1997
1998fi
1999
2000
2001test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2002echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2003 { (exit 1); exit 1; }; }
2004
2005# Provide some information about the compiler.
2006echo "$as_me:$LINENO:" \
2007 "checking for C compiler version" >&5
2008ac_compiler=`set X $ac_compile; echo $2`
2009{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2010 (eval $ac_compiler --version </dev/null >&5) 2>&5
2011 ac_status=$?
2012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2013 (exit $ac_status); }
2014{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2015 (eval $ac_compiler -v </dev/null >&5) 2>&5
2016 ac_status=$?
2017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2018 (exit $ac_status); }
2019{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2020 (eval $ac_compiler -V </dev/null >&5) 2>&5
2021 ac_status=$?
2022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2023 (exit $ac_status); }
2024
2025cat >conftest.$ac_ext <<_ACEOF
2026#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002027#include "confdefs.h"
2028
Martin v. Löwis11437992002-04-12 09:54:03 +00002029#ifdef F77_DUMMY_MAIN
2030# ifdef __cplusplus
2031 extern "C"
2032# endif
2033 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002035int
2036main ()
2037{
2038
2039 ;
2040 return 0;
2041}
2042_ACEOF
2043ac_clean_files_save=$ac_clean_files
2044ac_clean_files="$ac_clean_files a.out a.exe"
2045# Try to create an executable without -o first, disregard a.out.
2046# It will help us diagnose broken compilers, and finding out an intuition
2047# of exeext.
2048echo "$as_me:$LINENO: checking for C compiler default output" >&5
2049echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2050ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2051if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2052 (eval $ac_link_default) 2>&5
2053 ac_status=$?
2054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2055 (exit $ac_status); }; then
2056 # Find the output, starting from the most likely. This scheme is
2057# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2058# resort.
2059
2060# Be careful to initialize this variable, since it used to be cached.
2061# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2062ac_cv_exeext=
2063for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2064 ls a.out conftest 2>/dev/null;
2065 ls a.* conftest.* 2>/dev/null`; do
2066 case $ac_file in
2067 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2068 a.out ) # We found the default executable, but exeext='' is most
2069 # certainly right.
2070 break;;
2071 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2072 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2073 export ac_cv_exeext
2074 break;;
2075 * ) break;;
2076 esac
2077done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002078else
Martin v. Löwis11437992002-04-12 09:54:03 +00002079 echo "$as_me: failed program was:" >&5
2080cat conftest.$ac_ext >&5
2081{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2082echo "$as_me: error: C compiler cannot create executables" >&2;}
2083 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002084fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002085
Martin v. Löwis11437992002-04-12 09:54:03 +00002086ac_exeext=$ac_cv_exeext
2087echo "$as_me:$LINENO: result: $ac_file" >&5
2088echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002089
Martin v. Löwis11437992002-04-12 09:54:03 +00002090# Check the compiler produces executables we can run. If not, either
2091# the compiler is broken, or we cross compile.
2092echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2093echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2094# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2095# If not cross compiling, check that we can run a simple program.
2096if test "$cross_compiling" != yes; then
2097 if { ac_try='./$ac_file'
2098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2099 (eval $ac_try) 2>&5
2100 ac_status=$?
2101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2102 (exit $ac_status); }; }; then
2103 cross_compiling=no
2104 else
2105 if test "$cross_compiling" = maybe; then
2106 cross_compiling=yes
2107 else
2108 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2109If you meant to cross compile, use \`--host'." >&5
2110echo "$as_me: error: cannot run C compiled programs.
2111If you meant to cross compile, use \`--host'." >&2;}
2112 { (exit 1); exit 1; }; }
2113 fi
2114 fi
2115fi
2116echo "$as_me:$LINENO: result: yes" >&5
2117echo "${ECHO_T}yes" >&6
2118
2119rm -f a.out a.exe conftest$ac_cv_exeext
2120ac_clean_files=$ac_clean_files_save
2121# Check the compiler produces executables we can run. If not, either
2122# the compiler is broken, or we cross compile.
2123echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2124echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2125echo "$as_me:$LINENO: result: $cross_compiling" >&5
2126echo "${ECHO_T}$cross_compiling" >&6
2127
2128echo "$as_me:$LINENO: checking for suffix of executables" >&5
2129echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2131 (eval $ac_link) 2>&5
2132 ac_status=$?
2133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2134 (exit $ac_status); }; then
2135 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2136# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2137# work properly (i.e., refer to `conftest.exe'), while it won't with
2138# `rm'.
2139for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2140 case $ac_file in
2141 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2142 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2143 export ac_cv_exeext
2144 break;;
2145 * ) break;;
2146 esac
2147done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002148else
Martin v. Löwis11437992002-04-12 09:54:03 +00002149 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2150echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2151 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002152fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002153
Martin v. Löwis11437992002-04-12 09:54:03 +00002154rm -f conftest$ac_cv_exeext
2155echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2156echo "${ECHO_T}$ac_cv_exeext" >&6
2157
2158rm -f conftest.$ac_ext
2159EXEEXT=$ac_cv_exeext
2160ac_exeext=$EXEEXT
2161echo "$as_me:$LINENO: checking for suffix of object files" >&5
2162echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2163if test "${ac_cv_objext+set}" = set; then
2164 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002165else
Martin v. Löwis11437992002-04-12 09:54:03 +00002166 cat >conftest.$ac_ext <<_ACEOF
2167#line $LINENO "configure"
2168#include "confdefs.h"
2169
2170#ifdef F77_DUMMY_MAIN
2171# ifdef __cplusplus
2172 extern "C"
2173# endif
2174 int F77_DUMMY_MAIN() { return 1; }
2175#endif
2176int
2177main ()
2178{
2179
2180 ;
2181 return 0;
2182}
2183_ACEOF
2184rm -f conftest.o conftest.obj
2185if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2186 (eval $ac_compile) 2>&5
2187 ac_status=$?
2188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2189 (exit $ac_status); }; then
2190 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2191 case $ac_file in
2192 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2193 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2194 break;;
2195 esac
2196done
2197else
2198 echo "$as_me: failed program was:" >&5
2199cat conftest.$ac_ext >&5
2200{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2201echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2202 { (exit 1); exit 1; }; }
2203fi
2204
2205rm -f conftest.$ac_cv_objext conftest.$ac_ext
2206fi
2207echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2208echo "${ECHO_T}$ac_cv_objext" >&6
2209OBJEXT=$ac_cv_objext
2210ac_objext=$OBJEXT
2211echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2212echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2213if test "${ac_cv_c_compiler_gnu+set}" = set; then
2214 echo $ECHO_N "(cached) $ECHO_C" >&6
2215else
2216 cat >conftest.$ac_ext <<_ACEOF
2217#line $LINENO "configure"
2218#include "confdefs.h"
2219
2220#ifdef F77_DUMMY_MAIN
2221# ifdef __cplusplus
2222 extern "C"
2223# endif
2224 int F77_DUMMY_MAIN() { return 1; }
2225#endif
2226int
2227main ()
2228{
2229#ifndef __GNUC__
2230 choke me
2231#endif
2232
2233 ;
2234 return 0;
2235}
2236_ACEOF
2237rm -f conftest.$ac_objext
2238if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2239 (eval $ac_compile) 2>&5
2240 ac_status=$?
2241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2242 (exit $ac_status); } &&
2243 { ac_try='test -s conftest.$ac_objext'
2244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2245 (eval $ac_try) 2>&5
2246 ac_status=$?
2247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2248 (exit $ac_status); }; }; then
2249 ac_compiler_gnu=yes
2250else
2251 echo "$as_me: failed program was:" >&5
2252cat conftest.$ac_ext >&5
2253ac_compiler_gnu=no
2254fi
2255rm -f conftest.$ac_objext conftest.$ac_ext
2256ac_cv_c_compiler_gnu=$ac_compiler_gnu
2257
2258fi
2259echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2260echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2261GCC=`test $ac_compiler_gnu = yes && echo yes`
2262ac_test_CFLAGS=${CFLAGS+set}
2263ac_save_CFLAGS=$CFLAGS
2264CFLAGS="-g"
2265echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2266echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2267if test "${ac_cv_prog_cc_g+set}" = set; then
2268 echo $ECHO_N "(cached) $ECHO_C" >&6
2269else
2270 cat >conftest.$ac_ext <<_ACEOF
2271#line $LINENO "configure"
2272#include "confdefs.h"
2273
2274#ifdef F77_DUMMY_MAIN
2275# ifdef __cplusplus
2276 extern "C"
2277# endif
2278 int F77_DUMMY_MAIN() { return 1; }
2279#endif
2280int
2281main ()
2282{
2283
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288rm -f conftest.$ac_objext
2289if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2290 (eval $ac_compile) 2>&5
2291 ac_status=$?
2292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2293 (exit $ac_status); } &&
2294 { ac_try='test -s conftest.$ac_objext'
2295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2296 (eval $ac_try) 2>&5
2297 ac_status=$?
2298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2299 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002300 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002301else
Martin v. Löwis11437992002-04-12 09:54:03 +00002302 echo "$as_me: failed program was:" >&5
2303cat conftest.$ac_ext >&5
2304ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002305fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002306rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002307fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002308echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2309echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002310if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002311 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002312elif test $ac_cv_prog_cc_g = yes; then
2313 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002314 CFLAGS="-g -O2"
2315 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002316 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002317 fi
2318else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002319 if test "$GCC" = yes; then
2320 CFLAGS="-O2"
2321 else
2322 CFLAGS=
2323 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002324fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002325# Some people use a C++ compiler to compile C. Since we use `exit',
2326# in C++ we need to declare it. In case someone uses the same compiler
2327# for both compiling C and C++ we need to have the C++ compiler decide
2328# the declaration of exit, since it's the most demanding environment.
2329cat >conftest.$ac_ext <<_ACEOF
2330#ifndef __cplusplus
2331 choke me
2332#endif
2333_ACEOF
2334rm -f conftest.$ac_objext
2335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2336 (eval $ac_compile) 2>&5
2337 ac_status=$?
2338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2339 (exit $ac_status); } &&
2340 { ac_try='test -s conftest.$ac_objext'
2341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2342 (eval $ac_try) 2>&5
2343 ac_status=$?
2344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2345 (exit $ac_status); }; }; then
2346 for ac_declaration in \
2347 ''\
2348 '#include <stdlib.h>' \
2349 'extern "C" void std::exit (int) throw (); using std::exit;' \
2350 'extern "C" void std::exit (int); using std::exit;' \
2351 'extern "C" void exit (int) throw ();' \
2352 'extern "C" void exit (int);' \
2353 'void exit (int);'
2354do
2355 cat >conftest.$ac_ext <<_ACEOF
2356#line $LINENO "configure"
2357#include "confdefs.h"
2358#include <stdlib.h>
2359$ac_declaration
2360#ifdef F77_DUMMY_MAIN
2361# ifdef __cplusplus
2362 extern "C"
2363# endif
2364 int F77_DUMMY_MAIN() { return 1; }
2365#endif
2366int
2367main ()
2368{
2369exit (42);
2370 ;
2371 return 0;
2372}
2373_ACEOF
2374rm -f conftest.$ac_objext
2375if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2376 (eval $ac_compile) 2>&5
2377 ac_status=$?
2378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2379 (exit $ac_status); } &&
2380 { ac_try='test -s conftest.$ac_objext'
2381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2382 (eval $ac_try) 2>&5
2383 ac_status=$?
2384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2385 (exit $ac_status); }; }; then
2386 :
2387else
2388 echo "$as_me: failed program was:" >&5
2389cat conftest.$ac_ext >&5
2390continue
2391fi
2392rm -f conftest.$ac_objext conftest.$ac_ext
2393 cat >conftest.$ac_ext <<_ACEOF
2394#line $LINENO "configure"
2395#include "confdefs.h"
2396$ac_declaration
2397#ifdef F77_DUMMY_MAIN
2398# ifdef __cplusplus
2399 extern "C"
2400# endif
2401 int F77_DUMMY_MAIN() { return 1; }
2402#endif
2403int
2404main ()
2405{
2406exit (42);
2407 ;
2408 return 0;
2409}
2410_ACEOF
2411rm -f conftest.$ac_objext
2412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2413 (eval $ac_compile) 2>&5
2414 ac_status=$?
2415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2416 (exit $ac_status); } &&
2417 { ac_try='test -s conftest.$ac_objext'
2418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2419 (eval $ac_try) 2>&5
2420 ac_status=$?
2421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2422 (exit $ac_status); }; }; then
2423 break
2424else
2425 echo "$as_me: failed program was:" >&5
2426cat conftest.$ac_ext >&5
2427fi
2428rm -f conftest.$ac_objext conftest.$ac_ext
2429done
2430rm -f conftest*
2431if test -n "$ac_declaration"; then
2432 echo '#ifdef __cplusplus' >>confdefs.h
2433 echo $ac_declaration >>confdefs.h
2434 echo '#endif' >>confdefs.h
2435fi
2436
2437else
2438 echo "$as_me: failed program was:" >&5
2439cat conftest.$ac_ext >&5
2440fi
2441rm -f conftest.$ac_objext conftest.$ac_ext
2442ac_ext=c
2443ac_cpp='$CPP $CPPFLAGS'
2444ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2445ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2446ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002447
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002448
2449# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002450
2451ac_ext=c
2452ac_cpp='$CPP $CPPFLAGS'
2453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2455ac_compiler_gnu=$ac_cv_c_compiler_gnu
2456echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2457echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002458# On Suns, sometimes $CPP names a directory.
2459if test -n "$CPP" && test -d "$CPP"; then
2460 CPP=
2461fi
2462if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002463 if test "${ac_cv_prog_CPP+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002465else
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 # Double quotes because CPP needs to be expanded
2467 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2468 do
2469 ac_preproc_ok=false
2470for ac_c_preproc_warn_flag in '' yes
2471do
2472 # Use a header file that comes with gcc, so configuring glibc
2473 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002474 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 # not just through cpp. "Syntax error" is here to catch this case.
2476 cat >conftest.$ac_ext <<_ACEOF
2477#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002478#include "confdefs.h"
2479#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 Syntax error
2481_ACEOF
2482if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2483 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2484 ac_status=$?
2485 egrep -v '^ *\+' conftest.er1 >conftest.err
2486 rm -f conftest.er1
2487 cat conftest.err >&5
2488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2489 (exit $ac_status); } >/dev/null; then
2490 if test -s conftest.err; then
2491 ac_cpp_err=$ac_c_preproc_warn_flag
2492 else
2493 ac_cpp_err=
2494 fi
2495else
2496 ac_cpp_err=yes
2497fi
2498if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002499 :
2500else
Martin v. Löwis11437992002-04-12 09:54:03 +00002501 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002502 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 # Broken: fails on valid input.
2504continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002505fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002506rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002507
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 # OK, works on sane cases. Now check whether non-existent headers
2509 # can be detected and how.
2510 cat >conftest.$ac_ext <<_ACEOF
2511#line $LINENO "configure"
2512#include "confdefs.h"
2513#include <ac_nonexistent.h>
2514_ACEOF
2515if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2516 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2517 ac_status=$?
2518 egrep -v '^ *\+' conftest.er1 >conftest.err
2519 rm -f conftest.er1
2520 cat conftest.err >&5
2521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2522 (exit $ac_status); } >/dev/null; then
2523 if test -s conftest.err; then
2524 ac_cpp_err=$ac_c_preproc_warn_flag
2525 else
2526 ac_cpp_err=
2527 fi
2528else
2529 ac_cpp_err=yes
2530fi
2531if test -z "$ac_cpp_err"; then
2532 # Broken: success on invalid input.
2533continue
2534else
2535 echo "$as_me: failed program was:" >&5
2536 cat conftest.$ac_ext >&5
2537 # Passes both tests.
2538ac_preproc_ok=:
2539break
2540fi
2541rm -f conftest.err conftest.$ac_ext
2542
2543done
2544# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2545rm -f conftest.err conftest.$ac_ext
2546if $ac_preproc_ok; then
2547 break
2548fi
2549
2550 done
2551 ac_cv_prog_CPP=$CPP
2552
2553fi
2554 CPP=$ac_cv_prog_CPP
2555else
2556 ac_cv_prog_CPP=$CPP
2557fi
2558echo "$as_me:$LINENO: result: $CPP" >&5
2559echo "${ECHO_T}$CPP" >&6
2560ac_preproc_ok=false
2561for ac_c_preproc_warn_flag in '' yes
2562do
2563 # Use a header file that comes with gcc, so configuring glibc
2564 # with a fresh cross-compiler works.
2565 # On the NeXT, cc -E runs the code through the compiler's parser,
2566 # not just through cpp. "Syntax error" is here to catch this case.
2567 cat >conftest.$ac_ext <<_ACEOF
2568#line $LINENO "configure"
2569#include "confdefs.h"
2570#include <assert.h>
2571 Syntax error
2572_ACEOF
2573if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2574 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2575 ac_status=$?
2576 egrep -v '^ *\+' conftest.er1 >conftest.err
2577 rm -f conftest.er1
2578 cat conftest.err >&5
2579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2580 (exit $ac_status); } >/dev/null; then
2581 if test -s conftest.err; then
2582 ac_cpp_err=$ac_c_preproc_warn_flag
2583 else
2584 ac_cpp_err=
2585 fi
2586else
2587 ac_cpp_err=yes
2588fi
2589if test -z "$ac_cpp_err"; then
2590 :
2591else
2592 echo "$as_me: failed program was:" >&5
2593 cat conftest.$ac_ext >&5
2594 # Broken: fails on valid input.
2595continue
2596fi
2597rm -f conftest.err conftest.$ac_ext
2598
2599 # OK, works on sane cases. Now check whether non-existent headers
2600 # can be detected and how.
2601 cat >conftest.$ac_ext <<_ACEOF
2602#line $LINENO "configure"
2603#include "confdefs.h"
2604#include <ac_nonexistent.h>
2605_ACEOF
2606if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2607 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2608 ac_status=$?
2609 egrep -v '^ *\+' conftest.er1 >conftest.err
2610 rm -f conftest.er1
2611 cat conftest.err >&5
2612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2613 (exit $ac_status); } >/dev/null; then
2614 if test -s conftest.err; then
2615 ac_cpp_err=$ac_c_preproc_warn_flag
2616 else
2617 ac_cpp_err=
2618 fi
2619else
2620 ac_cpp_err=yes
2621fi
2622if test -z "$ac_cpp_err"; then
2623 # Broken: success on invalid input.
2624continue
2625else
2626 echo "$as_me: failed program was:" >&5
2627 cat conftest.$ac_ext >&5
2628 # Passes both tests.
2629ac_preproc_ok=:
2630break
2631fi
2632rm -f conftest.err conftest.$ac_ext
2633
2634done
2635# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2636rm -f conftest.err conftest.$ac_ext
2637if $ac_preproc_ok; then
2638 :
2639else
2640 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2641echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2642 { (exit 1); exit 1; }; }
2643fi
2644
2645ac_ext=c
2646ac_cpp='$CPP $CPPFLAGS'
2647ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2648ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2649ac_compiler_gnu=$ac_cv_c_compiler_gnu
2650
2651
2652
2653echo "$as_me:$LINENO: checking for AIX" >&5
2654echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2655cat >conftest.$ac_ext <<_ACEOF
2656#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002657#include "confdefs.h"
2658#ifdef _AIX
2659 yes
2660#endif
2661
Martin v. Löwis11437992002-04-12 09:54:03 +00002662_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002663if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2664 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 echo "$as_me:$LINENO: result: yes" >&5
2666echo "${ECHO_T}yes" >&6
2667cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002668#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002669_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002670
2671else
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 echo "$as_me:$LINENO: result: no" >&5
2673echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002674fi
2675rm -f conftest*
2676
Michael W. Hudson54241132001-12-07 15:38:26 +00002677
Martin v. Löwis11437992002-04-12 09:54:03 +00002678echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2679echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2680if test "${ac_cv_header_stdc+set}" = set; then
2681 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002682else
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 cat >conftest.$ac_ext <<_ACEOF
2684#line $LINENO "configure"
2685#include "confdefs.h"
2686#include <stdlib.h>
2687#include <stdarg.h>
2688#include <string.h>
2689#include <float.h>
2690
2691_ACEOF
2692if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2693 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2694 ac_status=$?
2695 egrep -v '^ *\+' conftest.er1 >conftest.err
2696 rm -f conftest.er1
2697 cat conftest.err >&5
2698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2699 (exit $ac_status); } >/dev/null; then
2700 if test -s conftest.err; then
2701 ac_cpp_err=$ac_c_preproc_warn_flag
2702 else
2703 ac_cpp_err=
2704 fi
2705else
2706 ac_cpp_err=yes
2707fi
2708if test -z "$ac_cpp_err"; then
2709 ac_cv_header_stdc=yes
2710else
2711 echo "$as_me: failed program was:" >&5
2712 cat conftest.$ac_ext >&5
2713 ac_cv_header_stdc=no
2714fi
2715rm -f conftest.err conftest.$ac_ext
2716
2717if test $ac_cv_header_stdc = yes; then
2718 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2719 cat >conftest.$ac_ext <<_ACEOF
2720#line $LINENO "configure"
2721#include "confdefs.h"
2722#include <string.h>
2723
2724_ACEOF
2725if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2726 egrep "memchr" >/dev/null 2>&1; then
2727 :
2728else
2729 ac_cv_header_stdc=no
2730fi
2731rm -f conftest*
2732
2733fi
2734
2735if test $ac_cv_header_stdc = yes; then
2736 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2737 cat >conftest.$ac_ext <<_ACEOF
2738#line $LINENO "configure"
2739#include "confdefs.h"
2740#include <stdlib.h>
2741
2742_ACEOF
2743if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2744 egrep "free" >/dev/null 2>&1; then
2745 :
2746else
2747 ac_cv_header_stdc=no
2748fi
2749rm -f conftest*
2750
2751fi
2752
2753if test $ac_cv_header_stdc = yes; then
2754 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2755 if test "$cross_compiling" = yes; then
2756 :
2757else
2758 cat >conftest.$ac_ext <<_ACEOF
2759#line $LINENO "configure"
2760#include "confdefs.h"
2761#include <ctype.h>
2762#if ((' ' & 0x0FF) == 0x020)
2763# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2764# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2765#else
2766# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2767 || ('j' <= (c) && (c) <= 'r') \
2768 || ('s' <= (c) && (c) <= 'z'))
2769# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2770#endif
2771
2772#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2773int
2774main ()
2775{
2776 int i;
2777 for (i = 0; i < 256; i++)
2778 if (XOR (islower (i), ISLOWER (i))
2779 || toupper (i) != TOUPPER (i))
2780 exit(2);
2781 exit (0);
2782}
2783_ACEOF
2784rm -f conftest$ac_exeext
2785if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2786 (eval $ac_link) 2>&5
2787 ac_status=$?
2788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2789 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2791 (eval $ac_try) 2>&5
2792 ac_status=$?
2793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2794 (exit $ac_status); }; }; then
2795 :
2796else
2797 echo "$as_me: program exited with status $ac_status" >&5
2798echo "$as_me: failed program was:" >&5
2799cat conftest.$ac_ext >&5
2800( exit $ac_status )
2801ac_cv_header_stdc=no
2802fi
2803rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2804fi
2805fi
2806fi
2807echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2808echo "${ECHO_T}$ac_cv_header_stdc" >&6
2809if test $ac_cv_header_stdc = yes; then
2810
2811cat >>confdefs.h <<\_ACEOF
2812#define STDC_HEADERS 1
2813_ACEOF
2814
2815fi
2816
2817# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2828 inttypes.h stdint.h unistd.h
2829do
2830as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2831echo "$as_me:$LINENO: checking for $ac_header" >&5
2832echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2833if eval "test \"\${$as_ac_Header+set}\" = set"; then
2834 echo $ECHO_N "(cached) $ECHO_C" >&6
2835else
2836 cat >conftest.$ac_ext <<_ACEOF
2837#line $LINENO "configure"
2838#include "confdefs.h"
2839$ac_includes_default
2840
2841#include <$ac_header>
2842_ACEOF
2843rm -f conftest.$ac_objext
2844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2845 (eval $ac_compile) 2>&5
2846 ac_status=$?
2847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2848 (exit $ac_status); } &&
2849 { ac_try='test -s conftest.$ac_objext'
2850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2851 (eval $ac_try) 2>&5
2852 ac_status=$?
2853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2854 (exit $ac_status); }; }; then
2855 eval "$as_ac_Header=yes"
2856else
2857 echo "$as_me: failed program was:" >&5
2858cat conftest.$ac_ext >&5
2859eval "$as_ac_Header=no"
2860fi
2861rm -f conftest.$ac_objext conftest.$ac_ext
2862fi
2863echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2864echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2865if test `eval echo '${'$as_ac_Header'}'` = yes; then
2866 cat >>confdefs.h <<_ACEOF
2867#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2868_ACEOF
2869
2870fi
2871
2872done
2873
2874
2875if test "${ac_cv_header_minix_config_h+set}" = set; then
2876 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2877echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2878if test "${ac_cv_header_minix_config_h+set}" = set; then
2879 echo $ECHO_N "(cached) $ECHO_C" >&6
2880fi
2881echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2882echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2883else
2884 # Is the header compilable?
2885echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2886echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2887cat >conftest.$ac_ext <<_ACEOF
2888#line $LINENO "configure"
2889#include "confdefs.h"
2890$ac_includes_default
2891#include <minix/config.h>
2892_ACEOF
2893rm -f conftest.$ac_objext
2894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2895 (eval $ac_compile) 2>&5
2896 ac_status=$?
2897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2898 (exit $ac_status); } &&
2899 { ac_try='test -s conftest.$ac_objext'
2900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2901 (eval $ac_try) 2>&5
2902 ac_status=$?
2903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2904 (exit $ac_status); }; }; then
2905 ac_header_compiler=yes
2906else
2907 echo "$as_me: failed program was:" >&5
2908cat conftest.$ac_ext >&5
2909ac_header_compiler=no
2910fi
2911rm -f conftest.$ac_objext conftest.$ac_ext
2912echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2913echo "${ECHO_T}$ac_header_compiler" >&6
2914
2915# Is the header present?
2916echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2917echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2918cat >conftest.$ac_ext <<_ACEOF
2919#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002920#include "confdefs.h"
2921#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002922_ACEOF
2923if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2924 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2925 ac_status=$?
2926 egrep -v '^ *\+' conftest.er1 >conftest.err
2927 rm -f conftest.er1
2928 cat conftest.err >&5
2929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2930 (exit $ac_status); } >/dev/null; then
2931 if test -s conftest.err; then
2932 ac_cpp_err=$ac_c_preproc_warn_flag
2933 else
2934 ac_cpp_err=
2935 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002936else
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 ac_cpp_err=yes
2938fi
2939if test -z "$ac_cpp_err"; then
2940 ac_header_preproc=yes
2941else
2942 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002943 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002944 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002945fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002946rm -f conftest.err conftest.$ac_ext
2947echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2948echo "${ECHO_T}$ac_header_preproc" >&6
2949
2950# So? What about this header?
2951case $ac_header_compiler:$ac_header_preproc in
2952 yes:no )
2953 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2954echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2955 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2956echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2957 no:yes )
2958 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2959echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2960 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2961echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2962 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2963echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2964esac
2965echo "$as_me:$LINENO: checking for minix/config.h" >&5
2966echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2967if test "${ac_cv_header_minix_config_h+set}" = set; then
2968 echo $ECHO_N "(cached) $ECHO_C" >&6
2969else
2970 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002971fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002972echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2973echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2974
2975fi
2976if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002977 MINIX=yes
2978else
Martin v. Löwis11437992002-04-12 09:54:03 +00002979 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002980fi
2981
Martin v. Löwis11437992002-04-12 09:54:03 +00002982
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002983if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002984
2985cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002986#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002987_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002988
Martin v. Löwis11437992002-04-12 09:54:03 +00002989
2990cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002991#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002992_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002993
Martin v. Löwis11437992002-04-12 09:54:03 +00002994
2995cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002996#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002997_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002998
2999fi
3000
3001
Michael W. Hudson54241132001-12-07 15:38:26 +00003002
Martin v. Löwis11437992002-04-12 09:54:03 +00003003echo "$as_me:$LINENO: checking for --with-suffix" >&5
3004echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003005
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003006# Check whether --with-suffix or --without-suffix was given.
3007if test "${with_suffix+set}" = set; then
3008 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003009
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003010 case $withval in
3011 no) EXEEXT=;;
3012 yes) EXEEXT=.exe;;
3013 *) EXEEXT=$withval;;
3014 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003015fi;
3016echo "$as_me:$LINENO: result: $EXEEXT" >&5
3017echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003018
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003019# Test whether we're running on a non-case-sensitive system, in which
3020# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003021
Martin v. Löwis11437992002-04-12 09:54:03 +00003022echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3023echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003024if test ! -d CaseSensitiveTestDir; then
3025mkdir CaseSensitiveTestDir
3026fi
3027
3028if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003029then
Martin v. Löwis11437992002-04-12 09:54:03 +00003030 echo "$as_me:$LINENO: result: yes" >&5
3031echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003032 BUILDEXEEXT=.exe
3033else
Martin v. Löwis11437992002-04-12 09:54:03 +00003034 echo "$as_me:$LINENO: result: no" >&5
3035echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003036 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003037fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003038rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003039
Guido van Rossumdd997f71998-10-07 19:58:26 +00003040case $MACHDEP in
3041bsdos*)
3042 case $CC in
3043 gcc) CC="$CC -D_HAVE_BSDI";;
3044 esac;;
3045esac
3046
Guido van Rossum24b1e751997-08-21 02:29:16 +00003047case $ac_sys_system in
3048hp*|HP*)
3049 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003050 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003051 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003052Monterey*)
3053 case $CC in
3054 cc) CC="$CC -Wl,-Bexport";;
3055 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003056SunOS*)
3057 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003058
3059cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003060#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003061_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003062
3063 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003064esac
3065
Michael W. Hudson54241132001-12-07 15:38:26 +00003066
3067
Martin v. Löwis11437992002-04-12 09:54:03 +00003068echo "$as_me:$LINENO: checking LIBRARY" >&5
3069echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003070if test -z "$LIBRARY"
3071then
3072 LIBRARY='libpython$(VERSION).a'
3073fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003074echo "$as_me:$LINENO: result: $LIBRARY" >&5
3075echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003076
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003077# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003078# name of the library into which to insert object files). BLDLIBRARY is also
3079# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3080# is blank as the main program is not linked directly against LDLIBRARY.
3081# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3082# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3083# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3084# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003085#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003086# RUNSHARED is used to run shared python without installed libraries
3087#
3088# INSTSONAME is the name of the shared library that will be use to install
3089# on the system - some systems like version suffix, others don't
3090
3091
Michael W. Hudson54241132001-12-07 15:38:26 +00003092
3093
3094
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003095
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003096LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003097BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003098INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003099DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003100LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003101RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003102
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003103# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003104# If CXX is set, and if it is needed to link a main function that was
3105# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3106# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003107# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003108# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003109
Martin v. Löwis11437992002-04-12 09:54:03 +00003110echo "$as_me:$LINENO: checking LINKCC" >&5
3111echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003112if test -z "$LINKCC"
3113then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003114 if test -z "$CXX"; then
3115 LINKCC="\$(PURIFY) \$(CC)"
3116 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003117 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003118 $CXX -c conftest.$ac_ext 2>&5
3119 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3120 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3121 then
3122 LINKCC="\$(PURIFY) \$(CC)"
3123 else
3124 LINKCC="\$(PURIFY) \$(CXX)"
3125 fi
3126 rm -fr conftest*
3127 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003128 case $ac_sys_system in
3129 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003130 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003131 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003132 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003133 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003134 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003135 esac
3136fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003137echo "$as_me:$LINENO: result: $LINKCC" >&5
3138echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003139
Martin v. Löwis11437992002-04-12 09:54:03 +00003140echo "$as_me:$LINENO: checking for --enable-shared" >&5
3141echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003142# Check whether --enable-shared or --disable-shared was given.
3143if test "${enable_shared+set}" = set; then
3144 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003145
Martin v. Löwis11437992002-04-12 09:54:03 +00003146fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003147
3148if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003149then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003150 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003151 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003152 enable_shared="yes";;
3153 *)
3154 enable_shared="no";;
3155 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003156fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003157echo "$as_me:$LINENO: result: $enable_shared" >&5
3158echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003159
3160
Martin v. Löwis11437992002-04-12 09:54:03 +00003161echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3162echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003163
Guido van Rossumb8552162001-09-05 14:58:11 +00003164# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3165# library that we build, but we do not want to link against it (we
3166# will find it with a -framework option). For this reason there is an
3167# extra variable BLDLIBRARY against which Python and the extension
3168# modules are linked, BLDLIBRARY. This is normally the same as
3169# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003170if test "$enable_framework"
3171then
3172 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3173 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3174 BLDLIBRARY=''
3175else
3176 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003177fi
Jack Jansene578a632001-08-15 01:27:14 +00003178
Martin v. Löwis1142de32002-03-29 16:28:31 +00003179# Other platforms follow
3180if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003181
3182cat >>confdefs.h <<\_ACEOF
3183#define Py_ENABLE_SHARED 1
3184_ACEOF
3185
Martin v. Löwis1142de32002-03-29 16:28:31 +00003186 case $ac_sys_system in
3187 BeOS*)
3188 LDLIBRARY='libpython$(VERSION).so'
3189 ;;
3190 CYGWIN*)
3191 LDLIBRARY='libpython$(VERSION).dll.a'
3192 DLLLIBRARY='libpython$(VERSION).dll'
3193 ;;
3194 SunOS*)
3195 LDLIBRARY='libpython$(VERSION).so'
3196 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3197 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3198 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003199 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003200 LDLIBRARY='libpython$(VERSION).so'
3201 BLDLIBRARY='-L. -lpython$(VERSION)'
3202 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3203 INSTSONAME="$LDLIBRARY".$SOVERSION
3204 ;;
3205 hp*|HP*)
3206 LDLIBRARY='libpython$(VERSION).sl'
3207 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3208 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3209 ;;
3210 OSF*)
3211 LDLIBRARY='libpython$(VERSION).so'
3212 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3213 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3214 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003215 atheos*)
3216 LDLIBRARY='libpython$(VERSION).so'
3217 BLDLIBRARY='-L. -lpython$(VERSION)'
3218 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3219 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003220 esac
3221 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3222 case $MACHDEP in
3223 dguxR4)
3224 LDLIBRARY='libpython$(VERSION).so'
3225 OPT="$OPT -pic"
3226 ;;
3227 esac
3228fi
3229
Martin v. Löwis11437992002-04-12 09:54:03 +00003230echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3231echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003232
Martin v. Löwis11437992002-04-12 09:54:03 +00003233if test -n "$ac_tool_prefix"; then
3234 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3235set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3236echo "$as_me:$LINENO: checking for $ac_word" >&5
3237echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3238if test "${ac_cv_prog_RANLIB+set}" = set; then
3239 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003240else
3241 if test -n "$RANLIB"; then
3242 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3243else
Martin v. Löwis11437992002-04-12 09:54:03 +00003244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3245for as_dir in $PATH
3246do
3247 IFS=$as_save_IFS
3248 test -z "$as_dir" && as_dir=.
3249 for ac_exec_ext in '' $ac_executable_extensions; do
3250 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3251 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3252 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3253 break 2
3254 fi
3255done
3256done
3257
Guido van Rossum627b2d71993-12-24 10:39:16 +00003258fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003259fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003260RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003261if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003262 echo "$as_me:$LINENO: result: $RANLIB" >&5
3263echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003264else
Martin v. Löwis11437992002-04-12 09:54:03 +00003265 echo "$as_me:$LINENO: result: no" >&5
3266echo "${ECHO_T}no" >&6
3267fi
3268
3269fi
3270if test -z "$ac_cv_prog_RANLIB"; then
3271 ac_ct_RANLIB=$RANLIB
3272 # Extract the first word of "ranlib", so it can be a program name with args.
3273set dummy ranlib; ac_word=$2
3274echo "$as_me:$LINENO: checking for $ac_word" >&5
3275echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3276if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3277 echo $ECHO_N "(cached) $ECHO_C" >&6
3278else
3279 if test -n "$ac_ct_RANLIB"; then
3280 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3281else
3282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3283for as_dir in $PATH
3284do
3285 IFS=$as_save_IFS
3286 test -z "$as_dir" && as_dir=.
3287 for ac_exec_ext in '' $ac_executable_extensions; do
3288 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3289 ac_cv_prog_ac_ct_RANLIB="ranlib"
3290 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3291 break 2
3292 fi
3293done
3294done
3295
3296 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3297fi
3298fi
3299ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3300if test -n "$ac_ct_RANLIB"; then
3301 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3302echo "${ECHO_T}$ac_ct_RANLIB" >&6
3303else
3304 echo "$as_me:$LINENO: result: no" >&5
3305echo "${ECHO_T}no" >&6
3306fi
3307
3308 RANLIB=$ac_ct_RANLIB
3309else
3310 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003311fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003312
3313
Guido van Rossum7f43da71994-08-01 12:15:30 +00003314for ac_prog in ar aal
3315do
Martin v. Löwis11437992002-04-12 09:54:03 +00003316 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003317set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003318echo "$as_me:$LINENO: checking for $ac_word" >&5
3319echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3320if test "${ac_cv_prog_AR+set}" = set; then
3321 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003322else
3323 if test -n "$AR"; then
3324 ac_cv_prog_AR="$AR" # Let the user override the test.
3325else
Martin v. Löwis11437992002-04-12 09:54:03 +00003326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3327for as_dir in $PATH
3328do
3329 IFS=$as_save_IFS
3330 test -z "$as_dir" && as_dir=.
3331 for ac_exec_ext in '' $ac_executable_extensions; do
3332 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3333 ac_cv_prog_AR="$ac_prog"
3334 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3335 break 2
3336 fi
3337done
3338done
3339
Guido van Rossum7f43da71994-08-01 12:15:30 +00003340fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003341fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003342AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003343if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003344 echo "$as_me:$LINENO: result: $AR" >&5
3345echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003346else
Martin v. Löwis11437992002-04-12 09:54:03 +00003347 echo "$as_me:$LINENO: result: no" >&5
3348echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003349fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003350
Martin v. Löwis11437992002-04-12 09:54:03 +00003351 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003352done
3353test -n "$AR" || AR="ar"
3354
Michael W. Hudson54241132001-12-07 15:38:26 +00003355
Neil Schemenauera42c8272001-03-31 00:01:55 +00003356case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003357bsdos*|hp*|HP*)
3358 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003359 if test -z "$INSTALL"
3360 then
3361 INSTALL="${srcdir}/install-sh -c"
3362 fi
3363esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003364ac_aux_dir=
3365for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3366 if test -f $ac_dir/install-sh; then
3367 ac_aux_dir=$ac_dir
3368 ac_install_sh="$ac_aux_dir/install-sh -c"
3369 break
3370 elif test -f $ac_dir/install.sh; then
3371 ac_aux_dir=$ac_dir
3372 ac_install_sh="$ac_aux_dir/install.sh -c"
3373 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003374 elif test -f $ac_dir/shtool; then
3375 ac_aux_dir=$ac_dir
3376 ac_install_sh="$ac_aux_dir/shtool install -c"
3377 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003378 fi
3379done
3380if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003381 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3382echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3383 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003384fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003385ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3386ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3387ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003388
3389# Find a good install program. We prefer a C program (faster),
3390# so one script is as good as another. But avoid the broken or
3391# incompatible versions:
3392# SysV /etc/install, /usr/sbin/install
3393# SunOS /usr/etc/install
3394# IRIX /sbin/install
3395# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003396# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003397# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3398# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3399# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3400# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003401echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3402echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003403if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003404if test "${ac_cv_path_install+set}" = set; then
3405 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003406else
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3408for as_dir in $PATH
3409do
3410 IFS=$as_save_IFS
3411 test -z "$as_dir" && as_dir=.
3412 # Account for people who put trailing slashes in PATH elements.
3413case $as_dir/ in
3414 ./ | .// | /cC/* | \
3415 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3416 /usr/ucb/* ) ;;
3417 *)
3418 # OSF1 and SCO ODT 3.0 have their own names for install.
3419 # Don't use installbsd from OSF since it installs stuff as root
3420 # by default.
3421 for ac_prog in ginstall scoinst install; do
3422 for ac_exec_ext in '' $ac_executable_extensions; do
3423 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3424 if test $ac_prog = install &&
3425 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3426 # AIX install. It has an incompatible calling convention.
3427 :
3428 elif test $ac_prog = install &&
3429 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3430 # program-specific install script used by HP pwplus--don't use.
3431 :
3432 else
3433 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3434 break 3
3435 fi
3436 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003437 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003438 done
3439 ;;
3440esac
3441done
3442
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003443
3444fi
3445 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003446 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003447 else
3448 # As a last resort, use the slow shell script. We don't cache a
3449 # path for INSTALL within a source directory, because that will
3450 # break other packages using the cache if that directory is
3451 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003452 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003453 fi
3454fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003455echo "$as_me:$LINENO: result: $INSTALL" >&5
3456echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003457
3458# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3459# It thinks the first close brace ends the variable substitution.
3460test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3461
Martin v. Löwis11437992002-04-12 09:54:03 +00003462test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003463
3464test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3465
Michael W. Hudson54241132001-12-07 15:38:26 +00003466
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003467# Not every filesystem supports hard links
3468
3469if test -z "$LN" ; then
3470 case $ac_sys_system in
3471 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003472 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003473 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003474 *) LN=ln;;
3475 esac
3476fi
3477
Fred Drake109d9862001-07-11 06:27:56 +00003478# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003479echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3480echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3481
Fred Drake109d9862001-07-11 06:27:56 +00003482# Check whether --with-pydebug or --without-pydebug was given.
3483if test "${with_pydebug+set}" = set; then
3484 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003485
Fred Drake109d9862001-07-11 06:27:56 +00003486if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003487then
3488
3489cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003490#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003491_ACEOF
3492
3493 echo "$as_me:$LINENO: result: yes" >&5
3494echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003495 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003496else echo "$as_me:$LINENO: result: no" >&5
3497echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003498fi
3499else
Martin v. Löwis11437992002-04-12 09:54:03 +00003500 echo "$as_me:$LINENO: result: no" >&5
3501echo "${ECHO_T}no" >&6
3502fi;
Fred Drake109d9862001-07-11 06:27:56 +00003503
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003504# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003505
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003506if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003507then
Neal Norwitzd957f392002-09-25 21:26:19 +00003508 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003509 yes)
3510 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003511 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003512 if test "$Py_DEBUG" = 'true' ; then
3513 # Optimization messes up debuggers, so turn it off for
3514 # debug builds.
3515 OPT="-g -Wall -Wstrict-prototypes"
3516 else
3517 OPT="-g -O3 -Wall -Wstrict-prototypes"
3518 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003519 *)
Fred Drake109d9862001-07-11 06:27:56 +00003520 OPT="-O3 -Wall -Wstrict-prototypes";;
3521 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003522 case $ac_sys_system in
3523 SCO_SV*) OPT="$OPT -m486 -DSCO5";;
3524 esac
Fred Drake109d9862001-07-11 06:27:56 +00003525 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003526 *)
3527 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003528 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003529 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003530 SCO_SV*)
3531 CFLAGS="$CFLAGS -belf"
3532 OPT="-belf -O -Ki486 -DSCO5";;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003533 *)
3534 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003535 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003536 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003537 case $ac_sys_system in
3538 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003539 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003540 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003541fi
3542
Fred Drakee1ceaa02001-12-04 20:55:47 +00003543if test "$Py_DEBUG" = 'true'; then
3544 :
3545else
3546 OPT="-DNDEBUG $OPT"
3547fi
3548
Trent Mick635f6fb2000-08-23 21:33:05 +00003549# The current (beta) Monterey compiler dies with optimizations
3550case $ac_sys_system in
3551Monterey*) OPT="";;
3552esac
3553
Guido van Rossum563e7081996-09-10 18:20:48 +00003554if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003555then
3556 OPT="$OPT $ac_arch_flags"
3557fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003558
Martin v. Löwis11437992002-04-12 09:54:03 +00003559echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3560echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3561if test "${ac_cv_opt_olimit_ok+set}" = set; then
3562 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003563else
3564 ac_save_cc="$CC"
3565CC="$CC -OPT:Olimit=0"
3566if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003567 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003568else
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 cat >conftest.$ac_ext <<_ACEOF
3570#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003571#include "confdefs.h"
3572int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003573_ACEOF
3574rm -f conftest$ac_exeext
3575if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3576 (eval $ac_link) 2>&5
3577 ac_status=$?
3578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3579 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3581 (eval $ac_try) 2>&5
3582 ac_status=$?
3583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3584 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003585 ac_cv_opt_olimit_ok=yes
3586else
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 echo "$as_me: program exited with status $ac_status" >&5
3588echo "$as_me: failed program was:" >&5
3589cat conftest.$ac_ext >&5
3590( exit $ac_status )
3591ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003592fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003593rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003594fi
Guido van Rossum91922671997-10-09 20:24:13 +00003595CC="$ac_save_cc"
3596fi
3597
Martin v. Löwis11437992002-04-12 09:54:03 +00003598echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3599echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003600if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003601 case $ac_sys_system in
3602 Darwin*) OPT="$OPT" ;;
3603 *) OPT="$OPT -OPT:Olimit=0";;
3604 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003605else
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3607echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3608 if test "${ac_cv_olimit_ok+set}" = set; then
3609 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003610else
3611 ac_save_cc="$CC"
3612 CC="$CC -Olimit 1500"
3613 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003614 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003615else
Martin v. Löwis11437992002-04-12 09:54:03 +00003616 cat >conftest.$ac_ext <<_ACEOF
3617#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003618#include "confdefs.h"
3619int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003620_ACEOF
3621rm -f conftest$ac_exeext
3622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3623 (eval $ac_link) 2>&5
3624 ac_status=$?
3625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3626 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3628 (eval $ac_try) 2>&5
3629 ac_status=$?
3630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3631 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003632 ac_cv_olimit_ok=yes
3633else
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 echo "$as_me: program exited with status $ac_status" >&5
3635echo "$as_me: failed program was:" >&5
3636cat conftest.$ac_ext >&5
3637( exit $ac_status )
3638ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003639fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003640rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003641fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003642 CC="$ac_save_cc"
3643fi
3644
Martin v. Löwis11437992002-04-12 09:54:03 +00003645 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3646echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003647 if test $ac_cv_olimit_ok = yes; then
3648 OPT="$OPT -Olimit 1500"
3649 fi
3650fi
3651
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003652# On some compilers, pthreads are available without further options
3653# (e.g. MacOS X). On some of these systems, the compiler will not
3654# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3655# So we have to see first whether pthreads are available without
3656# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003657echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3658echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3659if test "${ac_cv_pthread_is_default+set}" = set; then
3660 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003661else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003662 if test "$cross_compiling" = yes; then
3663 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003664else
Martin v. Löwis11437992002-04-12 09:54:03 +00003665 cat >conftest.$ac_ext <<_ACEOF
3666#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003667#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003668
Martin v. Löwis130fb172001-07-19 11:00:41 +00003669#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003670
3671void* routine(void* p){return NULL;}
3672
3673int main(){
3674 pthread_t p;
3675 if(pthread_create(&p,NULL,routine,NULL)!=0)
3676 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003677 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003678 return 0;
3679}
3680
Martin v. Löwis11437992002-04-12 09:54:03 +00003681_ACEOF
3682rm -f conftest$ac_exeext
3683if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3684 (eval $ac_link) 2>&5
3685 ac_status=$?
3686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3687 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3689 (eval $ac_try) 2>&5
3690 ac_status=$?
3691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3692 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003693 ac_cv_pthread_is_default=yes
3694else
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 echo "$as_me: program exited with status $ac_status" >&5
3696echo "$as_me: failed program was:" >&5
3697cat conftest.$ac_ext >&5
3698( exit $ac_status )
3699ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003700fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003701rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003702fi
3703
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003704fi
3705
Martin v. Löwis11437992002-04-12 09:54:03 +00003706echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3707echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003708
Michael W. Hudson54241132001-12-07 15:38:26 +00003709
Martin v. Löwis11437992002-04-12 09:54:03 +00003710if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003711then
3712 ac_cv_kpthread=no
3713else
3714# -Kpthread, if available, provides the right #defines
3715# and linker options to make pthread_create available
3716# Some compilers won't report that they do not support -Kpthread,
3717# so we need to run a program to see whether it really made the
3718# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003719echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3720echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3721if test "${ac_cv_kpthread+set}" = set; then
3722 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003723else
3724 ac_save_cc="$CC"
3725CC="$CC -Kpthread"
3726if test "$cross_compiling" = yes; then
3727 ac_cv_kpthread=no
3728else
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 cat >conftest.$ac_ext <<_ACEOF
3730#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003731#include "confdefs.h"
3732
3733#include <pthread.h>
3734
3735void* routine(void* p){return NULL;}
3736
3737int main(){
3738 pthread_t p;
3739 if(pthread_create(&p,NULL,routine,NULL)!=0)
3740 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003741 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003742 return 0;
3743}
3744
Martin v. Löwis11437992002-04-12 09:54:03 +00003745_ACEOF
3746rm -f conftest$ac_exeext
3747if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3748 (eval $ac_link) 2>&5
3749 ac_status=$?
3750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3751 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3753 (eval $ac_try) 2>&5
3754 ac_status=$?
3755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3756 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003757 ac_cv_kpthread=yes
3758else
Martin v. Löwis11437992002-04-12 09:54:03 +00003759 echo "$as_me: program exited with status $ac_status" >&5
3760echo "$as_me: failed program was:" >&5
3761cat conftest.$ac_ext >&5
3762( exit $ac_status )
3763ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003764fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003765rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003766fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003767CC="$ac_save_cc"
3768fi
3769
Martin v. Löwis11437992002-04-12 09:54:03 +00003770echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3771echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003772fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003773
Michael W. Hudson54241132001-12-07 15:38:26 +00003774
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003775# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003776echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3777echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3778if test "${ac_cv_header_stdc+set}" = set; then
3779 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003780else
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 cat >conftest.$ac_ext <<_ACEOF
3782#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003783#include "confdefs.h"
3784#include <stdlib.h>
3785#include <stdarg.h>
3786#include <string.h>
3787#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003788
3789_ACEOF
3790if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3791 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3792 ac_status=$?
3793 egrep -v '^ *\+' conftest.er1 >conftest.err
3794 rm -f conftest.er1
3795 cat conftest.err >&5
3796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3797 (exit $ac_status); } >/dev/null; then
3798 if test -s conftest.err; then
3799 ac_cpp_err=$ac_c_preproc_warn_flag
3800 else
3801 ac_cpp_err=
3802 fi
3803else
3804 ac_cpp_err=yes
3805fi
3806if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003807 ac_cv_header_stdc=yes
3808else
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003810 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003811 ac_cv_header_stdc=no
3812fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003813rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003814
3815if test $ac_cv_header_stdc = yes; then
3816 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003817 cat >conftest.$ac_ext <<_ACEOF
3818#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003819#include "confdefs.h"
3820#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003821
3822_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3824 egrep "memchr" >/dev/null 2>&1; then
3825 :
3826else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003827 ac_cv_header_stdc=no
3828fi
3829rm -f conftest*
3830
3831fi
3832
3833if test $ac_cv_header_stdc = yes; then
3834 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 cat >conftest.$ac_ext <<_ACEOF
3836#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003837#include "confdefs.h"
3838#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003839
3840_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3842 egrep "free" >/dev/null 2>&1; then
3843 :
3844else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003845 ac_cv_header_stdc=no
3846fi
3847rm -f conftest*
3848
3849fi
3850
3851if test $ac_cv_header_stdc = yes; then
3852 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003853 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003854 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003855else
Martin v. Löwis11437992002-04-12 09:54:03 +00003856 cat >conftest.$ac_ext <<_ACEOF
3857#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003858#include "confdefs.h"
3859#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003860#if ((' ' & 0x0FF) == 0x020)
3861# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3862# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3863#else
3864# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3865 || ('j' <= (c) && (c) <= 'r') \
3866 || ('s' <= (c) && (c) <= 'z'))
3867# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3868#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3871int
3872main ()
3873{
3874 int i;
3875 for (i = 0; i < 256; i++)
3876 if (XOR (islower (i), ISLOWER (i))
3877 || toupper (i) != TOUPPER (i))
3878 exit(2);
3879 exit (0);
3880}
3881_ACEOF
3882rm -f conftest$ac_exeext
3883if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3884 (eval $ac_link) 2>&5
3885 ac_status=$?
3886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3887 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3889 (eval $ac_try) 2>&5
3890 ac_status=$?
3891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3892 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003893 :
3894else
Martin v. Löwis11437992002-04-12 09:54:03 +00003895 echo "$as_me: program exited with status $ac_status" >&5
3896echo "$as_me: failed program was:" >&5
3897cat conftest.$ac_ext >&5
3898( exit $ac_status )
3899ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003900fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003901rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003902fi
3903fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003904fi
3905echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3906echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003907if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003908
3909cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003910#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003911_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003912
3913fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003914
Martin v. Löwis11437992002-04-12 09:54:03 +00003915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
Martin v. Löwis11437992002-04-12 09:54:03 +00003952for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003953libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003954signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003955sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003956sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00003957sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003958sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003959do
Martin v. Löwis11437992002-04-12 09:54:03 +00003960as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3961if eval "test \"\${$as_ac_Header+set}\" = set"; then
3962 echo "$as_me:$LINENO: checking for $ac_header" >&5
3963echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3964if eval "test \"\${$as_ac_Header+set}\" = set"; then
3965 echo $ECHO_N "(cached) $ECHO_C" >&6
3966fi
3967echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3968echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003969else
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 # Is the header compilable?
3971echo "$as_me:$LINENO: checking $ac_header usability" >&5
3972echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3973cat >conftest.$ac_ext <<_ACEOF
3974#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003975#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003976$ac_includes_default
3977#include <$ac_header>
3978_ACEOF
3979rm -f conftest.$ac_objext
3980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3981 (eval $ac_compile) 2>&5
3982 ac_status=$?
3983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3984 (exit $ac_status); } &&
3985 { ac_try='test -s conftest.$ac_objext'
3986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3987 (eval $ac_try) 2>&5
3988 ac_status=$?
3989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3990 (exit $ac_status); }; }; then
3991 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003992else
Martin v. Löwis11437992002-04-12 09:54:03 +00003993 echo "$as_me: failed program was:" >&5
3994cat conftest.$ac_ext >&5
3995ac_header_compiler=no
3996fi
3997rm -f conftest.$ac_objext conftest.$ac_ext
3998echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3999echo "${ECHO_T}$ac_header_compiler" >&6
4000
4001# Is the header present?
4002echo "$as_me:$LINENO: checking $ac_header presence" >&5
4003echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4004cat >conftest.$ac_ext <<_ACEOF
4005#line $LINENO "configure"
4006#include "confdefs.h"
4007#include <$ac_header>
4008_ACEOF
4009if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4010 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4011 ac_status=$?
4012 egrep -v '^ *\+' conftest.er1 >conftest.err
4013 rm -f conftest.er1
4014 cat conftest.err >&5
4015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4016 (exit $ac_status); } >/dev/null; then
4017 if test -s conftest.err; then
4018 ac_cpp_err=$ac_c_preproc_warn_flag
4019 else
4020 ac_cpp_err=
4021 fi
4022else
4023 ac_cpp_err=yes
4024fi
4025if test -z "$ac_cpp_err"; then
4026 ac_header_preproc=yes
4027else
4028 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004029 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004030 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004031fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004032rm -f conftest.err conftest.$ac_ext
4033echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4034echo "${ECHO_T}$ac_header_preproc" >&6
4035
4036# So? What about this header?
4037case $ac_header_compiler:$ac_header_preproc in
4038 yes:no )
4039 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4040echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4041 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4042echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4043 no:yes )
4044 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4045echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4046 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4047echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4048 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4049echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4050esac
4051echo "$as_me:$LINENO: checking for $ac_header" >&5
4052echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4053if eval "test \"\${$as_ac_Header+set}\" = set"; then
4054 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004055else
Martin v. Löwis11437992002-04-12 09:54:03 +00004056 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004057fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004058echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4059echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4060
4061fi
4062if test `eval echo '${'$as_ac_Header'}'` = yes; then
4063 cat >>confdefs.h <<_ACEOF
4064#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4065_ACEOF
4066
4067fi
4068
Guido van Rossum627b2d71993-12-24 10:39:16 +00004069done
4070
Martin v. Löwis11437992002-04-12 09:54:03 +00004071
4072
4073
4074
4075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004076ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004077for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4078 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4079echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4080echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4081if eval "test \"\${$as_ac_Header+set}\" = set"; then
4082 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004083else
Martin v. Löwis11437992002-04-12 09:54:03 +00004084 cat >conftest.$ac_ext <<_ACEOF
4085#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004086#include "confdefs.h"
4087#include <sys/types.h>
4088#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004089
4090#ifdef F77_DUMMY_MAIN
4091# ifdef __cplusplus
4092 extern "C"
4093# endif
4094 int F77_DUMMY_MAIN() { return 1; }
4095#endif
4096int
4097main ()
4098{
4099if ((DIR *) 0)
4100return 0;
4101 ;
4102 return 0;
4103}
4104_ACEOF
4105rm -f conftest.$ac_objext
4106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4107 (eval $ac_compile) 2>&5
4108 ac_status=$?
4109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4110 (exit $ac_status); } &&
4111 { ac_try='test -s conftest.$ac_objext'
4112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4113 (eval $ac_try) 2>&5
4114 ac_status=$?
4115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4116 (exit $ac_status); }; }; then
4117 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004118else
Martin v. Löwis11437992002-04-12 09:54:03 +00004119 echo "$as_me: failed program was:" >&5
4120cat conftest.$ac_ext >&5
4121eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004122fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004123rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004124fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004125echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4126echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4127if test `eval echo '${'$as_ac_Header'}'` = yes; then
4128 cat >>confdefs.h <<_ACEOF
4129#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4130_ACEOF
4131
4132ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004133fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004134
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004135done
4136# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4137if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004138 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4139echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4140if test "${ac_cv_search_opendir+set}" = set; then
4141 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004142else
Martin v. Löwis11437992002-04-12 09:54:03 +00004143 ac_func_search_save_LIBS=$LIBS
4144ac_cv_search_opendir=no
4145cat >conftest.$ac_ext <<_ACEOF
4146#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004147#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004148
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004149/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004150#ifdef __cplusplus
4151extern "C"
4152#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004153/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004154 builtin and then its argument prototype would still apply. */
4155char opendir ();
4156#ifdef F77_DUMMY_MAIN
4157# ifdef __cplusplus
4158 extern "C"
4159# endif
4160 int F77_DUMMY_MAIN() { return 1; }
4161#endif
4162int
4163main ()
4164{
4165opendir ();
4166 ;
4167 return 0;
4168}
4169_ACEOF
4170rm -f conftest.$ac_objext conftest$ac_exeext
4171if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4172 (eval $ac_link) 2>&5
4173 ac_status=$?
4174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4175 (exit $ac_status); } &&
4176 { ac_try='test -s conftest$ac_exeext'
4177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4178 (eval $ac_try) 2>&5
4179 ac_status=$?
4180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4181 (exit $ac_status); }; }; then
4182 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183else
Martin v. Löwis11437992002-04-12 09:54:03 +00004184 echo "$as_me: failed program was:" >&5
4185cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004186fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004187rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4188if test "$ac_cv_search_opendir" = no; then
4189 for ac_lib in dir; do
4190 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4191 cat >conftest.$ac_ext <<_ACEOF
4192#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004193#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004194
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004195/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004196#ifdef __cplusplus
4197extern "C"
4198#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004199/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004200 builtin and then its argument prototype would still apply. */
4201char opendir ();
4202#ifdef F77_DUMMY_MAIN
4203# ifdef __cplusplus
4204 extern "C"
4205# endif
4206 int F77_DUMMY_MAIN() { return 1; }
4207#endif
4208int
4209main ()
4210{
4211opendir ();
4212 ;
4213 return 0;
4214}
4215_ACEOF
4216rm -f conftest.$ac_objext conftest$ac_exeext
4217if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4218 (eval $ac_link) 2>&5
4219 ac_status=$?
4220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4221 (exit $ac_status); } &&
4222 { ac_try='test -s conftest$ac_exeext'
4223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4224 (eval $ac_try) 2>&5
4225 ac_status=$?
4226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4227 (exit $ac_status); }; }; then
4228 ac_cv_search_opendir="-l$ac_lib"
4229break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004230else
Martin v. Löwis11437992002-04-12 09:54:03 +00004231 echo "$as_me: failed program was:" >&5
4232cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004233fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004234rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4235 done
4236fi
4237LIBS=$ac_func_search_save_LIBS
4238fi
4239echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4240echo "${ECHO_T}$ac_cv_search_opendir" >&6
4241if test "$ac_cv_search_opendir" != no; then
4242 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004243
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004245
Michael W. Hudson54241132001-12-07 15:38:26 +00004246else
Martin v. Löwis11437992002-04-12 09:54:03 +00004247 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4248echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4249if test "${ac_cv_search_opendir+set}" = set; then
4250 echo $ECHO_N "(cached) $ECHO_C" >&6
4251else
4252 ac_func_search_save_LIBS=$LIBS
4253ac_cv_search_opendir=no
4254cat >conftest.$ac_ext <<_ACEOF
4255#line $LINENO "configure"
4256#include "confdefs.h"
4257
4258/* Override any gcc2 internal prototype to avoid an error. */
4259#ifdef __cplusplus
4260extern "C"
4261#endif
4262/* We use char because int might match the return type of a gcc2
4263 builtin and then its argument prototype would still apply. */
4264char opendir ();
4265#ifdef F77_DUMMY_MAIN
4266# ifdef __cplusplus
4267 extern "C"
4268# endif
4269 int F77_DUMMY_MAIN() { return 1; }
4270#endif
4271int
4272main ()
4273{
4274opendir ();
4275 ;
4276 return 0;
4277}
4278_ACEOF
4279rm -f conftest.$ac_objext conftest$ac_exeext
4280if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4281 (eval $ac_link) 2>&5
4282 ac_status=$?
4283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4284 (exit $ac_status); } &&
4285 { ac_try='test -s conftest$ac_exeext'
4286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4287 (eval $ac_try) 2>&5
4288 ac_status=$?
4289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4290 (exit $ac_status); }; }; then
4291 ac_cv_search_opendir="none required"
4292else
4293 echo "$as_me: failed program was:" >&5
4294cat conftest.$ac_ext >&5
4295fi
4296rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4297if test "$ac_cv_search_opendir" = no; then
4298 for ac_lib in x; do
4299 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4300 cat >conftest.$ac_ext <<_ACEOF
4301#line $LINENO "configure"
4302#include "confdefs.h"
4303
4304/* Override any gcc2 internal prototype to avoid an error. */
4305#ifdef __cplusplus
4306extern "C"
4307#endif
4308/* We use char because int might match the return type of a gcc2
4309 builtin and then its argument prototype would still apply. */
4310char opendir ();
4311#ifdef F77_DUMMY_MAIN
4312# ifdef __cplusplus
4313 extern "C"
4314# endif
4315 int F77_DUMMY_MAIN() { return 1; }
4316#endif
4317int
4318main ()
4319{
4320opendir ();
4321 ;
4322 return 0;
4323}
4324_ACEOF
4325rm -f conftest.$ac_objext conftest$ac_exeext
4326if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4327 (eval $ac_link) 2>&5
4328 ac_status=$?
4329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4330 (exit $ac_status); } &&
4331 { ac_try='test -s conftest$ac_exeext'
4332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4333 (eval $ac_try) 2>&5
4334 ac_status=$?
4335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4336 (exit $ac_status); }; }; then
4337 ac_cv_search_opendir="-l$ac_lib"
4338break
4339else
4340 echo "$as_me: failed program was:" >&5
4341cat conftest.$ac_ext >&5
4342fi
4343rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4344 done
4345fi
4346LIBS=$ac_func_search_save_LIBS
4347fi
4348echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4349echo "${ECHO_T}$ac_cv_search_opendir" >&6
4350if test "$ac_cv_search_opendir" != no; then
4351 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4352
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004353fi
4354
4355fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004356
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004357echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4358echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4359if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4360 echo $ECHO_N "(cached) $ECHO_C" >&6
4361else
4362 cat >conftest.$ac_ext <<_ACEOF
4363#line $LINENO "configure"
4364#include "confdefs.h"
4365#include <sys/types.h>
4366#ifdef F77_DUMMY_MAIN
4367# ifdef __cplusplus
4368 extern "C"
4369# endif
4370 int F77_DUMMY_MAIN() { return 1; }
4371#endif
4372int
4373main ()
4374{
4375return makedev(0, 0);
4376 ;
4377 return 0;
4378}
4379_ACEOF
4380rm -f conftest.$ac_objext conftest$ac_exeext
4381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4382 (eval $ac_link) 2>&5
4383 ac_status=$?
4384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4385 (exit $ac_status); } &&
4386 { ac_try='test -s conftest$ac_exeext'
4387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4388 (eval $ac_try) 2>&5
4389 ac_status=$?
4390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4391 (exit $ac_status); }; }; then
4392 ac_cv_header_sys_types_h_makedev=yes
4393else
4394 echo "$as_me: failed program was:" >&5
4395cat conftest.$ac_ext >&5
4396ac_cv_header_sys_types_h_makedev=no
4397fi
4398rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4399
4400fi
4401echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4402echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4403
4404if test $ac_cv_header_sys_types_h_makedev = no; then
4405if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4406 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4407echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4408if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4409 echo $ECHO_N "(cached) $ECHO_C" >&6
4410fi
4411echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4412echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4413else
4414 # Is the header compilable?
4415echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4416echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4417cat >conftest.$ac_ext <<_ACEOF
4418#line $LINENO "configure"
4419#include "confdefs.h"
4420$ac_includes_default
4421#include <sys/mkdev.h>
4422_ACEOF
4423rm -f conftest.$ac_objext
4424if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4425 (eval $ac_compile) 2>&5
4426 ac_status=$?
4427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4428 (exit $ac_status); } &&
4429 { ac_try='test -s conftest.$ac_objext'
4430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4431 (eval $ac_try) 2>&5
4432 ac_status=$?
4433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4434 (exit $ac_status); }; }; then
4435 ac_header_compiler=yes
4436else
4437 echo "$as_me: failed program was:" >&5
4438cat conftest.$ac_ext >&5
4439ac_header_compiler=no
4440fi
4441rm -f conftest.$ac_objext conftest.$ac_ext
4442echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4443echo "${ECHO_T}$ac_header_compiler" >&6
4444
4445# Is the header present?
4446echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4447echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4448cat >conftest.$ac_ext <<_ACEOF
4449#line $LINENO "configure"
4450#include "confdefs.h"
4451#include <sys/mkdev.h>
4452_ACEOF
4453if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4454 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4455 ac_status=$?
4456 egrep -v '^ *\+' conftest.er1 >conftest.err
4457 rm -f conftest.er1
4458 cat conftest.err >&5
4459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4460 (exit $ac_status); } >/dev/null; then
4461 if test -s conftest.err; then
4462 ac_cpp_err=$ac_c_preproc_warn_flag
4463 else
4464 ac_cpp_err=
4465 fi
4466else
4467 ac_cpp_err=yes
4468fi
4469if test -z "$ac_cpp_err"; then
4470 ac_header_preproc=yes
4471else
4472 echo "$as_me: failed program was:" >&5
4473 cat conftest.$ac_ext >&5
4474 ac_header_preproc=no
4475fi
4476rm -f conftest.err conftest.$ac_ext
4477echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4478echo "${ECHO_T}$ac_header_preproc" >&6
4479
4480# So? What about this header?
4481case $ac_header_compiler:$ac_header_preproc in
4482 yes:no )
4483 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4484echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4485 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4486echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4487 no:yes )
4488 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4489echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4490 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4491echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4492 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4493echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4494esac
4495echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4496echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4497if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4498 echo $ECHO_N "(cached) $ECHO_C" >&6
4499else
4500 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4501fi
4502echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4503echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4504
4505fi
4506if test $ac_cv_header_sys_mkdev_h = yes; then
4507
4508cat >>confdefs.h <<\_ACEOF
4509#define MAJOR_IN_MKDEV 1
4510_ACEOF
4511
4512fi
4513
4514
4515
4516 if test $ac_cv_header_sys_mkdev_h = no; then
4517 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4518 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4519echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4520if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4521 echo $ECHO_N "(cached) $ECHO_C" >&6
4522fi
4523echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4524echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4525else
4526 # Is the header compilable?
4527echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4528echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4529cat >conftest.$ac_ext <<_ACEOF
4530#line $LINENO "configure"
4531#include "confdefs.h"
4532$ac_includes_default
4533#include <sys/sysmacros.h>
4534_ACEOF
4535rm -f conftest.$ac_objext
4536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4537 (eval $ac_compile) 2>&5
4538 ac_status=$?
4539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4540 (exit $ac_status); } &&
4541 { ac_try='test -s conftest.$ac_objext'
4542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4543 (eval $ac_try) 2>&5
4544 ac_status=$?
4545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4546 (exit $ac_status); }; }; then
4547 ac_header_compiler=yes
4548else
4549 echo "$as_me: failed program was:" >&5
4550cat conftest.$ac_ext >&5
4551ac_header_compiler=no
4552fi
4553rm -f conftest.$ac_objext conftest.$ac_ext
4554echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4555echo "${ECHO_T}$ac_header_compiler" >&6
4556
4557# Is the header present?
4558echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4559echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4560cat >conftest.$ac_ext <<_ACEOF
4561#line $LINENO "configure"
4562#include "confdefs.h"
4563#include <sys/sysmacros.h>
4564_ACEOF
4565if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4566 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4567 ac_status=$?
4568 egrep -v '^ *\+' conftest.er1 >conftest.err
4569 rm -f conftest.er1
4570 cat conftest.err >&5
4571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4572 (exit $ac_status); } >/dev/null; then
4573 if test -s conftest.err; then
4574 ac_cpp_err=$ac_c_preproc_warn_flag
4575 else
4576 ac_cpp_err=
4577 fi
4578else
4579 ac_cpp_err=yes
4580fi
4581if test -z "$ac_cpp_err"; then
4582 ac_header_preproc=yes
4583else
4584 echo "$as_me: failed program was:" >&5
4585 cat conftest.$ac_ext >&5
4586 ac_header_preproc=no
4587fi
4588rm -f conftest.err conftest.$ac_ext
4589echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4590echo "${ECHO_T}$ac_header_preproc" >&6
4591
4592# So? What about this header?
4593case $ac_header_compiler:$ac_header_preproc in
4594 yes:no )
4595 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4596echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4597 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4598echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4599 no:yes )
4600 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4601echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4602 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4603echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4604 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4605echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4606esac
4607echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4608echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4609if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4610 echo $ECHO_N "(cached) $ECHO_C" >&6
4611else
4612 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4613fi
4614echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4615echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4616
4617fi
4618if test $ac_cv_header_sys_sysmacros_h = yes; then
4619
4620cat >>confdefs.h <<\_ACEOF
4621#define MAJOR_IN_SYSMACROS 1
4622_ACEOF
4623
4624fi
4625
4626
4627 fi
4628fi
4629
Michael W. Hudson54241132001-12-07 15:38:26 +00004630
Guido van Rossum627b2d71993-12-24 10:39:16 +00004631# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004632was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004633echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4634echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4635cat >conftest.$ac_ext <<_ACEOF
4636#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004637#include "confdefs.h"
4638#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004639
4640_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4642 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004643 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004644else
Martin v. Löwis11437992002-04-12 09:54:03 +00004645
4646
4647cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004648#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004649_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004650
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004651
Guido van Rossum627b2d71993-12-24 10:39:16 +00004652fi
4653rm -f conftest*
4654
Martin v. Löwis11437992002-04-12 09:54:03 +00004655echo "$as_me:$LINENO: result: $was_it_defined" >&5
4656echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004657
Neal Norwitz11690112002-07-30 01:08:28 +00004658# Check whether using makedev requires defining _OSF_SOURCE
4659echo "$as_me:$LINENO: checking for makedev" >&5
4660echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4661cat >conftest.$ac_ext <<_ACEOF
4662#line $LINENO "configure"
4663#include "confdefs.h"
4664 #include <sys/types.h>
4665#ifdef F77_DUMMY_MAIN
4666# ifdef __cplusplus
4667 extern "C"
4668# endif
4669 int F77_DUMMY_MAIN() { return 1; }
4670#endif
4671int
4672main ()
4673{
4674 makedev(0, 0)
4675 ;
4676 return 0;
4677}
4678_ACEOF
4679rm -f conftest.$ac_objext conftest$ac_exeext
4680if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4681 (eval $ac_link) 2>&5
4682 ac_status=$?
4683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4684 (exit $ac_status); } &&
4685 { ac_try='test -s conftest$ac_exeext'
4686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4687 (eval $ac_try) 2>&5
4688 ac_status=$?
4689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4690 (exit $ac_status); }; }; then
4691 ac_cv_has_makedev=yes
4692else
4693 echo "$as_me: failed program was:" >&5
4694cat conftest.$ac_ext >&5
4695ac_cv_has_makedev=no
4696fi
4697rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4698if test "$ac_cv_has_makedev" = "no"; then
4699 # we didn't link, try if _OSF_SOURCE will allow us to link
4700 cat >conftest.$ac_ext <<_ACEOF
4701#line $LINENO "configure"
4702#include "confdefs.h"
4703
4704 #define _OSF_SOURCE 1
4705 #include <sys/types.h>
4706
4707#ifdef F77_DUMMY_MAIN
4708# ifdef __cplusplus
4709 extern "C"
4710# endif
4711 int F77_DUMMY_MAIN() { return 1; }
4712#endif
4713int
4714main ()
4715{
4716 makedev(0, 0)
4717 ;
4718 return 0;
4719}
4720_ACEOF
4721rm -f conftest.$ac_objext conftest$ac_exeext
4722if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4723 (eval $ac_link) 2>&5
4724 ac_status=$?
4725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4726 (exit $ac_status); } &&
4727 { ac_try='test -s conftest$ac_exeext'
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_cv_has_makedev=yes
4734else
4735 echo "$as_me: failed program was:" >&5
4736cat conftest.$ac_ext >&5
4737ac_cv_has_makedev=no
4738fi
4739rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4740 if test "$ac_cv_has_makedev" = "yes"; then
4741
4742cat >>confdefs.h <<\_ACEOF
4743#define _OSF_SOURCE 1
4744_ACEOF
4745
4746 fi
4747fi
4748echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4749echo "${ECHO_T}$ac_cv_has_makedev" >&6
4750if test "$ac_cv_has_makedev" = "yes"; then
4751
4752cat >>confdefs.h <<\_ACEOF
4753#define HAVE_MAKEDEV 1
4754_ACEOF
4755
4756fi
4757
Martin v. Löwis399a6892002-10-04 10:22:02 +00004758# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4759# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4760# defined, but the compiler does not support pragma redefine_extname,
4761# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4762# structures (such as rlimit64) without declaring them. As a
4763# work-around, disable LFS on such configurations
4764
4765use_lfs=yes
4766echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4767echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4768cat >conftest.$ac_ext <<_ACEOF
4769#line $LINENO "configure"
4770#include "confdefs.h"
4771
4772#define _LARGEFILE_SOURCE 1
4773#define _FILE_OFFSET_BITS 64
4774#include <sys/resource.h>
4775
4776#ifdef F77_DUMMY_MAIN
4777# ifdef __cplusplus
4778 extern "C"
4779# endif
4780 int F77_DUMMY_MAIN() { return 1; }
4781#endif
4782int
4783main ()
4784{
4785struct rlimit foo;
4786 ;
4787 return 0;
4788}
4789_ACEOF
4790rm -f conftest.$ac_objext
4791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4792 (eval $ac_compile) 2>&5
4793 ac_status=$?
4794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4795 (exit $ac_status); } &&
4796 { ac_try='test -s conftest.$ac_objext'
4797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4798 (eval $ac_try) 2>&5
4799 ac_status=$?
4800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4801 (exit $ac_status); }; }; then
4802 sol_lfs_bug=no
4803else
4804 echo "$as_me: failed program was:" >&5
4805cat conftest.$ac_ext >&5
4806sol_lfs_bug=yes
4807fi
4808rm -f conftest.$ac_objext conftest.$ac_ext
4809echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4810echo "${ECHO_T}$sol_lfs_bug" >&6
4811if test "$sol_lfs_bug" = "yes"; then
4812 use_lfs=no
4813fi
4814
4815if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004816# Two defines needed to enable largefile support on various platforms
4817# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004818
Martin v. Löwis11437992002-04-12 09:54:03 +00004819cat >>confdefs.h <<\_ACEOF
4820#define _LARGEFILE_SOURCE 1
4821_ACEOF
4822
4823
4824cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004825#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004826_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004827
Martin v. Löwis399a6892002-10-04 10:22:02 +00004828fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004829
Guido van Rossum84e7b241996-08-19 21:59:00 +00004830# Add some code to confdefs.h so that the test for off_t works on SCO
4831cat >> confdefs.h <<\EOF
4832#if defined(SCO_DS)
4833#undef _OFF_T
4834#endif
4835EOF
4836
Guido van Rossumef2255b2000-03-10 22:30:29 +00004837# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004838echo "$as_me:$LINENO: checking for mode_t" >&5
4839echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4840if test "${ac_cv_type_mode_t+set}" = set; then
4841 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004842else
Martin v. Löwis11437992002-04-12 09:54:03 +00004843 cat >conftest.$ac_ext <<_ACEOF
4844#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004845#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004846$ac_includes_default
4847#ifdef F77_DUMMY_MAIN
4848# ifdef __cplusplus
4849 extern "C"
4850# endif
4851 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004853int
4854main ()
4855{
4856if ((mode_t *) 0)
4857 return 0;
4858if (sizeof (mode_t))
4859 return 0;
4860 ;
4861 return 0;
4862}
4863_ACEOF
4864rm -f conftest.$ac_objext
4865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4866 (eval $ac_compile) 2>&5
4867 ac_status=$?
4868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4869 (exit $ac_status); } &&
4870 { ac_try='test -s conftest.$ac_objext'
4871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4872 (eval $ac_try) 2>&5
4873 ac_status=$?
4874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4875 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004876 ac_cv_type_mode_t=yes
4877else
Martin v. Löwis11437992002-04-12 09:54:03 +00004878 echo "$as_me: failed program was:" >&5
4879cat conftest.$ac_ext >&5
4880ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004881fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004882rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004883fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004884echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4885echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4886if test $ac_cv_type_mode_t = yes; then
4887 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004888else
Martin v. Löwis11437992002-04-12 09:54:03 +00004889
4890cat >>confdefs.h <<_ACEOF
4891#define mode_t int
4892_ACEOF
4893
4894fi
4895
4896echo "$as_me:$LINENO: checking for off_t" >&5
4897echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4898if test "${ac_cv_type_off_t+set}" = set; then
4899 echo $ECHO_N "(cached) $ECHO_C" >&6
4900else
4901 cat >conftest.$ac_ext <<_ACEOF
4902#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004903#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004904$ac_includes_default
4905#ifdef F77_DUMMY_MAIN
4906# ifdef __cplusplus
4907 extern "C"
4908# endif
4909 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004911int
4912main ()
4913{
4914if ((off_t *) 0)
4915 return 0;
4916if (sizeof (off_t))
4917 return 0;
4918 ;
4919 return 0;
4920}
4921_ACEOF
4922rm -f conftest.$ac_objext
4923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4924 (eval $ac_compile) 2>&5
4925 ac_status=$?
4926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4927 (exit $ac_status); } &&
4928 { ac_try='test -s conftest.$ac_objext'
4929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4930 (eval $ac_try) 2>&5
4931 ac_status=$?
4932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4933 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004934 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004935else
Martin v. Löwis11437992002-04-12 09:54:03 +00004936 echo "$as_me: failed program was:" >&5
4937cat conftest.$ac_ext >&5
4938ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004939fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004940rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004941fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004942echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4943echo "${ECHO_T}$ac_cv_type_off_t" >&6
4944if test $ac_cv_type_off_t = yes; then
4945 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004946else
Martin v. Löwis11437992002-04-12 09:54:03 +00004947
4948cat >>confdefs.h <<_ACEOF
4949#define off_t long
4950_ACEOF
4951
4952fi
4953
4954echo "$as_me:$LINENO: checking for pid_t" >&5
4955echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4956if test "${ac_cv_type_pid_t+set}" = set; then
4957 echo $ECHO_N "(cached) $ECHO_C" >&6
4958else
4959 cat >conftest.$ac_ext <<_ACEOF
4960#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004961#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004962$ac_includes_default
4963#ifdef F77_DUMMY_MAIN
4964# ifdef __cplusplus
4965 extern "C"
4966# endif
4967 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004968#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004969int
4970main ()
4971{
4972if ((pid_t *) 0)
4973 return 0;
4974if (sizeof (pid_t))
4975 return 0;
4976 ;
4977 return 0;
4978}
4979_ACEOF
4980rm -f conftest.$ac_objext
4981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4982 (eval $ac_compile) 2>&5
4983 ac_status=$?
4984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985 (exit $ac_status); } &&
4986 { ac_try='test -s conftest.$ac_objext'
4987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4988 (eval $ac_try) 2>&5
4989 ac_status=$?
4990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4991 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004992 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004993else
Martin v. Löwis11437992002-04-12 09:54:03 +00004994 echo "$as_me: failed program was:" >&5
4995cat conftest.$ac_ext >&5
4996ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004997fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004998rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004999fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005000echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5001echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5002if test $ac_cv_type_pid_t = yes; then
5003 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005004else
Martin v. Löwis11437992002-04-12 09:54:03 +00005005
5006cat >>confdefs.h <<_ACEOF
5007#define pid_t int
5008_ACEOF
5009
5010fi
5011
5012echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5013echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5014if test "${ac_cv_type_signal+set}" = set; then
5015 echo $ECHO_N "(cached) $ECHO_C" >&6
5016else
5017 cat >conftest.$ac_ext <<_ACEOF
5018#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005019#include "confdefs.h"
5020#include <sys/types.h>
5021#include <signal.h>
5022#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005023# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005024#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005025#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005026extern "C" void (*signal (int, void (*)(int)))(int);
5027#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005028void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005029#endif
5030
Martin v. Löwis11437992002-04-12 09:54:03 +00005031#ifdef F77_DUMMY_MAIN
5032# ifdef __cplusplus
5033 extern "C"
5034# endif
5035 int F77_DUMMY_MAIN() { return 1; }
5036#endif
5037int
5038main ()
5039{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005040int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005041 ;
5042 return 0;
5043}
5044_ACEOF
5045rm -f conftest.$ac_objext
5046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5047 (eval $ac_compile) 2>&5
5048 ac_status=$?
5049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5050 (exit $ac_status); } &&
5051 { ac_try='test -s conftest.$ac_objext'
5052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5053 (eval $ac_try) 2>&5
5054 ac_status=$?
5055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5056 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005057 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005058else
Martin v. Löwis11437992002-04-12 09:54:03 +00005059 echo "$as_me: failed program was:" >&5
5060cat conftest.$ac_ext >&5
5061ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005062fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005063rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005064fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005065echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5066echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005067
Martin v. Löwis11437992002-04-12 09:54:03 +00005068cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005069#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005070_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005071
Michael W. Hudson54241132001-12-07 15:38:26 +00005072
Martin v. Löwis11437992002-04-12 09:54:03 +00005073echo "$as_me:$LINENO: checking for size_t" >&5
5074echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5075if test "${ac_cv_type_size_t+set}" = set; then
5076 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005077else
Martin v. Löwis11437992002-04-12 09:54:03 +00005078 cat >conftest.$ac_ext <<_ACEOF
5079#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005080#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005081$ac_includes_default
5082#ifdef F77_DUMMY_MAIN
5083# ifdef __cplusplus
5084 extern "C"
5085# endif
5086 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005088int
5089main ()
5090{
5091if ((size_t *) 0)
5092 return 0;
5093if (sizeof (size_t))
5094 return 0;
5095 ;
5096 return 0;
5097}
5098_ACEOF
5099rm -f conftest.$ac_objext
5100if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5101 (eval $ac_compile) 2>&5
5102 ac_status=$?
5103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5104 (exit $ac_status); } &&
5105 { ac_try='test -s conftest.$ac_objext'
5106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5107 (eval $ac_try) 2>&5
5108 ac_status=$?
5109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5110 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005111 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005112else
Martin v. Löwis11437992002-04-12 09:54:03 +00005113 echo "$as_me: failed program was:" >&5
5114cat conftest.$ac_ext >&5
5115ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005116fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005117rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005118fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005119echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5120echo "${ECHO_T}$ac_cv_type_size_t" >&6
5121if test $ac_cv_type_size_t = yes; then
5122 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005123else
Martin v. Löwis11437992002-04-12 09:54:03 +00005124
5125cat >>confdefs.h <<_ACEOF
5126#define size_t unsigned
5127_ACEOF
5128
5129fi
5130
5131echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5132echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5133if test "${ac_cv_type_uid_t+set}" = set; then
5134 echo $ECHO_N "(cached) $ECHO_C" >&6
5135else
5136 cat >conftest.$ac_ext <<_ACEOF
5137#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005138#include "confdefs.h"
5139#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005140
5141_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5143 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005144 ac_cv_type_uid_t=yes
5145else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005146 ac_cv_type_uid_t=no
5147fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005148rm -f conftest*
5149
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005150fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005151echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5152echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005153if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005154
Martin v. Löwis11437992002-04-12 09:54:03 +00005155cat >>confdefs.h <<\_ACEOF
5156#define uid_t int
5157_ACEOF
5158
5159
5160cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005161#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005162_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005163
5164fi
5165
Jack Jansendd19cf82001-12-06 22:36:17 +00005166
Michael W. Hudson54241132001-12-07 15:38:26 +00005167# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005168echo "$as_me:$LINENO: checking for int" >&5
5169echo $ECHO_N "checking for int... $ECHO_C" >&6
5170if test "${ac_cv_type_int+set}" = set; then
5171 echo $ECHO_N "(cached) $ECHO_C" >&6
5172else
5173 cat >conftest.$ac_ext <<_ACEOF
5174#line $LINENO "configure"
5175#include "confdefs.h"
5176$ac_includes_default
5177#ifdef F77_DUMMY_MAIN
5178# ifdef __cplusplus
5179 extern "C"
5180# endif
5181 int F77_DUMMY_MAIN() { return 1; }
5182#endif
5183int
5184main ()
5185{
5186if ((int *) 0)
5187 return 0;
5188if (sizeof (int))
5189 return 0;
5190 ;
5191 return 0;
5192}
5193_ACEOF
5194rm -f conftest.$ac_objext
5195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5196 (eval $ac_compile) 2>&5
5197 ac_status=$?
5198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5199 (exit $ac_status); } &&
5200 { ac_try='test -s conftest.$ac_objext'
5201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5202 (eval $ac_try) 2>&5
5203 ac_status=$?
5204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5205 (exit $ac_status); }; }; then
5206 ac_cv_type_int=yes
5207else
5208 echo "$as_me: failed program was:" >&5
5209cat conftest.$ac_ext >&5
5210ac_cv_type_int=no
5211fi
5212rm -f conftest.$ac_objext conftest.$ac_ext
5213fi
5214echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5215echo "${ECHO_T}$ac_cv_type_int" >&6
5216
5217echo "$as_me:$LINENO: checking size of int" >&5
5218echo $ECHO_N "checking size of int... $ECHO_C" >&6
5219if test "${ac_cv_sizeof_int+set}" = set; then
5220 echo $ECHO_N "(cached) $ECHO_C" >&6
5221else
5222 if test "$ac_cv_type_int" = yes; then
5223 # The cast to unsigned long works around a bug in the HP C Compiler
5224 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5225 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5226 # This bug is HP SR number 8606223364.
5227 if test "$cross_compiling" = yes; then
5228 # Depending upon the size, compute the lo and hi bounds.
5229cat >conftest.$ac_ext <<_ACEOF
5230#line $LINENO "configure"
5231#include "confdefs.h"
5232$ac_includes_default
5233#ifdef F77_DUMMY_MAIN
5234# ifdef __cplusplus
5235 extern "C"
5236# endif
5237 int F77_DUMMY_MAIN() { return 1; }
5238#endif
5239int
5240main ()
5241{
5242static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5243test_array [0] = 0
5244
5245 ;
5246 return 0;
5247}
5248_ACEOF
5249rm -f conftest.$ac_objext
5250if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5251 (eval $ac_compile) 2>&5
5252 ac_status=$?
5253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5254 (exit $ac_status); } &&
5255 { ac_try='test -s conftest.$ac_objext'
5256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5257 (eval $ac_try) 2>&5
5258 ac_status=$?
5259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5260 (exit $ac_status); }; }; then
5261 ac_lo=0 ac_mid=0
5262 while :; do
5263 cat >conftest.$ac_ext <<_ACEOF
5264#line $LINENO "configure"
5265#include "confdefs.h"
5266$ac_includes_default
5267#ifdef F77_DUMMY_MAIN
5268# ifdef __cplusplus
5269 extern "C"
5270# endif
5271 int F77_DUMMY_MAIN() { return 1; }
5272#endif
5273int
5274main ()
5275{
5276static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5277test_array [0] = 0
5278
5279 ;
5280 return 0;
5281}
5282_ACEOF
5283rm -f conftest.$ac_objext
5284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5285 (eval $ac_compile) 2>&5
5286 ac_status=$?
5287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5288 (exit $ac_status); } &&
5289 { ac_try='test -s conftest.$ac_objext'
5290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5291 (eval $ac_try) 2>&5
5292 ac_status=$?
5293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5294 (exit $ac_status); }; }; then
5295 ac_hi=$ac_mid; break
5296else
5297 echo "$as_me: failed program was:" >&5
5298cat conftest.$ac_ext >&5
5299ac_lo=`expr $ac_mid + 1`
5300 if test $ac_lo -le $ac_mid; then
5301 ac_lo= ac_hi=
5302 break
5303 fi
5304 ac_mid=`expr 2 '*' $ac_mid + 1`
5305fi
5306rm -f conftest.$ac_objext conftest.$ac_ext
5307 done
5308else
5309 echo "$as_me: failed program was:" >&5
5310cat conftest.$ac_ext >&5
5311cat >conftest.$ac_ext <<_ACEOF
5312#line $LINENO "configure"
5313#include "confdefs.h"
5314$ac_includes_default
5315#ifdef F77_DUMMY_MAIN
5316# ifdef __cplusplus
5317 extern "C"
5318# endif
5319 int F77_DUMMY_MAIN() { return 1; }
5320#endif
5321int
5322main ()
5323{
5324static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5325test_array [0] = 0
5326
5327 ;
5328 return 0;
5329}
5330_ACEOF
5331rm -f conftest.$ac_objext
5332if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5333 (eval $ac_compile) 2>&5
5334 ac_status=$?
5335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5336 (exit $ac_status); } &&
5337 { ac_try='test -s conftest.$ac_objext'
5338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5339 (eval $ac_try) 2>&5
5340 ac_status=$?
5341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5342 (exit $ac_status); }; }; then
5343 ac_hi=-1 ac_mid=-1
5344 while :; do
5345 cat >conftest.$ac_ext <<_ACEOF
5346#line $LINENO "configure"
5347#include "confdefs.h"
5348$ac_includes_default
5349#ifdef F77_DUMMY_MAIN
5350# ifdef __cplusplus
5351 extern "C"
5352# endif
5353 int F77_DUMMY_MAIN() { return 1; }
5354#endif
5355int
5356main ()
5357{
5358static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5359test_array [0] = 0
5360
5361 ;
5362 return 0;
5363}
5364_ACEOF
5365rm -f conftest.$ac_objext
5366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5367 (eval $ac_compile) 2>&5
5368 ac_status=$?
5369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5370 (exit $ac_status); } &&
5371 { ac_try='test -s conftest.$ac_objext'
5372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5373 (eval $ac_try) 2>&5
5374 ac_status=$?
5375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5376 (exit $ac_status); }; }; then
5377 ac_lo=$ac_mid; break
5378else
5379 echo "$as_me: failed program was:" >&5
5380cat conftest.$ac_ext >&5
5381ac_hi=`expr '(' $ac_mid ')' - 1`
5382 if test $ac_mid -le $ac_hi; then
5383 ac_lo= ac_hi=
5384 break
5385 fi
5386 ac_mid=`expr 2 '*' $ac_mid`
5387fi
5388rm -f conftest.$ac_objext conftest.$ac_ext
5389 done
5390else
5391 echo "$as_me: failed program was:" >&5
5392cat conftest.$ac_ext >&5
5393ac_lo= ac_hi=
5394fi
5395rm -f conftest.$ac_objext conftest.$ac_ext
5396fi
5397rm -f conftest.$ac_objext conftest.$ac_ext
5398# Binary search between lo and hi bounds.
5399while test "x$ac_lo" != "x$ac_hi"; do
5400 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5401 cat >conftest.$ac_ext <<_ACEOF
5402#line $LINENO "configure"
5403#include "confdefs.h"
5404$ac_includes_default
5405#ifdef F77_DUMMY_MAIN
5406# ifdef __cplusplus
5407 extern "C"
5408# endif
5409 int F77_DUMMY_MAIN() { return 1; }
5410#endif
5411int
5412main ()
5413{
5414static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5415test_array [0] = 0
5416
5417 ;
5418 return 0;
5419}
5420_ACEOF
5421rm -f conftest.$ac_objext
5422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5423 (eval $ac_compile) 2>&5
5424 ac_status=$?
5425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5426 (exit $ac_status); } &&
5427 { ac_try='test -s conftest.$ac_objext'
5428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5429 (eval $ac_try) 2>&5
5430 ac_status=$?
5431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5432 (exit $ac_status); }; }; then
5433 ac_hi=$ac_mid
5434else
5435 echo "$as_me: failed program was:" >&5
5436cat conftest.$ac_ext >&5
5437ac_lo=`expr '(' $ac_mid ')' + 1`
5438fi
5439rm -f conftest.$ac_objext conftest.$ac_ext
5440done
5441case $ac_lo in
5442?*) ac_cv_sizeof_int=$ac_lo;;
5443'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5444echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5445 { (exit 1); exit 1; }; } ;;
5446esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005447else
5448 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005449 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5450echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5451 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005452else
Martin v. Löwis11437992002-04-12 09:54:03 +00005453 cat >conftest.$ac_ext <<_ACEOF
5454#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005455#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005456$ac_includes_default
5457long longval () { return (long) (sizeof (int)); }
5458unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005459#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005460#include <stdlib.h>
5461#ifdef F77_DUMMY_MAIN
5462# ifdef __cplusplus
5463 extern "C"
5464# endif
5465 int F77_DUMMY_MAIN() { return 1; }
5466#endif
5467int
5468main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005469{
Martin v. Löwis11437992002-04-12 09:54:03 +00005470
5471 FILE *f = fopen ("conftest.val", "w");
5472 if (! f)
5473 exit (1);
5474 if (((long) (sizeof (int))) < 0)
5475 {
5476 long i = longval ();
5477 if (i != ((long) (sizeof (int))))
5478 exit (1);
5479 fprintf (f, "%ld\n", i);
5480 }
5481 else
5482 {
5483 unsigned long i = ulongval ();
5484 if (i != ((long) (sizeof (int))))
5485 exit (1);
5486 fprintf (f, "%lu\n", i);
5487 }
5488 exit (ferror (f) || fclose (f) != 0);
5489
5490 ;
5491 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005492}
Martin v. Löwis11437992002-04-12 09:54:03 +00005493_ACEOF
5494rm -f conftest$ac_exeext
5495if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5496 (eval $ac_link) 2>&5
5497 ac_status=$?
5498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5499 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5501 (eval $ac_try) 2>&5
5502 ac_status=$?
5503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5504 (exit $ac_status); }; }; then
5505 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005506else
Martin v. Löwis11437992002-04-12 09:54:03 +00005507 echo "$as_me: program exited with status $ac_status" >&5
5508echo "$as_me: failed program was:" >&5
5509cat conftest.$ac_ext >&5
5510( exit $ac_status )
5511{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5512echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5513 { (exit 1); exit 1; }; }
5514fi
5515rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5516fi
5517fi
5518rm -f conftest.val
5519else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005520 ac_cv_sizeof_int=0
5521fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005522fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005523echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5524echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5525cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005526#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005527_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005528
5529
Martin v. Löwis11437992002-04-12 09:54:03 +00005530echo "$as_me:$LINENO: checking for long" >&5
5531echo $ECHO_N "checking for long... $ECHO_C" >&6
5532if test "${ac_cv_type_long+set}" = set; then
5533 echo $ECHO_N "(cached) $ECHO_C" >&6
5534else
5535 cat >conftest.$ac_ext <<_ACEOF
5536#line $LINENO "configure"
5537#include "confdefs.h"
5538$ac_includes_default
5539#ifdef F77_DUMMY_MAIN
5540# ifdef __cplusplus
5541 extern "C"
5542# endif
5543 int F77_DUMMY_MAIN() { return 1; }
5544#endif
5545int
5546main ()
5547{
5548if ((long *) 0)
5549 return 0;
5550if (sizeof (long))
5551 return 0;
5552 ;
5553 return 0;
5554}
5555_ACEOF
5556rm -f conftest.$ac_objext
5557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5558 (eval $ac_compile) 2>&5
5559 ac_status=$?
5560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5561 (exit $ac_status); } &&
5562 { ac_try='test -s conftest.$ac_objext'
5563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5564 (eval $ac_try) 2>&5
5565 ac_status=$?
5566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5567 (exit $ac_status); }; }; then
5568 ac_cv_type_long=yes
5569else
5570 echo "$as_me: failed program was:" >&5
5571cat conftest.$ac_ext >&5
5572ac_cv_type_long=no
5573fi
5574rm -f conftest.$ac_objext conftest.$ac_ext
5575fi
5576echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5577echo "${ECHO_T}$ac_cv_type_long" >&6
5578
5579echo "$as_me:$LINENO: checking size of long" >&5
5580echo $ECHO_N "checking size of long... $ECHO_C" >&6
5581if test "${ac_cv_sizeof_long+set}" = set; then
5582 echo $ECHO_N "(cached) $ECHO_C" >&6
5583else
5584 if test "$ac_cv_type_long" = yes; then
5585 # The cast to unsigned long works around a bug in the HP C Compiler
5586 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5587 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5588 # This bug is HP SR number 8606223364.
5589 if test "$cross_compiling" = yes; then
5590 # Depending upon the size, compute the lo and hi bounds.
5591cat >conftest.$ac_ext <<_ACEOF
5592#line $LINENO "configure"
5593#include "confdefs.h"
5594$ac_includes_default
5595#ifdef F77_DUMMY_MAIN
5596# ifdef __cplusplus
5597 extern "C"
5598# endif
5599 int F77_DUMMY_MAIN() { return 1; }
5600#endif
5601int
5602main ()
5603{
5604static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5605test_array [0] = 0
5606
5607 ;
5608 return 0;
5609}
5610_ACEOF
5611rm -f conftest.$ac_objext
5612if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5613 (eval $ac_compile) 2>&5
5614 ac_status=$?
5615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5616 (exit $ac_status); } &&
5617 { ac_try='test -s conftest.$ac_objext'
5618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5619 (eval $ac_try) 2>&5
5620 ac_status=$?
5621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5622 (exit $ac_status); }; }; then
5623 ac_lo=0 ac_mid=0
5624 while :; do
5625 cat >conftest.$ac_ext <<_ACEOF
5626#line $LINENO "configure"
5627#include "confdefs.h"
5628$ac_includes_default
5629#ifdef F77_DUMMY_MAIN
5630# ifdef __cplusplus
5631 extern "C"
5632# endif
5633 int F77_DUMMY_MAIN() { return 1; }
5634#endif
5635int
5636main ()
5637{
5638static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5639test_array [0] = 0
5640
5641 ;
5642 return 0;
5643}
5644_ACEOF
5645rm -f conftest.$ac_objext
5646if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5647 (eval $ac_compile) 2>&5
5648 ac_status=$?
5649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5650 (exit $ac_status); } &&
5651 { ac_try='test -s conftest.$ac_objext'
5652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5653 (eval $ac_try) 2>&5
5654 ac_status=$?
5655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5656 (exit $ac_status); }; }; then
5657 ac_hi=$ac_mid; break
5658else
5659 echo "$as_me: failed program was:" >&5
5660cat conftest.$ac_ext >&5
5661ac_lo=`expr $ac_mid + 1`
5662 if test $ac_lo -le $ac_mid; then
5663 ac_lo= ac_hi=
5664 break
5665 fi
5666 ac_mid=`expr 2 '*' $ac_mid + 1`
5667fi
5668rm -f conftest.$ac_objext conftest.$ac_ext
5669 done
5670else
5671 echo "$as_me: failed program was:" >&5
5672cat conftest.$ac_ext >&5
5673cat >conftest.$ac_ext <<_ACEOF
5674#line $LINENO "configure"
5675#include "confdefs.h"
5676$ac_includes_default
5677#ifdef F77_DUMMY_MAIN
5678# ifdef __cplusplus
5679 extern "C"
5680# endif
5681 int F77_DUMMY_MAIN() { return 1; }
5682#endif
5683int
5684main ()
5685{
5686static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5687test_array [0] = 0
5688
5689 ;
5690 return 0;
5691}
5692_ACEOF
5693rm -f conftest.$ac_objext
5694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5695 (eval $ac_compile) 2>&5
5696 ac_status=$?
5697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5698 (exit $ac_status); } &&
5699 { ac_try='test -s conftest.$ac_objext'
5700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5701 (eval $ac_try) 2>&5
5702 ac_status=$?
5703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5704 (exit $ac_status); }; }; then
5705 ac_hi=-1 ac_mid=-1
5706 while :; do
5707 cat >conftest.$ac_ext <<_ACEOF
5708#line $LINENO "configure"
5709#include "confdefs.h"
5710$ac_includes_default
5711#ifdef F77_DUMMY_MAIN
5712# ifdef __cplusplus
5713 extern "C"
5714# endif
5715 int F77_DUMMY_MAIN() { return 1; }
5716#endif
5717int
5718main ()
5719{
5720static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5721test_array [0] = 0
5722
5723 ;
5724 return 0;
5725}
5726_ACEOF
5727rm -f conftest.$ac_objext
5728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5729 (eval $ac_compile) 2>&5
5730 ac_status=$?
5731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732 (exit $ac_status); } &&
5733 { ac_try='test -s conftest.$ac_objext'
5734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5735 (eval $ac_try) 2>&5
5736 ac_status=$?
5737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5738 (exit $ac_status); }; }; then
5739 ac_lo=$ac_mid; break
5740else
5741 echo "$as_me: failed program was:" >&5
5742cat conftest.$ac_ext >&5
5743ac_hi=`expr '(' $ac_mid ')' - 1`
5744 if test $ac_mid -le $ac_hi; then
5745 ac_lo= ac_hi=
5746 break
5747 fi
5748 ac_mid=`expr 2 '*' $ac_mid`
5749fi
5750rm -f conftest.$ac_objext conftest.$ac_ext
5751 done
5752else
5753 echo "$as_me: failed program was:" >&5
5754cat conftest.$ac_ext >&5
5755ac_lo= ac_hi=
5756fi
5757rm -f conftest.$ac_objext conftest.$ac_ext
5758fi
5759rm -f conftest.$ac_objext conftest.$ac_ext
5760# Binary search between lo and hi bounds.
5761while test "x$ac_lo" != "x$ac_hi"; do
5762 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5763 cat >conftest.$ac_ext <<_ACEOF
5764#line $LINENO "configure"
5765#include "confdefs.h"
5766$ac_includes_default
5767#ifdef F77_DUMMY_MAIN
5768# ifdef __cplusplus
5769 extern "C"
5770# endif
5771 int F77_DUMMY_MAIN() { return 1; }
5772#endif
5773int
5774main ()
5775{
5776static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5777test_array [0] = 0
5778
5779 ;
5780 return 0;
5781}
5782_ACEOF
5783rm -f conftest.$ac_objext
5784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5785 (eval $ac_compile) 2>&5
5786 ac_status=$?
5787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5788 (exit $ac_status); } &&
5789 { ac_try='test -s conftest.$ac_objext'
5790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5791 (eval $ac_try) 2>&5
5792 ac_status=$?
5793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5794 (exit $ac_status); }; }; then
5795 ac_hi=$ac_mid
5796else
5797 echo "$as_me: failed program was:" >&5
5798cat conftest.$ac_ext >&5
5799ac_lo=`expr '(' $ac_mid ')' + 1`
5800fi
5801rm -f conftest.$ac_objext conftest.$ac_ext
5802done
5803case $ac_lo in
5804?*) ac_cv_sizeof_long=$ac_lo;;
5805'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5806echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5807 { (exit 1); exit 1; }; } ;;
5808esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005809else
5810 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005811 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5812echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5813 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005814else
Martin v. Löwis11437992002-04-12 09:54:03 +00005815 cat >conftest.$ac_ext <<_ACEOF
5816#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005817#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005818$ac_includes_default
5819long longval () { return (long) (sizeof (long)); }
5820unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005821#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005822#include <stdlib.h>
5823#ifdef F77_DUMMY_MAIN
5824# ifdef __cplusplus
5825 extern "C"
5826# endif
5827 int F77_DUMMY_MAIN() { return 1; }
5828#endif
5829int
5830main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005831{
Martin v. Löwis11437992002-04-12 09:54:03 +00005832
5833 FILE *f = fopen ("conftest.val", "w");
5834 if (! f)
5835 exit (1);
5836 if (((long) (sizeof (long))) < 0)
5837 {
5838 long i = longval ();
5839 if (i != ((long) (sizeof (long))))
5840 exit (1);
5841 fprintf (f, "%ld\n", i);
5842 }
5843 else
5844 {
5845 unsigned long i = ulongval ();
5846 if (i != ((long) (sizeof (long))))
5847 exit (1);
5848 fprintf (f, "%lu\n", i);
5849 }
5850 exit (ferror (f) || fclose (f) != 0);
5851
5852 ;
5853 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005854}
Martin v. Löwis11437992002-04-12 09:54:03 +00005855_ACEOF
5856rm -f conftest$ac_exeext
5857if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5858 (eval $ac_link) 2>&5
5859 ac_status=$?
5860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5861 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5863 (eval $ac_try) 2>&5
5864 ac_status=$?
5865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5866 (exit $ac_status); }; }; then
5867 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005868else
Martin v. Löwis11437992002-04-12 09:54:03 +00005869 echo "$as_me: program exited with status $ac_status" >&5
5870echo "$as_me: failed program was:" >&5
5871cat conftest.$ac_ext >&5
5872( exit $ac_status )
5873{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5874echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5875 { (exit 1); exit 1; }; }
5876fi
5877rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5878fi
5879fi
5880rm -f conftest.val
5881else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005882 ac_cv_sizeof_long=0
5883fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005884fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005885echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5886echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5887cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005888#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005889_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005890
5891
Martin v. Löwis11437992002-04-12 09:54:03 +00005892echo "$as_me:$LINENO: checking for void *" >&5
5893echo $ECHO_N "checking for void *... $ECHO_C" >&6
5894if test "${ac_cv_type_void_p+set}" = set; then
5895 echo $ECHO_N "(cached) $ECHO_C" >&6
5896else
5897 cat >conftest.$ac_ext <<_ACEOF
5898#line $LINENO "configure"
5899#include "confdefs.h"
5900$ac_includes_default
5901#ifdef F77_DUMMY_MAIN
5902# ifdef __cplusplus
5903 extern "C"
5904# endif
5905 int F77_DUMMY_MAIN() { return 1; }
5906#endif
5907int
5908main ()
5909{
5910if ((void * *) 0)
5911 return 0;
5912if (sizeof (void *))
5913 return 0;
5914 ;
5915 return 0;
5916}
5917_ACEOF
5918rm -f conftest.$ac_objext
5919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5920 (eval $ac_compile) 2>&5
5921 ac_status=$?
5922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5923 (exit $ac_status); } &&
5924 { ac_try='test -s conftest.$ac_objext'
5925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5926 (eval $ac_try) 2>&5
5927 ac_status=$?
5928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5929 (exit $ac_status); }; }; then
5930 ac_cv_type_void_p=yes
5931else
5932 echo "$as_me: failed program was:" >&5
5933cat conftest.$ac_ext >&5
5934ac_cv_type_void_p=no
5935fi
5936rm -f conftest.$ac_objext conftest.$ac_ext
5937fi
5938echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5939echo "${ECHO_T}$ac_cv_type_void_p" >&6
5940
5941echo "$as_me:$LINENO: checking size of void *" >&5
5942echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5943if test "${ac_cv_sizeof_void_p+set}" = set; then
5944 echo $ECHO_N "(cached) $ECHO_C" >&6
5945else
5946 if test "$ac_cv_type_void_p" = yes; then
5947 # The cast to unsigned long works around a bug in the HP C Compiler
5948 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5949 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5950 # This bug is HP SR number 8606223364.
5951 if test "$cross_compiling" = yes; then
5952 # Depending upon the size, compute the lo and hi bounds.
5953cat >conftest.$ac_ext <<_ACEOF
5954#line $LINENO "configure"
5955#include "confdefs.h"
5956$ac_includes_default
5957#ifdef F77_DUMMY_MAIN
5958# ifdef __cplusplus
5959 extern "C"
5960# endif
5961 int F77_DUMMY_MAIN() { return 1; }
5962#endif
5963int
5964main ()
5965{
5966static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5967test_array [0] = 0
5968
5969 ;
5970 return 0;
5971}
5972_ACEOF
5973rm -f conftest.$ac_objext
5974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5975 (eval $ac_compile) 2>&5
5976 ac_status=$?
5977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5978 (exit $ac_status); } &&
5979 { ac_try='test -s conftest.$ac_objext'
5980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5981 (eval $ac_try) 2>&5
5982 ac_status=$?
5983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5984 (exit $ac_status); }; }; then
5985 ac_lo=0 ac_mid=0
5986 while :; do
5987 cat >conftest.$ac_ext <<_ACEOF
5988#line $LINENO "configure"
5989#include "confdefs.h"
5990$ac_includes_default
5991#ifdef F77_DUMMY_MAIN
5992# ifdef __cplusplus
5993 extern "C"
5994# endif
5995 int F77_DUMMY_MAIN() { return 1; }
5996#endif
5997int
5998main ()
5999{
6000static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6001test_array [0] = 0
6002
6003 ;
6004 return 0;
6005}
6006_ACEOF
6007rm -f conftest.$ac_objext
6008if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6009 (eval $ac_compile) 2>&5
6010 ac_status=$?
6011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6012 (exit $ac_status); } &&
6013 { ac_try='test -s conftest.$ac_objext'
6014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6015 (eval $ac_try) 2>&5
6016 ac_status=$?
6017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6018 (exit $ac_status); }; }; then
6019 ac_hi=$ac_mid; break
6020else
6021 echo "$as_me: failed program was:" >&5
6022cat conftest.$ac_ext >&5
6023ac_lo=`expr $ac_mid + 1`
6024 if test $ac_lo -le $ac_mid; then
6025 ac_lo= ac_hi=
6026 break
6027 fi
6028 ac_mid=`expr 2 '*' $ac_mid + 1`
6029fi
6030rm -f conftest.$ac_objext conftest.$ac_ext
6031 done
6032else
6033 echo "$as_me: failed program was:" >&5
6034cat conftest.$ac_ext >&5
6035cat >conftest.$ac_ext <<_ACEOF
6036#line $LINENO "configure"
6037#include "confdefs.h"
6038$ac_includes_default
6039#ifdef F77_DUMMY_MAIN
6040# ifdef __cplusplus
6041 extern "C"
6042# endif
6043 int F77_DUMMY_MAIN() { return 1; }
6044#endif
6045int
6046main ()
6047{
6048static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6049test_array [0] = 0
6050
6051 ;
6052 return 0;
6053}
6054_ACEOF
6055rm -f conftest.$ac_objext
6056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6057 (eval $ac_compile) 2>&5
6058 ac_status=$?
6059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6060 (exit $ac_status); } &&
6061 { ac_try='test -s conftest.$ac_objext'
6062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6063 (eval $ac_try) 2>&5
6064 ac_status=$?
6065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6066 (exit $ac_status); }; }; then
6067 ac_hi=-1 ac_mid=-1
6068 while :; do
6069 cat >conftest.$ac_ext <<_ACEOF
6070#line $LINENO "configure"
6071#include "confdefs.h"
6072$ac_includes_default
6073#ifdef F77_DUMMY_MAIN
6074# ifdef __cplusplus
6075 extern "C"
6076# endif
6077 int F77_DUMMY_MAIN() { return 1; }
6078#endif
6079int
6080main ()
6081{
6082static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6083test_array [0] = 0
6084
6085 ;
6086 return 0;
6087}
6088_ACEOF
6089rm -f conftest.$ac_objext
6090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6091 (eval $ac_compile) 2>&5
6092 ac_status=$?
6093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094 (exit $ac_status); } &&
6095 { ac_try='test -s conftest.$ac_objext'
6096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6097 (eval $ac_try) 2>&5
6098 ac_status=$?
6099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6100 (exit $ac_status); }; }; then
6101 ac_lo=$ac_mid; break
6102else
6103 echo "$as_me: failed program was:" >&5
6104cat conftest.$ac_ext >&5
6105ac_hi=`expr '(' $ac_mid ')' - 1`
6106 if test $ac_mid -le $ac_hi; then
6107 ac_lo= ac_hi=
6108 break
6109 fi
6110 ac_mid=`expr 2 '*' $ac_mid`
6111fi
6112rm -f conftest.$ac_objext conftest.$ac_ext
6113 done
6114else
6115 echo "$as_me: failed program was:" >&5
6116cat conftest.$ac_ext >&5
6117ac_lo= ac_hi=
6118fi
6119rm -f conftest.$ac_objext conftest.$ac_ext
6120fi
6121rm -f conftest.$ac_objext conftest.$ac_ext
6122# Binary search between lo and hi bounds.
6123while test "x$ac_lo" != "x$ac_hi"; do
6124 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6125 cat >conftest.$ac_ext <<_ACEOF
6126#line $LINENO "configure"
6127#include "confdefs.h"
6128$ac_includes_default
6129#ifdef F77_DUMMY_MAIN
6130# ifdef __cplusplus
6131 extern "C"
6132# endif
6133 int F77_DUMMY_MAIN() { return 1; }
6134#endif
6135int
6136main ()
6137{
6138static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6139test_array [0] = 0
6140
6141 ;
6142 return 0;
6143}
6144_ACEOF
6145rm -f conftest.$ac_objext
6146if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6147 (eval $ac_compile) 2>&5
6148 ac_status=$?
6149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6150 (exit $ac_status); } &&
6151 { ac_try='test -s conftest.$ac_objext'
6152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6153 (eval $ac_try) 2>&5
6154 ac_status=$?
6155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6156 (exit $ac_status); }; }; then
6157 ac_hi=$ac_mid
6158else
6159 echo "$as_me: failed program was:" >&5
6160cat conftest.$ac_ext >&5
6161ac_lo=`expr '(' $ac_mid ')' + 1`
6162fi
6163rm -f conftest.$ac_objext conftest.$ac_ext
6164done
6165case $ac_lo in
6166?*) ac_cv_sizeof_void_p=$ac_lo;;
6167'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6168echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6169 { (exit 1); exit 1; }; } ;;
6170esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006171else
6172 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006173 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6174echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6175 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006176else
Martin v. Löwis11437992002-04-12 09:54:03 +00006177 cat >conftest.$ac_ext <<_ACEOF
6178#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006179#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006180$ac_includes_default
6181long longval () { return (long) (sizeof (void *)); }
6182unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006183#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006184#include <stdlib.h>
6185#ifdef F77_DUMMY_MAIN
6186# ifdef __cplusplus
6187 extern "C"
6188# endif
6189 int F77_DUMMY_MAIN() { return 1; }
6190#endif
6191int
6192main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006193{
Martin v. Löwis11437992002-04-12 09:54:03 +00006194
6195 FILE *f = fopen ("conftest.val", "w");
6196 if (! f)
6197 exit (1);
6198 if (((long) (sizeof (void *))) < 0)
6199 {
6200 long i = longval ();
6201 if (i != ((long) (sizeof (void *))))
6202 exit (1);
6203 fprintf (f, "%ld\n", i);
6204 }
6205 else
6206 {
6207 unsigned long i = ulongval ();
6208 if (i != ((long) (sizeof (void *))))
6209 exit (1);
6210 fprintf (f, "%lu\n", i);
6211 }
6212 exit (ferror (f) || fclose (f) != 0);
6213
6214 ;
6215 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006216}
Martin v. Löwis11437992002-04-12 09:54:03 +00006217_ACEOF
6218rm -f conftest$ac_exeext
6219if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6220 (eval $ac_link) 2>&5
6221 ac_status=$?
6222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6223 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6225 (eval $ac_try) 2>&5
6226 ac_status=$?
6227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6228 (exit $ac_status); }; }; then
6229 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006230else
Martin v. Löwis11437992002-04-12 09:54:03 +00006231 echo "$as_me: program exited with status $ac_status" >&5
6232echo "$as_me: failed program was:" >&5
6233cat conftest.$ac_ext >&5
6234( exit $ac_status )
6235{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6236echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6237 { (exit 1); exit 1; }; }
6238fi
6239rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6240fi
6241fi
6242rm -f conftest.val
6243else
Guido van Rossumad678af1998-10-02 14:42:15 +00006244 ac_cv_sizeof_void_p=0
6245fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006246fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006247echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6248echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6249cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006250#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006251_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006252
6253
Martin v. Löwis11437992002-04-12 09:54:03 +00006254echo "$as_me:$LINENO: checking for char" >&5
6255echo $ECHO_N "checking for char... $ECHO_C" >&6
6256if test "${ac_cv_type_char+set}" = set; then
6257 echo $ECHO_N "(cached) $ECHO_C" >&6
6258else
6259 cat >conftest.$ac_ext <<_ACEOF
6260#line $LINENO "configure"
6261#include "confdefs.h"
6262$ac_includes_default
6263#ifdef F77_DUMMY_MAIN
6264# ifdef __cplusplus
6265 extern "C"
6266# endif
6267 int F77_DUMMY_MAIN() { return 1; }
6268#endif
6269int
6270main ()
6271{
6272if ((char *) 0)
6273 return 0;
6274if (sizeof (char))
6275 return 0;
6276 ;
6277 return 0;
6278}
6279_ACEOF
6280rm -f conftest.$ac_objext
6281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6282 (eval $ac_compile) 2>&5
6283 ac_status=$?
6284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6285 (exit $ac_status); } &&
6286 { ac_try='test -s conftest.$ac_objext'
6287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6288 (eval $ac_try) 2>&5
6289 ac_status=$?
6290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6291 (exit $ac_status); }; }; then
6292 ac_cv_type_char=yes
6293else
6294 echo "$as_me: failed program was:" >&5
6295cat conftest.$ac_ext >&5
6296ac_cv_type_char=no
6297fi
6298rm -f conftest.$ac_objext conftest.$ac_ext
6299fi
6300echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6301echo "${ECHO_T}$ac_cv_type_char" >&6
6302
6303echo "$as_me:$LINENO: checking size of char" >&5
6304echo $ECHO_N "checking size of char... $ECHO_C" >&6
6305if test "${ac_cv_sizeof_char+set}" = set; then
6306 echo $ECHO_N "(cached) $ECHO_C" >&6
6307else
6308 if test "$ac_cv_type_char" = yes; then
6309 # The cast to unsigned long works around a bug in the HP C Compiler
6310 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6311 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6312 # This bug is HP SR number 8606223364.
6313 if test "$cross_compiling" = yes; then
6314 # Depending upon the size, compute the lo and hi bounds.
6315cat >conftest.$ac_ext <<_ACEOF
6316#line $LINENO "configure"
6317#include "confdefs.h"
6318$ac_includes_default
6319#ifdef F77_DUMMY_MAIN
6320# ifdef __cplusplus
6321 extern "C"
6322# endif
6323 int F77_DUMMY_MAIN() { return 1; }
6324#endif
6325int
6326main ()
6327{
6328static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6329test_array [0] = 0
6330
6331 ;
6332 return 0;
6333}
6334_ACEOF
6335rm -f conftest.$ac_objext
6336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6337 (eval $ac_compile) 2>&5
6338 ac_status=$?
6339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6340 (exit $ac_status); } &&
6341 { ac_try='test -s conftest.$ac_objext'
6342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6343 (eval $ac_try) 2>&5
6344 ac_status=$?
6345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6346 (exit $ac_status); }; }; then
6347 ac_lo=0 ac_mid=0
6348 while :; do
6349 cat >conftest.$ac_ext <<_ACEOF
6350#line $LINENO "configure"
6351#include "confdefs.h"
6352$ac_includes_default
6353#ifdef F77_DUMMY_MAIN
6354# ifdef __cplusplus
6355 extern "C"
6356# endif
6357 int F77_DUMMY_MAIN() { return 1; }
6358#endif
6359int
6360main ()
6361{
6362static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6363test_array [0] = 0
6364
6365 ;
6366 return 0;
6367}
6368_ACEOF
6369rm -f conftest.$ac_objext
6370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6371 (eval $ac_compile) 2>&5
6372 ac_status=$?
6373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6374 (exit $ac_status); } &&
6375 { ac_try='test -s conftest.$ac_objext'
6376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6377 (eval $ac_try) 2>&5
6378 ac_status=$?
6379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6380 (exit $ac_status); }; }; then
6381 ac_hi=$ac_mid; break
6382else
6383 echo "$as_me: failed program was:" >&5
6384cat conftest.$ac_ext >&5
6385ac_lo=`expr $ac_mid + 1`
6386 if test $ac_lo -le $ac_mid; then
6387 ac_lo= ac_hi=
6388 break
6389 fi
6390 ac_mid=`expr 2 '*' $ac_mid + 1`
6391fi
6392rm -f conftest.$ac_objext conftest.$ac_ext
6393 done
6394else
6395 echo "$as_me: failed program was:" >&5
6396cat conftest.$ac_ext >&5
6397cat >conftest.$ac_ext <<_ACEOF
6398#line $LINENO "configure"
6399#include "confdefs.h"
6400$ac_includes_default
6401#ifdef F77_DUMMY_MAIN
6402# ifdef __cplusplus
6403 extern "C"
6404# endif
6405 int F77_DUMMY_MAIN() { return 1; }
6406#endif
6407int
6408main ()
6409{
6410static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6411test_array [0] = 0
6412
6413 ;
6414 return 0;
6415}
6416_ACEOF
6417rm -f conftest.$ac_objext
6418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6419 (eval $ac_compile) 2>&5
6420 ac_status=$?
6421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6422 (exit $ac_status); } &&
6423 { ac_try='test -s conftest.$ac_objext'
6424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6425 (eval $ac_try) 2>&5
6426 ac_status=$?
6427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6428 (exit $ac_status); }; }; then
6429 ac_hi=-1 ac_mid=-1
6430 while :; do
6431 cat >conftest.$ac_ext <<_ACEOF
6432#line $LINENO "configure"
6433#include "confdefs.h"
6434$ac_includes_default
6435#ifdef F77_DUMMY_MAIN
6436# ifdef __cplusplus
6437 extern "C"
6438# endif
6439 int F77_DUMMY_MAIN() { return 1; }
6440#endif
6441int
6442main ()
6443{
6444static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6445test_array [0] = 0
6446
6447 ;
6448 return 0;
6449}
6450_ACEOF
6451rm -f conftest.$ac_objext
6452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6453 (eval $ac_compile) 2>&5
6454 ac_status=$?
6455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6456 (exit $ac_status); } &&
6457 { ac_try='test -s conftest.$ac_objext'
6458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6459 (eval $ac_try) 2>&5
6460 ac_status=$?
6461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6462 (exit $ac_status); }; }; then
6463 ac_lo=$ac_mid; break
6464else
6465 echo "$as_me: failed program was:" >&5
6466cat conftest.$ac_ext >&5
6467ac_hi=`expr '(' $ac_mid ')' - 1`
6468 if test $ac_mid -le $ac_hi; then
6469 ac_lo= ac_hi=
6470 break
6471 fi
6472 ac_mid=`expr 2 '*' $ac_mid`
6473fi
6474rm -f conftest.$ac_objext conftest.$ac_ext
6475 done
6476else
6477 echo "$as_me: failed program was:" >&5
6478cat conftest.$ac_ext >&5
6479ac_lo= ac_hi=
6480fi
6481rm -f conftest.$ac_objext conftest.$ac_ext
6482fi
6483rm -f conftest.$ac_objext conftest.$ac_ext
6484# Binary search between lo and hi bounds.
6485while test "x$ac_lo" != "x$ac_hi"; do
6486 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6487 cat >conftest.$ac_ext <<_ACEOF
6488#line $LINENO "configure"
6489#include "confdefs.h"
6490$ac_includes_default
6491#ifdef F77_DUMMY_MAIN
6492# ifdef __cplusplus
6493 extern "C"
6494# endif
6495 int F77_DUMMY_MAIN() { return 1; }
6496#endif
6497int
6498main ()
6499{
6500static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6501test_array [0] = 0
6502
6503 ;
6504 return 0;
6505}
6506_ACEOF
6507rm -f conftest.$ac_objext
6508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6509 (eval $ac_compile) 2>&5
6510 ac_status=$?
6511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6512 (exit $ac_status); } &&
6513 { ac_try='test -s conftest.$ac_objext'
6514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6515 (eval $ac_try) 2>&5
6516 ac_status=$?
6517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6518 (exit $ac_status); }; }; then
6519 ac_hi=$ac_mid
6520else
6521 echo "$as_me: failed program was:" >&5
6522cat conftest.$ac_ext >&5
6523ac_lo=`expr '(' $ac_mid ')' + 1`
6524fi
6525rm -f conftest.$ac_objext conftest.$ac_ext
6526done
6527case $ac_lo in
6528?*) ac_cv_sizeof_char=$ac_lo;;
6529'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6530echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6531 { (exit 1); exit 1; }; } ;;
6532esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006533else
6534 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006535 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6536echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6537 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006538else
Martin v. Löwis11437992002-04-12 09:54:03 +00006539 cat >conftest.$ac_ext <<_ACEOF
6540#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006541#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006542$ac_includes_default
6543long longval () { return (long) (sizeof (char)); }
6544unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006545#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006546#include <stdlib.h>
6547#ifdef F77_DUMMY_MAIN
6548# ifdef __cplusplus
6549 extern "C"
6550# endif
6551 int F77_DUMMY_MAIN() { return 1; }
6552#endif
6553int
6554main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006555{
Martin v. Löwis11437992002-04-12 09:54:03 +00006556
6557 FILE *f = fopen ("conftest.val", "w");
6558 if (! f)
6559 exit (1);
6560 if (((long) (sizeof (char))) < 0)
6561 {
6562 long i = longval ();
6563 if (i != ((long) (sizeof (char))))
6564 exit (1);
6565 fprintf (f, "%ld\n", i);
6566 }
6567 else
6568 {
6569 unsigned long i = ulongval ();
6570 if (i != ((long) (sizeof (char))))
6571 exit (1);
6572 fprintf (f, "%lu\n", i);
6573 }
6574 exit (ferror (f) || fclose (f) != 0);
6575
6576 ;
6577 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006578}
Martin v. Löwis11437992002-04-12 09:54:03 +00006579_ACEOF
6580rm -f conftest$ac_exeext
6581if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6582 (eval $ac_link) 2>&5
6583 ac_status=$?
6584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6585 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6587 (eval $ac_try) 2>&5
6588 ac_status=$?
6589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6590 (exit $ac_status); }; }; then
6591 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006592else
Martin v. Löwis11437992002-04-12 09:54:03 +00006593 echo "$as_me: program exited with status $ac_status" >&5
6594echo "$as_me: failed program was:" >&5
6595cat conftest.$ac_ext >&5
6596( exit $ac_status )
6597{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6598echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6599 { (exit 1); exit 1; }; }
6600fi
6601rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6602fi
6603fi
6604rm -f conftest.val
6605else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006606 ac_cv_sizeof_char=0
6607fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006608fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006609echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6610echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6611cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006612#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006613_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006614
6615
Martin v. Löwis11437992002-04-12 09:54:03 +00006616echo "$as_me:$LINENO: checking for short" >&5
6617echo $ECHO_N "checking for short... $ECHO_C" >&6
6618if test "${ac_cv_type_short+set}" = set; then
6619 echo $ECHO_N "(cached) $ECHO_C" >&6
6620else
6621 cat >conftest.$ac_ext <<_ACEOF
6622#line $LINENO "configure"
6623#include "confdefs.h"
6624$ac_includes_default
6625#ifdef F77_DUMMY_MAIN
6626# ifdef __cplusplus
6627 extern "C"
6628# endif
6629 int F77_DUMMY_MAIN() { return 1; }
6630#endif
6631int
6632main ()
6633{
6634if ((short *) 0)
6635 return 0;
6636if (sizeof (short))
6637 return 0;
6638 ;
6639 return 0;
6640}
6641_ACEOF
6642rm -f conftest.$ac_objext
6643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6644 (eval $ac_compile) 2>&5
6645 ac_status=$?
6646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6647 (exit $ac_status); } &&
6648 { ac_try='test -s conftest.$ac_objext'
6649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6650 (eval $ac_try) 2>&5
6651 ac_status=$?
6652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6653 (exit $ac_status); }; }; then
6654 ac_cv_type_short=yes
6655else
6656 echo "$as_me: failed program was:" >&5
6657cat conftest.$ac_ext >&5
6658ac_cv_type_short=no
6659fi
6660rm -f conftest.$ac_objext conftest.$ac_ext
6661fi
6662echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6663echo "${ECHO_T}$ac_cv_type_short" >&6
6664
6665echo "$as_me:$LINENO: checking size of short" >&5
6666echo $ECHO_N "checking size of short... $ECHO_C" >&6
6667if test "${ac_cv_sizeof_short+set}" = set; then
6668 echo $ECHO_N "(cached) $ECHO_C" >&6
6669else
6670 if test "$ac_cv_type_short" = yes; then
6671 # The cast to unsigned long works around a bug in the HP C Compiler
6672 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6673 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6674 # This bug is HP SR number 8606223364.
6675 if test "$cross_compiling" = yes; then
6676 # Depending upon the size, compute the lo and hi bounds.
6677cat >conftest.$ac_ext <<_ACEOF
6678#line $LINENO "configure"
6679#include "confdefs.h"
6680$ac_includes_default
6681#ifdef F77_DUMMY_MAIN
6682# ifdef __cplusplus
6683 extern "C"
6684# endif
6685 int F77_DUMMY_MAIN() { return 1; }
6686#endif
6687int
6688main ()
6689{
6690static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6691test_array [0] = 0
6692
6693 ;
6694 return 0;
6695}
6696_ACEOF
6697rm -f conftest.$ac_objext
6698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6699 (eval $ac_compile) 2>&5
6700 ac_status=$?
6701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6702 (exit $ac_status); } &&
6703 { ac_try='test -s conftest.$ac_objext'
6704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6705 (eval $ac_try) 2>&5
6706 ac_status=$?
6707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6708 (exit $ac_status); }; }; then
6709 ac_lo=0 ac_mid=0
6710 while :; do
6711 cat >conftest.$ac_ext <<_ACEOF
6712#line $LINENO "configure"
6713#include "confdefs.h"
6714$ac_includes_default
6715#ifdef F77_DUMMY_MAIN
6716# ifdef __cplusplus
6717 extern "C"
6718# endif
6719 int F77_DUMMY_MAIN() { return 1; }
6720#endif
6721int
6722main ()
6723{
6724static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6725test_array [0] = 0
6726
6727 ;
6728 return 0;
6729}
6730_ACEOF
6731rm -f conftest.$ac_objext
6732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6733 (eval $ac_compile) 2>&5
6734 ac_status=$?
6735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6736 (exit $ac_status); } &&
6737 { ac_try='test -s conftest.$ac_objext'
6738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6739 (eval $ac_try) 2>&5
6740 ac_status=$?
6741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6742 (exit $ac_status); }; }; then
6743 ac_hi=$ac_mid; break
6744else
6745 echo "$as_me: failed program was:" >&5
6746cat conftest.$ac_ext >&5
6747ac_lo=`expr $ac_mid + 1`
6748 if test $ac_lo -le $ac_mid; then
6749 ac_lo= ac_hi=
6750 break
6751 fi
6752 ac_mid=`expr 2 '*' $ac_mid + 1`
6753fi
6754rm -f conftest.$ac_objext conftest.$ac_ext
6755 done
6756else
6757 echo "$as_me: failed program was:" >&5
6758cat conftest.$ac_ext >&5
6759cat >conftest.$ac_ext <<_ACEOF
6760#line $LINENO "configure"
6761#include "confdefs.h"
6762$ac_includes_default
6763#ifdef F77_DUMMY_MAIN
6764# ifdef __cplusplus
6765 extern "C"
6766# endif
6767 int F77_DUMMY_MAIN() { return 1; }
6768#endif
6769int
6770main ()
6771{
6772static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6773test_array [0] = 0
6774
6775 ;
6776 return 0;
6777}
6778_ACEOF
6779rm -f conftest.$ac_objext
6780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6781 (eval $ac_compile) 2>&5
6782 ac_status=$?
6783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6784 (exit $ac_status); } &&
6785 { ac_try='test -s conftest.$ac_objext'
6786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6787 (eval $ac_try) 2>&5
6788 ac_status=$?
6789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6790 (exit $ac_status); }; }; then
6791 ac_hi=-1 ac_mid=-1
6792 while :; do
6793 cat >conftest.$ac_ext <<_ACEOF
6794#line $LINENO "configure"
6795#include "confdefs.h"
6796$ac_includes_default
6797#ifdef F77_DUMMY_MAIN
6798# ifdef __cplusplus
6799 extern "C"
6800# endif
6801 int F77_DUMMY_MAIN() { return 1; }
6802#endif
6803int
6804main ()
6805{
6806static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6807test_array [0] = 0
6808
6809 ;
6810 return 0;
6811}
6812_ACEOF
6813rm -f conftest.$ac_objext
6814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6815 (eval $ac_compile) 2>&5
6816 ac_status=$?
6817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6818 (exit $ac_status); } &&
6819 { ac_try='test -s conftest.$ac_objext'
6820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6821 (eval $ac_try) 2>&5
6822 ac_status=$?
6823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6824 (exit $ac_status); }; }; then
6825 ac_lo=$ac_mid; break
6826else
6827 echo "$as_me: failed program was:" >&5
6828cat conftest.$ac_ext >&5
6829ac_hi=`expr '(' $ac_mid ')' - 1`
6830 if test $ac_mid -le $ac_hi; then
6831 ac_lo= ac_hi=
6832 break
6833 fi
6834 ac_mid=`expr 2 '*' $ac_mid`
6835fi
6836rm -f conftest.$ac_objext conftest.$ac_ext
6837 done
6838else
6839 echo "$as_me: failed program was:" >&5
6840cat conftest.$ac_ext >&5
6841ac_lo= ac_hi=
6842fi
6843rm -f conftest.$ac_objext conftest.$ac_ext
6844fi
6845rm -f conftest.$ac_objext conftest.$ac_ext
6846# Binary search between lo and hi bounds.
6847while test "x$ac_lo" != "x$ac_hi"; do
6848 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6849 cat >conftest.$ac_ext <<_ACEOF
6850#line $LINENO "configure"
6851#include "confdefs.h"
6852$ac_includes_default
6853#ifdef F77_DUMMY_MAIN
6854# ifdef __cplusplus
6855 extern "C"
6856# endif
6857 int F77_DUMMY_MAIN() { return 1; }
6858#endif
6859int
6860main ()
6861{
6862static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6863test_array [0] = 0
6864
6865 ;
6866 return 0;
6867}
6868_ACEOF
6869rm -f conftest.$ac_objext
6870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6871 (eval $ac_compile) 2>&5
6872 ac_status=$?
6873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6874 (exit $ac_status); } &&
6875 { ac_try='test -s conftest.$ac_objext'
6876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6877 (eval $ac_try) 2>&5
6878 ac_status=$?
6879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6880 (exit $ac_status); }; }; then
6881 ac_hi=$ac_mid
6882else
6883 echo "$as_me: failed program was:" >&5
6884cat conftest.$ac_ext >&5
6885ac_lo=`expr '(' $ac_mid ')' + 1`
6886fi
6887rm -f conftest.$ac_objext conftest.$ac_ext
6888done
6889case $ac_lo in
6890?*) ac_cv_sizeof_short=$ac_lo;;
6891'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6892echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6893 { (exit 1); exit 1; }; } ;;
6894esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006895else
6896 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006897 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6898echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6899 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006900else
Martin v. Löwis11437992002-04-12 09:54:03 +00006901 cat >conftest.$ac_ext <<_ACEOF
6902#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006903#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006904$ac_includes_default
6905long longval () { return (long) (sizeof (short)); }
6906unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006907#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006908#include <stdlib.h>
6909#ifdef F77_DUMMY_MAIN
6910# ifdef __cplusplus
6911 extern "C"
6912# endif
6913 int F77_DUMMY_MAIN() { return 1; }
6914#endif
6915int
6916main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006917{
Martin v. Löwis11437992002-04-12 09:54:03 +00006918
6919 FILE *f = fopen ("conftest.val", "w");
6920 if (! f)
6921 exit (1);
6922 if (((long) (sizeof (short))) < 0)
6923 {
6924 long i = longval ();
6925 if (i != ((long) (sizeof (short))))
6926 exit (1);
6927 fprintf (f, "%ld\n", i);
6928 }
6929 else
6930 {
6931 unsigned long i = ulongval ();
6932 if (i != ((long) (sizeof (short))))
6933 exit (1);
6934 fprintf (f, "%lu\n", i);
6935 }
6936 exit (ferror (f) || fclose (f) != 0);
6937
6938 ;
6939 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006940}
Martin v. Löwis11437992002-04-12 09:54:03 +00006941_ACEOF
6942rm -f conftest$ac_exeext
6943if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6944 (eval $ac_link) 2>&5
6945 ac_status=$?
6946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6947 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6949 (eval $ac_try) 2>&5
6950 ac_status=$?
6951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6952 (exit $ac_status); }; }; then
6953 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006954else
Martin v. Löwis11437992002-04-12 09:54:03 +00006955 echo "$as_me: program exited with status $ac_status" >&5
6956echo "$as_me: failed program was:" >&5
6957cat conftest.$ac_ext >&5
6958( exit $ac_status )
6959{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6960echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6961 { (exit 1); exit 1; }; }
6962fi
6963rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6964fi
6965fi
6966rm -f conftest.val
6967else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006968 ac_cv_sizeof_short=0
6969fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006970fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006971echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6972echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6973cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006974#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006975_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006976
6977
Martin v. Löwis11437992002-04-12 09:54:03 +00006978echo "$as_me:$LINENO: checking for float" >&5
6979echo $ECHO_N "checking for float... $ECHO_C" >&6
6980if test "${ac_cv_type_float+set}" = set; then
6981 echo $ECHO_N "(cached) $ECHO_C" >&6
6982else
6983 cat >conftest.$ac_ext <<_ACEOF
6984#line $LINENO "configure"
6985#include "confdefs.h"
6986$ac_includes_default
6987#ifdef F77_DUMMY_MAIN
6988# ifdef __cplusplus
6989 extern "C"
6990# endif
6991 int F77_DUMMY_MAIN() { return 1; }
6992#endif
6993int
6994main ()
6995{
6996if ((float *) 0)
6997 return 0;
6998if (sizeof (float))
6999 return 0;
7000 ;
7001 return 0;
7002}
7003_ACEOF
7004rm -f conftest.$ac_objext
7005if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7006 (eval $ac_compile) 2>&5
7007 ac_status=$?
7008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7009 (exit $ac_status); } &&
7010 { ac_try='test -s conftest.$ac_objext'
7011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7012 (eval $ac_try) 2>&5
7013 ac_status=$?
7014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7015 (exit $ac_status); }; }; then
7016 ac_cv_type_float=yes
7017else
7018 echo "$as_me: failed program was:" >&5
7019cat conftest.$ac_ext >&5
7020ac_cv_type_float=no
7021fi
7022rm -f conftest.$ac_objext conftest.$ac_ext
7023fi
7024echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7025echo "${ECHO_T}$ac_cv_type_float" >&6
7026
7027echo "$as_me:$LINENO: checking size of float" >&5
7028echo $ECHO_N "checking size of float... $ECHO_C" >&6
7029if test "${ac_cv_sizeof_float+set}" = set; then
7030 echo $ECHO_N "(cached) $ECHO_C" >&6
7031else
7032 if test "$ac_cv_type_float" = yes; then
7033 # The cast to unsigned long works around a bug in the HP C Compiler
7034 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7035 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7036 # This bug is HP SR number 8606223364.
7037 if test "$cross_compiling" = yes; then
7038 # Depending upon the size, compute the lo and hi bounds.
7039cat >conftest.$ac_ext <<_ACEOF
7040#line $LINENO "configure"
7041#include "confdefs.h"
7042$ac_includes_default
7043#ifdef F77_DUMMY_MAIN
7044# ifdef __cplusplus
7045 extern "C"
7046# endif
7047 int F77_DUMMY_MAIN() { return 1; }
7048#endif
7049int
7050main ()
7051{
7052static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7053test_array [0] = 0
7054
7055 ;
7056 return 0;
7057}
7058_ACEOF
7059rm -f conftest.$ac_objext
7060if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7061 (eval $ac_compile) 2>&5
7062 ac_status=$?
7063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7064 (exit $ac_status); } &&
7065 { ac_try='test -s conftest.$ac_objext'
7066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7067 (eval $ac_try) 2>&5
7068 ac_status=$?
7069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7070 (exit $ac_status); }; }; then
7071 ac_lo=0 ac_mid=0
7072 while :; do
7073 cat >conftest.$ac_ext <<_ACEOF
7074#line $LINENO "configure"
7075#include "confdefs.h"
7076$ac_includes_default
7077#ifdef F77_DUMMY_MAIN
7078# ifdef __cplusplus
7079 extern "C"
7080# endif
7081 int F77_DUMMY_MAIN() { return 1; }
7082#endif
7083int
7084main ()
7085{
7086static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7087test_array [0] = 0
7088
7089 ;
7090 return 0;
7091}
7092_ACEOF
7093rm -f conftest.$ac_objext
7094if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7095 (eval $ac_compile) 2>&5
7096 ac_status=$?
7097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7098 (exit $ac_status); } &&
7099 { ac_try='test -s conftest.$ac_objext'
7100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7101 (eval $ac_try) 2>&5
7102 ac_status=$?
7103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7104 (exit $ac_status); }; }; then
7105 ac_hi=$ac_mid; break
7106else
7107 echo "$as_me: failed program was:" >&5
7108cat conftest.$ac_ext >&5
7109ac_lo=`expr $ac_mid + 1`
7110 if test $ac_lo -le $ac_mid; then
7111 ac_lo= ac_hi=
7112 break
7113 fi
7114 ac_mid=`expr 2 '*' $ac_mid + 1`
7115fi
7116rm -f conftest.$ac_objext conftest.$ac_ext
7117 done
7118else
7119 echo "$as_me: failed program was:" >&5
7120cat conftest.$ac_ext >&5
7121cat >conftest.$ac_ext <<_ACEOF
7122#line $LINENO "configure"
7123#include "confdefs.h"
7124$ac_includes_default
7125#ifdef F77_DUMMY_MAIN
7126# ifdef __cplusplus
7127 extern "C"
7128# endif
7129 int F77_DUMMY_MAIN() { return 1; }
7130#endif
7131int
7132main ()
7133{
7134static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7135test_array [0] = 0
7136
7137 ;
7138 return 0;
7139}
7140_ACEOF
7141rm -f conftest.$ac_objext
7142if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7143 (eval $ac_compile) 2>&5
7144 ac_status=$?
7145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7146 (exit $ac_status); } &&
7147 { ac_try='test -s conftest.$ac_objext'
7148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7149 (eval $ac_try) 2>&5
7150 ac_status=$?
7151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7152 (exit $ac_status); }; }; then
7153 ac_hi=-1 ac_mid=-1
7154 while :; do
7155 cat >conftest.$ac_ext <<_ACEOF
7156#line $LINENO "configure"
7157#include "confdefs.h"
7158$ac_includes_default
7159#ifdef F77_DUMMY_MAIN
7160# ifdef __cplusplus
7161 extern "C"
7162# endif
7163 int F77_DUMMY_MAIN() { return 1; }
7164#endif
7165int
7166main ()
7167{
7168static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7169test_array [0] = 0
7170
7171 ;
7172 return 0;
7173}
7174_ACEOF
7175rm -f conftest.$ac_objext
7176if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7177 (eval $ac_compile) 2>&5
7178 ac_status=$?
7179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7180 (exit $ac_status); } &&
7181 { ac_try='test -s conftest.$ac_objext'
7182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7183 (eval $ac_try) 2>&5
7184 ac_status=$?
7185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7186 (exit $ac_status); }; }; then
7187 ac_lo=$ac_mid; break
7188else
7189 echo "$as_me: failed program was:" >&5
7190cat conftest.$ac_ext >&5
7191ac_hi=`expr '(' $ac_mid ')' - 1`
7192 if test $ac_mid -le $ac_hi; then
7193 ac_lo= ac_hi=
7194 break
7195 fi
7196 ac_mid=`expr 2 '*' $ac_mid`
7197fi
7198rm -f conftest.$ac_objext conftest.$ac_ext
7199 done
7200else
7201 echo "$as_me: failed program was:" >&5
7202cat conftest.$ac_ext >&5
7203ac_lo= ac_hi=
7204fi
7205rm -f conftest.$ac_objext conftest.$ac_ext
7206fi
7207rm -f conftest.$ac_objext conftest.$ac_ext
7208# Binary search between lo and hi bounds.
7209while test "x$ac_lo" != "x$ac_hi"; do
7210 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7211 cat >conftest.$ac_ext <<_ACEOF
7212#line $LINENO "configure"
7213#include "confdefs.h"
7214$ac_includes_default
7215#ifdef F77_DUMMY_MAIN
7216# ifdef __cplusplus
7217 extern "C"
7218# endif
7219 int F77_DUMMY_MAIN() { return 1; }
7220#endif
7221int
7222main ()
7223{
7224static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7225test_array [0] = 0
7226
7227 ;
7228 return 0;
7229}
7230_ACEOF
7231rm -f conftest.$ac_objext
7232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7233 (eval $ac_compile) 2>&5
7234 ac_status=$?
7235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7236 (exit $ac_status); } &&
7237 { ac_try='test -s conftest.$ac_objext'
7238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7239 (eval $ac_try) 2>&5
7240 ac_status=$?
7241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7242 (exit $ac_status); }; }; then
7243 ac_hi=$ac_mid
7244else
7245 echo "$as_me: failed program was:" >&5
7246cat conftest.$ac_ext >&5
7247ac_lo=`expr '(' $ac_mid ')' + 1`
7248fi
7249rm -f conftest.$ac_objext conftest.$ac_ext
7250done
7251case $ac_lo in
7252?*) ac_cv_sizeof_float=$ac_lo;;
7253'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7254echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7255 { (exit 1); exit 1; }; } ;;
7256esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007257else
7258 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007259 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7260echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7261 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007262else
Martin v. Löwis11437992002-04-12 09:54:03 +00007263 cat >conftest.$ac_ext <<_ACEOF
7264#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007265#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007266$ac_includes_default
7267long longval () { return (long) (sizeof (float)); }
7268unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007269#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007270#include <stdlib.h>
7271#ifdef F77_DUMMY_MAIN
7272# ifdef __cplusplus
7273 extern "C"
7274# endif
7275 int F77_DUMMY_MAIN() { return 1; }
7276#endif
7277int
7278main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007279{
Martin v. Löwis11437992002-04-12 09:54:03 +00007280
7281 FILE *f = fopen ("conftest.val", "w");
7282 if (! f)
7283 exit (1);
7284 if (((long) (sizeof (float))) < 0)
7285 {
7286 long i = longval ();
7287 if (i != ((long) (sizeof (float))))
7288 exit (1);
7289 fprintf (f, "%ld\n", i);
7290 }
7291 else
7292 {
7293 unsigned long i = ulongval ();
7294 if (i != ((long) (sizeof (float))))
7295 exit (1);
7296 fprintf (f, "%lu\n", i);
7297 }
7298 exit (ferror (f) || fclose (f) != 0);
7299
7300 ;
7301 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007302}
Martin v. Löwis11437992002-04-12 09:54:03 +00007303_ACEOF
7304rm -f conftest$ac_exeext
7305if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7306 (eval $ac_link) 2>&5
7307 ac_status=$?
7308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7309 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7311 (eval $ac_try) 2>&5
7312 ac_status=$?
7313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7314 (exit $ac_status); }; }; then
7315 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007316else
Martin v. Löwis11437992002-04-12 09:54:03 +00007317 echo "$as_me: program exited with status $ac_status" >&5
7318echo "$as_me: failed program was:" >&5
7319cat conftest.$ac_ext >&5
7320( exit $ac_status )
7321{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7322echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7323 { (exit 1); exit 1; }; }
7324fi
7325rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7326fi
7327fi
7328rm -f conftest.val
7329else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007330 ac_cv_sizeof_float=0
7331fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007332fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007333echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7334echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7335cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007336#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007337_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007338
7339
Martin v. Löwis11437992002-04-12 09:54:03 +00007340echo "$as_me:$LINENO: checking for double" >&5
7341echo $ECHO_N "checking for double... $ECHO_C" >&6
7342if test "${ac_cv_type_double+set}" = set; then
7343 echo $ECHO_N "(cached) $ECHO_C" >&6
7344else
7345 cat >conftest.$ac_ext <<_ACEOF
7346#line $LINENO "configure"
7347#include "confdefs.h"
7348$ac_includes_default
7349#ifdef F77_DUMMY_MAIN
7350# ifdef __cplusplus
7351 extern "C"
7352# endif
7353 int F77_DUMMY_MAIN() { return 1; }
7354#endif
7355int
7356main ()
7357{
7358if ((double *) 0)
7359 return 0;
7360if (sizeof (double))
7361 return 0;
7362 ;
7363 return 0;
7364}
7365_ACEOF
7366rm -f conftest.$ac_objext
7367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7368 (eval $ac_compile) 2>&5
7369 ac_status=$?
7370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7371 (exit $ac_status); } &&
7372 { ac_try='test -s conftest.$ac_objext'
7373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7374 (eval $ac_try) 2>&5
7375 ac_status=$?
7376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7377 (exit $ac_status); }; }; then
7378 ac_cv_type_double=yes
7379else
7380 echo "$as_me: failed program was:" >&5
7381cat conftest.$ac_ext >&5
7382ac_cv_type_double=no
7383fi
7384rm -f conftest.$ac_objext conftest.$ac_ext
7385fi
7386echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7387echo "${ECHO_T}$ac_cv_type_double" >&6
7388
7389echo "$as_me:$LINENO: checking size of double" >&5
7390echo $ECHO_N "checking size of double... $ECHO_C" >&6
7391if test "${ac_cv_sizeof_double+set}" = set; then
7392 echo $ECHO_N "(cached) $ECHO_C" >&6
7393else
7394 if test "$ac_cv_type_double" = yes; then
7395 # The cast to unsigned long works around a bug in the HP C Compiler
7396 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7397 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7398 # This bug is HP SR number 8606223364.
7399 if test "$cross_compiling" = yes; then
7400 # Depending upon the size, compute the lo and hi bounds.
7401cat >conftest.$ac_ext <<_ACEOF
7402#line $LINENO "configure"
7403#include "confdefs.h"
7404$ac_includes_default
7405#ifdef F77_DUMMY_MAIN
7406# ifdef __cplusplus
7407 extern "C"
7408# endif
7409 int F77_DUMMY_MAIN() { return 1; }
7410#endif
7411int
7412main ()
7413{
7414static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7415test_array [0] = 0
7416
7417 ;
7418 return 0;
7419}
7420_ACEOF
7421rm -f conftest.$ac_objext
7422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7423 (eval $ac_compile) 2>&5
7424 ac_status=$?
7425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7426 (exit $ac_status); } &&
7427 { ac_try='test -s conftest.$ac_objext'
7428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7429 (eval $ac_try) 2>&5
7430 ac_status=$?
7431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7432 (exit $ac_status); }; }; then
7433 ac_lo=0 ac_mid=0
7434 while :; do
7435 cat >conftest.$ac_ext <<_ACEOF
7436#line $LINENO "configure"
7437#include "confdefs.h"
7438$ac_includes_default
7439#ifdef F77_DUMMY_MAIN
7440# ifdef __cplusplus
7441 extern "C"
7442# endif
7443 int F77_DUMMY_MAIN() { return 1; }
7444#endif
7445int
7446main ()
7447{
7448static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7449test_array [0] = 0
7450
7451 ;
7452 return 0;
7453}
7454_ACEOF
7455rm -f conftest.$ac_objext
7456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7457 (eval $ac_compile) 2>&5
7458 ac_status=$?
7459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7460 (exit $ac_status); } &&
7461 { ac_try='test -s conftest.$ac_objext'
7462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7463 (eval $ac_try) 2>&5
7464 ac_status=$?
7465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7466 (exit $ac_status); }; }; then
7467 ac_hi=$ac_mid; break
7468else
7469 echo "$as_me: failed program was:" >&5
7470cat conftest.$ac_ext >&5
7471ac_lo=`expr $ac_mid + 1`
7472 if test $ac_lo -le $ac_mid; then
7473 ac_lo= ac_hi=
7474 break
7475 fi
7476 ac_mid=`expr 2 '*' $ac_mid + 1`
7477fi
7478rm -f conftest.$ac_objext conftest.$ac_ext
7479 done
7480else
7481 echo "$as_me: failed program was:" >&5
7482cat conftest.$ac_ext >&5
7483cat >conftest.$ac_ext <<_ACEOF
7484#line $LINENO "configure"
7485#include "confdefs.h"
7486$ac_includes_default
7487#ifdef F77_DUMMY_MAIN
7488# ifdef __cplusplus
7489 extern "C"
7490# endif
7491 int F77_DUMMY_MAIN() { return 1; }
7492#endif
7493int
7494main ()
7495{
7496static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7497test_array [0] = 0
7498
7499 ;
7500 return 0;
7501}
7502_ACEOF
7503rm -f conftest.$ac_objext
7504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7505 (eval $ac_compile) 2>&5
7506 ac_status=$?
7507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7508 (exit $ac_status); } &&
7509 { ac_try='test -s conftest.$ac_objext'
7510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7511 (eval $ac_try) 2>&5
7512 ac_status=$?
7513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7514 (exit $ac_status); }; }; then
7515 ac_hi=-1 ac_mid=-1
7516 while :; do
7517 cat >conftest.$ac_ext <<_ACEOF
7518#line $LINENO "configure"
7519#include "confdefs.h"
7520$ac_includes_default
7521#ifdef F77_DUMMY_MAIN
7522# ifdef __cplusplus
7523 extern "C"
7524# endif
7525 int F77_DUMMY_MAIN() { return 1; }
7526#endif
7527int
7528main ()
7529{
7530static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7531test_array [0] = 0
7532
7533 ;
7534 return 0;
7535}
7536_ACEOF
7537rm -f conftest.$ac_objext
7538if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7539 (eval $ac_compile) 2>&5
7540 ac_status=$?
7541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7542 (exit $ac_status); } &&
7543 { ac_try='test -s conftest.$ac_objext'
7544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7545 (eval $ac_try) 2>&5
7546 ac_status=$?
7547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7548 (exit $ac_status); }; }; then
7549 ac_lo=$ac_mid; break
7550else
7551 echo "$as_me: failed program was:" >&5
7552cat conftest.$ac_ext >&5
7553ac_hi=`expr '(' $ac_mid ')' - 1`
7554 if test $ac_mid -le $ac_hi; then
7555 ac_lo= ac_hi=
7556 break
7557 fi
7558 ac_mid=`expr 2 '*' $ac_mid`
7559fi
7560rm -f conftest.$ac_objext conftest.$ac_ext
7561 done
7562else
7563 echo "$as_me: failed program was:" >&5
7564cat conftest.$ac_ext >&5
7565ac_lo= ac_hi=
7566fi
7567rm -f conftest.$ac_objext conftest.$ac_ext
7568fi
7569rm -f conftest.$ac_objext conftest.$ac_ext
7570# Binary search between lo and hi bounds.
7571while test "x$ac_lo" != "x$ac_hi"; do
7572 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7573 cat >conftest.$ac_ext <<_ACEOF
7574#line $LINENO "configure"
7575#include "confdefs.h"
7576$ac_includes_default
7577#ifdef F77_DUMMY_MAIN
7578# ifdef __cplusplus
7579 extern "C"
7580# endif
7581 int F77_DUMMY_MAIN() { return 1; }
7582#endif
7583int
7584main ()
7585{
7586static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7587test_array [0] = 0
7588
7589 ;
7590 return 0;
7591}
7592_ACEOF
7593rm -f conftest.$ac_objext
7594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7595 (eval $ac_compile) 2>&5
7596 ac_status=$?
7597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7598 (exit $ac_status); } &&
7599 { ac_try='test -s conftest.$ac_objext'
7600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7601 (eval $ac_try) 2>&5
7602 ac_status=$?
7603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7604 (exit $ac_status); }; }; then
7605 ac_hi=$ac_mid
7606else
7607 echo "$as_me: failed program was:" >&5
7608cat conftest.$ac_ext >&5
7609ac_lo=`expr '(' $ac_mid ')' + 1`
7610fi
7611rm -f conftest.$ac_objext conftest.$ac_ext
7612done
7613case $ac_lo in
7614?*) ac_cv_sizeof_double=$ac_lo;;
7615'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7616echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7617 { (exit 1); exit 1; }; } ;;
7618esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007619else
7620 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007621 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7622echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7623 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007624else
Martin v. Löwis11437992002-04-12 09:54:03 +00007625 cat >conftest.$ac_ext <<_ACEOF
7626#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007627#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007628$ac_includes_default
7629long longval () { return (long) (sizeof (double)); }
7630unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007631#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007632#include <stdlib.h>
7633#ifdef F77_DUMMY_MAIN
7634# ifdef __cplusplus
7635 extern "C"
7636# endif
7637 int F77_DUMMY_MAIN() { return 1; }
7638#endif
7639int
7640main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007641{
Martin v. Löwis11437992002-04-12 09:54:03 +00007642
7643 FILE *f = fopen ("conftest.val", "w");
7644 if (! f)
7645 exit (1);
7646 if (((long) (sizeof (double))) < 0)
7647 {
7648 long i = longval ();
7649 if (i != ((long) (sizeof (double))))
7650 exit (1);
7651 fprintf (f, "%ld\n", i);
7652 }
7653 else
7654 {
7655 unsigned long i = ulongval ();
7656 if (i != ((long) (sizeof (double))))
7657 exit (1);
7658 fprintf (f, "%lu\n", i);
7659 }
7660 exit (ferror (f) || fclose (f) != 0);
7661
7662 ;
7663 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007664}
Martin v. Löwis11437992002-04-12 09:54:03 +00007665_ACEOF
7666rm -f conftest$ac_exeext
7667if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7668 (eval $ac_link) 2>&5
7669 ac_status=$?
7670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7671 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7673 (eval $ac_try) 2>&5
7674 ac_status=$?
7675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7676 (exit $ac_status); }; }; then
7677 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007678else
Martin v. Löwis11437992002-04-12 09:54:03 +00007679 echo "$as_me: program exited with status $ac_status" >&5
7680echo "$as_me: failed program was:" >&5
7681cat conftest.$ac_ext >&5
7682( exit $ac_status )
7683{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7684echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7685 { (exit 1); exit 1; }; }
7686fi
7687rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7688fi
7689fi
7690rm -f conftest.val
7691else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007692 ac_cv_sizeof_double=0
7693fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007694fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007695echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7696echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7697cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007698#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007699_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007700
7701
Martin v. Löwis11437992002-04-12 09:54:03 +00007702echo "$as_me:$LINENO: checking for fpos_t" >&5
7703echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7704if test "${ac_cv_type_fpos_t+set}" = set; then
7705 echo $ECHO_N "(cached) $ECHO_C" >&6
7706else
7707 cat >conftest.$ac_ext <<_ACEOF
7708#line $LINENO "configure"
7709#include "confdefs.h"
7710$ac_includes_default
7711#ifdef F77_DUMMY_MAIN
7712# ifdef __cplusplus
7713 extern "C"
7714# endif
7715 int F77_DUMMY_MAIN() { return 1; }
7716#endif
7717int
7718main ()
7719{
7720if ((fpos_t *) 0)
7721 return 0;
7722if (sizeof (fpos_t))
7723 return 0;
7724 ;
7725 return 0;
7726}
7727_ACEOF
7728rm -f conftest.$ac_objext
7729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7730 (eval $ac_compile) 2>&5
7731 ac_status=$?
7732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7733 (exit $ac_status); } &&
7734 { ac_try='test -s conftest.$ac_objext'
7735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7736 (eval $ac_try) 2>&5
7737 ac_status=$?
7738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7739 (exit $ac_status); }; }; then
7740 ac_cv_type_fpos_t=yes
7741else
7742 echo "$as_me: failed program was:" >&5
7743cat conftest.$ac_ext >&5
7744ac_cv_type_fpos_t=no
7745fi
7746rm -f conftest.$ac_objext conftest.$ac_ext
7747fi
7748echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7749echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7750
7751echo "$as_me:$LINENO: checking size of fpos_t" >&5
7752echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7753if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7754 echo $ECHO_N "(cached) $ECHO_C" >&6
7755else
7756 if test "$ac_cv_type_fpos_t" = yes; then
7757 # The cast to unsigned long works around a bug in the HP C Compiler
7758 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7759 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7760 # This bug is HP SR number 8606223364.
7761 if test "$cross_compiling" = yes; then
7762 # Depending upon the size, compute the lo and hi bounds.
7763cat >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 (fpos_t))) >= 0)];
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=0 ac_mid=0
7796 while :; do
7797 cat >conftest.$ac_ext <<_ACEOF
7798#line $LINENO "configure"
7799#include "confdefs.h"
7800$ac_includes_default
7801#ifdef F77_DUMMY_MAIN
7802# ifdef __cplusplus
7803 extern "C"
7804# endif
7805 int F77_DUMMY_MAIN() { return 1; }
7806#endif
7807int
7808main ()
7809{
7810static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7811test_array [0] = 0
7812
7813 ;
7814 return 0;
7815}
7816_ACEOF
7817rm -f conftest.$ac_objext
7818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7819 (eval $ac_compile) 2>&5
7820 ac_status=$?
7821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7822 (exit $ac_status); } &&
7823 { ac_try='test -s conftest.$ac_objext'
7824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7825 (eval $ac_try) 2>&5
7826 ac_status=$?
7827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7828 (exit $ac_status); }; }; then
7829 ac_hi=$ac_mid; break
7830else
7831 echo "$as_me: failed program was:" >&5
7832cat conftest.$ac_ext >&5
7833ac_lo=`expr $ac_mid + 1`
7834 if test $ac_lo -le $ac_mid; then
7835 ac_lo= ac_hi=
7836 break
7837 fi
7838 ac_mid=`expr 2 '*' $ac_mid + 1`
7839fi
7840rm -f conftest.$ac_objext conftest.$ac_ext
7841 done
7842else
7843 echo "$as_me: failed program was:" >&5
7844cat conftest.$ac_ext >&5
7845cat >conftest.$ac_ext <<_ACEOF
7846#line $LINENO "configure"
7847#include "confdefs.h"
7848$ac_includes_default
7849#ifdef F77_DUMMY_MAIN
7850# ifdef __cplusplus
7851 extern "C"
7852# endif
7853 int F77_DUMMY_MAIN() { return 1; }
7854#endif
7855int
7856main ()
7857{
7858static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7859test_array [0] = 0
7860
7861 ;
7862 return 0;
7863}
7864_ACEOF
7865rm -f conftest.$ac_objext
7866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7867 (eval $ac_compile) 2>&5
7868 ac_status=$?
7869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7870 (exit $ac_status); } &&
7871 { ac_try='test -s conftest.$ac_objext'
7872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7873 (eval $ac_try) 2>&5
7874 ac_status=$?
7875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7876 (exit $ac_status); }; }; then
7877 ac_hi=-1 ac_mid=-1
7878 while :; do
7879 cat >conftest.$ac_ext <<_ACEOF
7880#line $LINENO "configure"
7881#include "confdefs.h"
7882$ac_includes_default
7883#ifdef F77_DUMMY_MAIN
7884# ifdef __cplusplus
7885 extern "C"
7886# endif
7887 int F77_DUMMY_MAIN() { return 1; }
7888#endif
7889int
7890main ()
7891{
7892static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7893test_array [0] = 0
7894
7895 ;
7896 return 0;
7897}
7898_ACEOF
7899rm -f conftest.$ac_objext
7900if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7901 (eval $ac_compile) 2>&5
7902 ac_status=$?
7903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7904 (exit $ac_status); } &&
7905 { ac_try='test -s conftest.$ac_objext'
7906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7907 (eval $ac_try) 2>&5
7908 ac_status=$?
7909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7910 (exit $ac_status); }; }; then
7911 ac_lo=$ac_mid; break
7912else
7913 echo "$as_me: failed program was:" >&5
7914cat conftest.$ac_ext >&5
7915ac_hi=`expr '(' $ac_mid ')' - 1`
7916 if test $ac_mid -le $ac_hi; then
7917 ac_lo= ac_hi=
7918 break
7919 fi
7920 ac_mid=`expr 2 '*' $ac_mid`
7921fi
7922rm -f conftest.$ac_objext conftest.$ac_ext
7923 done
7924else
7925 echo "$as_me: failed program was:" >&5
7926cat conftest.$ac_ext >&5
7927ac_lo= ac_hi=
7928fi
7929rm -f conftest.$ac_objext conftest.$ac_ext
7930fi
7931rm -f conftest.$ac_objext conftest.$ac_ext
7932# Binary search between lo and hi bounds.
7933while test "x$ac_lo" != "x$ac_hi"; do
7934 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7935 cat >conftest.$ac_ext <<_ACEOF
7936#line $LINENO "configure"
7937#include "confdefs.h"
7938$ac_includes_default
7939#ifdef F77_DUMMY_MAIN
7940# ifdef __cplusplus
7941 extern "C"
7942# endif
7943 int F77_DUMMY_MAIN() { return 1; }
7944#endif
7945int
7946main ()
7947{
7948static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7949test_array [0] = 0
7950
7951 ;
7952 return 0;
7953}
7954_ACEOF
7955rm -f conftest.$ac_objext
7956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7957 (eval $ac_compile) 2>&5
7958 ac_status=$?
7959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7960 (exit $ac_status); } &&
7961 { ac_try='test -s conftest.$ac_objext'
7962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7963 (eval $ac_try) 2>&5
7964 ac_status=$?
7965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7966 (exit $ac_status); }; }; then
7967 ac_hi=$ac_mid
7968else
7969 echo "$as_me: failed program was:" >&5
7970cat conftest.$ac_ext >&5
7971ac_lo=`expr '(' $ac_mid ')' + 1`
7972fi
7973rm -f conftest.$ac_objext conftest.$ac_ext
7974done
7975case $ac_lo in
7976?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7977'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7978echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7979 { (exit 1); exit 1; }; } ;;
7980esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007981else
7982 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007983 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7984echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7985 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007986else
Martin v. Löwis11437992002-04-12 09:54:03 +00007987 cat >conftest.$ac_ext <<_ACEOF
7988#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007989#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007990$ac_includes_default
7991long longval () { return (long) (sizeof (fpos_t)); }
7992unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007993#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007994#include <stdlib.h>
7995#ifdef F77_DUMMY_MAIN
7996# ifdef __cplusplus
7997 extern "C"
7998# endif
7999 int F77_DUMMY_MAIN() { return 1; }
8000#endif
8001int
8002main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008003{
Martin v. Löwis11437992002-04-12 09:54:03 +00008004
8005 FILE *f = fopen ("conftest.val", "w");
8006 if (! f)
8007 exit (1);
8008 if (((long) (sizeof (fpos_t))) < 0)
8009 {
8010 long i = longval ();
8011 if (i != ((long) (sizeof (fpos_t))))
8012 exit (1);
8013 fprintf (f, "%ld\n", i);
8014 }
8015 else
8016 {
8017 unsigned long i = ulongval ();
8018 if (i != ((long) (sizeof (fpos_t))))
8019 exit (1);
8020 fprintf (f, "%lu\n", i);
8021 }
8022 exit (ferror (f) || fclose (f) != 0);
8023
8024 ;
8025 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008026}
Martin v. Löwis11437992002-04-12 09:54:03 +00008027_ACEOF
8028rm -f conftest$ac_exeext
8029if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8030 (eval $ac_link) 2>&5
8031 ac_status=$?
8032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8033 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8035 (eval $ac_try) 2>&5
8036 ac_status=$?
8037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8038 (exit $ac_status); }; }; then
8039 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008040else
Martin v. Löwis11437992002-04-12 09:54:03 +00008041 echo "$as_me: program exited with status $ac_status" >&5
8042echo "$as_me: failed program was:" >&5
8043cat conftest.$ac_ext >&5
8044( exit $ac_status )
8045{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8046echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8047 { (exit 1); exit 1; }; }
8048fi
8049rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8050fi
8051fi
8052rm -f conftest.val
8053else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008054 ac_cv_sizeof_fpos_t=0
8055fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008056fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008057echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8058echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8059cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008060#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008061_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008062
Michael W. Hudson54241132001-12-07 15:38:26 +00008063
8064
Martin v. Löwis11437992002-04-12 09:54:03 +00008065echo "$as_me:$LINENO: checking for long long support" >&5
8066echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008067have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008068cat >conftest.$ac_ext <<_ACEOF
8069#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008070#include "confdefs.h"
8071
Martin v. Löwis11437992002-04-12 09:54:03 +00008072#ifdef F77_DUMMY_MAIN
8073# ifdef __cplusplus
8074 extern "C"
8075# endif
8076 int F77_DUMMY_MAIN() { return 1; }
8077#endif
8078int
8079main ()
8080{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008081long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 ;
8083 return 0;
8084}
8085_ACEOF
8086rm -f conftest.$ac_objext
8087if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8088 (eval $ac_compile) 2>&5
8089 ac_status=$?
8090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8091 (exit $ac_status); } &&
8092 { ac_try='test -s conftest.$ac_objext'
8093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8094 (eval $ac_try) 2>&5
8095 ac_status=$?
8096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8097 (exit $ac_status); }; }; then
8098
8099
8100cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008101#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008102_ACEOF
8103
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008104 have_long_long=yes
8105
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008106else
Martin v. Löwis11437992002-04-12 09:54:03 +00008107 echo "$as_me: failed program was:" >&5
8108cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008109fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008110rm -f conftest.$ac_objext conftest.$ac_ext
8111echo "$as_me:$LINENO: result: $have_long_long" >&5
8112echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008113if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008114echo "$as_me:$LINENO: checking for long long" >&5
8115echo $ECHO_N "checking for long long... $ECHO_C" >&6
8116if test "${ac_cv_type_long_long+set}" = set; then
8117 echo $ECHO_N "(cached) $ECHO_C" >&6
8118else
8119 cat >conftest.$ac_ext <<_ACEOF
8120#line $LINENO "configure"
8121#include "confdefs.h"
8122$ac_includes_default
8123#ifdef F77_DUMMY_MAIN
8124# ifdef __cplusplus
8125 extern "C"
8126# endif
8127 int F77_DUMMY_MAIN() { return 1; }
8128#endif
8129int
8130main ()
8131{
8132if ((long long *) 0)
8133 return 0;
8134if (sizeof (long long))
8135 return 0;
8136 ;
8137 return 0;
8138}
8139_ACEOF
8140rm -f conftest.$ac_objext
8141if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8142 (eval $ac_compile) 2>&5
8143 ac_status=$?
8144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8145 (exit $ac_status); } &&
8146 { ac_try='test -s conftest.$ac_objext'
8147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8148 (eval $ac_try) 2>&5
8149 ac_status=$?
8150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8151 (exit $ac_status); }; }; then
8152 ac_cv_type_long_long=yes
8153else
8154 echo "$as_me: failed program was:" >&5
8155cat conftest.$ac_ext >&5
8156ac_cv_type_long_long=no
8157fi
8158rm -f conftest.$ac_objext conftest.$ac_ext
8159fi
8160echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8161echo "${ECHO_T}$ac_cv_type_long_long" >&6
8162
8163echo "$as_me:$LINENO: checking size of long long" >&5
8164echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8165if test "${ac_cv_sizeof_long_long+set}" = set; then
8166 echo $ECHO_N "(cached) $ECHO_C" >&6
8167else
8168 if test "$ac_cv_type_long_long" = yes; then
8169 # The cast to unsigned long works around a bug in the HP C Compiler
8170 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8171 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8172 # This bug is HP SR number 8606223364.
8173 if test "$cross_compiling" = yes; then
8174 # Depending upon the size, compute the lo and hi bounds.
8175cat >conftest.$ac_ext <<_ACEOF
8176#line $LINENO "configure"
8177#include "confdefs.h"
8178$ac_includes_default
8179#ifdef F77_DUMMY_MAIN
8180# ifdef __cplusplus
8181 extern "C"
8182# endif
8183 int F77_DUMMY_MAIN() { return 1; }
8184#endif
8185int
8186main ()
8187{
8188static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8189test_array [0] = 0
8190
8191 ;
8192 return 0;
8193}
8194_ACEOF
8195rm -f conftest.$ac_objext
8196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8197 (eval $ac_compile) 2>&5
8198 ac_status=$?
8199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8200 (exit $ac_status); } &&
8201 { ac_try='test -s conftest.$ac_objext'
8202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8203 (eval $ac_try) 2>&5
8204 ac_status=$?
8205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8206 (exit $ac_status); }; }; then
8207 ac_lo=0 ac_mid=0
8208 while :; do
8209 cat >conftest.$ac_ext <<_ACEOF
8210#line $LINENO "configure"
8211#include "confdefs.h"
8212$ac_includes_default
8213#ifdef F77_DUMMY_MAIN
8214# ifdef __cplusplus
8215 extern "C"
8216# endif
8217 int F77_DUMMY_MAIN() { return 1; }
8218#endif
8219int
8220main ()
8221{
8222static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8223test_array [0] = 0
8224
8225 ;
8226 return 0;
8227}
8228_ACEOF
8229rm -f conftest.$ac_objext
8230if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8231 (eval $ac_compile) 2>&5
8232 ac_status=$?
8233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8234 (exit $ac_status); } &&
8235 { ac_try='test -s conftest.$ac_objext'
8236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8237 (eval $ac_try) 2>&5
8238 ac_status=$?
8239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8240 (exit $ac_status); }; }; then
8241 ac_hi=$ac_mid; break
8242else
8243 echo "$as_me: failed program was:" >&5
8244cat conftest.$ac_ext >&5
8245ac_lo=`expr $ac_mid + 1`
8246 if test $ac_lo -le $ac_mid; then
8247 ac_lo= ac_hi=
8248 break
8249 fi
8250 ac_mid=`expr 2 '*' $ac_mid + 1`
8251fi
8252rm -f conftest.$ac_objext conftest.$ac_ext
8253 done
8254else
8255 echo "$as_me: failed program was:" >&5
8256cat conftest.$ac_ext >&5
8257cat >conftest.$ac_ext <<_ACEOF
8258#line $LINENO "configure"
8259#include "confdefs.h"
8260$ac_includes_default
8261#ifdef F77_DUMMY_MAIN
8262# ifdef __cplusplus
8263 extern "C"
8264# endif
8265 int F77_DUMMY_MAIN() { return 1; }
8266#endif
8267int
8268main ()
8269{
8270static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8271test_array [0] = 0
8272
8273 ;
8274 return 0;
8275}
8276_ACEOF
8277rm -f conftest.$ac_objext
8278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8279 (eval $ac_compile) 2>&5
8280 ac_status=$?
8281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8282 (exit $ac_status); } &&
8283 { ac_try='test -s conftest.$ac_objext'
8284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8285 (eval $ac_try) 2>&5
8286 ac_status=$?
8287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8288 (exit $ac_status); }; }; then
8289 ac_hi=-1 ac_mid=-1
8290 while :; do
8291 cat >conftest.$ac_ext <<_ACEOF
8292#line $LINENO "configure"
8293#include "confdefs.h"
8294$ac_includes_default
8295#ifdef F77_DUMMY_MAIN
8296# ifdef __cplusplus
8297 extern "C"
8298# endif
8299 int F77_DUMMY_MAIN() { return 1; }
8300#endif
8301int
8302main ()
8303{
8304static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8305test_array [0] = 0
8306
8307 ;
8308 return 0;
8309}
8310_ACEOF
8311rm -f conftest.$ac_objext
8312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8313 (eval $ac_compile) 2>&5
8314 ac_status=$?
8315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8316 (exit $ac_status); } &&
8317 { ac_try='test -s conftest.$ac_objext'
8318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8319 (eval $ac_try) 2>&5
8320 ac_status=$?
8321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8322 (exit $ac_status); }; }; then
8323 ac_lo=$ac_mid; break
8324else
8325 echo "$as_me: failed program was:" >&5
8326cat conftest.$ac_ext >&5
8327ac_hi=`expr '(' $ac_mid ')' - 1`
8328 if test $ac_mid -le $ac_hi; then
8329 ac_lo= ac_hi=
8330 break
8331 fi
8332 ac_mid=`expr 2 '*' $ac_mid`
8333fi
8334rm -f conftest.$ac_objext conftest.$ac_ext
8335 done
8336else
8337 echo "$as_me: failed program was:" >&5
8338cat conftest.$ac_ext >&5
8339ac_lo= ac_hi=
8340fi
8341rm -f conftest.$ac_objext conftest.$ac_ext
8342fi
8343rm -f conftest.$ac_objext conftest.$ac_ext
8344# Binary search between lo and hi bounds.
8345while test "x$ac_lo" != "x$ac_hi"; do
8346 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8347 cat >conftest.$ac_ext <<_ACEOF
8348#line $LINENO "configure"
8349#include "confdefs.h"
8350$ac_includes_default
8351#ifdef F77_DUMMY_MAIN
8352# ifdef __cplusplus
8353 extern "C"
8354# endif
8355 int F77_DUMMY_MAIN() { return 1; }
8356#endif
8357int
8358main ()
8359{
8360static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8361test_array [0] = 0
8362
8363 ;
8364 return 0;
8365}
8366_ACEOF
8367rm -f conftest.$ac_objext
8368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8369 (eval $ac_compile) 2>&5
8370 ac_status=$?
8371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8372 (exit $ac_status); } &&
8373 { ac_try='test -s conftest.$ac_objext'
8374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8375 (eval $ac_try) 2>&5
8376 ac_status=$?
8377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8378 (exit $ac_status); }; }; then
8379 ac_hi=$ac_mid
8380else
8381 echo "$as_me: failed program was:" >&5
8382cat conftest.$ac_ext >&5
8383ac_lo=`expr '(' $ac_mid ')' + 1`
8384fi
8385rm -f conftest.$ac_objext conftest.$ac_ext
8386done
8387case $ac_lo in
8388?*) ac_cv_sizeof_long_long=$ac_lo;;
8389'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8390echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8391 { (exit 1); exit 1; }; } ;;
8392esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008393else
8394 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008395 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8396echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8397 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008398else
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 cat >conftest.$ac_ext <<_ACEOF
8400#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008401#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008402$ac_includes_default
8403long longval () { return (long) (sizeof (long long)); }
8404unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008405#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008406#include <stdlib.h>
8407#ifdef F77_DUMMY_MAIN
8408# ifdef __cplusplus
8409 extern "C"
8410# endif
8411 int F77_DUMMY_MAIN() { return 1; }
8412#endif
8413int
8414main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008415{
Martin v. Löwis11437992002-04-12 09:54:03 +00008416
8417 FILE *f = fopen ("conftest.val", "w");
8418 if (! f)
8419 exit (1);
8420 if (((long) (sizeof (long long))) < 0)
8421 {
8422 long i = longval ();
8423 if (i != ((long) (sizeof (long long))))
8424 exit (1);
8425 fprintf (f, "%ld\n", i);
8426 }
8427 else
8428 {
8429 unsigned long i = ulongval ();
8430 if (i != ((long) (sizeof (long long))))
8431 exit (1);
8432 fprintf (f, "%lu\n", i);
8433 }
8434 exit (ferror (f) || fclose (f) != 0);
8435
8436 ;
8437 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008438}
Martin v. Löwis11437992002-04-12 09:54:03 +00008439_ACEOF
8440rm -f conftest$ac_exeext
8441if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8442 (eval $ac_link) 2>&5
8443 ac_status=$?
8444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8445 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8447 (eval $ac_try) 2>&5
8448 ac_status=$?
8449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8450 (exit $ac_status); }; }; then
8451 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008452else
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 echo "$as_me: program exited with status $ac_status" >&5
8454echo "$as_me: failed program was:" >&5
8455cat conftest.$ac_ext >&5
8456( exit $ac_status )
8457{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8458echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8459 { (exit 1); exit 1; }; }
8460fi
8461rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8462fi
8463fi
8464rm -f conftest.val
8465else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008466 ac_cv_sizeof_long_long=0
8467fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008468fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008469echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8470echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8471cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008472#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008473_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008474
Michael W. Hudson54241132001-12-07 15:38:26 +00008475
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008476fi
8477
Martin v. Löwis11437992002-04-12 09:54:03 +00008478echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8479echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008480have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008481cat >conftest.$ac_ext <<_ACEOF
8482#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008483#include "confdefs.h"
8484
Martin v. Löwis11437992002-04-12 09:54:03 +00008485#ifdef F77_DUMMY_MAIN
8486# ifdef __cplusplus
8487 extern "C"
8488# endif
8489 int F77_DUMMY_MAIN() { return 1; }
8490#endif
8491int
8492main ()
8493{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008494uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008495 ;
8496 return 0;
8497}
8498_ACEOF
8499rm -f conftest.$ac_objext
8500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8501 (eval $ac_compile) 2>&5
8502 ac_status=$?
8503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8504 (exit $ac_status); } &&
8505 { ac_try='test -s conftest.$ac_objext'
8506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8507 (eval $ac_try) 2>&5
8508 ac_status=$?
8509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8510 (exit $ac_status); }; }; then
8511
8512
8513cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008514#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008515_ACEOF
8516
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008517 have_uintptr_t=yes
8518
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008519else
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 echo "$as_me: failed program was:" >&5
8521cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008522fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008523rm -f conftest.$ac_objext conftest.$ac_ext
8524echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8525echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008526if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008527echo "$as_me:$LINENO: checking for uintptr_t" >&5
8528echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8529if test "${ac_cv_type_uintptr_t+set}" = set; then
8530 echo $ECHO_N "(cached) $ECHO_C" >&6
8531else
8532 cat >conftest.$ac_ext <<_ACEOF
8533#line $LINENO "configure"
8534#include "confdefs.h"
8535$ac_includes_default
8536#ifdef F77_DUMMY_MAIN
8537# ifdef __cplusplus
8538 extern "C"
8539# endif
8540 int F77_DUMMY_MAIN() { return 1; }
8541#endif
8542int
8543main ()
8544{
8545if ((uintptr_t *) 0)
8546 return 0;
8547if (sizeof (uintptr_t))
8548 return 0;
8549 ;
8550 return 0;
8551}
8552_ACEOF
8553rm -f conftest.$ac_objext
8554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8555 (eval $ac_compile) 2>&5
8556 ac_status=$?
8557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8558 (exit $ac_status); } &&
8559 { ac_try='test -s conftest.$ac_objext'
8560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8561 (eval $ac_try) 2>&5
8562 ac_status=$?
8563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8564 (exit $ac_status); }; }; then
8565 ac_cv_type_uintptr_t=yes
8566else
8567 echo "$as_me: failed program was:" >&5
8568cat conftest.$ac_ext >&5
8569ac_cv_type_uintptr_t=no
8570fi
8571rm -f conftest.$ac_objext conftest.$ac_ext
8572fi
8573echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8574echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8575
8576echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8577echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8578if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8579 echo $ECHO_N "(cached) $ECHO_C" >&6
8580else
8581 if test "$ac_cv_type_uintptr_t" = yes; then
8582 # The cast to unsigned long works around a bug in the HP C Compiler
8583 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8584 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8585 # This bug is HP SR number 8606223364.
8586 if test "$cross_compiling" = yes; then
8587 # Depending upon the size, compute the lo and hi bounds.
8588cat >conftest.$ac_ext <<_ACEOF
8589#line $LINENO "configure"
8590#include "confdefs.h"
8591$ac_includes_default
8592#ifdef F77_DUMMY_MAIN
8593# ifdef __cplusplus
8594 extern "C"
8595# endif
8596 int F77_DUMMY_MAIN() { return 1; }
8597#endif
8598int
8599main ()
8600{
8601static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8602test_array [0] = 0
8603
8604 ;
8605 return 0;
8606}
8607_ACEOF
8608rm -f conftest.$ac_objext
8609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8610 (eval $ac_compile) 2>&5
8611 ac_status=$?
8612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8613 (exit $ac_status); } &&
8614 { ac_try='test -s conftest.$ac_objext'
8615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8616 (eval $ac_try) 2>&5
8617 ac_status=$?
8618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8619 (exit $ac_status); }; }; then
8620 ac_lo=0 ac_mid=0
8621 while :; do
8622 cat >conftest.$ac_ext <<_ACEOF
8623#line $LINENO "configure"
8624#include "confdefs.h"
8625$ac_includes_default
8626#ifdef F77_DUMMY_MAIN
8627# ifdef __cplusplus
8628 extern "C"
8629# endif
8630 int F77_DUMMY_MAIN() { return 1; }
8631#endif
8632int
8633main ()
8634{
8635static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8636test_array [0] = 0
8637
8638 ;
8639 return 0;
8640}
8641_ACEOF
8642rm -f conftest.$ac_objext
8643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8644 (eval $ac_compile) 2>&5
8645 ac_status=$?
8646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8647 (exit $ac_status); } &&
8648 { ac_try='test -s conftest.$ac_objext'
8649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8650 (eval $ac_try) 2>&5
8651 ac_status=$?
8652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8653 (exit $ac_status); }; }; then
8654 ac_hi=$ac_mid; break
8655else
8656 echo "$as_me: failed program was:" >&5
8657cat conftest.$ac_ext >&5
8658ac_lo=`expr $ac_mid + 1`
8659 if test $ac_lo -le $ac_mid; then
8660 ac_lo= ac_hi=
8661 break
8662 fi
8663 ac_mid=`expr 2 '*' $ac_mid + 1`
8664fi
8665rm -f conftest.$ac_objext conftest.$ac_ext
8666 done
8667else
8668 echo "$as_me: failed program was:" >&5
8669cat conftest.$ac_ext >&5
8670cat >conftest.$ac_ext <<_ACEOF
8671#line $LINENO "configure"
8672#include "confdefs.h"
8673$ac_includes_default
8674#ifdef F77_DUMMY_MAIN
8675# ifdef __cplusplus
8676 extern "C"
8677# endif
8678 int F77_DUMMY_MAIN() { return 1; }
8679#endif
8680int
8681main ()
8682{
8683static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8684test_array [0] = 0
8685
8686 ;
8687 return 0;
8688}
8689_ACEOF
8690rm -f conftest.$ac_objext
8691if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8692 (eval $ac_compile) 2>&5
8693 ac_status=$?
8694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8695 (exit $ac_status); } &&
8696 { ac_try='test -s conftest.$ac_objext'
8697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8698 (eval $ac_try) 2>&5
8699 ac_status=$?
8700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8701 (exit $ac_status); }; }; then
8702 ac_hi=-1 ac_mid=-1
8703 while :; do
8704 cat >conftest.$ac_ext <<_ACEOF
8705#line $LINENO "configure"
8706#include "confdefs.h"
8707$ac_includes_default
8708#ifdef F77_DUMMY_MAIN
8709# ifdef __cplusplus
8710 extern "C"
8711# endif
8712 int F77_DUMMY_MAIN() { return 1; }
8713#endif
8714int
8715main ()
8716{
8717static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8718test_array [0] = 0
8719
8720 ;
8721 return 0;
8722}
8723_ACEOF
8724rm -f conftest.$ac_objext
8725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8726 (eval $ac_compile) 2>&5
8727 ac_status=$?
8728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8729 (exit $ac_status); } &&
8730 { ac_try='test -s conftest.$ac_objext'
8731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8732 (eval $ac_try) 2>&5
8733 ac_status=$?
8734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8735 (exit $ac_status); }; }; then
8736 ac_lo=$ac_mid; break
8737else
8738 echo "$as_me: failed program was:" >&5
8739cat conftest.$ac_ext >&5
8740ac_hi=`expr '(' $ac_mid ')' - 1`
8741 if test $ac_mid -le $ac_hi; then
8742 ac_lo= ac_hi=
8743 break
8744 fi
8745 ac_mid=`expr 2 '*' $ac_mid`
8746fi
8747rm -f conftest.$ac_objext conftest.$ac_ext
8748 done
8749else
8750 echo "$as_me: failed program was:" >&5
8751cat conftest.$ac_ext >&5
8752ac_lo= ac_hi=
8753fi
8754rm -f conftest.$ac_objext conftest.$ac_ext
8755fi
8756rm -f conftest.$ac_objext conftest.$ac_ext
8757# Binary search between lo and hi bounds.
8758while test "x$ac_lo" != "x$ac_hi"; do
8759 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8760 cat >conftest.$ac_ext <<_ACEOF
8761#line $LINENO "configure"
8762#include "confdefs.h"
8763$ac_includes_default
8764#ifdef F77_DUMMY_MAIN
8765# ifdef __cplusplus
8766 extern "C"
8767# endif
8768 int F77_DUMMY_MAIN() { return 1; }
8769#endif
8770int
8771main ()
8772{
8773static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8774test_array [0] = 0
8775
8776 ;
8777 return 0;
8778}
8779_ACEOF
8780rm -f conftest.$ac_objext
8781if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8782 (eval $ac_compile) 2>&5
8783 ac_status=$?
8784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8785 (exit $ac_status); } &&
8786 { ac_try='test -s conftest.$ac_objext'
8787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8788 (eval $ac_try) 2>&5
8789 ac_status=$?
8790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8791 (exit $ac_status); }; }; then
8792 ac_hi=$ac_mid
8793else
8794 echo "$as_me: failed program was:" >&5
8795cat conftest.$ac_ext >&5
8796ac_lo=`expr '(' $ac_mid ')' + 1`
8797fi
8798rm -f conftest.$ac_objext conftest.$ac_ext
8799done
8800case $ac_lo in
8801?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8802'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8803echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8804 { (exit 1); exit 1; }; } ;;
8805esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008806else
8807 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008808 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8809echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8810 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008811else
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 cat >conftest.$ac_ext <<_ACEOF
8813#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008814#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008815$ac_includes_default
8816long longval () { return (long) (sizeof (uintptr_t)); }
8817unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008818#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008819#include <stdlib.h>
8820#ifdef F77_DUMMY_MAIN
8821# ifdef __cplusplus
8822 extern "C"
8823# endif
8824 int F77_DUMMY_MAIN() { return 1; }
8825#endif
8826int
8827main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008828{
Martin v. Löwis11437992002-04-12 09:54:03 +00008829
8830 FILE *f = fopen ("conftest.val", "w");
8831 if (! f)
8832 exit (1);
8833 if (((long) (sizeof (uintptr_t))) < 0)
8834 {
8835 long i = longval ();
8836 if (i != ((long) (sizeof (uintptr_t))))
8837 exit (1);
8838 fprintf (f, "%ld\n", i);
8839 }
8840 else
8841 {
8842 unsigned long i = ulongval ();
8843 if (i != ((long) (sizeof (uintptr_t))))
8844 exit (1);
8845 fprintf (f, "%lu\n", i);
8846 }
8847 exit (ferror (f) || fclose (f) != 0);
8848
8849 ;
8850 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008851}
Martin v. Löwis11437992002-04-12 09:54:03 +00008852_ACEOF
8853rm -f conftest$ac_exeext
8854if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8855 (eval $ac_link) 2>&5
8856 ac_status=$?
8857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8858 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8860 (eval $ac_try) 2>&5
8861 ac_status=$?
8862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8863 (exit $ac_status); }; }; then
8864 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008865else
Martin v. Löwis11437992002-04-12 09:54:03 +00008866 echo "$as_me: program exited with status $ac_status" >&5
8867echo "$as_me: failed program was:" >&5
8868cat conftest.$ac_ext >&5
8869( exit $ac_status )
8870{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8871echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8872 { (exit 1); exit 1; }; }
8873fi
8874rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8875fi
8876fi
8877rm -f conftest.val
8878else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008879 ac_cv_sizeof_uintptr_t=0
8880fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008881fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008882echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8883echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8884cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008885#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008886_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008887
Michael W. Hudson54241132001-12-07 15:38:26 +00008888
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008889fi
8890
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008891# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008892echo "$as_me:$LINENO: checking size of off_t" >&5
8893echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8894if test "${ac_cv_sizeof_off_t+set}" = set; then
8895 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008896else
8897 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008898 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008899else
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 cat >conftest.$ac_ext <<_ACEOF
8901#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008902#include "confdefs.h"
8903#include <stdio.h>
8904#include <sys/types.h>
8905main()
8906{
8907 FILE *f=fopen("conftestval", "w");
8908 if (!f) exit(1);
8909 fprintf(f, "%d\n", sizeof(off_t));
8910 exit(0);
8911}
Martin v. Löwis11437992002-04-12 09:54:03 +00008912_ACEOF
8913rm -f conftest$ac_exeext
8914if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8915 (eval $ac_link) 2>&5
8916 ac_status=$?
8917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8918 (exit $ac_status); } && { ac_try='./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
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008924 ac_cv_sizeof_off_t=`cat conftestval`
8925else
Martin v. Löwis11437992002-04-12 09:54:03 +00008926 echo "$as_me: program exited with status $ac_status" >&5
8927echo "$as_me: failed program was:" >&5
8928cat conftest.$ac_ext >&5
8929( exit $ac_status )
8930ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008931fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008932rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008933fi
8934
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008935fi
8936
Martin v. Löwis11437992002-04-12 09:54:03 +00008937echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8938echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8939
8940cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008941#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008942_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008943
Michael W. Hudson54241132001-12-07 15:38:26 +00008944
Martin v. Löwis11437992002-04-12 09:54:03 +00008945echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8946echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008947if test "$have_long_long" = yes -a \
8948 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8949 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008950
Martin v. Löwis11437992002-04-12 09:54:03 +00008951cat >>confdefs.h <<\_ACEOF
8952#define HAVE_LARGEFILE_SUPPORT 1
8953_ACEOF
8954
8955 echo "$as_me:$LINENO: result: yes" >&5
8956echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008957else
Martin v. Löwis11437992002-04-12 09:54:03 +00008958 echo "$as_me:$LINENO: result: no" >&5
8959echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008960fi
8961
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008962# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008963echo "$as_me:$LINENO: checking size of time_t" >&5
8964echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8965if test "${ac_cv_sizeof_time_t+set}" = set; then
8966 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008967else
8968 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008969 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008970else
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 cat >conftest.$ac_ext <<_ACEOF
8972#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008973#include "confdefs.h"
8974#include <stdio.h>
8975#include <time.h>
8976main()
8977{
8978 FILE *f=fopen("conftestval", "w");
8979 if (!f) exit(1);
8980 fprintf(f, "%d\n", sizeof(time_t));
8981 exit(0);
8982}
Martin v. Löwis11437992002-04-12 09:54:03 +00008983_ACEOF
8984rm -f conftest$ac_exeext
8985if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8986 (eval $ac_link) 2>&5
8987 ac_status=$?
8988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8989 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8991 (eval $ac_try) 2>&5
8992 ac_status=$?
8993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8994 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008995 ac_cv_sizeof_time_t=`cat conftestval`
8996else
Martin v. Löwis11437992002-04-12 09:54:03 +00008997 echo "$as_me: program exited with status $ac_status" >&5
8998echo "$as_me: failed program was:" >&5
8999cat conftest.$ac_ext >&5
9000( exit $ac_status )
9001ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009002fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009003rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009004fi
9005
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009006fi
9007
Martin v. Löwis11437992002-04-12 09:54:03 +00009008echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9009echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9010
9011cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009012#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009013_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009014
Michael W. Hudson54241132001-12-07 15:38:26 +00009015
9016
Trent Mick635f6fb2000-08-23 21:33:05 +00009017# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009018ac_save_cc="$CC"
9019if test "$ac_cv_kpthread" = "yes"
9020then CC="$CC -Kpthread"
9021fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009022echo "$as_me:$LINENO: checking for pthread_t" >&5
9023echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009024have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009025cat >conftest.$ac_ext <<_ACEOF
9026#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009027#include "confdefs.h"
9028#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009029#ifdef F77_DUMMY_MAIN
9030# ifdef __cplusplus
9031 extern "C"
9032# endif
9033 int F77_DUMMY_MAIN() { return 1; }
9034#endif
9035int
9036main ()
9037{
Guido van Rossum12580492000-09-24 16:47:19 +00009038pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 ;
9040 return 0;
9041}
9042_ACEOF
9043rm -f conftest.$ac_objext
9044if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9045 (eval $ac_compile) 2>&5
9046 ac_status=$?
9047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9048 (exit $ac_status); } &&
9049 { ac_try='test -s conftest.$ac_objext'
9050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9051 (eval $ac_try) 2>&5
9052 ac_status=$?
9053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9054 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009055 have_pthread_t=yes
9056else
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 echo "$as_me: failed program was:" >&5
9058cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009060rm -f conftest.$ac_objext conftest.$ac_ext
9061echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9062echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009063if test "$have_pthread_t" = yes ; then
9064 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009065 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9066echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9067 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9068 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009069else
9070 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009071 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009072else
Martin v. Löwis11437992002-04-12 09:54:03 +00009073 cat >conftest.$ac_ext <<_ACEOF
9074#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009075#include "confdefs.h"
9076#include <stdio.h>
9077 #include <pthread.h>
9078 main()
9079 {
9080 FILE *f=fopen("conftestval", "w");
9081 if (!f) exit(1);
9082 fprintf(f, "%d\n", sizeof(pthread_t));
9083 exit(0);
9084 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009085_ACEOF
9086rm -f conftest$ac_exeext
9087if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9088 (eval $ac_link) 2>&5
9089 ac_status=$?
9090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9091 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9093 (eval $ac_try) 2>&5
9094 ac_status=$?
9095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9096 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009097 ac_cv_sizeof_pthread_t=`cat conftestval`
9098else
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 echo "$as_me: program exited with status $ac_status" >&5
9100echo "$as_me: failed program was:" >&5
9101cat conftest.$ac_ext >&5
9102( exit $ac_status )
9103ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009104fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009105rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009106fi
9107
Trent Mick635f6fb2000-08-23 21:33:05 +00009108fi
9109
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9111echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9112
9113cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009114#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009115_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009116
9117fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009118CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009119
Martin v. Löwis11437992002-04-12 09:54:03 +00009120echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9121echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009122# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9123if test "${enable_toolbox_glue+set}" = set; then
9124 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009125
Martin v. Löwis11437992002-04-12 09:54:03 +00009126fi;
Jack Jansene578a632001-08-15 01:27:14 +00009127
9128if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009129then
Jack Jansene578a632001-08-15 01:27:14 +00009130 case $ac_sys_system/$ac_sys_release in
9131 Darwin/*)
9132 enable_toolbox_glue="yes";;
9133 *)
9134 enable_toolbox_glue="no";;
9135 esac
9136fi
9137case "$enable_toolbox_glue" in
9138yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009139 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009140 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009141 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009142
9143cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009144#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009145_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009146
9147 ;;
9148*)
9149 extra_frameworks=""
9150 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009151 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009152 ;;
9153esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009154echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9155echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009156
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009157
9158case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009159 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009160 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009161 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009162 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9163 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009164 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009165 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009166 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009167 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9168 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009169esac
9170
Martin v. Löwis11437992002-04-12 09:54:03 +00009171echo "$as_me:$LINENO: checking for --enable-framework" >&5
9172echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009173if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009174then
Jack Jansenca06bc62001-08-03 15:32:23 +00009175 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009177 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009178 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009179
Martin v. Löwis11437992002-04-12 09:54:03 +00009180cat >>confdefs.h <<\_ACEOF
9181#define WITH_NEXT_FRAMEWORK 1
9182_ACEOF
9183
9184 echo "$as_me:$LINENO: result: yes" >&5
9185echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009186else
Martin v. Löwis11437992002-04-12 09:54:03 +00009187 echo "$as_me:$LINENO: result: no" >&5
9188echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009189fi
9190
Martin v. Löwis11437992002-04-12 09:54:03 +00009191echo "$as_me:$LINENO: checking for dyld" >&5
9192echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009193case $ac_sys_system/$ac_sys_release in
9194 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009195
Martin v. Löwis11437992002-04-12 09:54:03 +00009196cat >>confdefs.h <<\_ACEOF
9197#define WITH_DYLD 1
9198_ACEOF
9199
9200 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9201echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009202 ;;
9203 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009204 echo "$as_me:$LINENO: result: no" >&5
9205echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009206 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009207esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009208
Guido van Rossum0a516c91994-09-12 10:58:40 +00009209# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009210
Michael W. Hudson54241132001-12-07 15:38:26 +00009211
9212
9213
9214
Guido van Rossum0a516c91994-09-12 10:58:40 +00009215# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009216# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009217echo "$as_me:$LINENO: checking SO" >&5
9218echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009219if test -z "$SO"
9220then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009221 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009222 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009223 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009224 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009225 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009226fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009227echo "$as_me:$LINENO: result: $SO" >&5
9228echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009229# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009230# -- "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 +00009231# (Shared libraries in this instance are shared modules to be loaded into
9232# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009233echo "$as_me:$LINENO: checking LDSHARED" >&5
9234echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009235if test -z "$LDSHARED"
9236then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009237 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009238 AIX*)
9239 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009240 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009241 ;;
9242 BeOS*)
9243 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009244 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009245 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009246 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009247 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009248 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009249 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009250 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009251 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009252 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009253 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009254 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009255 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9256 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009257 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009258 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9259 if test "$enable_framework" ; then
9260 # Link against the framework. All externals should be defined.
9261 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9262 else
9263 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009264 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009265 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009266 Darwin/*)
9267 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9268 if test "$enable_framework" ; then
9269 # Link against the framework. All externals should be defined.
9270 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9271 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009272 # No framework, use the Python app as bundle-loader
9273 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9274 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009275 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009276 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009277 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009278 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009279 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009280 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009281 then
9282 LDSHARED="cc -shared ${LDFLAGS}"
9283 else
9284 LDSHARED="ld -Bshareable ${LDFLAGS}"
9285 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009286 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009287 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009288 if test "$GCC" = "yes"
9289 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009290 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009291 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009292 SCO_SV*) LDSHARED="$(CC) -Wl,-G,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00009293 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009294 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009295 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009296 *) LDSHARED="ld";;
9297 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009298fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009299echo "$as_me:$LINENO: result: $LDSHARED" >&5
9300echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009301BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009302# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009303# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009304echo "$as_me:$LINENO: checking CCSHARED" >&5
9305echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009306if test -z "$CCSHARED"
9307then
Guido van Rossum07397971997-04-29 21:49:50 +00009308 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009309 SunOS*) if test "$GCC" = yes;
9310 then CCSHARED="-fPIC";
9311 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009312 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009313 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009314 else CCSHARED="+z";
9315 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009316 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009317 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009318 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009319 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009320 if test "$GCC" = "yes"
9321 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009322 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009323 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009324 SCO_SV*)
9325 if test "$GCC" = "yes"
9326 then CCSHARED="-fPIC"
9327 else CCSHARED="-Kpic -belf"
9328 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009329 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009330 IRIX*/6*) case $CC in
9331 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009332 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009333 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009334 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009335 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009337echo "$as_me:$LINENO: result: $CCSHARED" >&5
9338echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009339# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009340# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009341echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9342echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009343if test -z "$LINKFORSHARED"
9344then
Guido van Rossum07397971997-04-29 21:49:50 +00009345 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009346 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009347 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009348 LINKFORSHARED="-Wl,-E -Wl,+s";;
9349# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009350 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009351 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009352 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009353 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009354 # -u __dummy makes the linker aware of the objc runtime
9355 # in System.framework; otherwise, __objcInit (referenced in
9356 # crt1.o) gets erroneously defined as common, which breaks dynamic
9357 # loading of any modules which reference it in System.framework.
9358 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9359 # not used by the core itself but which needs to be in the core so
9360 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009361 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009362 if test "$enable_framework"
9363 then
9364 LINKFORSHARED="$LINKFORSHARED -framework Python"
9365 fi
9366 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009367 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009368 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009369 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009370 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009371 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9372 then
9373 LINKFORSHARED="-Wl,--export-dynamic"
9374 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009375 SunOS/5*) case $CC in
9376 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009377 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009378 then
9379 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009380 fi;;
9381 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009382 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009383fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009384echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9385echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009386
Michael W. Hudson54241132001-12-07 15:38:26 +00009387
Martin v. Löwis11437992002-04-12 09:54:03 +00009388echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9389echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009390if test ! "$LIBRARY" = "$LDLIBRARY"
9391then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009392 case $ac_sys_system in
9393 CYGWIN*)
9394 # Cygwin needs CCSHARED when building extension DLLs
9395 # but not when building the interpreter DLL.
9396 CFLAGSFORSHARED='';;
9397 *)
9398 CFLAGSFORSHARED='$(CCSHARED)'
9399 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009400fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009401echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9402echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009403
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009404# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9405# library (with --enable-shared).
9406# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009407# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9408# if it is not required, since it creates a dependency of the shared library
9409# to LIBS. This, in turn, means that applications linking the shared libpython
9410# don't need to link LIBS explicitly. The default should be only changed
9411# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009412
9413echo "$as_me:$LINENO: checking SHLIBS" >&5
9414echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9415case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009416 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009417 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009418esac
9419echo "$as_me:$LINENO: result: $SHLIBS" >&5
9420echo "${ECHO_T}$SHLIBS" >&6
9421
9422
Guido van Rossum627b2d71993-12-24 10:39:16 +00009423# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009424
9425echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9426echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9427if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9428 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009429else
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009431LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009432cat >conftest.$ac_ext <<_ACEOF
9433#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009434#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009435
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009436/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009437#ifdef __cplusplus
9438extern "C"
9439#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009440/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 builtin and then its argument prototype would still apply. */
9442char dlopen ();
9443#ifdef F77_DUMMY_MAIN
9444# ifdef __cplusplus
9445 extern "C"
9446# endif
9447 int F77_DUMMY_MAIN() { return 1; }
9448#endif
9449int
9450main ()
9451{
9452dlopen ();
9453 ;
9454 return 0;
9455}
9456_ACEOF
9457rm -f conftest.$ac_objext conftest$ac_exeext
9458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9459 (eval $ac_link) 2>&5
9460 ac_status=$?
9461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9462 (exit $ac_status); } &&
9463 { ac_try='test -s conftest$ac_exeext'
9464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9465 (eval $ac_try) 2>&5
9466 ac_status=$?
9467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9468 (exit $ac_status); }; }; then
9469 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009470else
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 echo "$as_me: failed program was:" >&5
9472cat conftest.$ac_ext >&5
9473ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009474fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009475rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9476LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009477fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009478echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9479echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9480if test $ac_cv_lib_dl_dlopen = yes; then
9481 cat >>confdefs.h <<_ACEOF
9482#define HAVE_LIBDL 1
9483_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009484
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009485 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009486
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009487fi
9488 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009489
9490echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9491echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9492if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9493 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009494else
Martin v. Löwis11437992002-04-12 09:54:03 +00009495 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009496LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009497cat >conftest.$ac_ext <<_ACEOF
9498#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009499#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009500
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009501/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009502#ifdef __cplusplus
9503extern "C"
9504#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009505/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009506 builtin and then its argument prototype would still apply. */
9507char shl_load ();
9508#ifdef F77_DUMMY_MAIN
9509# ifdef __cplusplus
9510 extern "C"
9511# endif
9512 int F77_DUMMY_MAIN() { return 1; }
9513#endif
9514int
9515main ()
9516{
9517shl_load ();
9518 ;
9519 return 0;
9520}
9521_ACEOF
9522rm -f conftest.$ac_objext conftest$ac_exeext
9523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9524 (eval $ac_link) 2>&5
9525 ac_status=$?
9526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9527 (exit $ac_status); } &&
9528 { ac_try='test -s conftest$ac_exeext'
9529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9530 (eval $ac_try) 2>&5
9531 ac_status=$?
9532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9533 (exit $ac_status); }; }; then
9534 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009535else
Martin v. Löwis11437992002-04-12 09:54:03 +00009536 echo "$as_me: failed program was:" >&5
9537cat conftest.$ac_ext >&5
9538ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009539fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009540rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9541LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009542fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009543echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9544echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9545if test $ac_cv_lib_dld_shl_load = yes; then
9546 cat >>confdefs.h <<_ACEOF
9547#define HAVE_LIBDLD 1
9548_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009549
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009550 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009551
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009552fi
9553 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009554echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9555echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9556if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009557 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009558else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009559 ac_func_search_save_LIBS=$LIBS
9560ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009561cat >conftest.$ac_ext <<_ACEOF
9562#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009563#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009564
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009565/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009566#ifdef __cplusplus
9567extern "C"
9568#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009569/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009570 builtin and then its argument prototype would still apply. */
9571char sem_init ();
9572#ifdef F77_DUMMY_MAIN
9573# ifdef __cplusplus
9574 extern "C"
9575# endif
9576 int F77_DUMMY_MAIN() { return 1; }
9577#endif
9578int
9579main ()
9580{
9581sem_init ();
9582 ;
9583 return 0;
9584}
9585_ACEOF
9586rm -f conftest.$ac_objext conftest$ac_exeext
9587if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9588 (eval $ac_link) 2>&5
9589 ac_status=$?
9590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9591 (exit $ac_status); } &&
9592 { ac_try='test -s conftest$ac_exeext'
9593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9594 (eval $ac_try) 2>&5
9595 ac_status=$?
9596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9597 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009598 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009599else
Martin v. Löwis11437992002-04-12 09:54:03 +00009600 echo "$as_me: failed program was:" >&5
9601cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009603rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009604if test "$ac_cv_search_sem_init" = no; then
9605 for ac_lib in rt posix4; do
9606 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9607 cat >conftest.$ac_ext <<_ACEOF
9608#line $LINENO "configure"
9609#include "confdefs.h"
9610
9611/* Override any gcc2 internal prototype to avoid an error. */
9612#ifdef __cplusplus
9613extern "C"
9614#endif
9615/* We use char because int might match the return type of a gcc2
9616 builtin and then its argument prototype would still apply. */
9617char sem_init ();
9618#ifdef F77_DUMMY_MAIN
9619# ifdef __cplusplus
9620 extern "C"
9621# endif
9622 int F77_DUMMY_MAIN() { return 1; }
9623#endif
9624int
9625main ()
9626{
9627sem_init ();
9628 ;
9629 return 0;
9630}
Martin v. Löwis11437992002-04-12 09:54:03 +00009631_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009632rm -f conftest.$ac_objext conftest$ac_exeext
9633if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9634 (eval $ac_link) 2>&5
9635 ac_status=$?
9636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9637 (exit $ac_status); } &&
9638 { ac_try='test -s conftest$ac_exeext'
9639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9640 (eval $ac_try) 2>&5
9641 ac_status=$?
9642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9643 (exit $ac_status); }; }; then
9644 ac_cv_search_sem_init="-l$ac_lib"
9645break
9646else
9647 echo "$as_me: failed program was:" >&5
9648cat conftest.$ac_ext >&5
9649fi
9650rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9651 done
9652fi
9653LIBS=$ac_func_search_save_LIBS
9654fi
9655echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9656echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9657if test "$ac_cv_search_sem_init" != no; then
9658 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009659
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009660fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009661 # 'Real Time' functions on Solaris,
9662 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009663
9664# checks for system dependent C++ extensions support
9665case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009666 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9667echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9668 cat >conftest.$ac_ext <<_ACEOF
9669#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009670#include "confdefs.h"
9671#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009672#ifdef F77_DUMMY_MAIN
9673# ifdef __cplusplus
9674 extern "C"
9675# endif
9676 int F77_DUMMY_MAIN() { return 1; }
9677#endif
9678int
9679main ()
9680{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009681loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 ;
9683 return 0;
9684}
9685_ACEOF
9686rm -f conftest.$ac_objext conftest$ac_exeext
9687if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9688 (eval $ac_link) 2>&5
9689 ac_status=$?
9690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9691 (exit $ac_status); } &&
9692 { ac_try='test -s conftest$ac_exeext'
9693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9694 (eval $ac_try) 2>&5
9695 ac_status=$?
9696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9697 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009698
Martin v. Löwis11437992002-04-12 09:54:03 +00009699cat >>confdefs.h <<\_ACEOF
9700#define AIX_GENUINE_CPLUSPLUS 1
9701_ACEOF
9702
9703 echo "$as_me:$LINENO: result: yes" >&5
9704echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009705else
Martin v. Löwis11437992002-04-12 09:54:03 +00009706 echo "$as_me: failed program was:" >&5
9707cat conftest.$ac_ext >&5
9708echo "$as_me:$LINENO: result: no" >&5
9709echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009710fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009711rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009712 *) ;;
9713esac
9714
Guido van Rossum70c7f481998-03-26 18:44:10 +00009715# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009716# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009717# BeOS' sockets are stashed in libnet.
9718case "$ac_sys_system" in
9719IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009720*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009721echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9722echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9723if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9724 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009725else
Martin v. Löwis11437992002-04-12 09:54:03 +00009726 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009727LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009728cat >conftest.$ac_ext <<_ACEOF
9729#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009730#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009731
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009732/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009733#ifdef __cplusplus
9734extern "C"
9735#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009736/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 builtin and then its argument prototype would still apply. */
9738char t_open ();
9739#ifdef F77_DUMMY_MAIN
9740# ifdef __cplusplus
9741 extern "C"
9742# endif
9743 int F77_DUMMY_MAIN() { return 1; }
9744#endif
9745int
9746main ()
9747{
9748t_open ();
9749 ;
9750 return 0;
9751}
9752_ACEOF
9753rm -f conftest.$ac_objext conftest$ac_exeext
9754if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9755 (eval $ac_link) 2>&5
9756 ac_status=$?
9757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9758 (exit $ac_status); } &&
9759 { ac_try='test -s conftest$ac_exeext'
9760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9761 (eval $ac_try) 2>&5
9762 ac_status=$?
9763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9764 (exit $ac_status); }; }; then
9765 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009766else
Martin v. Löwis11437992002-04-12 09:54:03 +00009767 echo "$as_me: failed program was:" >&5
9768cat conftest.$ac_ext >&5
9769ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009770fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009771rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9772LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009773fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009774echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9775echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9776if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009777 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009778fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009779 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009780echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9781echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9782if test "${ac_cv_lib_socket_socket+set}" = set; then
9783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009784else
Martin v. Löwis11437992002-04-12 09:54:03 +00009785 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009786LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009787cat >conftest.$ac_ext <<_ACEOF
9788#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009789#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009790
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009791/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009792#ifdef __cplusplus
9793extern "C"
9794#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009795/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009796 builtin and then its argument prototype would still apply. */
9797char socket ();
9798#ifdef F77_DUMMY_MAIN
9799# ifdef __cplusplus
9800 extern "C"
9801# endif
9802 int F77_DUMMY_MAIN() { return 1; }
9803#endif
9804int
9805main ()
9806{
9807socket ();
9808 ;
9809 return 0;
9810}
9811_ACEOF
9812rm -f conftest.$ac_objext conftest$ac_exeext
9813if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9814 (eval $ac_link) 2>&5
9815 ac_status=$?
9816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9817 (exit $ac_status); } &&
9818 { ac_try='test -s conftest$ac_exeext'
9819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9820 (eval $ac_try) 2>&5
9821 ac_status=$?
9822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9823 (exit $ac_status); }; }; then
9824 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009825else
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 echo "$as_me: failed program was:" >&5
9827cat conftest.$ac_ext >&5
9828ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009829fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009830rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9831LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009832fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009833echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9834echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9835if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009836 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009837fi
9838 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009839;;
9840esac
9841case "$ac_sys_system" in
9842BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009843echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9844echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9845if test "${ac_cv_lib_net_socket+set}" = set; then
9846 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009847else
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009849LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009850cat >conftest.$ac_ext <<_ACEOF
9851#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009852#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009853
Guido van Rossumad678af1998-10-02 14:42:15 +00009854/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009855#ifdef __cplusplus
9856extern "C"
9857#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009858/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 builtin and then its argument prototype would still apply. */
9860char socket ();
9861#ifdef F77_DUMMY_MAIN
9862# ifdef __cplusplus
9863 extern "C"
9864# endif
9865 int F77_DUMMY_MAIN() { return 1; }
9866#endif
9867int
9868main ()
9869{
9870socket ();
9871 ;
9872 return 0;
9873}
9874_ACEOF
9875rm -f conftest.$ac_objext conftest$ac_exeext
9876if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9877 (eval $ac_link) 2>&5
9878 ac_status=$?
9879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9880 (exit $ac_status); } &&
9881 { ac_try='test -s conftest$ac_exeext'
9882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9883 (eval $ac_try) 2>&5
9884 ac_status=$?
9885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9886 (exit $ac_status); }; }; then
9887 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009888else
Martin v. Löwis11437992002-04-12 09:54:03 +00009889 echo "$as_me: failed program was:" >&5
9890cat conftest.$ac_ext >&5
9891ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009892fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009893rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9894LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009895fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009896echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9897echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9898if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009899 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009900fi
9901 # BeOS
9902;;
9903esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009904
Martin v. Löwis11437992002-04-12 09:54:03 +00009905echo "$as_me:$LINENO: checking for --with-libs" >&5
9906echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9907
Guido van Rossuma68acba1996-07-31 17:36:39 +00009908# Check whether --with-libs or --without-libs was given.
9909if test "${with_libs+set}" = set; then
9910 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009911
9912echo "$as_me:$LINENO: result: $withval" >&5
9913echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009914LIBS="$withval $LIBS"
9915
9916else
Martin v. Löwis11437992002-04-12 09:54:03 +00009917 echo "$as_me:$LINENO: result: no" >&5
9918echo "${ECHO_T}no" >&6
9919fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009920
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009921# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009922
9923
Martin v. Löwis11437992002-04-12 09:54:03 +00009924echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9925echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9926
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009927# Check whether --with-signal-module or --without-signal-module was given.
9928if test "${with_signal_module+set}" = set; then
9929 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009930
Martin v. Löwis11437992002-04-12 09:54:03 +00009931fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009932
9933if test -z "$with_signal_module"
9934then with_signal_module="yes"
9935fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009936echo "$as_me:$LINENO: result: $with_signal_module" >&5
9937echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009938
9939if test "${with_signal_module}" = "yes"; then
9940 USE_SIGNAL_MODULE=""
9941 SIGNAL_OBJS=""
9942else
9943 USE_SIGNAL_MODULE="#"
9944 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9945fi
9946
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009947# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009948
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009949USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009950
Martin v. Löwis11437992002-04-12 09:54:03 +00009951echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9952echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9953
Guido van Rossumec2f0731997-01-22 20:54:01 +00009954
9955# Check whether --with-dec-threads or --without-dec-threads was given.
9956if test "${with_dec_threads+set}" = set; then
9957 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009958
9959echo "$as_me:$LINENO: result: $withval" >&5
9960echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009961LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009962if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009963 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009964fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009965else
Martin v. Löwis11437992002-04-12 09:54:03 +00009966 echo "$as_me:$LINENO: result: no" >&5
9967echo "${ECHO_T}no" >&6
9968fi;
9969
9970# Templates for things AC_DEFINEd more than once.
9971# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009972
9973
Martin v. Löwis11437992002-04-12 09:54:03 +00009974
9975
9976
9977
9978
9979echo "$as_me:$LINENO: checking for --with-threads" >&5
9980echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9981
Guido van Rossumec2f0731997-01-22 20:54:01 +00009982# Check whether --with-threads or --without-threads was given.
9983if test "${with_threads+set}" = set; then
9984 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009985
Martin v. Löwis11437992002-04-12 09:54:03 +00009986fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009987
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009988# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009989
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009990# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009991if test "${with_thread+set}" = set; then
9992 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009993 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +00009994fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009995
9996if test -z "$with_threads"
9997then with_threads="yes"
9998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009999echo "$as_me:$LINENO: result: $with_threads" >&5
10000echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010001
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010002
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010003if test "$with_threads" = "no"
10004then
10005 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010006elif test "$ac_cv_pthread_is_default" = yes
10007then
Martin v. Löwis11437992002-04-12 09:54:03 +000010008 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010009#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010010_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010011
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010012 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010013 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010014#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010015_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010016
10017 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010018 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010019elif test "$ac_cv_kpthread" = "yes"
10020then
10021 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010022 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010023#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010024_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010025
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010026 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010027 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010028else
10029 if test ! -z "$with_threads" -a -d "$with_threads"
10030 then LDFLAGS="$LDFLAGS -L$with_threads"
10031 fi
10032 if test ! -z "$withval" -a -d "$withval"
10033 then LDFLAGS="$LDFLAGS -L$withval"
10034 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010035
10036 # According to the POSIX spec, a pthreads implementation must
10037 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010038 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10039echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10040 cat >conftest.$ac_ext <<_ACEOF
10041#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010042#include "confdefs.h"
10043#include <unistd.h>
10044 #ifdef _POSIX_THREADS
10045 yes
10046 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010047
10048_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10050 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010051 unistd_defines_pthreads=yes
10052else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010053 unistd_defines_pthreads=no
10054fi
10055rm -f conftest*
10056
Martin v. Löwis11437992002-04-12 09:54:03 +000010057 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10058echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010059
Martin v. Löwis11437992002-04-12 09:54:03 +000010060 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010061#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010062_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010063
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 if test "${ac_cv_header_cthreads_h+set}" = set; then
10065 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10066echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10067if test "${ac_cv_header_cthreads_h+set}" = set; then
10068 echo $ECHO_N "(cached) $ECHO_C" >&6
10069fi
10070echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10071echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010072else
Martin v. Löwis11437992002-04-12 09:54:03 +000010073 # Is the header compilable?
10074echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10075echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10076cat >conftest.$ac_ext <<_ACEOF
10077#line $LINENO "configure"
10078#include "confdefs.h"
10079$ac_includes_default
10080#include <cthreads.h>
10081_ACEOF
10082rm -f conftest.$ac_objext
10083if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10084 (eval $ac_compile) 2>&5
10085 ac_status=$?
10086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10087 (exit $ac_status); } &&
10088 { ac_try='test -s conftest.$ac_objext'
10089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10090 (eval $ac_try) 2>&5
10091 ac_status=$?
10092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10093 (exit $ac_status); }; }; then
10094 ac_header_compiler=yes
10095else
10096 echo "$as_me: failed program was:" >&5
10097cat conftest.$ac_ext >&5
10098ac_header_compiler=no
10099fi
10100rm -f conftest.$ac_objext conftest.$ac_ext
10101echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10102echo "${ECHO_T}$ac_header_compiler" >&6
10103
10104# Is the header present?
10105echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10106echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10107cat >conftest.$ac_ext <<_ACEOF
10108#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010109#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010110#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010111_ACEOF
10112if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10113 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10114 ac_status=$?
10115 egrep -v '^ *\+' conftest.er1 >conftest.err
10116 rm -f conftest.er1
10117 cat conftest.err >&5
10118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10119 (exit $ac_status); } >/dev/null; then
10120 if test -s conftest.err; then
10121 ac_cpp_err=$ac_c_preproc_warn_flag
10122 else
10123 ac_cpp_err=
10124 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010125else
Martin v. Löwis11437992002-04-12 09:54:03 +000010126 ac_cpp_err=yes
10127fi
10128if test -z "$ac_cpp_err"; then
10129 ac_header_preproc=yes
10130else
10131 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010132 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010133 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010135rm -f conftest.err conftest.$ac_ext
10136echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10137echo "${ECHO_T}$ac_header_preproc" >&6
10138
10139# So? What about this header?
10140case $ac_header_compiler:$ac_header_preproc in
10141 yes:no )
10142 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10143echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10144 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10145echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10146 no:yes )
10147 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10148echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10149 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10150echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10151 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10152echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10153esac
10154echo "$as_me:$LINENO: checking for cthreads.h" >&5
10155echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10156if test "${ac_cv_header_cthreads_h+set}" = set; then
10157 echo $ECHO_N "(cached) $ECHO_C" >&6
10158else
10159 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010160fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010161echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10162echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10163
10164fi
10165if test $ac_cv_header_cthreads_h = yes; then
10166 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010167#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010168_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010169
Martin v. Löwis11437992002-04-12 09:54:03 +000010170 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010171#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010172_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010173
Martin v. Löwis11437992002-04-12 09:54:03 +000010174
10175cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010176#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010177_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010178
10179 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010180 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010181else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010182
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10184 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10185echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10186if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10187 echo $ECHO_N "(cached) $ECHO_C" >&6
10188fi
10189echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10190echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010191else
Martin v. Löwis11437992002-04-12 09:54:03 +000010192 # Is the header compilable?
10193echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10194echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10195cat >conftest.$ac_ext <<_ACEOF
10196#line $LINENO "configure"
10197#include "confdefs.h"
10198$ac_includes_default
10199#include <mach/cthreads.h>
10200_ACEOF
10201rm -f conftest.$ac_objext
10202if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10203 (eval $ac_compile) 2>&5
10204 ac_status=$?
10205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10206 (exit $ac_status); } &&
10207 { ac_try='test -s conftest.$ac_objext'
10208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10209 (eval $ac_try) 2>&5
10210 ac_status=$?
10211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10212 (exit $ac_status); }; }; then
10213 ac_header_compiler=yes
10214else
10215 echo "$as_me: failed program was:" >&5
10216cat conftest.$ac_ext >&5
10217ac_header_compiler=no
10218fi
10219rm -f conftest.$ac_objext conftest.$ac_ext
10220echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10221echo "${ECHO_T}$ac_header_compiler" >&6
10222
10223# Is the header present?
10224echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10225echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10226cat >conftest.$ac_ext <<_ACEOF
10227#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010228#include "confdefs.h"
10229#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010230_ACEOF
10231if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10232 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10233 ac_status=$?
10234 egrep -v '^ *\+' conftest.er1 >conftest.err
10235 rm -f conftest.er1
10236 cat conftest.err >&5
10237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10238 (exit $ac_status); } >/dev/null; then
10239 if test -s conftest.err; then
10240 ac_cpp_err=$ac_c_preproc_warn_flag
10241 else
10242 ac_cpp_err=
10243 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010244else
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_cpp_err=yes
10246fi
10247if test -z "$ac_cpp_err"; then
10248 ac_header_preproc=yes
10249else
10250 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010251 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010253fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010254rm -f conftest.err conftest.$ac_ext
10255echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10256echo "${ECHO_T}$ac_header_preproc" >&6
10257
10258# So? What about this header?
10259case $ac_header_compiler:$ac_header_preproc in
10260 yes:no )
10261 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10262echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10263 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10264echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10265 no:yes )
10266 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10267echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10268 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10269echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10270 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10271echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10272esac
10273echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10274echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10275if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10276 echo $ECHO_N "(cached) $ECHO_C" >&6
10277else
10278 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010279fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010280echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10281echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10282
10283fi
10284if test $ac_cv_header_mach_cthreads_h = yes; then
10285 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010286#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010287_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010288
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010290#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010291_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010292
Martin v. Löwis11437992002-04-12 09:54:03 +000010293
10294cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010295#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010296_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010297
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010298 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010299else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010300
Martin v. Löwis11437992002-04-12 09:54:03 +000010301 echo "$as_me:$LINENO: checking for --with-pth" >&5
10302echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10303
10304# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010305if test "${with_pth+set}" = set; then
10306 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010307 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010308echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010309 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010310#define WITH_THREAD 1
10311_ACEOF
10312
10313
10314cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010315#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010316_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010317
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010318 LIBS="-lpth $LIBS"
10319 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010320else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010321 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010322echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010323
10324 # Just looking for pthread_create in libpthread is not enough:
10325 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10326 # So we really have to include pthread.h, and then link.
10327 _libs=$LIBS
10328 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10330echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10331 cat >conftest.$ac_ext <<_ACEOF
10332#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010333#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010334#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010335
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010336void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010337#ifdef F77_DUMMY_MAIN
10338# ifdef __cplusplus
10339 extern "C"
10340# endif
10341 int F77_DUMMY_MAIN() { return 1; }
10342#endif
10343int
10344main ()
10345{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010346
10347pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 ;
10349 return 0;
10350}
10351_ACEOF
10352rm -f conftest.$ac_objext conftest$ac_exeext
10353if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10354 (eval $ac_link) 2>&5
10355 ac_status=$?
10356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10357 (exit $ac_status); } &&
10358 { ac_try='test -s conftest$ac_exeext'
10359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10360 (eval $ac_try) 2>&5
10361 ac_status=$?
10362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10363 (exit $ac_status); }; }; then
10364
10365 echo "$as_me:$LINENO: result: yes" >&5
10366echo "${ECHO_T}yes" >&6
10367 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010368#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010369_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010370
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010371 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010372 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010373else
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 echo "$as_me: failed program was:" >&5
10375cat conftest.$ac_ext >&5
10376
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010377 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10379echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10380if test "${ac_cv_func_pthread_detach+set}" = set; then
10381 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010382else
Martin v. Löwis11437992002-04-12 09:54:03 +000010383 cat >conftest.$ac_ext <<_ACEOF
10384#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010385#include "confdefs.h"
10386/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010388#include <assert.h>
10389/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010390#ifdef __cplusplus
10391extern "C"
10392#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010393/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 builtin and then its argument prototype would still apply. */
10395char pthread_detach ();
10396char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010397
Martin v. Löwis11437992002-04-12 09:54:03 +000010398#ifdef F77_DUMMY_MAIN
10399# ifdef __cplusplus
10400 extern "C"
10401# endif
10402 int F77_DUMMY_MAIN() { return 1; }
10403#endif
10404int
10405main ()
10406{
Guido van Rossumad678af1998-10-02 14:42:15 +000010407/* The GNU C library defines this for functions which it implements
10408 to always fail with ENOSYS. Some functions are actually named
10409 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010410#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010411choke me
10412#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010413f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010414#endif
10415
Martin v. Löwis11437992002-04-12 09:54:03 +000010416 ;
10417 return 0;
10418}
10419_ACEOF
10420rm -f conftest.$ac_objext conftest$ac_exeext
10421if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10422 (eval $ac_link) 2>&5
10423 ac_status=$?
10424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10425 (exit $ac_status); } &&
10426 { ac_try='test -s conftest$ac_exeext'
10427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10428 (eval $ac_try) 2>&5
10429 ac_status=$?
10430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10431 (exit $ac_status); }; }; then
10432 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010433else
Martin v. Löwis11437992002-04-12 09:54:03 +000010434 echo "$as_me: failed program was:" >&5
10435cat conftest.$ac_ext >&5
10436ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010438rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010440echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10441echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10442if test $ac_cv_func_pthread_detach = yes; then
10443 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010444#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010445_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010446
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010447 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010448 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010449else
Guido van Rossumad678af1998-10-02 14:42:15 +000010450
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010451 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10452 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10453echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10454if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10455 echo $ECHO_N "(cached) $ECHO_C" >&6
10456fi
10457echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10458echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10459else
10460 # Is the header compilable?
10461echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10462echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10463cat >conftest.$ac_ext <<_ACEOF
10464#line $LINENO "configure"
10465#include "confdefs.h"
10466$ac_includes_default
10467#include <atheos/threads.h>
10468_ACEOF
10469rm -f conftest.$ac_objext
10470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10471 (eval $ac_compile) 2>&5
10472 ac_status=$?
10473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10474 (exit $ac_status); } &&
10475 { ac_try='test -s conftest.$ac_objext'
10476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10477 (eval $ac_try) 2>&5
10478 ac_status=$?
10479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10480 (exit $ac_status); }; }; then
10481 ac_header_compiler=yes
10482else
10483 echo "$as_me: failed program was:" >&5
10484cat conftest.$ac_ext >&5
10485ac_header_compiler=no
10486fi
10487rm -f conftest.$ac_objext conftest.$ac_ext
10488echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10489echo "${ECHO_T}$ac_header_compiler" >&6
10490
10491# Is the header present?
10492echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10493echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10494cat >conftest.$ac_ext <<_ACEOF
10495#line $LINENO "configure"
10496#include "confdefs.h"
10497#include <atheos/threads.h>
10498_ACEOF
10499if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10500 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10501 ac_status=$?
10502 egrep -v '^ *\+' conftest.er1 >conftest.err
10503 rm -f conftest.er1
10504 cat conftest.err >&5
10505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10506 (exit $ac_status); } >/dev/null; then
10507 if test -s conftest.err; then
10508 ac_cpp_err=$ac_c_preproc_warn_flag
10509 else
10510 ac_cpp_err=
10511 fi
10512else
10513 ac_cpp_err=yes
10514fi
10515if test -z "$ac_cpp_err"; then
10516 ac_header_preproc=yes
10517else
10518 echo "$as_me: failed program was:" >&5
10519 cat conftest.$ac_ext >&5
10520 ac_header_preproc=no
10521fi
10522rm -f conftest.err conftest.$ac_ext
10523echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10524echo "${ECHO_T}$ac_header_preproc" >&6
10525
10526# So? What about this header?
10527case $ac_header_compiler:$ac_header_preproc in
10528 yes:no )
10529 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10530echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10531 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10532echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10533 no:yes )
10534 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10535echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10536 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10537echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10538 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10539echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10540esac
10541echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10542echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10543if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10544 echo $ECHO_N "(cached) $ECHO_C" >&6
10545else
10546 ac_cv_header_atheos_threads_h=$ac_header_preproc
10547fi
10548echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10549echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10550
10551fi
10552if test $ac_cv_header_atheos_threads_h = yes; then
10553 cat >>confdefs.h <<\_ACEOF
10554#define WITH_THREAD 1
10555_ACEOF
10556
10557
10558cat >>confdefs.h <<\_ACEOF
10559#define ATHEOS_THREADS 1
10560_ACEOF
10561
10562 THREADOBJ="Python/thread.o"
10563else
10564
Martin v. Löwis11437992002-04-12 09:54:03 +000010565 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10566 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10567echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10568if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10569 echo $ECHO_N "(cached) $ECHO_C" >&6
10570fi
10571echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10572echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010573else
Martin v. Löwis11437992002-04-12 09:54:03 +000010574 # Is the header compilable?
10575echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10576echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10577cat >conftest.$ac_ext <<_ACEOF
10578#line $LINENO "configure"
10579#include "confdefs.h"
10580$ac_includes_default
10581#include <kernel/OS.h>
10582_ACEOF
10583rm -f conftest.$ac_objext
10584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10585 (eval $ac_compile) 2>&5
10586 ac_status=$?
10587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10588 (exit $ac_status); } &&
10589 { ac_try='test -s conftest.$ac_objext'
10590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10591 (eval $ac_try) 2>&5
10592 ac_status=$?
10593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10594 (exit $ac_status); }; }; then
10595 ac_header_compiler=yes
10596else
10597 echo "$as_me: failed program was:" >&5
10598cat conftest.$ac_ext >&5
10599ac_header_compiler=no
10600fi
10601rm -f conftest.$ac_objext conftest.$ac_ext
10602echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10603echo "${ECHO_T}$ac_header_compiler" >&6
10604
10605# Is the header present?
10606echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10607echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10608cat >conftest.$ac_ext <<_ACEOF
10609#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010610#include "confdefs.h"
10611#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010612_ACEOF
10613if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10614 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10615 ac_status=$?
10616 egrep -v '^ *\+' conftest.er1 >conftest.err
10617 rm -f conftest.er1
10618 cat conftest.err >&5
10619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10620 (exit $ac_status); } >/dev/null; then
10621 if test -s conftest.err; then
10622 ac_cpp_err=$ac_c_preproc_warn_flag
10623 else
10624 ac_cpp_err=
10625 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010626else
Martin v. Löwis11437992002-04-12 09:54:03 +000010627 ac_cpp_err=yes
10628fi
10629if test -z "$ac_cpp_err"; then
10630 ac_header_preproc=yes
10631else
10632 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010633 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010636rm -f conftest.err conftest.$ac_ext
10637echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10638echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010639
Martin v. Löwis11437992002-04-12 09:54:03 +000010640# So? What about this header?
10641case $ac_header_compiler:$ac_header_preproc in
10642 yes:no )
10643 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10644echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10645 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10646echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10647 no:yes )
10648 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10649echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10650 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10651echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10652 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10653echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10654esac
10655echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10656echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10657if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10658 echo $ECHO_N "(cached) $ECHO_C" >&6
10659else
10660 ac_cv_header_kernel_OS_h=$ac_header_preproc
10661fi
10662echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10663echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10664
10665fi
10666if test $ac_cv_header_kernel_OS_h = yes; then
10667 cat >>confdefs.h <<\_ACEOF
10668#define WITH_THREAD 1
10669_ACEOF
10670
10671
10672cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010673#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010674_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010675
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010676 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010677else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010678
Martin v. Löwis11437992002-04-12 09:54:03 +000010679 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10680echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10681if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10682 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010683else
Martin v. Löwis11437992002-04-12 09:54:03 +000010684 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010685LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010686cat >conftest.$ac_ext <<_ACEOF
10687#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010688#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010689
Greg Steinadf63d62000-07-05 10:38:09 +000010690/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010691#ifdef __cplusplus
10692extern "C"
10693#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010694/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 builtin and then its argument prototype would still apply. */
10696char pthread_create ();
10697#ifdef F77_DUMMY_MAIN
10698# ifdef __cplusplus
10699 extern "C"
10700# endif
10701 int F77_DUMMY_MAIN() { return 1; }
10702#endif
10703int
10704main ()
10705{
10706pthread_create ();
10707 ;
10708 return 0;
10709}
10710_ACEOF
10711rm -f conftest.$ac_objext conftest$ac_exeext
10712if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10713 (eval $ac_link) 2>&5
10714 ac_status=$?
10715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10716 (exit $ac_status); } &&
10717 { ac_try='test -s conftest$ac_exeext'
10718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10719 (eval $ac_try) 2>&5
10720 ac_status=$?
10721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10722 (exit $ac_status); }; }; then
10723 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010724else
Martin v. Löwis11437992002-04-12 09:54:03 +000010725 echo "$as_me: failed program was:" >&5
10726cat conftest.$ac_ext >&5
10727ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010728fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010729rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10730LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010731fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010732echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10733echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10734if test $ac_cv_lib_pthreads_pthread_create = yes; then
10735 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010736#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010737_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010738
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010739 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010740 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010741 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010742else
Greg Steinadf63d62000-07-05 10:38:09 +000010743
Martin v. Löwis11437992002-04-12 09:54:03 +000010744 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10745echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10746if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10747 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010748else
Martin v. Löwis11437992002-04-12 09:54:03 +000010749 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010750LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010751cat >conftest.$ac_ext <<_ACEOF
10752#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010753#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010754
Guido van Rossum49545951997-12-02 19:28:29 +000010755/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010756#ifdef __cplusplus
10757extern "C"
10758#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010759/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 builtin and then its argument prototype would still apply. */
10761char pthread_create ();
10762#ifdef F77_DUMMY_MAIN
10763# ifdef __cplusplus
10764 extern "C"
10765# endif
10766 int F77_DUMMY_MAIN() { return 1; }
10767#endif
10768int
10769main ()
10770{
10771pthread_create ();
10772 ;
10773 return 0;
10774}
10775_ACEOF
10776rm -f conftest.$ac_objext conftest$ac_exeext
10777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10778 (eval $ac_link) 2>&5
10779 ac_status=$?
10780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10781 (exit $ac_status); } &&
10782 { ac_try='test -s conftest$ac_exeext'
10783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10784 (eval $ac_try) 2>&5
10785 ac_status=$?
10786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10787 (exit $ac_status); }; }; then
10788 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010789else
Martin v. Löwis11437992002-04-12 09:54:03 +000010790 echo "$as_me: failed program was:" >&5
10791cat conftest.$ac_ext >&5
10792ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010793fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010794rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10795LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010796fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010797echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10798echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10799if test $ac_cv_lib_c_r_pthread_create = yes; then
10800 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010801#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010802_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010803
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010804 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010805 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010806 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010807else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010808
Martin v. Löwis11437992002-04-12 09:54:03 +000010809 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10810echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10811if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10812 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010813else
Martin v. Löwis11437992002-04-12 09:54:03 +000010814 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010815LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010816cat >conftest.$ac_ext <<_ACEOF
10817#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010818#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010819
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010820/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010821#ifdef __cplusplus
10822extern "C"
10823#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010824/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010825 builtin and then its argument prototype would still apply. */
10826char __d6_pthread_create ();
10827#ifdef F77_DUMMY_MAIN
10828# ifdef __cplusplus
10829 extern "C"
10830# endif
10831 int F77_DUMMY_MAIN() { return 1; }
10832#endif
10833int
10834main ()
10835{
10836__d6_pthread_create ();
10837 ;
10838 return 0;
10839}
10840_ACEOF
10841rm -f conftest.$ac_objext conftest$ac_exeext
10842if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10843 (eval $ac_link) 2>&5
10844 ac_status=$?
10845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10846 (exit $ac_status); } &&
10847 { ac_try='test -s conftest$ac_exeext'
10848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10849 (eval $ac_try) 2>&5
10850 ac_status=$?
10851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10852 (exit $ac_status); }; }; then
10853 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010854else
Martin v. Löwis11437992002-04-12 09:54:03 +000010855 echo "$as_me: failed program was:" >&5
10856cat conftest.$ac_ext >&5
10857ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010858fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010859rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10860LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010861fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010862echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10863echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10864if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10865 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010866#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010867_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010868
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010869 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010870 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010871 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010872else
Guido van Rossum49545951997-12-02 19:28:29 +000010873
Martin v. Löwis11437992002-04-12 09:54:03 +000010874 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10875echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10876if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10877 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010878else
Martin v. Löwis11437992002-04-12 09:54:03 +000010879 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010880LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010881cat >conftest.$ac_ext <<_ACEOF
10882#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010883#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010884
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010885/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010886#ifdef __cplusplus
10887extern "C"
10888#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010889/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010890 builtin and then its argument prototype would still apply. */
10891char __pthread_create_system ();
10892#ifdef F77_DUMMY_MAIN
10893# ifdef __cplusplus
10894 extern "C"
10895# endif
10896 int F77_DUMMY_MAIN() { return 1; }
10897#endif
10898int
10899main ()
10900{
10901__pthread_create_system ();
10902 ;
10903 return 0;
10904}
10905_ACEOF
10906rm -f conftest.$ac_objext conftest$ac_exeext
10907if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10908 (eval $ac_link) 2>&5
10909 ac_status=$?
10910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10911 (exit $ac_status); } &&
10912 { ac_try='test -s conftest$ac_exeext'
10913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10914 (eval $ac_try) 2>&5
10915 ac_status=$?
10916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10917 (exit $ac_status); }; }; then
10918 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010919else
Martin v. Löwis11437992002-04-12 09:54:03 +000010920 echo "$as_me: failed program was:" >&5
10921cat conftest.$ac_ext >&5
10922ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010923fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010924rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10925LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010926fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010927echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10928echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10929if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10930 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010931#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010932_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010933
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010934 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010935 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010936 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010937else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010938
Martin v. Löwis11437992002-04-12 09:54:03 +000010939 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10940echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10941if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10942 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010943else
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010945LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010946cat >conftest.$ac_ext <<_ACEOF
10947#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010948#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010949
Guido van Rossumb93a8621998-05-07 13:27:32 +000010950/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010951#ifdef __cplusplus
10952extern "C"
10953#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010954/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010955 builtin and then its argument prototype would still apply. */
10956char pthread_create ();
10957#ifdef F77_DUMMY_MAIN
10958# ifdef __cplusplus
10959 extern "C"
10960# endif
10961 int F77_DUMMY_MAIN() { return 1; }
10962#endif
10963int
10964main ()
10965{
10966pthread_create ();
10967 ;
10968 return 0;
10969}
10970_ACEOF
10971rm -f conftest.$ac_objext conftest$ac_exeext
10972if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10973 (eval $ac_link) 2>&5
10974 ac_status=$?
10975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10976 (exit $ac_status); } &&
10977 { ac_try='test -s conftest$ac_exeext'
10978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10979 (eval $ac_try) 2>&5
10980 ac_status=$?
10981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10982 (exit $ac_status); }; }; then
10983 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010984else
Martin v. Löwis11437992002-04-12 09:54:03 +000010985 echo "$as_me: failed program was:" >&5
10986cat conftest.$ac_ext >&5
10987ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010988fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010989rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10990LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010991fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010992echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10993echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10994if test $ac_cv_lib_cma_pthread_create = yes; then
10995 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010996#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010997_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010998
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010999 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011000 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011001 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011002else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011003
Martin v. Löwis130fb172001-07-19 11:00:41 +000011004 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011005fi
11006
Guido van Rossum627b2d71993-12-24 10:39:16 +000011007
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011008fi
11009
Guido van Rossum0be3e491997-05-22 20:33:33 +000011010fi
11011
Guido van Rossum49545951997-12-02 19:28:29 +000011012fi
11013
Guido van Rossumb93a8621998-05-07 13:27:32 +000011014fi
11015
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011016fi
11017
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011018
Michael W. Hudson54241132001-12-07 15:38:26 +000011019fi
11020
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011021
11022fi
11023
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011025rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11026fi;
11027fi
11028
11029
11030fi
11031
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011032
Michael W. Hudson54241132001-12-07 15:38:26 +000011033
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011034 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011035 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011036
11037cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011038#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011039_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011040
11041 fi
11042
Martin v. Löwis11437992002-04-12 09:54:03 +000011043 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11044echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11045 if test "${ac_cv_pthread_system_supported+set}" = set; then
11046 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011047else
11048 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011049 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011050else
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 cat >conftest.$ac_ext <<_ACEOF
11052#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011053#include "confdefs.h"
11054#include <pthread.h>
11055 void *foo(void *parm) {
11056 return NULL;
11057 }
11058 main() {
11059 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011060 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011061 if (pthread_attr_init(&attr)) exit(-1);
11062 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011063 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011064 exit(0);
11065 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011066_ACEOF
11067rm -f conftest$ac_exeext
11068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11069 (eval $ac_link) 2>&5
11070 ac_status=$?
11071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11074 (eval $ac_try) 2>&5
11075 ac_status=$?
11076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11077 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011078 ac_cv_pthread_system_supported=yes
11079else
Martin v. Löwis11437992002-04-12 09:54:03 +000011080 echo "$as_me: program exited with status $ac_status" >&5
11081echo "$as_me: failed program was:" >&5
11082cat conftest.$ac_ext >&5
11083( exit $ac_status )
11084ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011085fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011086rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011087fi
11088
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011089fi
11090
Martin v. Löwis11437992002-04-12 09:54:03 +000011091 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11092echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011093 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011094
11095cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011096#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011097_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011098
11099 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011100
11101for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011102do
Martin v. Löwis11437992002-04-12 09:54:03 +000011103as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11104echo "$as_me:$LINENO: checking for $ac_func" >&5
11105echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11106if eval "test \"\${$as_ac_var+set}\" = set"; then
11107 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011108else
Martin v. Löwis11437992002-04-12 09:54:03 +000011109 cat >conftest.$ac_ext <<_ACEOF
11110#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011111#include "confdefs.h"
11112/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011114#include <assert.h>
11115/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011116#ifdef __cplusplus
11117extern "C"
11118#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011119/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 builtin and then its argument prototype would still apply. */
11121char $ac_func ();
11122char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011123
Martin v. Löwis11437992002-04-12 09:54:03 +000011124#ifdef F77_DUMMY_MAIN
11125# ifdef __cplusplus
11126 extern "C"
11127# endif
11128 int F77_DUMMY_MAIN() { return 1; }
11129#endif
11130int
11131main ()
11132{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011133/* The GNU C library defines this for functions which it implements
11134 to always fail with ENOSYS. Some functions are actually named
11135 something starting with __ and the normal name is an alias. */
11136#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11137choke me
11138#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011139f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011140#endif
11141
Martin v. Löwis11437992002-04-12 09:54:03 +000011142 ;
11143 return 0;
11144}
11145_ACEOF
11146rm -f conftest.$ac_objext conftest$ac_exeext
11147if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11148 (eval $ac_link) 2>&5
11149 ac_status=$?
11150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11151 (exit $ac_status); } &&
11152 { ac_try='test -s conftest$ac_exeext'
11153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11154 (eval $ac_try) 2>&5
11155 ac_status=$?
11156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11157 (exit $ac_status); }; }; then
11158 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011159else
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 echo "$as_me: failed program was:" >&5
11161cat conftest.$ac_ext >&5
11162eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011163fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011164rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011165fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011166echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11167echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11168if test `eval echo '${'$as_ac_var'}'` = yes; then
11169 cat >>confdefs.h <<_ACEOF
11170#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11171_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011172
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011173fi
11174done
11175
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011176 fi
11177
Martin v. Löwis11437992002-04-12 09:54:03 +000011178 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11179echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11180if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11181 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011182else
Martin v. Löwis11437992002-04-12 09:54:03 +000011183 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011184LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011185cat >conftest.$ac_ext <<_ACEOF
11186#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011187#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011188
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011189/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011190#ifdef __cplusplus
11191extern "C"
11192#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011193/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 builtin and then its argument prototype would still apply. */
11195char usconfig ();
11196#ifdef F77_DUMMY_MAIN
11197# ifdef __cplusplus
11198 extern "C"
11199# endif
11200 int F77_DUMMY_MAIN() { return 1; }
11201#endif
11202int
11203main ()
11204{
11205usconfig ();
11206 ;
11207 return 0;
11208}
11209_ACEOF
11210rm -f conftest.$ac_objext conftest$ac_exeext
11211if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11212 (eval $ac_link) 2>&5
11213 ac_status=$?
11214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11215 (exit $ac_status); } &&
11216 { ac_try='test -s conftest$ac_exeext'
11217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11218 (eval $ac_try) 2>&5
11219 ac_status=$?
11220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11221 (exit $ac_status); }; }; then
11222 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011223else
Martin v. Löwis11437992002-04-12 09:54:03 +000011224 echo "$as_me: failed program was:" >&5
11225cat conftest.$ac_ext >&5
11226ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011227fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011228rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11229LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011231echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11232echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11233if test $ac_cv_lib_mpc_usconfig = yes; then
11234 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011235#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011236_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011237
Martin v. Löwis130fb172001-07-19 11:00:41 +000011238 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011239 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011240 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011241fi
11242
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011243
Neal Norwitza978ab02002-11-02 16:58:05 +000011244 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011245 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11246echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11247if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11248 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011249else
Martin v. Löwis11437992002-04-12 09:54:03 +000011250 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011251LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011252cat >conftest.$ac_ext <<_ACEOF
11253#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011254#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011255
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011256/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011257#ifdef __cplusplus
11258extern "C"
11259#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011260/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 builtin and then its argument prototype would still apply. */
11262char thr_create ();
11263#ifdef F77_DUMMY_MAIN
11264# ifdef __cplusplus
11265 extern "C"
11266# endif
11267 int F77_DUMMY_MAIN() { return 1; }
11268#endif
11269int
11270main ()
11271{
11272thr_create ();
11273 ;
11274 return 0;
11275}
11276_ACEOF
11277rm -f conftest.$ac_objext conftest$ac_exeext
11278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11279 (eval $ac_link) 2>&5
11280 ac_status=$?
11281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11282 (exit $ac_status); } &&
11283 { ac_try='test -s conftest$ac_exeext'
11284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11285 (eval $ac_try) 2>&5
11286 ac_status=$?
11287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11288 (exit $ac_status); }; }; then
11289 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011290else
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 echo "$as_me: failed program was:" >&5
11292cat conftest.$ac_ext >&5
11293ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011294fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011295rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11296LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011297fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011298echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11299echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11300if test $ac_cv_lib_thread_thr_create = yes; then
11301 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011302#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011303_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011304
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011305 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011306 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011307 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011308fi
11309
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011310 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011311
Martin v. Löwis130fb172001-07-19 11:00:41 +000011312 if test "$USE_THREAD_MODULE" != "#"
11313 then
11314 # If the above checks didn't disable threads, (at least) OSF1
11315 # needs this '-threads' argument during linking.
11316 case $ac_sys_system in
11317 OSF1) LDLAST=-threads;;
11318 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011319 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011320
11321 if test "$posix_threads" = yes -a \
11322 "$ac_sys_system" = "SunOS" -a \
11323 "$ac_sys_release" = "5.6"; then
11324
11325cat >>confdefs.h <<\_ACEOF
11326#define HAVE_PTHREAD_DESTRUCTOR 1
11327_ACEOF
11328
11329 fi
11330
Guido van Rossum627b2d71993-12-24 10:39:16 +000011331fi
11332
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011333# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011334
11335
11336echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11337echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011338# Check whether --enable-ipv6 or --disable-ipv6 was given.
11339if test "${enable_ipv6+set}" = set; then
11340 enableval="$enable_ipv6"
11341 case "$enableval" in
11342 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 echo "$as_me:$LINENO: result: no" >&5
11344echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011345 ipv6=no
11346 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011347 *) echo "$as_me:$LINENO: result: yes" >&5
11348echo "${ECHO_T}yes" >&6
11349 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011350#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011351_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011352
11353 ipv6=yes
11354 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011355 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011356else
Martin v. Löwis11437992002-04-12 09:54:03 +000011357
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011358 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 echo "$as_me:$LINENO: result: no" >&5
11360echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011361 ipv6=no
11362
11363else
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 cat >conftest.$ac_ext <<_ACEOF
11365#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011366#include "confdefs.h"
11367 /* AF_INET6 available check */
11368#include <sys/types.h>
11369#include <sys/socket.h>
11370main()
11371{
11372 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11373 exit(1);
11374 else
11375 exit(0);
11376}
11377
Martin v. Löwis11437992002-04-12 09:54:03 +000011378_ACEOF
11379rm -f conftest$ac_exeext
11380if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11381 (eval $ac_link) 2>&5
11382 ac_status=$?
11383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11384 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11386 (eval $ac_try) 2>&5
11387 ac_status=$?
11388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11389 (exit $ac_status); }; }; then
11390 echo "$as_me:$LINENO: result: yes" >&5
11391echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011392 ipv6=yes
11393else
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 echo "$as_me: program exited with status $ac_status" >&5
11395echo "$as_me: failed program was:" >&5
11396cat conftest.$ac_ext >&5
11397( exit $ac_status )
11398echo "$as_me:$LINENO: result: no" >&5
11399echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011400 ipv6=no
11401fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011402rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011403fi
11404
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011405if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11407echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11408 cat >conftest.$ac_ext <<_ACEOF
11409#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011410#include "confdefs.h"
11411#include <sys/types.h>
11412#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011413#ifdef F77_DUMMY_MAIN
11414# ifdef __cplusplus
11415 extern "C"
11416# endif
11417 int F77_DUMMY_MAIN() { return 1; }
11418#endif
11419int
11420main ()
11421{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011422struct sockaddr_in6 x;
11423x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 ;
11425 return 0;
11426}
11427_ACEOF
11428rm -f conftest.$ac_objext
11429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11430 (eval $ac_compile) 2>&5
11431 ac_status=$?
11432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11433 (exit $ac_status); } &&
11434 { ac_try='test -s conftest.$ac_objext'
11435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11436 (eval $ac_try) 2>&5
11437 ac_status=$?
11438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11439 (exit $ac_status); }; }; then
11440 echo "$as_me:$LINENO: result: yes" >&5
11441echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011442 ipv6=yes
11443else
Martin v. Löwis11437992002-04-12 09:54:03 +000011444 echo "$as_me: failed program was:" >&5
11445cat conftest.$ac_ext >&5
11446echo "$as_me:$LINENO: result: no" >&5
11447echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011448 ipv6=no
11449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011450rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011451fi
11452
11453if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011455#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011456_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011457
11458fi
11459
Martin v. Löwis11437992002-04-12 09:54:03 +000011460fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011461
11462ipv6type=unknown
11463ipv6lib=none
11464ipv6trylibc=no
11465
11466if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011467 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11468echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011469 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11470 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011471 case $i in
11472 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011473 cat >conftest.$ac_ext <<_ACEOF
11474#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011475#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011476
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011477#include <netinet/in.h>
11478#ifdef IPV6_INRIA_VERSION
11479yes
11480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011481_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11483 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011484 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011485fi
11486rm -f conftest*
11487
11488 ;;
11489 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011490 cat >conftest.$ac_ext <<_ACEOF
11491#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011492#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011493
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011494#include <netinet/in.h>
11495#ifdef __KAME__
11496yes
11497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011498_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11500 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011501 ipv6type=$i;
11502 ipv6lib=inet6
11503 ipv6libdir=/usr/local/v6/lib
11504 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011505fi
11506rm -f conftest*
11507
11508 ;;
11509 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 cat >conftest.$ac_ext <<_ACEOF
11511#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011512#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011513
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011514#include <features.h>
11515#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11516yes
11517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011518_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11520 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011521 ipv6type=$i;
11522 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011523fi
11524rm -f conftest*
11525
11526 ;;
11527 linux-inet6)
11528 if test -d /usr/inet6; then
11529 ipv6type=$i
11530 ipv6lib=inet6
11531 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011532 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011533 fi
11534 ;;
11535 solaris)
11536 if test -f /etc/netconfig; then
11537 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11538 ipv6type=$i
11539 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011540 fi
11541 fi
11542 ;;
11543 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011544 cat >conftest.$ac_ext <<_ACEOF
11545#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011546#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011547
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011548#include <sys/param.h>
11549#ifdef _TOSHIBA_INET6
11550yes
11551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011552_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011553if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11554 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011555 ipv6type=$i;
11556 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011557 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011558fi
11559rm -f conftest*
11560
11561 ;;
11562 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011563 cat >conftest.$ac_ext <<_ACEOF
11564#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011565#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011566
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011567#include </usr/local/v6/include/sys/v6config.h>
11568#ifdef __V6D__
11569yes
11570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011571_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11573 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011574 ipv6type=$i;
11575 ipv6lib=v6;
11576 ipv6libdir=/usr/local/v6/lib;
11577 OPT="-I/usr/local/v6/include $OPT"
11578fi
11579rm -f conftest*
11580
11581 ;;
11582 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011583 cat >conftest.$ac_ext <<_ACEOF
11584#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011585#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011586
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011587#include <sys/param.h>
11588#ifdef _ZETA_MINAMI_INET6
11589yes
11590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011591_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11593 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011594 ipv6type=$i;
11595 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011596 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011597fi
11598rm -f conftest*
11599
11600 ;;
11601 esac
11602 if test "$ipv6type" != "unknown"; then
11603 break
11604 fi
11605 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011606 echo "$as_me:$LINENO: result: $ipv6type" >&5
11607echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011608fi
11609
11610if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11611 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11612 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11613 echo "using lib$ipv6lib"
11614 else
11615 if test $ipv6trylibc = "yes"; then
11616 echo "using libc"
11617 else
11618 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11619 echo "You need to fetch lib$ipv6lib.a from appropriate"
11620 echo 'ipv6 kit and compile beforehand.'
11621 exit 1
11622 fi
11623 fi
11624fi
11625
Jack Jansen7b8c7542002-04-14 20:12:41 +000011626# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011627echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11628echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011629
11630# Check whether --with-universal-newlines or --without-universal-newlines was given.
11631if test "${with_universal_newlines+set}" = set; then
11632 withval="$with_universal_newlines"
11633
11634fi;
11635
11636if test -z "$with_universal_newlines"
11637then with_universal_newlines="yes"
11638fi
11639if test "$with_universal_newlines" != "no"
11640then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011641
11642cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011643#define WITH_UNIVERSAL_NEWLINES 1
11644_ACEOF
11645
11646fi
11647echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11648echo "${ECHO_T}$with_universal_newlines" >&6
11649
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011650# Check for --with-doc-strings
11651echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11652echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11653
11654# Check whether --with-doc-strings or --without-doc-strings was given.
11655if test "${with_doc_strings+set}" = set; then
11656 withval="$with_doc_strings"
11657
11658fi;
11659
11660if test -z "$with_doc_strings"
11661then with_doc_strings="yes"
11662fi
11663if test "$with_doc_strings" != "no"
11664then
11665
11666cat >>confdefs.h <<\_ACEOF
11667#define WITH_DOC_STRINGS 1
11668_ACEOF
11669
11670fi
11671echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11672echo "${ECHO_T}$with_doc_strings" >&6
11673
Neil Schemenauera35c6882001-02-27 04:45:05 +000011674# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011675echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11676echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11677
Neil Schemenauera35c6882001-02-27 04:45:05 +000011678# Check whether --with-pymalloc or --without-pymalloc was given.
11679if test "${with_pymalloc+set}" = set; then
11680 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011681
Martin v. Löwis11437992002-04-12 09:54:03 +000011682fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011683
Neil Schemenauer16c22972002-03-22 15:34:49 +000011684if test -z "$with_pymalloc"
11685then with_pymalloc="yes"
11686fi
11687if test "$with_pymalloc" != "no"
11688then
Martin v. Löwis11437992002-04-12 09:54:03 +000011689
11690cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011691#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011692_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011693
11694fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011695echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11696echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011697
Barry Warsawef82cd72000-06-30 16:21:01 +000011698# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011699echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11700echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11701
Barry Warsawef82cd72000-06-30 16:21:01 +000011702# Check whether --with-wctype-functions or --without-wctype-functions was given.
11703if test "${with_wctype_functions+set}" = set; then
11704 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011705
Barry Warsawef82cd72000-06-30 16:21:01 +000011706if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011707then
11708
11709cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011710#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011711_ACEOF
11712
11713 echo "$as_me:$LINENO: result: yes" >&5
11714echo "${ECHO_T}yes" >&6
11715else echo "$as_me:$LINENO: result: no" >&5
11716echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011717fi
11718else
Martin v. Löwis11437992002-04-12 09:54:03 +000011719 echo "$as_me:$LINENO: result: no" >&5
11720echo "${ECHO_T}no" >&6
11721fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011722
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011723# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011724
Guido van Rossum98935bf2001-09-05 19:13:16 +000011725DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011726
Martin v. Löwis11437992002-04-12 09:54:03 +000011727echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11728echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11729
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011730# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011731if test "${with_sgi_dl+set}" = set; then
11732 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011733
11734echo "$as_me:$LINENO: result: $withval" >&5
11735echo "${ECHO_T}$withval" >&6
11736
11737cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011738#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011739_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011740
Guido van Rossume97ee181999-12-20 21:27:22 +000011741DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011742dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011743if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011744then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011745else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11746echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11747 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011748fi
11749DLINCLDIR=${dldir}
11750LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011751else
Martin v. Löwis11437992002-04-12 09:54:03 +000011752 echo "$as_me:$LINENO: result: no" >&5
11753echo "${ECHO_T}no" >&6
11754fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011755
Martin v. Löwis11437992002-04-12 09:54:03 +000011756echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11757echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011758
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011759# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011760if test "${with_dl_dld+set}" = set; then
11761 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011762
11763echo "$as_me:$LINENO: result: $withval" >&5
11764echo "${ECHO_T}$withval" >&6
11765
11766cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011767#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011768_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011769
Guido van Rossume97ee181999-12-20 21:27:22 +000011770DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011771dldir=`echo "$withval" | sed 's/,.*//'`
11772dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011773if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011774then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011775else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11776echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11777 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011778fi
11779DLINCLDIR=${dldir}
11780LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011781else
Martin v. Löwis11437992002-04-12 09:54:03 +000011782 echo "$as_me:$LINENO: result: no" >&5
11783echo "${ECHO_T}no" >&6
11784fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011785
Guido van Rossume97ee181999-12-20 21:27:22 +000011786# the dlopen() function means we might want to use dynload_shlib.o. some
11787# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011788
Thomas Wouters3a584202000-08-05 23:28:51 +000011789for ac_func in dlopen
11790do
Martin v. Löwis11437992002-04-12 09:54:03 +000011791as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11792echo "$as_me:$LINENO: checking for $ac_func" >&5
11793echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11794if eval "test \"\${$as_ac_var+set}\" = set"; then
11795 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011796else
Martin v. Löwis11437992002-04-12 09:54:03 +000011797 cat >conftest.$ac_ext <<_ACEOF
11798#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011799#include "confdefs.h"
11800/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011801 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011802#include <assert.h>
11803/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011804#ifdef __cplusplus
11805extern "C"
11806#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011807/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011808 builtin and then its argument prototype would still apply. */
11809char $ac_func ();
11810char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011811
Martin v. Löwis11437992002-04-12 09:54:03 +000011812#ifdef F77_DUMMY_MAIN
11813# ifdef __cplusplus
11814 extern "C"
11815# endif
11816 int F77_DUMMY_MAIN() { return 1; }
11817#endif
11818int
11819main ()
11820{
Guido van Rossume97ee181999-12-20 21:27:22 +000011821/* The GNU C library defines this for functions which it implements
11822 to always fail with ENOSYS. Some functions are actually named
11823 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011824#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011825choke me
11826#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011827f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011828#endif
11829
Martin v. Löwis11437992002-04-12 09:54:03 +000011830 ;
11831 return 0;
11832}
11833_ACEOF
11834rm -f conftest.$ac_objext conftest$ac_exeext
11835if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11836 (eval $ac_link) 2>&5
11837 ac_status=$?
11838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11839 (exit $ac_status); } &&
11840 { ac_try='test -s conftest$ac_exeext'
11841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11842 (eval $ac_try) 2>&5
11843 ac_status=$?
11844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11845 (exit $ac_status); }; }; then
11846 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011847else
Martin v. Löwis11437992002-04-12 09:54:03 +000011848 echo "$as_me: failed program was:" >&5
11849cat conftest.$ac_ext >&5
11850eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011851fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011852rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011853fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011854echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11855echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11856if test `eval echo '${'$as_ac_var'}'` = yes; then
11857 cat >>confdefs.h <<_ACEOF
11858#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11859_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011860
Guido van Rossume97ee181999-12-20 21:27:22 +000011861fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011862done
Guido van Rossume97ee181999-12-20 21:27:22 +000011863
Michael W. Hudson54241132001-12-07 15:38:26 +000011864
Guido van Rossume97ee181999-12-20 21:27:22 +000011865# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11866# loading of modules.
11867
Martin v. Löwis11437992002-04-12 09:54:03 +000011868echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11869echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011870if test -z "$DYNLOADFILE"
11871then
11872 case $ac_sys_system/$ac_sys_release in
11873 AIX*) DYNLOADFILE="dynload_aix.o";;
11874 BeOS*) DYNLOADFILE="dynload_beos.o";;
11875 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011876 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011877 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011878 *)
11879 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11880 # out any dynamic loading
11881 if test "$ac_cv_func_dlopen" = yes
11882 then DYNLOADFILE="dynload_shlib.o"
11883 else DYNLOADFILE="dynload_stub.o"
11884 fi
11885 ;;
11886 esac
11887fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011888echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11889echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011890if test "$DYNLOADFILE" != "dynload_stub.o"
11891then
Martin v. Löwis11437992002-04-12 09:54:03 +000011892
11893cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011894#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011895_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011896
11897fi
11898
Neil Schemenauer4e425612001-06-19 15:44:15 +000011899# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11900
Michael W. Hudson54241132001-12-07 15:38:26 +000011901
Martin v. Löwis11437992002-04-12 09:54:03 +000011902echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11903echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011904if test -z "$MACHDEP_OBJS"
11905then
Jack Jansene578a632001-08-15 01:27:14 +000011906 MACHDEP_OBJS=$extra_machdep_objs
11907else
11908 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011909fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011910echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11911echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011912
Guido van Rossum627b2d71993-12-24 10:39:16 +000011913# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
Martin v. Löwisd5843682002-11-21 20:41:28 +000011987for ac_func in alarm chown clock confstr ctermid execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011988 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011989 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011990 hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000011991 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011992 putenv readlink \
Martin v. Löwisd5843682002-11-21 20:41:28 +000011993 select setegid seteuid setgid \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011994 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011995 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011996 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011997 truncate uname unsetenv utimes waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011998do
Martin v. Löwis11437992002-04-12 09:54:03 +000011999as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12000echo "$as_me:$LINENO: checking for $ac_func" >&5
12001echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12002if eval "test \"\${$as_ac_var+set}\" = set"; then
12003 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012004else
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 cat >conftest.$ac_ext <<_ACEOF
12006#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012007#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012008/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012009 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012010#include <assert.h>
12011/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012012#ifdef __cplusplus
12013extern "C"
12014#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012015/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012016 builtin and then its argument prototype would still apply. */
12017char $ac_func ();
12018char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012019
Martin v. Löwis11437992002-04-12 09:54:03 +000012020#ifdef F77_DUMMY_MAIN
12021# ifdef __cplusplus
12022 extern "C"
12023# endif
12024 int F77_DUMMY_MAIN() { return 1; }
12025#endif
12026int
12027main ()
12028{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012029/* The GNU C library defines this for functions which it implements
12030 to always fail with ENOSYS. Some functions are actually named
12031 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012032#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012033choke me
12034#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012035f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012036#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012037
Martin v. Löwis11437992002-04-12 09:54:03 +000012038 ;
12039 return 0;
12040}
12041_ACEOF
12042rm -f conftest.$ac_objext conftest$ac_exeext
12043if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12044 (eval $ac_link) 2>&5
12045 ac_status=$?
12046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12047 (exit $ac_status); } &&
12048 { ac_try='test -s conftest$ac_exeext'
12049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12050 (eval $ac_try) 2>&5
12051 ac_status=$?
12052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12053 (exit $ac_status); }; }; then
12054 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012055else
Martin v. Löwis11437992002-04-12 09:54:03 +000012056 echo "$as_me: failed program was:" >&5
12057cat conftest.$ac_ext >&5
12058eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012059fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012060rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012061fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012062echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12063echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12064if test `eval echo '${'$as_ac_var'}'` = yes; then
12065 cat >>confdefs.h <<_ACEOF
12066#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12067_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012068
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012069fi
12070done
12071
Michael W. Hudson54241132001-12-07 15:38:26 +000012072
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012073# For some functions, having a definition is not sufficient, since
12074# we want to take their address.
12075echo "$as_me:$LINENO: checking for chroot" >&5
12076echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12077cat >conftest.$ac_ext <<_ACEOF
12078#line $LINENO "configure"
12079#include "confdefs.h"
12080#include <unistd.h>
12081#ifdef F77_DUMMY_MAIN
12082# ifdef __cplusplus
12083 extern "C"
12084# endif
12085 int F77_DUMMY_MAIN() { return 1; }
12086#endif
12087int
12088main ()
12089{
12090void *x=chroot
12091 ;
12092 return 0;
12093}
12094_ACEOF
12095rm -f conftest.$ac_objext
12096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12097 (eval $ac_compile) 2>&5
12098 ac_status=$?
12099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12100 (exit $ac_status); } &&
12101 { ac_try='test -s conftest.$ac_objext'
12102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12103 (eval $ac_try) 2>&5
12104 ac_status=$?
12105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12106 (exit $ac_status); }; }; then
12107
12108cat >>confdefs.h <<\_ACEOF
12109#define HAVE_CHROOT 1
12110_ACEOF
12111
12112 echo "$as_me:$LINENO: result: yes" >&5
12113echo "${ECHO_T}yes" >&6
12114else
12115 echo "$as_me: failed program was:" >&5
12116cat conftest.$ac_ext >&5
12117echo "$as_me:$LINENO: result: no" >&5
12118echo "${ECHO_T}no" >&6
12119
12120fi
12121rm -f conftest.$ac_objext conftest.$ac_ext
12122echo "$as_me:$LINENO: checking for link" >&5
12123echo $ECHO_N "checking for link... $ECHO_C" >&6
12124cat >conftest.$ac_ext <<_ACEOF
12125#line $LINENO "configure"
12126#include "confdefs.h"
12127#include <unistd.h>
12128#ifdef F77_DUMMY_MAIN
12129# ifdef __cplusplus
12130 extern "C"
12131# endif
12132 int F77_DUMMY_MAIN() { return 1; }
12133#endif
12134int
12135main ()
12136{
12137void *x=link
12138 ;
12139 return 0;
12140}
12141_ACEOF
12142rm -f conftest.$ac_objext
12143if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12144 (eval $ac_compile) 2>&5
12145 ac_status=$?
12146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12147 (exit $ac_status); } &&
12148 { ac_try='test -s conftest.$ac_objext'
12149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12150 (eval $ac_try) 2>&5
12151 ac_status=$?
12152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12153 (exit $ac_status); }; }; then
12154
12155cat >>confdefs.h <<\_ACEOF
12156#define HAVE_LINK 1
12157_ACEOF
12158
12159 echo "$as_me:$LINENO: result: yes" >&5
12160echo "${ECHO_T}yes" >&6
12161else
12162 echo "$as_me: failed program was:" >&5
12163cat conftest.$ac_ext >&5
12164echo "$as_me:$LINENO: result: no" >&5
12165echo "${ECHO_T}no" >&6
12166
12167fi
12168rm -f conftest.$ac_objext conftest.$ac_ext
12169echo "$as_me:$LINENO: checking for symlink" >&5
12170echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12171cat >conftest.$ac_ext <<_ACEOF
12172#line $LINENO "configure"
12173#include "confdefs.h"
12174#include <unistd.h>
12175#ifdef F77_DUMMY_MAIN
12176# ifdef __cplusplus
12177 extern "C"
12178# endif
12179 int F77_DUMMY_MAIN() { return 1; }
12180#endif
12181int
12182main ()
12183{
12184void *x=symlink
12185 ;
12186 return 0;
12187}
12188_ACEOF
12189rm -f conftest.$ac_objext
12190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12191 (eval $ac_compile) 2>&5
12192 ac_status=$?
12193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12194 (exit $ac_status); } &&
12195 { ac_try='test -s conftest.$ac_objext'
12196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12197 (eval $ac_try) 2>&5
12198 ac_status=$?
12199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12200 (exit $ac_status); }; }; then
12201
12202cat >>confdefs.h <<\_ACEOF
12203#define HAVE_SYMLINK 1
12204_ACEOF
12205
12206 echo "$as_me:$LINENO: result: yes" >&5
12207echo "${ECHO_T}yes" >&6
12208else
12209 echo "$as_me: failed program was:" >&5
12210cat conftest.$ac_ext >&5
12211echo "$as_me:$LINENO: result: no" >&5
12212echo "${ECHO_T}no" >&6
12213
12214fi
12215rm -f conftest.$ac_objext conftest.$ac_ext
12216
Martin v. Löwisd5843682002-11-21 20:41:28 +000012217# On some systems (eg. FreeBSD 5), we would find a definition of the
12218# functions ctermid_r, setgroups in the library, but no prototype
12219# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12220# address to avoid compiler warnings and potential miscompilations
12221# because of the missing prototypes.
12222
12223echo "$as_me:$LINENO: checking for ctermid_r" >&5
12224echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12225cat >conftest.$ac_ext <<_ACEOF
12226#line $LINENO "configure"
12227#include "confdefs.h"
12228
12229#include "confdefs.h"
12230#include <stdio.h>
12231
12232#ifdef F77_DUMMY_MAIN
12233# ifdef __cplusplus
12234 extern "C"
12235# endif
12236 int F77_DUMMY_MAIN() { return 1; }
12237#endif
12238int
12239main ()
12240{
12241void* p = ctermid_r
12242 ;
12243 return 0;
12244}
12245_ACEOF
12246rm -f conftest.$ac_objext
12247if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12248 (eval $ac_compile) 2>&5
12249 ac_status=$?
12250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12251 (exit $ac_status); } &&
12252 { ac_try='test -s conftest.$ac_objext'
12253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12254 (eval $ac_try) 2>&5
12255 ac_status=$?
12256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12257 (exit $ac_status); }; }; then
12258
12259cat >>confdefs.h <<\_ACEOF
12260#define HAVE_CTERMID_R 1
12261_ACEOF
12262
12263 echo "$as_me:$LINENO: result: yes" >&5
12264echo "${ECHO_T}yes" >&6
12265else
12266 echo "$as_me: failed program was:" >&5
12267cat conftest.$ac_ext >&5
12268echo "$as_me:$LINENO: result: no" >&5
12269echo "${ECHO_T}no" >&6
12270
12271fi
12272rm -f conftest.$ac_objext conftest.$ac_ext
12273
12274echo "$as_me:$LINENO: checking for setgroups" >&5
12275echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
12276cat >conftest.$ac_ext <<_ACEOF
12277#line $LINENO "configure"
12278#include "confdefs.h"
12279
12280#include "confdefs.h"
12281#include <unistd.h.h>
12282
12283#ifdef F77_DUMMY_MAIN
12284# ifdef __cplusplus
12285 extern "C"
12286# endif
12287 int F77_DUMMY_MAIN() { return 1; }
12288#endif
12289int
12290main ()
12291{
12292void* p = setgroups
12293 ;
12294 return 0;
12295}
12296_ACEOF
12297rm -f conftest.$ac_objext
12298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12299 (eval $ac_compile) 2>&5
12300 ac_status=$?
12301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12302 (exit $ac_status); } &&
12303 { ac_try='test -s conftest.$ac_objext'
12304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12305 (eval $ac_try) 2>&5
12306 ac_status=$?
12307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12308 (exit $ac_status); }; }; then
12309
12310cat >>confdefs.h <<\_ACEOF
12311#define HAVE_SETGROUPS 1
12312_ACEOF
12313
12314 echo "$as_me:$LINENO: result: yes" >&5
12315echo "${ECHO_T}yes" >&6
12316else
12317 echo "$as_me: failed program was:" >&5
12318cat conftest.$ac_ext >&5
12319echo "$as_me:$LINENO: result: no" >&5
12320echo "${ECHO_T}no" >&6
12321
12322fi
12323rm -f conftest.$ac_objext conftest.$ac_ext
12324
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012325# check for openpty and forkpty
12326
Martin v. Löwis11437992002-04-12 09:54:03 +000012327
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012328for ac_func in openpty
12329do
Martin v. Löwis11437992002-04-12 09:54:03 +000012330as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12331echo "$as_me:$LINENO: checking for $ac_func" >&5
12332echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12333if eval "test \"\${$as_ac_var+set}\" = set"; then
12334 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012335else
Martin v. Löwis11437992002-04-12 09:54:03 +000012336 cat >conftest.$ac_ext <<_ACEOF
12337#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012338#include "confdefs.h"
12339/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012340 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012341#include <assert.h>
12342/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012343#ifdef __cplusplus
12344extern "C"
12345#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012346/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012347 builtin and then its argument prototype would still apply. */
12348char $ac_func ();
12349char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012350
Martin v. Löwis11437992002-04-12 09:54:03 +000012351#ifdef F77_DUMMY_MAIN
12352# ifdef __cplusplus
12353 extern "C"
12354# endif
12355 int F77_DUMMY_MAIN() { return 1; }
12356#endif
12357int
12358main ()
12359{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012360/* The GNU C library defines this for functions which it implements
12361 to always fail with ENOSYS. Some functions are actually named
12362 something starting with __ and the normal name is an alias. */
12363#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12364choke me
12365#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012366f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012367#endif
12368
Martin v. Löwis11437992002-04-12 09:54:03 +000012369 ;
12370 return 0;
12371}
12372_ACEOF
12373rm -f conftest.$ac_objext conftest$ac_exeext
12374if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12375 (eval $ac_link) 2>&5
12376 ac_status=$?
12377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12378 (exit $ac_status); } &&
12379 { ac_try='test -s conftest$ac_exeext'
12380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12381 (eval $ac_try) 2>&5
12382 ac_status=$?
12383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12384 (exit $ac_status); }; }; then
12385 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012386else
Martin v. Löwis11437992002-04-12 09:54:03 +000012387 echo "$as_me: failed program was:" >&5
12388cat conftest.$ac_ext >&5
12389eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012390fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012391rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012392fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012393echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12394echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12395if test `eval echo '${'$as_ac_var'}'` = yes; then
12396 cat >>confdefs.h <<_ACEOF
12397#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12398_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012399
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012400else
Martin v. Löwis11437992002-04-12 09:54:03 +000012401 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12402echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12403if test "${ac_cv_lib_util_openpty+set}" = set; then
12404 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012405else
Martin v. Löwis11437992002-04-12 09:54:03 +000012406 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012407LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012408cat >conftest.$ac_ext <<_ACEOF
12409#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012410#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012411
Fred Drake8cef4cf2000-06-28 16:40:38 +000012412/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012413#ifdef __cplusplus
12414extern "C"
12415#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012416/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012417 builtin and then its argument prototype would still apply. */
12418char openpty ();
12419#ifdef F77_DUMMY_MAIN
12420# ifdef __cplusplus
12421 extern "C"
12422# endif
12423 int F77_DUMMY_MAIN() { return 1; }
12424#endif
12425int
12426main ()
12427{
12428openpty ();
12429 ;
12430 return 0;
12431}
12432_ACEOF
12433rm -f conftest.$ac_objext conftest$ac_exeext
12434if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12435 (eval $ac_link) 2>&5
12436 ac_status=$?
12437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12438 (exit $ac_status); } &&
12439 { ac_try='test -s conftest$ac_exeext'
12440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12441 (eval $ac_try) 2>&5
12442 ac_status=$?
12443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12444 (exit $ac_status); }; }; then
12445 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012446else
Martin v. Löwis11437992002-04-12 09:54:03 +000012447 echo "$as_me: failed program was:" >&5
12448cat conftest.$ac_ext >&5
12449ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012450fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012451rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12452LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012453fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012454echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12455echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12456if test $ac_cv_lib_util_openpty = yes; then
12457 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012458#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012459_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012460 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012461fi
12462
12463fi
12464done
12465
Martin v. Löwis11437992002-04-12 09:54:03 +000012466
Fred Drake8cef4cf2000-06-28 16:40:38 +000012467for ac_func in forkpty
12468do
Martin v. Löwis11437992002-04-12 09:54:03 +000012469as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12470echo "$as_me:$LINENO: checking for $ac_func" >&5
12471echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12472if eval "test \"\${$as_ac_var+set}\" = set"; then
12473 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012474else
Martin v. Löwis11437992002-04-12 09:54:03 +000012475 cat >conftest.$ac_ext <<_ACEOF
12476#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012477#include "confdefs.h"
12478/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012479 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000012480#include <assert.h>
12481/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012482#ifdef __cplusplus
12483extern "C"
12484#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012485/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012486 builtin and then its argument prototype would still apply. */
12487char $ac_func ();
12488char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012489
Martin v. Löwis11437992002-04-12 09:54:03 +000012490#ifdef F77_DUMMY_MAIN
12491# ifdef __cplusplus
12492 extern "C"
12493# endif
12494 int F77_DUMMY_MAIN() { return 1; }
12495#endif
12496int
12497main ()
12498{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012499/* The GNU C library defines this for functions which it implements
12500 to always fail with ENOSYS. Some functions are actually named
12501 something starting with __ and the normal name is an alias. */
12502#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12503choke me
12504#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012505f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012506#endif
12507
Martin v. Löwis11437992002-04-12 09:54:03 +000012508 ;
12509 return 0;
12510}
12511_ACEOF
12512rm -f conftest.$ac_objext conftest$ac_exeext
12513if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12514 (eval $ac_link) 2>&5
12515 ac_status=$?
12516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12517 (exit $ac_status); } &&
12518 { ac_try='test -s conftest$ac_exeext'
12519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12520 (eval $ac_try) 2>&5
12521 ac_status=$?
12522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12523 (exit $ac_status); }; }; then
12524 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012525else
Martin v. Löwis11437992002-04-12 09:54:03 +000012526 echo "$as_me: failed program was:" >&5
12527cat conftest.$ac_ext >&5
12528eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012529fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012530rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012531fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012532echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12533echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12534if test `eval echo '${'$as_ac_var'}'` = yes; then
12535 cat >>confdefs.h <<_ACEOF
12536#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12537_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012538
Fred Drake8cef4cf2000-06-28 16:40:38 +000012539else
Martin v. Löwis11437992002-04-12 09:54:03 +000012540 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12541echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12542if test "${ac_cv_lib_util_forkpty+set}" = set; then
12543 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012544else
Martin v. Löwis11437992002-04-12 09:54:03 +000012545 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012546LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012547cat >conftest.$ac_ext <<_ACEOF
12548#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012549#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012550
Fred Drake8cef4cf2000-06-28 16:40:38 +000012551/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012552#ifdef __cplusplus
12553extern "C"
12554#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012555/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012556 builtin and then its argument prototype would still apply. */
12557char forkpty ();
12558#ifdef F77_DUMMY_MAIN
12559# ifdef __cplusplus
12560 extern "C"
12561# endif
12562 int F77_DUMMY_MAIN() { return 1; }
12563#endif
12564int
12565main ()
12566{
12567forkpty ();
12568 ;
12569 return 0;
12570}
12571_ACEOF
12572rm -f conftest.$ac_objext conftest$ac_exeext
12573if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12574 (eval $ac_link) 2>&5
12575 ac_status=$?
12576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12577 (exit $ac_status); } &&
12578 { ac_try='test -s conftest$ac_exeext'
12579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12580 (eval $ac_try) 2>&5
12581 ac_status=$?
12582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12583 (exit $ac_status); }; }; then
12584 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012585else
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 echo "$as_me: failed program was:" >&5
12587cat conftest.$ac_ext >&5
12588ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012590rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12591LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012593echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12594echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12595if test $ac_cv_lib_util_forkpty = yes; then
12596 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012597#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012598_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012599 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012600fi
12601
12602fi
12603done
12604
Jack Jansendd19cf82001-12-06 22:36:17 +000012605
Michael W. Hudson54241132001-12-07 15:38:26 +000012606# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012607
12608
12609
12610
12611
12612
Fred Drake8cef4cf2000-06-28 16:40:38 +000012613for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12614do
Martin v. Löwis11437992002-04-12 09:54:03 +000012615as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12616echo "$as_me:$LINENO: checking for $ac_func" >&5
12617echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12618if eval "test \"\${$as_ac_var+set}\" = set"; then
12619 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012620else
Martin v. Löwis11437992002-04-12 09:54:03 +000012621 cat >conftest.$ac_ext <<_ACEOF
12622#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012623#include "confdefs.h"
12624/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012625 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012626#include <assert.h>
12627/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012628#ifdef __cplusplus
12629extern "C"
12630#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012631/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012632 builtin and then its argument prototype would still apply. */
12633char $ac_func ();
12634char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012635
Martin v. Löwis11437992002-04-12 09:54:03 +000012636#ifdef F77_DUMMY_MAIN
12637# ifdef __cplusplus
12638 extern "C"
12639# endif
12640 int F77_DUMMY_MAIN() { return 1; }
12641#endif
12642int
12643main ()
12644{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012645/* The GNU C library defines this for functions which it implements
12646 to always fail with ENOSYS. Some functions are actually named
12647 something starting with __ and the normal name is an alias. */
12648#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12649choke me
12650#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012651f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012652#endif
12653
Martin v. Löwis11437992002-04-12 09:54:03 +000012654 ;
12655 return 0;
12656}
12657_ACEOF
12658rm -f conftest.$ac_objext conftest$ac_exeext
12659if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12660 (eval $ac_link) 2>&5
12661 ac_status=$?
12662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12663 (exit $ac_status); } &&
12664 { ac_try='test -s conftest$ac_exeext'
12665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12666 (eval $ac_try) 2>&5
12667 ac_status=$?
12668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12669 (exit $ac_status); }; }; then
12670 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012671else
Martin v. Löwis11437992002-04-12 09:54:03 +000012672 echo "$as_me: failed program was:" >&5
12673cat conftest.$ac_ext >&5
12674eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012676rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012677fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012678echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12679echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12680if test `eval echo '${'$as_ac_var'}'` = yes; then
12681 cat >>confdefs.h <<_ACEOF
12682#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12683_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012684
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012685fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012686done
12687
Michael W. Hudson54241132001-12-07 15:38:26 +000012688
Martin v. Löwis11437992002-04-12 09:54:03 +000012689
12690
12691
12692
12693
Martin v. Löwis1142de32002-03-29 16:28:31 +000012694for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012695do
Martin v. Löwis11437992002-04-12 09:54:03 +000012696as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12697echo "$as_me:$LINENO: checking for $ac_func" >&5
12698echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12699if eval "test \"\${$as_ac_var+set}\" = set"; then
12700 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012701else
Martin v. Löwis11437992002-04-12 09:54:03 +000012702 cat >conftest.$ac_ext <<_ACEOF
12703#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012704#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012705/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012706 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012707#include <assert.h>
12708/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012709#ifdef __cplusplus
12710extern "C"
12711#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012712/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012713 builtin and then its argument prototype would still apply. */
12714char $ac_func ();
12715char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012716
Martin v. Löwis11437992002-04-12 09:54:03 +000012717#ifdef F77_DUMMY_MAIN
12718# ifdef __cplusplus
12719 extern "C"
12720# endif
12721 int F77_DUMMY_MAIN() { return 1; }
12722#endif
12723int
12724main ()
12725{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012726/* The GNU C library defines this for functions which it implements
12727 to always fail with ENOSYS. Some functions are actually named
12728 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012729#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012730choke me
12731#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012732f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012733#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012734
Martin v. Löwis11437992002-04-12 09:54:03 +000012735 ;
12736 return 0;
12737}
12738_ACEOF
12739rm -f conftest.$ac_objext conftest$ac_exeext
12740if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12741 (eval $ac_link) 2>&5
12742 ac_status=$?
12743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12744 (exit $ac_status); } &&
12745 { ac_try='test -s conftest$ac_exeext'
12746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12747 (eval $ac_try) 2>&5
12748 ac_status=$?
12749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12750 (exit $ac_status); }; }; then
12751 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012752else
Martin v. Löwis11437992002-04-12 09:54:03 +000012753 echo "$as_me: failed program was:" >&5
12754cat conftest.$ac_ext >&5
12755eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012756fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012757rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012758fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012759echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12760echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12761if test `eval echo '${'$as_ac_var'}'` = yes; then
12762 cat >>confdefs.h <<_ACEOF
12763#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12764_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012765
Martin v. Löwis1142de32002-03-29 16:28:31 +000012766else
Martin v. Löwis11437992002-04-12 09:54:03 +000012767 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012768fi
12769done
12770
12771
Martin v. Löwis11437992002-04-12 09:54:03 +000012772
Martin v. Löwis1142de32002-03-29 16:28:31 +000012773for ac_func in getpgrp
12774do
Martin v. Löwis11437992002-04-12 09:54:03 +000012775as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12776echo "$as_me:$LINENO: checking for $ac_func" >&5
12777echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12778if eval "test \"\${$as_ac_var+set}\" = set"; then
12779 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012780else
Martin v. Löwis11437992002-04-12 09:54:03 +000012781 cat >conftest.$ac_ext <<_ACEOF
12782#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012783#include "confdefs.h"
12784/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012785 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012786#include <assert.h>
12787/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012788#ifdef __cplusplus
12789extern "C"
12790#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012791/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012792 builtin and then its argument prototype would still apply. */
12793char $ac_func ();
12794char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012795
Martin v. Löwis11437992002-04-12 09:54:03 +000012796#ifdef F77_DUMMY_MAIN
12797# ifdef __cplusplus
12798 extern "C"
12799# endif
12800 int F77_DUMMY_MAIN() { return 1; }
12801#endif
12802int
12803main ()
12804{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012805/* The GNU C library defines this for functions which it implements
12806 to always fail with ENOSYS. Some functions are actually named
12807 something starting with __ and the normal name is an alias. */
12808#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12809choke me
12810#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012811f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012812#endif
12813
Martin v. Löwis11437992002-04-12 09:54:03 +000012814 ;
12815 return 0;
12816}
12817_ACEOF
12818rm -f conftest.$ac_objext conftest$ac_exeext
12819if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12820 (eval $ac_link) 2>&5
12821 ac_status=$?
12822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12823 (exit $ac_status); } &&
12824 { ac_try='test -s conftest$ac_exeext'
12825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12826 (eval $ac_try) 2>&5
12827 ac_status=$?
12828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12829 (exit $ac_status); }; }; then
12830 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012831else
Martin v. Löwis11437992002-04-12 09:54:03 +000012832 echo "$as_me: failed program was:" >&5
12833cat conftest.$ac_ext >&5
12834eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012835fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012836rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012837fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012838echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12839echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12840if test `eval echo '${'$as_ac_var'}'` = yes; then
12841 cat >>confdefs.h <<_ACEOF
12842#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12843_ACEOF
12844 cat >conftest.$ac_ext <<_ACEOF
12845#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846#include "confdefs.h"
12847#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012848#ifdef F77_DUMMY_MAIN
12849# ifdef __cplusplus
12850 extern "C"
12851# endif
12852 int F77_DUMMY_MAIN() { return 1; }
12853#endif
12854int
12855main ()
12856{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012857getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 ;
12859 return 0;
12860}
12861_ACEOF
12862rm -f conftest.$ac_objext
12863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12864 (eval $ac_compile) 2>&5
12865 ac_status=$?
12866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12867 (exit $ac_status); } &&
12868 { ac_try='test -s conftest.$ac_objext'
12869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12870 (eval $ac_try) 2>&5
12871 ac_status=$?
12872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12873 (exit $ac_status); }; }; then
12874
12875cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012876#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012877_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012878
Martin v. Löwis11437992002-04-12 09:54:03 +000012879
Guido van Rossumf78abae1997-01-21 22:02:36 +000012880else
Martin v. Löwis11437992002-04-12 09:54:03 +000012881 echo "$as_me: failed program was:" >&5
12882cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012883fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012884rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012885
Guido van Rossum627b2d71993-12-24 10:39:16 +000012886fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012887done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012888
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012889echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12890echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12891if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012893else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012894 if test "$cross_compiling" = yes; then
12895 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12896echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12897 { (exit 1); exit 1; }; }
12898else
Martin v. Löwis11437992002-04-12 09:54:03 +000012899 cat >conftest.$ac_ext <<_ACEOF
12900#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012901#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012902#if HAVE_UNISTD_H
12903# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012904#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012905
Martin v. Löwis11437992002-04-12 09:54:03 +000012906#ifdef F77_DUMMY_MAIN
12907# ifdef __cplusplus
12908 extern "C"
12909# endif
12910 int F77_DUMMY_MAIN() { return 1; }
12911#endif
12912int
12913main ()
12914{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012915/* If this system has a BSD-style setpgrp which takes arguments,
12916 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12917 exit successfully. */
12918 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012919 ;
12920 return 0;
12921}
12922_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012923rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12925 (eval $ac_link) 2>&5
12926 ac_status=$?
12927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012928 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12930 (eval $ac_try) 2>&5
12931 ac_status=$?
12932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12933 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012934 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012935else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012936 echo "$as_me: program exited with status $ac_status" >&5
12937echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012938cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012939( exit $ac_status )
12940ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012941fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012942rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012943fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012944fi
12945echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12946echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12947if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012948
12949cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012950#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012951_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012952
12953fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012954
Martin v. Löwis11437992002-04-12 09:54:03 +000012955
Thomas Wouters3a584202000-08-05 23:28:51 +000012956for ac_func in gettimeofday
12957do
Martin v. Löwis11437992002-04-12 09:54:03 +000012958as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12959echo "$as_me:$LINENO: checking for $ac_func" >&5
12960echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12961if eval "test \"\${$as_ac_var+set}\" = set"; then
12962 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012963else
Martin v. Löwis11437992002-04-12 09:54:03 +000012964 cat >conftest.$ac_ext <<_ACEOF
12965#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012966#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012967/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012968 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012969#include <assert.h>
12970/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012971#ifdef __cplusplus
12972extern "C"
12973#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012974/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012975 builtin and then its argument prototype would still apply. */
12976char $ac_func ();
12977char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012978
Martin v. Löwis11437992002-04-12 09:54:03 +000012979#ifdef F77_DUMMY_MAIN
12980# ifdef __cplusplus
12981 extern "C"
12982# endif
12983 int F77_DUMMY_MAIN() { return 1; }
12984#endif
12985int
12986main ()
12987{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012988/* The GNU C library defines this for functions which it implements
12989 to always fail with ENOSYS. Some functions are actually named
12990 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012991#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012992choke me
12993#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012994f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012995#endif
12996
Martin v. Löwis11437992002-04-12 09:54:03 +000012997 ;
12998 return 0;
12999}
13000_ACEOF
13001rm -f conftest.$ac_objext conftest$ac_exeext
13002if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13003 (eval $ac_link) 2>&5
13004 ac_status=$?
13005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13006 (exit $ac_status); } &&
13007 { ac_try='test -s conftest$ac_exeext'
13008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13009 (eval $ac_try) 2>&5
13010 ac_status=$?
13011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13012 (exit $ac_status); }; }; then
13013 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013014else
Martin v. Löwis11437992002-04-12 09:54:03 +000013015 echo "$as_me: failed program was:" >&5
13016cat conftest.$ac_ext >&5
13017eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013018fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013019rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013020fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013021echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13022echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13023if test `eval echo '${'$as_ac_var'}'` = yes; then
13024 cat >>confdefs.h <<_ACEOF
13025#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13026_ACEOF
13027 cat >conftest.$ac_ext <<_ACEOF
13028#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013029#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013030#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013031#ifdef F77_DUMMY_MAIN
13032# ifdef __cplusplus
13033 extern "C"
13034# endif
13035 int F77_DUMMY_MAIN() { return 1; }
13036#endif
13037int
13038main ()
13039{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013040gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013041 ;
13042 return 0;
13043}
13044_ACEOF
13045rm -f conftest.$ac_objext
13046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13047 (eval $ac_compile) 2>&5
13048 ac_status=$?
13049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13050 (exit $ac_status); } &&
13051 { ac_try='test -s conftest.$ac_objext'
13052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13053 (eval $ac_try) 2>&5
13054 ac_status=$?
13055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13056 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013057 :
13058else
Martin v. Löwis11437992002-04-12 09:54:03 +000013059 echo "$as_me: failed program was:" >&5
13060cat conftest.$ac_ext >&5
13061
13062cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013063#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013064_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013065
Martin v. Löwis11437992002-04-12 09:54:03 +000013066
Guido van Rossum627b2d71993-12-24 10:39:16 +000013067fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013068rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013069
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013070fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013071done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013072
Michael W. Hudson54241132001-12-07 15:38:26 +000013073
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013074echo "$as_me:$LINENO: checking for major" >&5
13075echo $ECHO_N "checking for major... $ECHO_C" >&6
13076cat >conftest.$ac_ext <<_ACEOF
13077#line $LINENO "configure"
13078#include "confdefs.h"
13079
13080 #if defined(MAJOR_IN_MKDEV)
13081 #include <sys/mkdev.h>
13082 #elif defined(MAJOR_IN_SYSMACROS)
13083 #include <sys/sysmacros.h>
13084 #else
13085 #include <sys/types.h>
13086 #endif
13087
13088#ifdef F77_DUMMY_MAIN
13089# ifdef __cplusplus
13090 extern "C"
13091# endif
13092 int F77_DUMMY_MAIN() { return 1; }
13093#endif
13094int
13095main ()
13096{
13097
13098 makedev(major(0),minor(0));
13099
13100 ;
13101 return 0;
13102}
13103_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013104rm -f conftest.$ac_objext conftest$ac_exeext
13105if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13106 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013107 ac_status=$?
13108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13109 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013110 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13112 (eval $ac_try) 2>&5
13113 ac_status=$?
13114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13115 (exit $ac_status); }; }; then
13116
13117
13118cat >>confdefs.h <<\_ACEOF
13119#define HAVE_DEVICE_MACROS 1
13120_ACEOF
13121
13122 echo "$as_me:$LINENO: result: yes" >&5
13123echo "${ECHO_T}yes" >&6
13124
13125else
13126 echo "$as_me: failed program was:" >&5
13127cat conftest.$ac_ext >&5
13128
13129 echo "$as_me:$LINENO: result: no" >&5
13130echo "${ECHO_T}no" >&6
13131
13132fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013133rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013134
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013135# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013136# for [no]getaddrinfo in netdb.h.
13137echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13138echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13139cat >conftest.$ac_ext <<_ACEOF
13140#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013141#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013142
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013143#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013144#include <sys/socket.h>
13145#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013146#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013147
Martin v. Löwis11437992002-04-12 09:54:03 +000013148#ifdef F77_DUMMY_MAIN
13149# ifdef __cplusplus
13150 extern "C"
13151# endif
13152 int F77_DUMMY_MAIN() { return 1; }
13153#endif
13154int
13155main ()
13156{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013157
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013158getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013159
Martin v. Löwis11437992002-04-12 09:54:03 +000013160 ;
13161 return 0;
13162}
13163_ACEOF
13164rm -f conftest.$ac_objext conftest$ac_exeext
13165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13166 (eval $ac_link) 2>&5
13167 ac_status=$?
13168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13169 (exit $ac_status); } &&
13170 { ac_try='test -s conftest$ac_exeext'
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
13177echo "$as_me:$LINENO: result: yes" >&5
13178echo "${ECHO_T}yes" >&6
13179echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13180echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013181if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013182 echo "$as_me:$LINENO: result: buggy" >&5
13183echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013184buggygetaddrinfo=yes
13185else
Martin v. Löwis11437992002-04-12 09:54:03 +000013186 cat >conftest.$ac_ext <<_ACEOF
13187#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013188#include "confdefs.h"
13189
13190#include <sys/types.h>
13191#include <netdb.h>
13192#include <string.h>
13193#include <sys/socket.h>
13194#include <netinet/in.h>
13195
13196main()
13197{
13198 int passive, gaierr, inet4 = 0, inet6 = 0;
13199 struct addrinfo hints, *ai, *aitop;
13200 char straddr[INET6_ADDRSTRLEN], strport[16];
13201
13202 for (passive = 0; passive <= 1; passive++) {
13203 memset(&hints, 0, sizeof(hints));
13204 hints.ai_family = AF_UNSPEC;
13205 hints.ai_flags = passive ? AI_PASSIVE : 0;
13206 hints.ai_socktype = SOCK_STREAM;
13207 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13208 (void)gai_strerror(gaierr);
13209 goto bad;
13210 }
13211 for (ai = aitop; ai; ai = ai->ai_next) {
13212 if (ai->ai_addr == NULL ||
13213 ai->ai_addrlen == 0 ||
13214 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13215 straddr, sizeof(straddr), strport, sizeof(strport),
13216 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13217 goto bad;
13218 }
13219 switch (ai->ai_family) {
13220 case AF_INET:
13221 if (strcmp(strport, "54321") != 0) {
13222 goto bad;
13223 }
13224 if (passive) {
13225 if (strcmp(straddr, "0.0.0.0") != 0) {
13226 goto bad;
13227 }
13228 } else {
13229 if (strcmp(straddr, "127.0.0.1") != 0) {
13230 goto bad;
13231 }
13232 }
13233 inet4++;
13234 break;
13235 case AF_INET6:
13236 if (strcmp(strport, "54321") != 0) {
13237 goto bad;
13238 }
13239 if (passive) {
13240 if (strcmp(straddr, "::") != 0) {
13241 goto bad;
13242 }
13243 } else {
13244 if (strcmp(straddr, "::1") != 0) {
13245 goto bad;
13246 }
13247 }
13248 inet6++;
13249 break;
13250 case AF_UNSPEC:
13251 goto bad;
13252 break;
13253 default:
13254 /* another family support? */
13255 break;
13256 }
13257 }
13258 }
13259
13260 if (!(inet4 == 0 || inet4 == 2))
13261 goto bad;
13262 if (!(inet6 == 0 || inet6 == 2))
13263 goto bad;
13264
13265 if (aitop)
13266 freeaddrinfo(aitop);
13267 exit(0);
13268
13269 bad:
13270 if (aitop)
13271 freeaddrinfo(aitop);
13272 exit(1);
13273}
13274
Martin v. Löwis11437992002-04-12 09:54:03 +000013275_ACEOF
13276rm -f conftest$ac_exeext
13277if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13278 (eval $ac_link) 2>&5
13279 ac_status=$?
13280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13281 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13283 (eval $ac_try) 2>&5
13284 ac_status=$?
13285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13286 (exit $ac_status); }; }; then
13287 echo "$as_me:$LINENO: result: good" >&5
13288echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013289buggygetaddrinfo=no
13290else
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 echo "$as_me: program exited with status $ac_status" >&5
13292echo "$as_me: failed program was:" >&5
13293cat conftest.$ac_ext >&5
13294( exit $ac_status )
13295echo "$as_me:$LINENO: result: buggy" >&5
13296echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013297buggygetaddrinfo=yes
13298fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013299rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013300fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013301else
Martin v. Löwis11437992002-04-12 09:54:03 +000013302 echo "$as_me: failed program was:" >&5
13303cat conftest.$ac_ext >&5
13304
13305echo "$as_me:$LINENO: result: no" >&5
13306echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013307buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013308
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013310rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013311
13312if test "$buggygetaddrinfo" = "yes"; then
13313 if test "$ipv6" = "yes"; then
13314 echo 'Fatal: You must get working getaddrinfo() function.'
13315 echo ' or you can specify "--disable-ipv6"'.
13316 exit 1
13317 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013318else
Martin v. Löwis11437992002-04-12 09:54:03 +000013319
13320cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013321#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013322_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013323
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013324fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013325
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013326for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013327do
Martin v. Löwis11437992002-04-12 09:54:03 +000013328as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13329echo "$as_me:$LINENO: checking for $ac_func" >&5
13330echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13331if eval "test \"\${$as_ac_var+set}\" = set"; then
13332 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013333else
Martin v. Löwis11437992002-04-12 09:54:03 +000013334 cat >conftest.$ac_ext <<_ACEOF
13335#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013336#include "confdefs.h"
13337/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013338 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013339#include <assert.h>
13340/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013341#ifdef __cplusplus
13342extern "C"
13343#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013344/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013345 builtin and then its argument prototype would still apply. */
13346char $ac_func ();
13347char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013348
Martin v. Löwis11437992002-04-12 09:54:03 +000013349#ifdef F77_DUMMY_MAIN
13350# ifdef __cplusplus
13351 extern "C"
13352# endif
13353 int F77_DUMMY_MAIN() { return 1; }
13354#endif
13355int
13356main ()
13357{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013358/* The GNU C library defines this for functions which it implements
13359 to always fail with ENOSYS. Some functions are actually named
13360 something starting with __ and the normal name is an alias. */
13361#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13362choke me
13363#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013364f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013365#endif
13366
Martin v. Löwis11437992002-04-12 09:54:03 +000013367 ;
13368 return 0;
13369}
13370_ACEOF
13371rm -f conftest.$ac_objext conftest$ac_exeext
13372if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13373 (eval $ac_link) 2>&5
13374 ac_status=$?
13375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13376 (exit $ac_status); } &&
13377 { ac_try='test -s conftest$ac_exeext'
13378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13379 (eval $ac_try) 2>&5
13380 ac_status=$?
13381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13382 (exit $ac_status); }; }; then
13383 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013384else
Martin v. Löwis11437992002-04-12 09:54:03 +000013385 echo "$as_me: failed program was:" >&5
13386cat conftest.$ac_ext >&5
13387eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013388fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013389rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013390fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013391echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13392echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13393if test `eval echo '${'$as_ac_var'}'` = yes; then
13394 cat >>confdefs.h <<_ACEOF
13395#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13396_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013397
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013398fi
13399done
13400
Michael W. Hudson54241132001-12-07 15:38:26 +000013401
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013402# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013403echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13404echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13405if test "${ac_cv_header_time+set}" = set; then
13406 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013407else
Martin v. Löwis11437992002-04-12 09:54:03 +000013408 cat >conftest.$ac_ext <<_ACEOF
13409#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013410#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013411#include <sys/types.h>
13412#include <sys/time.h>
13413#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013414
13415#ifdef F77_DUMMY_MAIN
13416# ifdef __cplusplus
13417 extern "C"
13418# endif
13419 int F77_DUMMY_MAIN() { return 1; }
13420#endif
13421int
13422main ()
13423{
13424if ((struct tm *) 0)
13425return 0;
13426 ;
13427 return 0;
13428}
13429_ACEOF
13430rm -f conftest.$ac_objext
13431if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13432 (eval $ac_compile) 2>&5
13433 ac_status=$?
13434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13435 (exit $ac_status); } &&
13436 { ac_try='test -s conftest.$ac_objext'
13437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13438 (eval $ac_try) 2>&5
13439 ac_status=$?
13440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13441 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013442 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013443else
Martin v. Löwis11437992002-04-12 09:54:03 +000013444 echo "$as_me: failed program was:" >&5
13445cat conftest.$ac_ext >&5
13446ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013447fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013448rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013450echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13451echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013452if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013453
13454cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013455#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013456_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013457
13458fi
13459
Martin v. Löwis11437992002-04-12 09:54:03 +000013460echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13461echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13462if test "${ac_cv_struct_tm+set}" = set; then
13463 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013464else
Martin v. Löwis11437992002-04-12 09:54:03 +000013465 cat >conftest.$ac_ext <<_ACEOF
13466#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013467#include "confdefs.h"
13468#include <sys/types.h>
13469#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013470
13471#ifdef F77_DUMMY_MAIN
13472# ifdef __cplusplus
13473 extern "C"
13474# endif
13475 int F77_DUMMY_MAIN() { return 1; }
13476#endif
13477int
13478main ()
13479{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013480struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 ;
13482 return 0;
13483}
13484_ACEOF
13485rm -f conftest.$ac_objext
13486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13487 (eval $ac_compile) 2>&5
13488 ac_status=$?
13489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13490 (exit $ac_status); } &&
13491 { ac_try='test -s conftest.$ac_objext'
13492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13493 (eval $ac_try) 2>&5
13494 ac_status=$?
13495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13496 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013497 ac_cv_struct_tm=time.h
13498else
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 echo "$as_me: failed program was:" >&5
13500cat conftest.$ac_ext >&5
13501ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013502fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013503rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013504fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013505echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13506echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013507if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013508
13509cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013510#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013511_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013512
13513fi
13514
Martin v. Löwis11437992002-04-12 09:54:03 +000013515echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13516echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13517if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13518 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013519else
Martin v. Löwis11437992002-04-12 09:54:03 +000013520 cat >conftest.$ac_ext <<_ACEOF
13521#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013522#include "confdefs.h"
13523#include <sys/types.h>
13524#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013525
13526
13527#ifdef F77_DUMMY_MAIN
13528# ifdef __cplusplus
13529 extern "C"
13530# endif
13531 int F77_DUMMY_MAIN() { return 1; }
13532#endif
13533int
13534main ()
13535{
13536static struct tm ac_aggr;
13537if (ac_aggr.tm_zone)
13538return 0;
13539 ;
13540 return 0;
13541}
13542_ACEOF
13543rm -f conftest.$ac_objext
13544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13545 (eval $ac_compile) 2>&5
13546 ac_status=$?
13547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13548 (exit $ac_status); } &&
13549 { ac_try='test -s conftest.$ac_objext'
13550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13551 (eval $ac_try) 2>&5
13552 ac_status=$?
13553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13554 (exit $ac_status); }; }; then
13555 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013556else
Martin v. Löwis11437992002-04-12 09:54:03 +000013557 echo "$as_me: failed program was:" >&5
13558cat conftest.$ac_ext >&5
13559ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013561rm -f conftest.$ac_objext conftest.$ac_ext
13562fi
13563echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13564echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13565if test $ac_cv_member_struct_tm_tm_zone = yes; then
13566
13567cat >>confdefs.h <<_ACEOF
13568#define HAVE_STRUCT_TM_TM_ZONE 1
13569_ACEOF
13570
13571
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013572fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013573
Martin v. Löwis11437992002-04-12 09:54:03 +000013574if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13575
13576cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013577#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013578_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013579
13580else
Martin v. Löwis11437992002-04-12 09:54:03 +000013581 echo "$as_me:$LINENO: checking for tzname" >&5
13582echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13583if test "${ac_cv_var_tzname+set}" = set; then
13584 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013585else
Martin v. Löwis11437992002-04-12 09:54:03 +000013586 cat >conftest.$ac_ext <<_ACEOF
13587#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013588#include "confdefs.h"
13589#include <time.h>
13590#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013591extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013593
13594#ifdef F77_DUMMY_MAIN
13595# ifdef __cplusplus
13596 extern "C"
13597# endif
13598 int F77_DUMMY_MAIN() { return 1; }
13599#endif
13600int
13601main ()
13602{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013603atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013604 ;
13605 return 0;
13606}
13607_ACEOF
13608rm -f conftest.$ac_objext conftest$ac_exeext
13609if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13610 (eval $ac_link) 2>&5
13611 ac_status=$?
13612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13613 (exit $ac_status); } &&
13614 { ac_try='test -s conftest$ac_exeext'
13615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13616 (eval $ac_try) 2>&5
13617 ac_status=$?
13618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13619 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013620 ac_cv_var_tzname=yes
13621else
Martin v. Löwis11437992002-04-12 09:54:03 +000013622 echo "$as_me: failed program was:" >&5
13623cat conftest.$ac_ext >&5
13624ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013625fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013626rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013627fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013628echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13629echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013630 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013631
13632cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013633#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013634_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013635
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013636 fi
13637fi
13638
Martin v. Löwis11437992002-04-12 09:54:03 +000013639echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13640echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13641if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13642 echo $ECHO_N "(cached) $ECHO_C" >&6
13643else
13644 cat >conftest.$ac_ext <<_ACEOF
13645#line $LINENO "configure"
13646#include "confdefs.h"
13647$ac_includes_default
13648#ifdef F77_DUMMY_MAIN
13649# ifdef __cplusplus
13650 extern "C"
13651# endif
13652 int F77_DUMMY_MAIN() { return 1; }
13653#endif
13654int
13655main ()
13656{
13657static struct stat ac_aggr;
13658if (ac_aggr.st_rdev)
13659return 0;
13660 ;
13661 return 0;
13662}
13663_ACEOF
13664rm -f conftest.$ac_objext
13665if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13666 (eval $ac_compile) 2>&5
13667 ac_status=$?
13668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13669 (exit $ac_status); } &&
13670 { ac_try='test -s conftest.$ac_objext'
13671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13672 (eval $ac_try) 2>&5
13673 ac_status=$?
13674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13675 (exit $ac_status); }; }; then
13676 ac_cv_member_struct_stat_st_rdev=yes
13677else
13678 echo "$as_me: failed program was:" >&5
13679cat conftest.$ac_ext >&5
13680ac_cv_member_struct_stat_st_rdev=no
13681fi
13682rm -f conftest.$ac_objext conftest.$ac_ext
13683fi
13684echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13685echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13686if test $ac_cv_member_struct_stat_st_rdev = yes; then
13687
13688cat >>confdefs.h <<_ACEOF
13689#define HAVE_STRUCT_STAT_ST_RDEV 1
13690_ACEOF
13691
13692
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013693fi
13694
Martin v. Löwis11437992002-04-12 09:54:03 +000013695echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13696echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13697if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13698 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013699else
Martin v. Löwis11437992002-04-12 09:54:03 +000013700 cat >conftest.$ac_ext <<_ACEOF
13701#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013702#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013703$ac_includes_default
13704#ifdef F77_DUMMY_MAIN
13705# ifdef __cplusplus
13706 extern "C"
13707# endif
13708 int F77_DUMMY_MAIN() { return 1; }
13709#endif
13710int
13711main ()
13712{
13713static struct stat ac_aggr;
13714if (ac_aggr.st_blksize)
13715return 0;
13716 ;
13717 return 0;
13718}
13719_ACEOF
13720rm -f conftest.$ac_objext
13721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13722 (eval $ac_compile) 2>&5
13723 ac_status=$?
13724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13725 (exit $ac_status); } &&
13726 { ac_try='test -s conftest.$ac_objext'
13727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13728 (eval $ac_try) 2>&5
13729 ac_status=$?
13730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13731 (exit $ac_status); }; }; then
13732 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013733else
Martin v. Löwis11437992002-04-12 09:54:03 +000013734 echo "$as_me: failed program was:" >&5
13735cat conftest.$ac_ext >&5
13736ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013737fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013738rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013740echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13741echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13742if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013743
Martin v. Löwis11437992002-04-12 09:54:03 +000013744cat >>confdefs.h <<_ACEOF
13745#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13746_ACEOF
13747
13748
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013749fi
13750
Martin v. Löwis11437992002-04-12 09:54:03 +000013751echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13752echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13753if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13754 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013755else
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 cat >conftest.$ac_ext <<_ACEOF
13757#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013758#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013759$ac_includes_default
13760#ifdef F77_DUMMY_MAIN
13761# ifdef __cplusplus
13762 extern "C"
13763# endif
13764 int F77_DUMMY_MAIN() { return 1; }
13765#endif
13766int
13767main ()
13768{
13769static struct stat ac_aggr;
13770if (ac_aggr.st_blocks)
13771return 0;
13772 ;
13773 return 0;
13774}
13775_ACEOF
13776rm -f conftest.$ac_objext
13777if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13778 (eval $ac_compile) 2>&5
13779 ac_status=$?
13780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13781 (exit $ac_status); } &&
13782 { ac_try='test -s conftest.$ac_objext'
13783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13784 (eval $ac_try) 2>&5
13785 ac_status=$?
13786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13787 (exit $ac_status); }; }; then
13788 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013789else
Martin v. Löwis11437992002-04-12 09:54:03 +000013790 echo "$as_me: failed program was:" >&5
13791cat conftest.$ac_ext >&5
13792ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013793fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013794rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013795fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013796echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13797echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13798if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013799
Martin v. Löwis11437992002-04-12 09:54:03 +000013800cat >>confdefs.h <<_ACEOF
13801#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13802_ACEOF
13803
13804
13805cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013806#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013807_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013808
13809else
Martin v. Löwis11437992002-04-12 09:54:03 +000013810 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013811fi
13812
Michael W. Hudson54241132001-12-07 15:38:26 +000013813
Martin v. Löwis11437992002-04-12 09:54:03 +000013814
13815echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13816echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13817if test "${ac_cv_header_time_altzone+set}" = set; then
13818 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013819else
Martin v. Löwis11437992002-04-12 09:54:03 +000013820 cat >conftest.$ac_ext <<_ACEOF
13821#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013822#include "confdefs.h"
13823#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013824#ifdef F77_DUMMY_MAIN
13825# ifdef __cplusplus
13826 extern "C"
13827# endif
13828 int F77_DUMMY_MAIN() { return 1; }
13829#endif
13830int
13831main ()
13832{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013833return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 ;
13835 return 0;
13836}
13837_ACEOF
13838rm -f conftest.$ac_objext
13839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13840 (eval $ac_compile) 2>&5
13841 ac_status=$?
13842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13843 (exit $ac_status); } &&
13844 { ac_try='test -s conftest.$ac_objext'
13845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13846 (eval $ac_try) 2>&5
13847 ac_status=$?
13848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13849 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013850 ac_cv_header_time_altzone=yes
13851else
Martin v. Löwis11437992002-04-12 09:54:03 +000013852 echo "$as_me: failed program was:" >&5
13853cat conftest.$ac_ext >&5
13854ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013855fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013856rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013857fi
13858
Martin v. Löwis11437992002-04-12 09:54:03 +000013859echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13860echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013861if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013862
13863cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013864#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013865_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013866
13867fi
13868
Guido van Rossumda88dad1995-01-26 00:46:29 +000013869was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013870echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13871echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13872cat >conftest.$ac_ext <<_ACEOF
13873#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013874#include "confdefs.h"
13875
13876#include <sys/types.h>
13877#include <sys/select.h>
13878#include <sys/time.h>
13879
Martin v. Löwis11437992002-04-12 09:54:03 +000013880#ifdef F77_DUMMY_MAIN
13881# ifdef __cplusplus
13882 extern "C"
13883# endif
13884 int F77_DUMMY_MAIN() { return 1; }
13885#endif
13886int
13887main ()
13888{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013889;
Martin v. Löwis11437992002-04-12 09:54:03 +000013890 ;
13891 return 0;
13892}
13893_ACEOF
13894rm -f conftest.$ac_objext
13895if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13896 (eval $ac_compile) 2>&5
13897 ac_status=$?
13898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13899 (exit $ac_status); } &&
13900 { ac_try='test -s conftest.$ac_objext'
13901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13902 (eval $ac_try) 2>&5
13903 ac_status=$?
13904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13905 (exit $ac_status); }; }; then
13906
13907
13908cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013909#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013910_ACEOF
13911
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013912 was_it_defined=yes
13913
Guido van Rossumf78abae1997-01-21 22:02:36 +000013914else
Martin v. Löwis11437992002-04-12 09:54:03 +000013915 echo "$as_me: failed program was:" >&5
13916cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013917fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013918rm -f conftest.$ac_objext conftest.$ac_ext
13919echo "$as_me:$LINENO: result: $was_it_defined" >&5
13920echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013921
Martin v. Löwis11437992002-04-12 09:54:03 +000013922echo "$as_me:$LINENO: checking for addrinfo" >&5
13923echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13924if test "${ac_cv_struct_addrinfo+set}" = set; then
13925 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013926else
Martin v. Löwis11437992002-04-12 09:54:03 +000013927 cat >conftest.$ac_ext <<_ACEOF
13928#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013929#include "confdefs.h"
13930
13931# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013932#ifdef F77_DUMMY_MAIN
13933# ifdef __cplusplus
13934 extern "C"
13935# endif
13936 int F77_DUMMY_MAIN() { return 1; }
13937#endif
13938int
13939main ()
13940{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013941struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013942 ;
13943 return 0;
13944}
13945_ACEOF
13946rm -f conftest.$ac_objext
13947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13948 (eval $ac_compile) 2>&5
13949 ac_status=$?
13950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13951 (exit $ac_status); } &&
13952 { ac_try='test -s conftest.$ac_objext'
13953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13954 (eval $ac_try) 2>&5
13955 ac_status=$?
13956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13957 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013958 ac_cv_struct_addrinfo=yes
13959else
Martin v. Löwis11437992002-04-12 09:54:03 +000013960 echo "$as_me: failed program was:" >&5
13961cat conftest.$ac_ext >&5
13962ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013963fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013964rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013965fi
13966
Martin v. Löwis11437992002-04-12 09:54:03 +000013967echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13968echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013969if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013970
13971cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013972#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013973_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013974
13975fi
13976
Martin v. Löwis11437992002-04-12 09:54:03 +000013977echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13978echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13979if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13980 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013981else
Martin v. Löwis11437992002-04-12 09:54:03 +000013982 cat >conftest.$ac_ext <<_ACEOF
13983#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013984#include "confdefs.h"
13985
13986# include <sys/types.h>
13987# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013988#ifdef F77_DUMMY_MAIN
13989# ifdef __cplusplus
13990 extern "C"
13991# endif
13992 int F77_DUMMY_MAIN() { return 1; }
13993#endif
13994int
13995main ()
13996{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013997struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013998 ;
13999 return 0;
14000}
14001_ACEOF
14002rm -f conftest.$ac_objext
14003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14004 (eval $ac_compile) 2>&5
14005 ac_status=$?
14006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14007 (exit $ac_status); } &&
14008 { ac_try='test -s conftest.$ac_objext'
14009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14010 (eval $ac_try) 2>&5
14011 ac_status=$?
14012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14013 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014014 ac_cv_struct_sockaddr_storage=yes
14015else
Martin v. Löwis11437992002-04-12 09:54:03 +000014016 echo "$as_me: failed program was:" >&5
14017cat conftest.$ac_ext >&5
14018ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014020rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014021fi
14022
Martin v. Löwis11437992002-04-12 09:54:03 +000014023echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14024echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014025if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014026
14027cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014028#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014029_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014030
14031fi
14032
Guido van Rossum627b2d71993-12-24 10:39:16 +000014033# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014034
Michael W. Hudson54241132001-12-07 15:38:26 +000014035
Martin v. Löwis11437992002-04-12 09:54:03 +000014036echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14037echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14038if test "${ac_cv_c_char_unsigned+set}" = set; then
14039 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014040else
Martin v. Löwis11437992002-04-12 09:54:03 +000014041 cat >conftest.$ac_ext <<_ACEOF
14042#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014043#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014044$ac_includes_default
14045#ifdef F77_DUMMY_MAIN
14046# ifdef __cplusplus
14047 extern "C"
14048# endif
14049 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014051int
14052main ()
14053{
14054static int test_array [1 - 2 * !(((char) -1) < 0)];
14055test_array [0] = 0
14056
14057 ;
14058 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014059}
Martin v. Löwis11437992002-04-12 09:54:03 +000014060_ACEOF
14061rm -f conftest.$ac_objext
14062if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14063 (eval $ac_compile) 2>&5
14064 ac_status=$?
14065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14066 (exit $ac_status); } &&
14067 { ac_try='test -s conftest.$ac_objext'
14068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14069 (eval $ac_try) 2>&5
14070 ac_status=$?
14071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14072 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014073 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014074else
14075 echo "$as_me: failed program was:" >&5
14076cat conftest.$ac_ext >&5
14077ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014078fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014079rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014081echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14082echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014083if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014084 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014085#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014086_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014087
14088fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014089
Martin v. Löwis11437992002-04-12 09:54:03 +000014090echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14091echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14092if test "${ac_cv_prog_cc_stdc+set}" = set; then
14093 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014094else
Martin v. Löwis11437992002-04-12 09:54:03 +000014095 ac_cv_prog_cc_stdc=no
14096ac_save_CC=$CC
14097cat >conftest.$ac_ext <<_ACEOF
14098#line $LINENO "configure"
14099#include "confdefs.h"
14100#include <stdarg.h>
14101#include <stdio.h>
14102#include <sys/types.h>
14103#include <sys/stat.h>
14104/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14105struct buf { int x; };
14106FILE * (*rcsopen) (struct buf *, struct stat *, int);
14107static char *e (p, i)
14108 char **p;
14109 int i;
14110{
14111 return p[i];
14112}
14113static char *f (char * (*g) (char **, int), char **p, ...)
14114{
14115 char *s;
14116 va_list v;
14117 va_start (v,p);
14118 s = g (p, va_arg (v,int));
14119 va_end (v);
14120 return s;
14121}
14122int test (int i, double x);
14123struct s1 {int (*f) (int a);};
14124struct s2 {int (*f) (double a);};
14125int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14126int argc;
14127char **argv;
14128#ifdef F77_DUMMY_MAIN
14129# ifdef __cplusplus
14130 extern "C"
14131# endif
14132 int F77_DUMMY_MAIN() { return 1; }
14133#endif
14134int
14135main ()
14136{
14137return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14138 ;
14139 return 0;
14140}
14141_ACEOF
14142# Don't try gcc -ansi; that turns off useful extensions and
14143# breaks some systems' header files.
14144# AIX -qlanglvl=ansi
14145# Ultrix and OSF/1 -std1
14146# HP-UX 10.20 and later -Ae
14147# HP-UX older versions -Aa -D_HPUX_SOURCE
14148# SVR4 -Xc -D__EXTENSIONS__
14149for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14150do
14151 CC="$ac_save_CC $ac_arg"
14152 rm -f conftest.$ac_objext
14153if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14154 (eval $ac_compile) 2>&5
14155 ac_status=$?
14156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14157 (exit $ac_status); } &&
14158 { ac_try='test -s conftest.$ac_objext'
14159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14160 (eval $ac_try) 2>&5
14161 ac_status=$?
14162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14163 (exit $ac_status); }; }; then
14164 ac_cv_prog_cc_stdc=$ac_arg
14165break
14166else
14167 echo "$as_me: failed program was:" >&5
14168cat conftest.$ac_ext >&5
14169fi
14170rm -f conftest.$ac_objext
14171done
14172rm -f conftest.$ac_ext conftest.$ac_objext
14173CC=$ac_save_CC
14174
14175fi
14176
14177case "x$ac_cv_prog_cc_stdc" in
14178 x|xno)
14179 echo "$as_me:$LINENO: result: none needed" >&5
14180echo "${ECHO_T}none needed" >&6 ;;
14181 *)
14182 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14183echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14184 CC="$CC $ac_cv_prog_cc_stdc" ;;
14185esac
14186
14187echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14188echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14189if test "${ac_cv_c_const+set}" = set; then
14190 echo $ECHO_N "(cached) $ECHO_C" >&6
14191else
14192 cat >conftest.$ac_ext <<_ACEOF
14193#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014194#include "confdefs.h"
14195
Martin v. Löwis11437992002-04-12 09:54:03 +000014196#ifdef F77_DUMMY_MAIN
14197# ifdef __cplusplus
14198 extern "C"
14199# endif
14200 int F77_DUMMY_MAIN() { return 1; }
14201#endif
14202int
14203main ()
14204{
14205/* FIXME: Include the comments suggested by Paul. */
14206#ifndef __cplusplus
14207 /* Ultrix mips cc rejects this. */
14208 typedef int charset[2];
14209 const charset x;
14210 /* SunOS 4.1.1 cc rejects this. */
14211 char const *const *ccp;
14212 char **p;
14213 /* NEC SVR4.0.2 mips cc rejects this. */
14214 struct point {int x, y;};
14215 static struct point const zero = {0,0};
14216 /* AIX XL C 1.02.0.0 rejects this.
14217 It does not let you subtract one const X* pointer from another in
14218 an arm of an if-expression whose if-part is not a constant
14219 expression */
14220 const char *g = "string";
14221 ccp = &g + (g ? g-g : 0);
14222 /* HPUX 7.0 cc rejects these. */
14223 ++ccp;
14224 p = (char**) ccp;
14225 ccp = (char const *const *) p;
14226 { /* SCO 3.2v4 cc rejects this. */
14227 char *t;
14228 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014229
Martin v. Löwis11437992002-04-12 09:54:03 +000014230 *t++ = 0;
14231 }
14232 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14233 int x[] = {25, 17};
14234 const int *foo = &x[0];
14235 ++foo;
14236 }
14237 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14238 typedef const int *iptr;
14239 iptr p = 0;
14240 ++p;
14241 }
14242 { /* AIX XL C 1.02.0.0 rejects this saying
14243 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14244 struct s { int j; const int *ap[3]; };
14245 struct s *b; b->j = 5;
14246 }
14247 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14248 const int foo = 10;
14249 }
14250#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014251
Martin v. Löwis11437992002-04-12 09:54:03 +000014252 ;
14253 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014254}
Martin v. Löwis11437992002-04-12 09:54:03 +000014255_ACEOF
14256rm -f conftest.$ac_objext
14257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14258 (eval $ac_compile) 2>&5
14259 ac_status=$?
14260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14261 (exit $ac_status); } &&
14262 { ac_try='test -s conftest.$ac_objext'
14263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14264 (eval $ac_try) 2>&5
14265 ac_status=$?
14266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14267 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014268 ac_cv_c_const=yes
14269else
Martin v. Löwis11437992002-04-12 09:54:03 +000014270 echo "$as_me: failed program was:" >&5
14271cat conftest.$ac_ext >&5
14272ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014274rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014275fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014276echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14277echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014278if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014279
14280cat >>confdefs.h <<\_ACEOF
14281#define const
14282_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014283
14284fi
14285
Michael W. Hudson54241132001-12-07 15:38:26 +000014286
Guido van Rossumda88dad1995-01-26 00:46:29 +000014287works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014288echo "$as_me:$LINENO: checking for working volatile" >&5
14289echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14290cat >conftest.$ac_ext <<_ACEOF
14291#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014292#include "confdefs.h"
14293
Martin v. Löwis11437992002-04-12 09:54:03 +000014294#ifdef F77_DUMMY_MAIN
14295# ifdef __cplusplus
14296 extern "C"
14297# endif
14298 int F77_DUMMY_MAIN() { return 1; }
14299#endif
14300int
14301main ()
14302{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014303volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014304 ;
14305 return 0;
14306}
14307_ACEOF
14308rm -f conftest.$ac_objext
14309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14310 (eval $ac_compile) 2>&5
14311 ac_status=$?
14312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14313 (exit $ac_status); } &&
14314 { ac_try='test -s conftest.$ac_objext'
14315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14316 (eval $ac_try) 2>&5
14317 ac_status=$?
14318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14319 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014320 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014321else
Martin v. Löwis11437992002-04-12 09:54:03 +000014322 echo "$as_me: failed program was:" >&5
14323cat conftest.$ac_ext >&5
14324
14325cat >>confdefs.h <<\_ACEOF
14326#define volatile
14327_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014328
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014329
Guido van Rossum627b2d71993-12-24 10:39:16 +000014330fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014331rm -f conftest.$ac_objext conftest.$ac_ext
14332echo "$as_me:$LINENO: result: $works" >&5
14333echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014334
Guido van Rossumda88dad1995-01-26 00:46:29 +000014335works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014336echo "$as_me:$LINENO: checking for working signed char" >&5
14337echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14338cat >conftest.$ac_ext <<_ACEOF
14339#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014340#include "confdefs.h"
14341
Martin v. Löwis11437992002-04-12 09:54:03 +000014342#ifdef F77_DUMMY_MAIN
14343# ifdef __cplusplus
14344 extern "C"
14345# endif
14346 int F77_DUMMY_MAIN() { return 1; }
14347#endif
14348int
14349main ()
14350{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014351signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014352 ;
14353 return 0;
14354}
14355_ACEOF
14356rm -f conftest.$ac_objext
14357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14358 (eval $ac_compile) 2>&5
14359 ac_status=$?
14360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14361 (exit $ac_status); } &&
14362 { ac_try='test -s conftest.$ac_objext'
14363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14364 (eval $ac_try) 2>&5
14365 ac_status=$?
14366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14367 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014368 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014369else
Martin v. Löwis11437992002-04-12 09:54:03 +000014370 echo "$as_me: failed program was:" >&5
14371cat conftest.$ac_ext >&5
14372
14373cat >>confdefs.h <<\_ACEOF
14374#define signed
14375_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014376
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014377
Guido van Rossum7f43da71994-08-01 12:15:30 +000014378fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014379rm -f conftest.$ac_objext conftest.$ac_ext
14380echo "$as_me:$LINENO: result: $works" >&5
14381echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014382
Guido van Rossumda88dad1995-01-26 00:46:29 +000014383have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014384echo "$as_me:$LINENO: checking for prototypes" >&5
14385echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14386cat >conftest.$ac_ext <<_ACEOF
14387#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014388#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014389int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014390#ifdef F77_DUMMY_MAIN
14391# ifdef __cplusplus
14392 extern "C"
14393# endif
14394 int F77_DUMMY_MAIN() { return 1; }
14395#endif
14396int
14397main ()
14398{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014399return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014400 ;
14401 return 0;
14402}
14403_ACEOF
14404rm -f conftest.$ac_objext
14405if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14406 (eval $ac_compile) 2>&5
14407 ac_status=$?
14408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14409 (exit $ac_status); } &&
14410 { ac_try='test -s conftest.$ac_objext'
14411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14412 (eval $ac_try) 2>&5
14413 ac_status=$?
14414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14415 (exit $ac_status); }; }; then
14416
14417
14418cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014419#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014420_ACEOF
14421
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014422 have_prototypes=yes
14423
Guido van Rossumf78abae1997-01-21 22:02:36 +000014424else
Martin v. Löwis11437992002-04-12 09:54:03 +000014425 echo "$as_me: failed program was:" >&5
14426cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014428rm -f conftest.$ac_objext conftest.$ac_ext
14429echo "$as_me:$LINENO: result: $have_prototypes" >&5
14430echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014431
Guido van Rossumda88dad1995-01-26 00:46:29 +000014432works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014433echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
14434echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
14435cat >conftest.$ac_ext <<_ACEOF
14436#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014437#include "confdefs.h"
14438
14439#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014440int foo(int x, ...) {
14441 va_list va;
14442 va_start(va, x);
14443 va_arg(va, int);
14444 va_arg(va, char *);
14445 va_arg(va, double);
14446 return 0;
14447}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014448
Martin v. Löwis11437992002-04-12 09:54:03 +000014449#ifdef F77_DUMMY_MAIN
14450# ifdef __cplusplus
14451 extern "C"
14452# endif
14453 int F77_DUMMY_MAIN() { return 1; }
14454#endif
14455int
14456main ()
14457{
Guido van Rossum90eea071996-08-30 20:58:57 +000014458return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 ;
14460 return 0;
14461}
14462_ACEOF
14463rm -f conftest.$ac_objext
14464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14465 (eval $ac_compile) 2>&5
14466 ac_status=$?
14467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14468 (exit $ac_status); } &&
14469 { ac_try='test -s conftest.$ac_objext'
14470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14471 (eval $ac_try) 2>&5
14472 ac_status=$?
14473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14474 (exit $ac_status); }; }; then
14475
14476
14477cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014478#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014479_ACEOF
14480
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014481 works=yes
14482
Guido van Rossumf78abae1997-01-21 22:02:36 +000014483else
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 echo "$as_me: failed program was:" >&5
14485cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000014486fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014487rm -f conftest.$ac_objext conftest.$ac_ext
14488echo "$as_me:$LINENO: result: $works" >&5
14489echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014490
Guido van Rossumda88dad1995-01-26 00:46:29 +000014491if test "$have_prototypes" = yes; then
14492bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014493echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
14494echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
14495cat >conftest.$ac_ext <<_ACEOF
14496#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014497#include "confdefs.h"
14498#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014499#ifdef F77_DUMMY_MAIN
14500# ifdef __cplusplus
14501 extern "C"
14502# endif
14503 int F77_DUMMY_MAIN() { return 1; }
14504#endif
14505int
14506main ()
14507{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014508char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 ;
14510 return 0;
14511}
14512_ACEOF
14513rm -f conftest.$ac_objext
14514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14515 (eval $ac_compile) 2>&5
14516 ac_status=$?
14517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14518 (exit $ac_status); } &&
14519 { ac_try='test -s conftest.$ac_objext'
14520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14521 (eval $ac_try) 2>&5
14522 ac_status=$?
14523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14524 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014525 :
14526else
Martin v. Löwis11437992002-04-12 09:54:03 +000014527 echo "$as_me: failed program was:" >&5
14528cat conftest.$ac_ext >&5
14529
14530cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014531#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014532_ACEOF
14533
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014534 bad_prototypes=yes
14535
Guido van Rossum627b2d71993-12-24 10:39:16 +000014536fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014537rm -f conftest.$ac_objext conftest.$ac_ext
14538echo "$as_me:$LINENO: result: $bad_prototypes" >&5
14539echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014540fi
14541
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014542# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000014543echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
14544echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
14545cat >conftest.$ac_ext <<_ACEOF
14546#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014547#include "confdefs.h"
14548#include <sys/types.h>
14549#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014550#ifdef F77_DUMMY_MAIN
14551# ifdef __cplusplus
14552 extern "C"
14553# endif
14554 int F77_DUMMY_MAIN() { return 1; }
14555#endif
14556int
14557main ()
14558{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014559struct sockaddr x;
14560x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 ;
14562 return 0;
14563}
14564_ACEOF
14565rm -f conftest.$ac_objext
14566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14567 (eval $ac_compile) 2>&5
14568 ac_status=$?
14569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14570 (exit $ac_status); } &&
14571 { ac_try='test -s conftest.$ac_objext'
14572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14573 (eval $ac_try) 2>&5
14574 ac_status=$?
14575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14576 (exit $ac_status); }; }; then
14577 echo "$as_me:$LINENO: result: yes" >&5
14578echo "${ECHO_T}yes" >&6
14579
14580cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014581#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014582_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014583
14584else
Martin v. Löwis11437992002-04-12 09:54:03 +000014585 echo "$as_me: failed program was:" >&5
14586cat conftest.$ac_ext >&5
14587echo "$as_me:$LINENO: result: no" >&5
14588echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014590rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014591
Guido van Rossumda88dad1995-01-26 00:46:29 +000014592va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014593echo "$as_me:$LINENO: checking whether va_list is an array" >&5
14594echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
14595cat >conftest.$ac_ext <<_ACEOF
14596#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014597#include "confdefs.h"
14598
14599#ifdef HAVE_STDARG_PROTOTYPES
14600#include <stdarg.h>
14601#else
14602#include <varargs.h>
14603#endif
14604
Martin v. Löwis11437992002-04-12 09:54:03 +000014605#ifdef F77_DUMMY_MAIN
14606# ifdef __cplusplus
14607 extern "C"
14608# endif
14609 int F77_DUMMY_MAIN() { return 1; }
14610#endif
14611int
14612main ()
14613{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014614va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000014615 ;
14616 return 0;
14617}
14618_ACEOF
14619rm -f conftest.$ac_objext
14620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14621 (eval $ac_compile) 2>&5
14622 ac_status=$?
14623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14624 (exit $ac_status); } &&
14625 { ac_try='test -s conftest.$ac_objext'
14626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14627 (eval $ac_try) 2>&5
14628 ac_status=$?
14629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14630 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014631 :
14632else
Martin v. Löwis11437992002-04-12 09:54:03 +000014633 echo "$as_me: failed program was:" >&5
14634cat conftest.$ac_ext >&5
14635
14636
14637cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014638#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014639_ACEOF
14640
Guido van Rossumda88dad1995-01-26 00:46:29 +000014641 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014642
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014643fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014644rm -f conftest.$ac_objext conftest.$ac_ext
14645echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14646echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014647
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014648# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014649
14650
14651
14652echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14653echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14654if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14655 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014656else
Martin v. Löwis11437992002-04-12 09:54:03 +000014657 cat >conftest.$ac_ext <<_ACEOF
14658#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014659#include "confdefs.h"
14660/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014661 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014662#include <assert.h>
14663/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014664#ifdef __cplusplus
14665extern "C"
14666#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014667/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014668 builtin and then its argument prototype would still apply. */
14669char gethostbyname_r ();
14670char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014671
Martin v. Löwis11437992002-04-12 09:54:03 +000014672#ifdef F77_DUMMY_MAIN
14673# ifdef __cplusplus
14674 extern "C"
14675# endif
14676 int F77_DUMMY_MAIN() { return 1; }
14677#endif
14678int
14679main ()
14680{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014681/* The GNU C library defines this for functions which it implements
14682 to always fail with ENOSYS. Some functions are actually named
14683 something starting with __ and the normal name is an alias. */
14684#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14685choke me
14686#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014687f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014688#endif
14689
Martin v. Löwis11437992002-04-12 09:54:03 +000014690 ;
14691 return 0;
14692}
14693_ACEOF
14694rm -f conftest.$ac_objext conftest$ac_exeext
14695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14696 (eval $ac_link) 2>&5
14697 ac_status=$?
14698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14699 (exit $ac_status); } &&
14700 { ac_try='test -s conftest$ac_exeext'
14701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14702 (eval $ac_try) 2>&5
14703 ac_status=$?
14704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14705 (exit $ac_status); }; }; then
14706 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014707else
Martin v. Löwis11437992002-04-12 09:54:03 +000014708 echo "$as_me: failed program was:" >&5
14709cat conftest.$ac_ext >&5
14710ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014711fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014712rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014713fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014714echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14715echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14716if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014717
Martin v. Löwis11437992002-04-12 09:54:03 +000014718 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014719#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014720_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014721
Martin v. Löwis11437992002-04-12 09:54:03 +000014722 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14723echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014724 OLD_CFLAGS=$CFLAGS
14725 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014726 cat >conftest.$ac_ext <<_ACEOF
14727#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014728#include "confdefs.h"
14729
14730# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014731
14732#ifdef F77_DUMMY_MAIN
14733# ifdef __cplusplus
14734 extern "C"
14735# endif
14736 int F77_DUMMY_MAIN() { return 1; }
14737#endif
14738int
14739main ()
14740{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014741
14742 char *name;
14743 struct hostent *he, *res;
14744 char buffer[2048];
14745 int buflen = 2048;
14746 int h_errnop;
14747
14748 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014749
14750 ;
14751 return 0;
14752}
14753_ACEOF
14754rm -f conftest.$ac_objext
14755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14756 (eval $ac_compile) 2>&5
14757 ac_status=$?
14758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14759 (exit $ac_status); } &&
14760 { ac_try='test -s conftest.$ac_objext'
14761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14762 (eval $ac_try) 2>&5
14763 ac_status=$?
14764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14765 (exit $ac_status); }; }; then
14766
14767 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014768#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014769_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014770
Martin v. Löwis11437992002-04-12 09:54:03 +000014771
14772cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014773#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014774_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014775
Martin v. Löwis11437992002-04-12 09:54:03 +000014776 echo "$as_me:$LINENO: result: yes" >&5
14777echo "${ECHO_T}yes" >&6
14778
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014779else
Martin v. Löwis11437992002-04-12 09:54:03 +000014780 echo "$as_me: failed program was:" >&5
14781cat conftest.$ac_ext >&5
14782
14783 echo "$as_me:$LINENO: result: no" >&5
14784echo "${ECHO_T}no" >&6
14785 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14786echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14787 cat >conftest.$ac_ext <<_ACEOF
14788#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014789#include "confdefs.h"
14790
14791# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014792
14793#ifdef F77_DUMMY_MAIN
14794# ifdef __cplusplus
14795 extern "C"
14796# endif
14797 int F77_DUMMY_MAIN() { return 1; }
14798#endif
14799int
14800main ()
14801{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014802
14803 char *name;
14804 struct hostent *he;
14805 char buffer[2048];
14806 int buflen = 2048;
14807 int h_errnop;
14808
14809 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014810
14811 ;
14812 return 0;
14813}
14814_ACEOF
14815rm -f conftest.$ac_objext
14816if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14817 (eval $ac_compile) 2>&5
14818 ac_status=$?
14819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14820 (exit $ac_status); } &&
14821 { ac_try='test -s conftest.$ac_objext'
14822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14823 (eval $ac_try) 2>&5
14824 ac_status=$?
14825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14826 (exit $ac_status); }; }; then
14827
14828 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014829#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014830_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014831
Martin v. Löwis11437992002-04-12 09:54:03 +000014832
14833cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014834#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014835_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014836
Martin v. Löwis11437992002-04-12 09:54:03 +000014837 echo "$as_me:$LINENO: result: yes" >&5
14838echo "${ECHO_T}yes" >&6
14839
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014840else
Martin v. Löwis11437992002-04-12 09:54:03 +000014841 echo "$as_me: failed program was:" >&5
14842cat conftest.$ac_ext >&5
14843
14844 echo "$as_me:$LINENO: result: no" >&5
14845echo "${ECHO_T}no" >&6
14846 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14847echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14848 cat >conftest.$ac_ext <<_ACEOF
14849#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014850#include "confdefs.h"
14851
14852# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014853
14854#ifdef F77_DUMMY_MAIN
14855# ifdef __cplusplus
14856 extern "C"
14857# endif
14858 int F77_DUMMY_MAIN() { return 1; }
14859#endif
14860int
14861main ()
14862{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014863
14864 char *name;
14865 struct hostent *he;
14866 struct hostent_data data;
14867
14868 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014869
14870 ;
14871 return 0;
14872}
14873_ACEOF
14874rm -f conftest.$ac_objext
14875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14876 (eval $ac_compile) 2>&5
14877 ac_status=$?
14878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14879 (exit $ac_status); } &&
14880 { ac_try='test -s conftest.$ac_objext'
14881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14882 (eval $ac_try) 2>&5
14883 ac_status=$?
14884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14885 (exit $ac_status); }; }; then
14886
14887 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014888#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014889_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014890
Martin v. Löwis11437992002-04-12 09:54:03 +000014891
14892cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014893#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014894_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014895
Martin v. Löwis11437992002-04-12 09:54:03 +000014896 echo "$as_me:$LINENO: result: yes" >&5
14897echo "${ECHO_T}yes" >&6
14898
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014899else
Martin v. Löwis11437992002-04-12 09:54:03 +000014900 echo "$as_me: failed program was:" >&5
14901cat conftest.$ac_ext >&5
14902
14903 echo "$as_me:$LINENO: result: no" >&5
14904echo "${ECHO_T}no" >&6
14905
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014906fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014907rm -f conftest.$ac_objext conftest.$ac_ext
14908
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014909fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014910rm -f conftest.$ac_objext conftest.$ac_ext
14911
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014912fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014913rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014914 CFLAGS=$OLD_CFLAGS
14915
14916else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014917
Martin v. Löwis11437992002-04-12 09:54:03 +000014918
14919for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014920do
Martin v. Löwis11437992002-04-12 09:54:03 +000014921as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14922echo "$as_me:$LINENO: checking for $ac_func" >&5
14923echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14924if eval "test \"\${$as_ac_var+set}\" = set"; then
14925 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014926else
Martin v. Löwis11437992002-04-12 09:54:03 +000014927 cat >conftest.$ac_ext <<_ACEOF
14928#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014929#include "confdefs.h"
14930/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014931 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014932#include <assert.h>
14933/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014934#ifdef __cplusplus
14935extern "C"
14936#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014937/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014938 builtin and then its argument prototype would still apply. */
14939char $ac_func ();
14940char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014941
Martin v. Löwis11437992002-04-12 09:54:03 +000014942#ifdef F77_DUMMY_MAIN
14943# ifdef __cplusplus
14944 extern "C"
14945# endif
14946 int F77_DUMMY_MAIN() { return 1; }
14947#endif
14948int
14949main ()
14950{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014951/* The GNU C library defines this for functions which it implements
14952 to always fail with ENOSYS. Some functions are actually named
14953 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014954#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014955choke me
14956#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014957f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014958#endif
14959
Martin v. Löwis11437992002-04-12 09:54:03 +000014960 ;
14961 return 0;
14962}
14963_ACEOF
14964rm -f conftest.$ac_objext conftest$ac_exeext
14965if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14966 (eval $ac_link) 2>&5
14967 ac_status=$?
14968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14969 (exit $ac_status); } &&
14970 { ac_try='test -s conftest$ac_exeext'
14971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14972 (eval $ac_try) 2>&5
14973 ac_status=$?
14974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14975 (exit $ac_status); }; }; then
14976 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014977else
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 echo "$as_me: failed program was:" >&5
14979cat conftest.$ac_ext >&5
14980eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014981fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014982rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014983fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014984echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14985echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14986if test `eval echo '${'$as_ac_var'}'` = yes; then
14987 cat >>confdefs.h <<_ACEOF
14988#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14989_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014990
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014991fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014992done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014993
Michael W. Hudson54241132001-12-07 15:38:26 +000014994
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014995fi
14996
Michael W. Hudson54241132001-12-07 15:38:26 +000014997
14998
14999
15000
15001
15002
Guido van Rossum627b2d71993-12-24 10:39:16 +000015003# checks for system services
15004# (none yet)
15005
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015006# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015007echo "$as_me:$LINENO: checking for __fpu_control" >&5
15008echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15009if test "${ac_cv_func___fpu_control+set}" = set; then
15010 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015011else
Martin v. Löwis11437992002-04-12 09:54:03 +000015012 cat >conftest.$ac_ext <<_ACEOF
15013#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015014#include "confdefs.h"
15015/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015017#include <assert.h>
15018/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015019#ifdef __cplusplus
15020extern "C"
15021#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015022/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015023 builtin and then its argument prototype would still apply. */
15024char __fpu_control ();
15025char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015026
Martin v. Löwis11437992002-04-12 09:54:03 +000015027#ifdef F77_DUMMY_MAIN
15028# ifdef __cplusplus
15029 extern "C"
15030# endif
15031 int F77_DUMMY_MAIN() { return 1; }
15032#endif
15033int
15034main ()
15035{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015036/* The GNU C library defines this for functions which it implements
15037 to always fail with ENOSYS. Some functions are actually named
15038 something starting with __ and the normal name is an alias. */
15039#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15040choke me
15041#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015042f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015043#endif
15044
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 ;
15046 return 0;
15047}
15048_ACEOF
15049rm -f conftest.$ac_objext conftest$ac_exeext
15050if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15051 (eval $ac_link) 2>&5
15052 ac_status=$?
15053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15054 (exit $ac_status); } &&
15055 { ac_try='test -s conftest$ac_exeext'
15056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15057 (eval $ac_try) 2>&5
15058 ac_status=$?
15059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15060 (exit $ac_status); }; }; then
15061 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015062else
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 echo "$as_me: failed program was:" >&5
15064cat conftest.$ac_ext >&5
15065ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015066fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015067rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015068fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015069echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15070echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15071if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015072 :
15073else
Martin v. Löwis11437992002-04-12 09:54:03 +000015074
15075echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15076echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15077if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15078 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015079else
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015081LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015082cat >conftest.$ac_ext <<_ACEOF
15083#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015084#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015085
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015086/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015087#ifdef __cplusplus
15088extern "C"
15089#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015090/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015091 builtin and then its argument prototype would still apply. */
15092char __fpu_control ();
15093#ifdef F77_DUMMY_MAIN
15094# ifdef __cplusplus
15095 extern "C"
15096# endif
15097 int F77_DUMMY_MAIN() { return 1; }
15098#endif
15099int
15100main ()
15101{
15102__fpu_control ();
15103 ;
15104 return 0;
15105}
15106_ACEOF
15107rm -f conftest.$ac_objext conftest$ac_exeext
15108if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15109 (eval $ac_link) 2>&5
15110 ac_status=$?
15111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15112 (exit $ac_status); } &&
15113 { ac_try='test -s conftest$ac_exeext'
15114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15115 (eval $ac_try) 2>&5
15116 ac_status=$?
15117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15118 (exit $ac_status); }; }; then
15119 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015120else
Martin v. Löwis11437992002-04-12 09:54:03 +000015121 echo "$as_me: failed program was:" >&5
15122cat conftest.$ac_ext >&5
15123ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015124fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015125rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15126LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015127fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015128echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15129echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15130if test $ac_cv_lib_ieee___fpu_control = yes; then
15131 cat >>confdefs.h <<_ACEOF
15132#define HAVE_LIBIEEE 1
15133_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015134
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015135 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015136
Guido van Rossum627b2d71993-12-24 10:39:16 +000015137fi
15138
Michael W. Hudson54241132001-12-07 15:38:26 +000015139
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015140fi
15141
Michael W. Hudson54241132001-12-07 15:38:26 +000015142
Guido van Rossum7f253911997-05-09 02:42:48 +000015143# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015144echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15145echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15146
Guido van Rossum7f253911997-05-09 02:42:48 +000015147# Check whether --with-fpectl or --without-fpectl was given.
15148if test "${with_fpectl+set}" = set; then
15149 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015150
Guido van Rossum7f253911997-05-09 02:42:48 +000015151if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015152then
15153
15154cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015155#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015156_ACEOF
15157
15158 echo "$as_me:$LINENO: result: yes" >&5
15159echo "${ECHO_T}yes" >&6
15160else echo "$as_me:$LINENO: result: no" >&5
15161echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015162fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015163else
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 echo "$as_me:$LINENO: result: no" >&5
15165echo "${ECHO_T}no" >&6
15166fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015167
Guido van Rossum7f43da71994-08-01 12:15:30 +000015168# check for --with-libm=...
15169
Guido van Rossum563e7081996-09-10 18:20:48 +000015170case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015171Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015172BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015173*) LIBM=-lm
15174esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015175echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15176echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15177
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015178# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015179if test "${with_libm+set}" = set; then
15180 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015181
Guido van Rossum7f253911997-05-09 02:42:48 +000015182if test "$withval" = no
15183then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15185echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015186elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015187then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15189echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15190else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15191echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15192 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015193fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015194else
Martin v. Löwis11437992002-04-12 09:54:03 +000015195 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15196echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15197fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015198
15199# check for --with-libc=...
15200
Martin v. Löwis11437992002-04-12 09:54:03 +000015201echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15202echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15203
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015204# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015205if test "${with_libc+set}" = set; then
15206 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015207
Guido van Rossum7f253911997-05-09 02:42:48 +000015208if test "$withval" = no
15209then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015210 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15211echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015212elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015213then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015214 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15215echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15216else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15217echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15218 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015219fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015220else
Martin v. Löwis11437992002-04-12 09:54:03 +000015221 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15222echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15223fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015224
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015225# check for hypot() in math library
15226LIBS_SAVE=$LIBS
15227LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015228
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015229for ac_func in hypot
15230do
Martin v. Löwis11437992002-04-12 09:54:03 +000015231as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15232echo "$as_me:$LINENO: checking for $ac_func" >&5
15233echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15234if eval "test \"\${$as_ac_var+set}\" = set"; then
15235 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015236else
Martin v. Löwis11437992002-04-12 09:54:03 +000015237 cat >conftest.$ac_ext <<_ACEOF
15238#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015239#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015240/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015241 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015242#include <assert.h>
15243/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015244#ifdef __cplusplus
15245extern "C"
15246#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015247/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015248 builtin and then its argument prototype would still apply. */
15249char $ac_func ();
15250char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015251
Martin v. Löwis11437992002-04-12 09:54:03 +000015252#ifdef F77_DUMMY_MAIN
15253# ifdef __cplusplus
15254 extern "C"
15255# endif
15256 int F77_DUMMY_MAIN() { return 1; }
15257#endif
15258int
15259main ()
15260{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015261/* The GNU C library defines this for functions which it implements
15262 to always fail with ENOSYS. Some functions are actually named
15263 something starting with __ and the normal name is an alias. */
15264#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15265choke me
15266#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015267f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015268#endif
15269
Martin v. Löwis11437992002-04-12 09:54:03 +000015270 ;
15271 return 0;
15272}
15273_ACEOF
15274rm -f conftest.$ac_objext conftest$ac_exeext
15275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15276 (eval $ac_link) 2>&5
15277 ac_status=$?
15278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15279 (exit $ac_status); } &&
15280 { ac_try='test -s conftest$ac_exeext'
15281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15282 (eval $ac_try) 2>&5
15283 ac_status=$?
15284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15285 (exit $ac_status); }; }; then
15286 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015287else
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 echo "$as_me: failed program was:" >&5
15289cat conftest.$ac_ext >&5
15290eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015291fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015292rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015293fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015294echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15295echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15296if test `eval echo '${'$as_ac_var'}'` = yes; then
15297 cat >>confdefs.h <<_ACEOF
15298#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15299_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015300
Michael W. Hudson54241132001-12-07 15:38:26 +000015301else
Martin v. Löwis11437992002-04-12 09:54:03 +000015302 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015303fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015304done
15305
Michael W. Hudson54241132001-12-07 15:38:26 +000015306
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015307LIBS=$LIBS_SAVE
15308
Guido van Rossumef2255b2000-03-10 22:30:29 +000015309# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015310if test "${ac_cv_header_wchar_h+set}" = set; then
15311 echo "$as_me:$LINENO: checking for wchar.h" >&5
15312echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15313if test "${ac_cv_header_wchar_h+set}" = set; then
15314 echo $ECHO_N "(cached) $ECHO_C" >&6
15315fi
15316echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15317echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015318else
Martin v. Löwis11437992002-04-12 09:54:03 +000015319 # Is the header compilable?
15320echo "$as_me:$LINENO: checking wchar.h usability" >&5
15321echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15322cat >conftest.$ac_ext <<_ACEOF
15323#line $LINENO "configure"
15324#include "confdefs.h"
15325$ac_includes_default
15326#include <wchar.h>
15327_ACEOF
15328rm -f conftest.$ac_objext
15329if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15330 (eval $ac_compile) 2>&5
15331 ac_status=$?
15332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15333 (exit $ac_status); } &&
15334 { ac_try='test -s conftest.$ac_objext'
15335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15336 (eval $ac_try) 2>&5
15337 ac_status=$?
15338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15339 (exit $ac_status); }; }; then
15340 ac_header_compiler=yes
15341else
15342 echo "$as_me: failed program was:" >&5
15343cat conftest.$ac_ext >&5
15344ac_header_compiler=no
15345fi
15346rm -f conftest.$ac_objext conftest.$ac_ext
15347echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15348echo "${ECHO_T}$ac_header_compiler" >&6
15349
15350# Is the header present?
15351echo "$as_me:$LINENO: checking wchar.h presence" >&5
15352echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15353cat >conftest.$ac_ext <<_ACEOF
15354#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015355#include "confdefs.h"
15356#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015357_ACEOF
15358if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15359 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15360 ac_status=$?
15361 egrep -v '^ *\+' conftest.er1 >conftest.err
15362 rm -f conftest.er1
15363 cat conftest.err >&5
15364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15365 (exit $ac_status); } >/dev/null; then
15366 if test -s conftest.err; then
15367 ac_cpp_err=$ac_c_preproc_warn_flag
15368 else
15369 ac_cpp_err=
15370 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015371else
Martin v. Löwis11437992002-04-12 09:54:03 +000015372 ac_cpp_err=yes
15373fi
15374if test -z "$ac_cpp_err"; then
15375 ac_header_preproc=yes
15376else
15377 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015378 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015379 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015380fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015381rm -f conftest.err conftest.$ac_ext
15382echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15383echo "${ECHO_T}$ac_header_preproc" >&6
15384
15385# So? What about this header?
15386case $ac_header_compiler:$ac_header_preproc in
15387 yes:no )
15388 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15389echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15390 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15391echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15392 no:yes )
15393 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15394echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15395 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15396echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15397 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15398echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15399esac
15400echo "$as_me:$LINENO: checking for wchar.h" >&5
15401echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15402if test "${ac_cv_header_wchar_h+set}" = set; then
15403 echo $ECHO_N "(cached) $ECHO_C" >&6
15404else
15405 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015406fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015407echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15408echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15409
15410fi
15411if test $ac_cv_header_wchar_h = yes; then
15412
15413
15414cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015415#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015416_ACEOF
15417
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015418 wchar_h="yes"
15419
Guido van Rossumef2255b2000-03-10 22:30:29 +000015420else
Martin v. Löwis11437992002-04-12 09:54:03 +000015421 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015422
15423fi
15424
Michael W. Hudson54241132001-12-07 15:38:26 +000015425
Martin v. Löwis11437992002-04-12 09:54:03 +000015426
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015427# determine wchar_t size
15428if test "$wchar_h" = yes
15429then
Martin v. Löwis11437992002-04-12 09:54:03 +000015430 echo "$as_me:$LINENO: checking for wchar_t" >&5
15431echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
15432if test "${ac_cv_type_wchar_t+set}" = set; then
15433 echo $ECHO_N "(cached) $ECHO_C" >&6
15434else
15435 cat >conftest.$ac_ext <<_ACEOF
15436#line $LINENO "configure"
15437#include "confdefs.h"
15438#include <wchar.h>
15439
15440#ifdef F77_DUMMY_MAIN
15441# ifdef __cplusplus
15442 extern "C"
15443# endif
15444 int F77_DUMMY_MAIN() { return 1; }
15445#endif
15446int
15447main ()
15448{
15449if ((wchar_t *) 0)
15450 return 0;
15451if (sizeof (wchar_t))
15452 return 0;
15453 ;
15454 return 0;
15455}
15456_ACEOF
15457rm -f conftest.$ac_objext
15458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15459 (eval $ac_compile) 2>&5
15460 ac_status=$?
15461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15462 (exit $ac_status); } &&
15463 { ac_try='test -s conftest.$ac_objext'
15464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15465 (eval $ac_try) 2>&5
15466 ac_status=$?
15467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15468 (exit $ac_status); }; }; then
15469 ac_cv_type_wchar_t=yes
15470else
15471 echo "$as_me: failed program was:" >&5
15472cat conftest.$ac_ext >&5
15473ac_cv_type_wchar_t=no
15474fi
15475rm -f conftest.$ac_objext conftest.$ac_ext
15476fi
15477echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
15478echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
15479
15480echo "$as_me:$LINENO: checking size of wchar_t" >&5
15481echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
15482if test "${ac_cv_sizeof_wchar_t+set}" = set; then
15483 echo $ECHO_N "(cached) $ECHO_C" >&6
15484else
15485 if test "$ac_cv_type_wchar_t" = yes; then
15486 # The cast to unsigned long works around a bug in the HP C Compiler
15487 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15488 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15489 # This bug is HP SR number 8606223364.
15490 if test "$cross_compiling" = yes; then
15491 # Depending upon the size, compute the lo and hi bounds.
15492cat >conftest.$ac_ext <<_ACEOF
15493#line $LINENO "configure"
15494#include "confdefs.h"
15495#include <wchar.h>
15496
15497#ifdef F77_DUMMY_MAIN
15498# ifdef __cplusplus
15499 extern "C"
15500# endif
15501 int F77_DUMMY_MAIN() { return 1; }
15502#endif
15503int
15504main ()
15505{
15506static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
15507test_array [0] = 0
15508
15509 ;
15510 return 0;
15511}
15512_ACEOF
15513rm -f conftest.$ac_objext
15514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15515 (eval $ac_compile) 2>&5
15516 ac_status=$?
15517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15518 (exit $ac_status); } &&
15519 { ac_try='test -s conftest.$ac_objext'
15520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15521 (eval $ac_try) 2>&5
15522 ac_status=$?
15523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15524 (exit $ac_status); }; }; then
15525 ac_lo=0 ac_mid=0
15526 while :; do
15527 cat >conftest.$ac_ext <<_ACEOF
15528#line $LINENO "configure"
15529#include "confdefs.h"
15530#include <wchar.h>
15531
15532#ifdef F77_DUMMY_MAIN
15533# ifdef __cplusplus
15534 extern "C"
15535# endif
15536 int F77_DUMMY_MAIN() { return 1; }
15537#endif
15538int
15539main ()
15540{
15541static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15542test_array [0] = 0
15543
15544 ;
15545 return 0;
15546}
15547_ACEOF
15548rm -f conftest.$ac_objext
15549if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15550 (eval $ac_compile) 2>&5
15551 ac_status=$?
15552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15553 (exit $ac_status); } &&
15554 { ac_try='test -s conftest.$ac_objext'
15555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15556 (eval $ac_try) 2>&5
15557 ac_status=$?
15558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15559 (exit $ac_status); }; }; then
15560 ac_hi=$ac_mid; break
15561else
15562 echo "$as_me: failed program was:" >&5
15563cat conftest.$ac_ext >&5
15564ac_lo=`expr $ac_mid + 1`
15565 if test $ac_lo -le $ac_mid; then
15566 ac_lo= ac_hi=
15567 break
15568 fi
15569 ac_mid=`expr 2 '*' $ac_mid + 1`
15570fi
15571rm -f conftest.$ac_objext conftest.$ac_ext
15572 done
15573else
15574 echo "$as_me: failed program was:" >&5
15575cat conftest.$ac_ext >&5
15576cat >conftest.$ac_ext <<_ACEOF
15577#line $LINENO "configure"
15578#include "confdefs.h"
15579#include <wchar.h>
15580
15581#ifdef F77_DUMMY_MAIN
15582# ifdef __cplusplus
15583 extern "C"
15584# endif
15585 int F77_DUMMY_MAIN() { return 1; }
15586#endif
15587int
15588main ()
15589{
15590static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
15591test_array [0] = 0
15592
15593 ;
15594 return 0;
15595}
15596_ACEOF
15597rm -f conftest.$ac_objext
15598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15599 (eval $ac_compile) 2>&5
15600 ac_status=$?
15601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15602 (exit $ac_status); } &&
15603 { ac_try='test -s conftest.$ac_objext'
15604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15605 (eval $ac_try) 2>&5
15606 ac_status=$?
15607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15608 (exit $ac_status); }; }; then
15609 ac_hi=-1 ac_mid=-1
15610 while :; do
15611 cat >conftest.$ac_ext <<_ACEOF
15612#line $LINENO "configure"
15613#include "confdefs.h"
15614#include <wchar.h>
15615
15616#ifdef F77_DUMMY_MAIN
15617# ifdef __cplusplus
15618 extern "C"
15619# endif
15620 int F77_DUMMY_MAIN() { return 1; }
15621#endif
15622int
15623main ()
15624{
15625static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15626test_array [0] = 0
15627
15628 ;
15629 return 0;
15630}
15631_ACEOF
15632rm -f conftest.$ac_objext
15633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15634 (eval $ac_compile) 2>&5
15635 ac_status=$?
15636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15637 (exit $ac_status); } &&
15638 { ac_try='test -s conftest.$ac_objext'
15639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15640 (eval $ac_try) 2>&5
15641 ac_status=$?
15642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15643 (exit $ac_status); }; }; then
15644 ac_lo=$ac_mid; break
15645else
15646 echo "$as_me: failed program was:" >&5
15647cat conftest.$ac_ext >&5
15648ac_hi=`expr '(' $ac_mid ')' - 1`
15649 if test $ac_mid -le $ac_hi; then
15650 ac_lo= ac_hi=
15651 break
15652 fi
15653 ac_mid=`expr 2 '*' $ac_mid`
15654fi
15655rm -f conftest.$ac_objext conftest.$ac_ext
15656 done
15657else
15658 echo "$as_me: failed program was:" >&5
15659cat conftest.$ac_ext >&5
15660ac_lo= ac_hi=
15661fi
15662rm -f conftest.$ac_objext conftest.$ac_ext
15663fi
15664rm -f conftest.$ac_objext conftest.$ac_ext
15665# Binary search between lo and hi bounds.
15666while test "x$ac_lo" != "x$ac_hi"; do
15667 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15668 cat >conftest.$ac_ext <<_ACEOF
15669#line $LINENO "configure"
15670#include "confdefs.h"
15671#include <wchar.h>
15672
15673#ifdef F77_DUMMY_MAIN
15674# ifdef __cplusplus
15675 extern "C"
15676# endif
15677 int F77_DUMMY_MAIN() { return 1; }
15678#endif
15679int
15680main ()
15681{
15682static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15683test_array [0] = 0
15684
15685 ;
15686 return 0;
15687}
15688_ACEOF
15689rm -f conftest.$ac_objext
15690if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15691 (eval $ac_compile) 2>&5
15692 ac_status=$?
15693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15694 (exit $ac_status); } &&
15695 { ac_try='test -s conftest.$ac_objext'
15696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15697 (eval $ac_try) 2>&5
15698 ac_status=$?
15699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15700 (exit $ac_status); }; }; then
15701 ac_hi=$ac_mid
15702else
15703 echo "$as_me: failed program was:" >&5
15704cat conftest.$ac_ext >&5
15705ac_lo=`expr '(' $ac_mid ')' + 1`
15706fi
15707rm -f conftest.$ac_objext conftest.$ac_ext
15708done
15709case $ac_lo in
15710?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15711'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15712echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15713 { (exit 1); exit 1; }; } ;;
15714esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015715else
15716 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015717 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15718echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15719 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015720else
Martin v. Löwis11437992002-04-12 09:54:03 +000015721 cat >conftest.$ac_ext <<_ACEOF
15722#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015723#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015724#include <wchar.h>
15725
15726long longval () { return (long) (sizeof (wchar_t)); }
15727unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015728#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015729#include <stdlib.h>
15730#ifdef F77_DUMMY_MAIN
15731# ifdef __cplusplus
15732 extern "C"
15733# endif
15734 int F77_DUMMY_MAIN() { return 1; }
15735#endif
15736int
15737main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015738{
Martin v. Löwis11437992002-04-12 09:54:03 +000015739
15740 FILE *f = fopen ("conftest.val", "w");
15741 if (! f)
15742 exit (1);
15743 if (((long) (sizeof (wchar_t))) < 0)
15744 {
15745 long i = longval ();
15746 if (i != ((long) (sizeof (wchar_t))))
15747 exit (1);
15748 fprintf (f, "%ld\n", i);
15749 }
15750 else
15751 {
15752 unsigned long i = ulongval ();
15753 if (i != ((long) (sizeof (wchar_t))))
15754 exit (1);
15755 fprintf (f, "%lu\n", i);
15756 }
15757 exit (ferror (f) || fclose (f) != 0);
15758
15759 ;
15760 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015761}
Martin v. Löwis11437992002-04-12 09:54:03 +000015762_ACEOF
15763rm -f conftest$ac_exeext
15764if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15765 (eval $ac_link) 2>&5
15766 ac_status=$?
15767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15768 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15770 (eval $ac_try) 2>&5
15771 ac_status=$?
15772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15773 (exit $ac_status); }; }; then
15774 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015775else
Martin v. Löwis11437992002-04-12 09:54:03 +000015776 echo "$as_me: program exited with status $ac_status" >&5
15777echo "$as_me: failed program was:" >&5
15778cat conftest.$ac_ext >&5
15779( exit $ac_status )
15780{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15781echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15782 { (exit 1); exit 1; }; }
15783fi
15784rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15785fi
15786fi
15787rm -f conftest.val
15788else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015789 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015790fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015791fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015792echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15793echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15794cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015795#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015796_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015797
Michael W. Hudson54241132001-12-07 15:38:26 +000015798
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015799fi
15800
Martin v. Löwis11437992002-04-12 09:54:03 +000015801echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15802echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015803# Check whether --enable-unicode or --disable-unicode was given.
15804if test "${enable_unicode+set}" = set; then
15805 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015806
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015807else
15808 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015809fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015810
15811if test $enable_unicode = yes
15812then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015813 # Without any arguments, Py_UNICODE defaults to two-byte mode
15814 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015815fi
15816
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015817
15818
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015819case "$enable_unicode" in
15820ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015821 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015822#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015823_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015824
15825 ;;
15826ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015827 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015828#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015829_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015830
15831 ;;
15832esac
15833
Michael W. Hudson54241132001-12-07 15:38:26 +000015834
Martin v. Löwis11437992002-04-12 09:54:03 +000015835
15836
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015837
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015838if test "$enable_unicode" = "no"
15839then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015840 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015841 echo "$as_me:$LINENO: result: not used" >&5
15842echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015843else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015844 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015845
15846cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015847#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015848_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015849
15850 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15851 then
15852 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015853
Martin v. Löwis11437992002-04-12 09:54:03 +000015854cat >>confdefs.h <<\_ACEOF
15855#define HAVE_USABLE_WCHAR_T 1
15856_ACEOF
15857
15858 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015859#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015860_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015861
15862 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15863 then
15864 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015865 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015866#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015867_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015868
15869 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15870 then
15871 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015872 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015873#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015874_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015875
15876 else
15877 PY_UNICODE_TYPE="no type found"
15878 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015879 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15880echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015881fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015882
15883# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015884echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15885echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15886if test "${ac_cv_c_bigendian+set}" = set; then
15887 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015888else
Martin v. Löwis11437992002-04-12 09:54:03 +000015889 # See if sys/param.h defines the BYTE_ORDER macro.
15890cat >conftest.$ac_ext <<_ACEOF
15891#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015892#include "confdefs.h"
15893#include <sys/types.h>
15894#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015895
Martin v. Löwis11437992002-04-12 09:54:03 +000015896#ifdef F77_DUMMY_MAIN
15897# ifdef __cplusplus
15898 extern "C"
15899# endif
15900 int F77_DUMMY_MAIN() { return 1; }
15901#endif
15902int
15903main ()
15904{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015905#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15906 bogus endian macros
15907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015908
15909 ;
15910 return 0;
15911}
15912_ACEOF
15913rm -f conftest.$ac_objext
15914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15915 (eval $ac_compile) 2>&5
15916 ac_status=$?
15917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15918 (exit $ac_status); } &&
15919 { ac_try='test -s conftest.$ac_objext'
15920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15921 (eval $ac_try) 2>&5
15922 ac_status=$?
15923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15924 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015925 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015926cat >conftest.$ac_ext <<_ACEOF
15927#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015928#include "confdefs.h"
15929#include <sys/types.h>
15930#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015931
Martin v. Löwis11437992002-04-12 09:54:03 +000015932#ifdef F77_DUMMY_MAIN
15933# ifdef __cplusplus
15934 extern "C"
15935# endif
15936 int F77_DUMMY_MAIN() { return 1; }
15937#endif
15938int
15939main ()
15940{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015941#if BYTE_ORDER != BIG_ENDIAN
15942 not big endian
15943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015944
15945 ;
15946 return 0;
15947}
15948_ACEOF
15949rm -f conftest.$ac_objext
15950if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15951 (eval $ac_compile) 2>&5
15952 ac_status=$?
15953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15954 (exit $ac_status); } &&
15955 { ac_try='test -s conftest.$ac_objext'
15956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15957 (eval $ac_try) 2>&5
15958 ac_status=$?
15959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15960 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015961 ac_cv_c_bigendian=yes
15962else
Martin v. Löwis11437992002-04-12 09:54:03 +000015963 echo "$as_me: failed program was:" >&5
15964cat conftest.$ac_ext >&5
15965ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015966fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015967rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015968else
Martin v. Löwis11437992002-04-12 09:54:03 +000015969 echo "$as_me: failed program was:" >&5
15970cat conftest.$ac_ext >&5
15971# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015972if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 # try to guess the endianess by grep'ing values into an object file
15974 ac_cv_c_bigendian=unknown
15975 cat >conftest.$ac_ext <<_ACEOF
15976#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015977#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015978short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15979short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15980void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15981short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15982short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15983void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15984#ifdef F77_DUMMY_MAIN
15985# ifdef __cplusplus
15986 extern "C"
15987# endif
15988 int F77_DUMMY_MAIN() { return 1; }
15989#endif
15990int
15991main ()
15992{
15993 _ascii (); _ebcdic ();
15994 ;
15995 return 0;
15996}
15997_ACEOF
15998rm -f conftest.$ac_objext
15999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16000 (eval $ac_compile) 2>&5
16001 ac_status=$?
16002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16003 (exit $ac_status); } &&
16004 { ac_try='test -s conftest.$ac_objext'
16005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16006 (eval $ac_try) 2>&5
16007 ac_status=$?
16008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16009 (exit $ac_status); }; }; then
16010 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
16011 ac_cv_c_bigendian=yes
16012fi
16013if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16014 if test "$ac_cv_c_bigendian" = unknown; then
16015 ac_cv_c_bigendian=no
16016 else
16017 # finding both strings is unlikely to happen, but who knows?
16018 ac_cv_c_bigendian=unknown
16019 fi
16020fi
16021else
16022 echo "$as_me: failed program was:" >&5
16023cat conftest.$ac_ext >&5
16024fi
16025rm -f conftest.$ac_objext conftest.$ac_ext
16026else
16027 cat >conftest.$ac_ext <<_ACEOF
16028#line $LINENO "configure"
16029#include "confdefs.h"
16030int
16031main ()
16032{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016033 /* Are we little or big endian? From Harbison&Steele. */
16034 union
16035 {
16036 long l;
16037 char c[sizeof (long)];
16038 } u;
16039 u.l = 1;
16040 exit (u.c[sizeof (long) - 1] == 1);
16041}
Martin v. Löwis11437992002-04-12 09:54:03 +000016042_ACEOF
16043rm -f conftest$ac_exeext
16044if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16045 (eval $ac_link) 2>&5
16046 ac_status=$?
16047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16048 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16050 (eval $ac_try) 2>&5
16051 ac_status=$?
16052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16053 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016054 ac_cv_c_bigendian=no
16055else
Martin v. Löwis11437992002-04-12 09:54:03 +000016056 echo "$as_me: program exited with status $ac_status" >&5
16057echo "$as_me: failed program was:" >&5
16058cat conftest.$ac_ext >&5
16059( exit $ac_status )
16060ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016061fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016062rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016063fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016064fi
16065rm -f conftest.$ac_objext conftest.$ac_ext
16066fi
16067echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16068echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16069case $ac_cv_c_bigendian in
16070 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016071
Martin v. Löwis11437992002-04-12 09:54:03 +000016072cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016073#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016074_ACEOF
16075 ;;
16076 no)
16077 ;;
16078 *)
16079 { { echo "$as_me:$LINENO: error: unknown endianess
16080presetting ac_cv_c_bigendian=no (or yes) will help" >&5
16081echo "$as_me: error: unknown endianess
16082presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16083 { (exit 1); exit 1; }; } ;;
16084esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016085
Michael W. Hudson54241132001-12-07 15:38:26 +000016086
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016087# Check whether right shifting a negative integer extends the sign bit
16088# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016089echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16090echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16091if test "${ac_cv_rshift_extends_sign+set}" = set; then
16092 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016093else
Martin v. Löwis11437992002-04-12 09:54:03 +000016094
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016095if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016096 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016097else
Martin v. Löwis11437992002-04-12 09:54:03 +000016098 cat >conftest.$ac_ext <<_ACEOF
16099#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016100#include "confdefs.h"
16101
16102int main()
16103{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016104 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016105}
16106
Martin v. Löwis11437992002-04-12 09:54:03 +000016107_ACEOF
16108rm -f conftest$ac_exeext
16109if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16110 (eval $ac_link) 2>&5
16111 ac_status=$?
16112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16113 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16115 (eval $ac_try) 2>&5
16116 ac_status=$?
16117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16118 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016119 ac_cv_rshift_extends_sign=yes
16120else
Martin v. Löwis11437992002-04-12 09:54:03 +000016121 echo "$as_me: program exited with status $ac_status" >&5
16122echo "$as_me: failed program was:" >&5
16123cat conftest.$ac_ext >&5
16124( exit $ac_status )
16125ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016126fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016127rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16128fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016129fi
16130
Martin v. Löwis11437992002-04-12 09:54:03 +000016131echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16132echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016133if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016134then
Martin v. Löwis11437992002-04-12 09:54:03 +000016135
16136cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016137#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016138_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016139
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016140fi
16141
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016142# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016143echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16144echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16145if test "${ac_cv_have_getc_unlocked+set}" = set; then
16146 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016147else
Martin v. Löwis11437992002-04-12 09:54:03 +000016148
16149cat >conftest.$ac_ext <<_ACEOF
16150#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016151#include "confdefs.h"
16152#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016153#ifdef F77_DUMMY_MAIN
16154# ifdef __cplusplus
16155 extern "C"
16156# endif
16157 int F77_DUMMY_MAIN() { return 1; }
16158#endif
16159int
16160main ()
16161{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016162
16163 FILE *f = fopen("/dev/null", "r");
16164 flockfile(f);
16165 getc_unlocked(f);
16166 funlockfile(f);
16167
Martin v. Löwis11437992002-04-12 09:54:03 +000016168 ;
16169 return 0;
16170}
16171_ACEOF
16172rm -f conftest.$ac_objext conftest$ac_exeext
16173if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16174 (eval $ac_link) 2>&5
16175 ac_status=$?
16176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16177 (exit $ac_status); } &&
16178 { ac_try='test -s conftest$ac_exeext'
16179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16180 (eval $ac_try) 2>&5
16181 ac_status=$?
16182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16183 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016184 ac_cv_have_getc_unlocked=yes
16185else
Martin v. Löwis11437992002-04-12 09:54:03 +000016186 echo "$as_me: failed program was:" >&5
16187cat conftest.$ac_ext >&5
16188ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016189fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016190rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016191fi
16192
Martin v. Löwis11437992002-04-12 09:54:03 +000016193echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16194echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016195if test "$ac_cv_have_getc_unlocked" = yes
16196then
Martin v. Löwis11437992002-04-12 09:54:03 +000016197
16198cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016199#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016200_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016201
16202fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016203
Martin v. Löwis0daad592001-09-30 21:09:59 +000016204# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016205echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16206echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16207if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16208 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016209else
Martin v. Löwis11437992002-04-12 09:54:03 +000016210 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016211LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016212cat >conftest.$ac_ext <<_ACEOF
16213#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016214#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016215
Guido van Rossum353ae582001-07-10 16:45:32 +000016216/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016217#ifdef __cplusplus
16218extern "C"
16219#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016220/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016221 builtin and then its argument prototype would still apply. */
16222char rl_pre_input_hook ();
16223#ifdef F77_DUMMY_MAIN
16224# ifdef __cplusplus
16225 extern "C"
16226# endif
16227 int F77_DUMMY_MAIN() { return 1; }
16228#endif
16229int
16230main ()
16231{
16232rl_pre_input_hook ();
16233 ;
16234 return 0;
16235}
16236_ACEOF
16237rm -f conftest.$ac_objext conftest$ac_exeext
16238if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16239 (eval $ac_link) 2>&5
16240 ac_status=$?
16241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16242 (exit $ac_status); } &&
16243 { ac_try='test -s conftest$ac_exeext'
16244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16245 (eval $ac_try) 2>&5
16246 ac_status=$?
16247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16248 (exit $ac_status); }; }; then
16249 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016250else
Martin v. Löwis11437992002-04-12 09:54:03 +000016251 echo "$as_me: failed program was:" >&5
16252cat conftest.$ac_ext >&5
16253ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016254fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016255rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16256LIBS=$ac_check_lib_save_LIBS
16257fi
16258echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16259echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16260if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016261
Martin v. Löwis11437992002-04-12 09:54:03 +000016262cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016263#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016264_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016265
Martin v. Löwis0daad592001-09-30 21:09:59 +000016266fi
16267
Michael W. Hudson54241132001-12-07 15:38:26 +000016268
Martin v. Löwis0daad592001-09-30 21:09:59 +000016269# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016270echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16271echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16272if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16273 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016274else
Martin v. Löwis11437992002-04-12 09:54:03 +000016275 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016276LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016277cat >conftest.$ac_ext <<_ACEOF
16278#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016279#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016280
Martin v. Löwis0daad592001-09-30 21:09:59 +000016281/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016282#ifdef __cplusplus
16283extern "C"
16284#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016285/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016286 builtin and then its argument prototype would still apply. */
16287char rl_completion_matches ();
16288#ifdef F77_DUMMY_MAIN
16289# ifdef __cplusplus
16290 extern "C"
16291# endif
16292 int F77_DUMMY_MAIN() { return 1; }
16293#endif
16294int
16295main ()
16296{
16297rl_completion_matches ();
16298 ;
16299 return 0;
16300}
16301_ACEOF
16302rm -f conftest.$ac_objext conftest$ac_exeext
16303if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16304 (eval $ac_link) 2>&5
16305 ac_status=$?
16306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16307 (exit $ac_status); } &&
16308 { ac_try='test -s conftest$ac_exeext'
16309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16310 (eval $ac_try) 2>&5
16311 ac_status=$?
16312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16313 (exit $ac_status); }; }; then
16314 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016315else
Martin v. Löwis11437992002-04-12 09:54:03 +000016316 echo "$as_me: failed program was:" >&5
16317cat conftest.$ac_ext >&5
16318ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016319fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016320rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16321LIBS=$ac_check_lib_save_LIBS
16322fi
16323echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16324echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16325if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016326
Martin v. Löwis11437992002-04-12 09:54:03 +000016327cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016328#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016329_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016330
Guido van Rossum353ae582001-07-10 16:45:32 +000016331fi
16332
Jack Jansendd19cf82001-12-06 22:36:17 +000016333
Martin v. Löwis11437992002-04-12 09:54:03 +000016334echo "$as_me:$LINENO: checking for broken nice()" >&5
16335echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16336if test "${ac_cv_broken_nice+set}" = set; then
16337 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016338else
Martin v. Löwis11437992002-04-12 09:54:03 +000016339
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016340if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016341 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016342else
Martin v. Löwis11437992002-04-12 09:54:03 +000016343 cat >conftest.$ac_ext <<_ACEOF
16344#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016345#include "confdefs.h"
16346
16347int main()
16348{
16349 int val1 = nice(1);
16350 if (val1 != -1 && val1 == nice(2))
16351 exit(0);
16352 exit(1);
16353}
16354
Martin v. Löwis11437992002-04-12 09:54:03 +000016355_ACEOF
16356rm -f conftest$ac_exeext
16357if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16358 (eval $ac_link) 2>&5
16359 ac_status=$?
16360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16361 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16363 (eval $ac_try) 2>&5
16364 ac_status=$?
16365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16366 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016367 ac_cv_broken_nice=yes
16368else
Martin v. Löwis11437992002-04-12 09:54:03 +000016369 echo "$as_me: program exited with status $ac_status" >&5
16370echo "$as_me: failed program was:" >&5
16371cat conftest.$ac_ext >&5
16372( exit $ac_status )
16373ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016374fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016375rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16376fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016377fi
16378
Martin v. Löwis11437992002-04-12 09:54:03 +000016379echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
16380echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016381if test "$ac_cv_broken_nice" = yes
16382then
Martin v. Löwis11437992002-04-12 09:54:03 +000016383
16384cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016385#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016386_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016387
16388fi
16389
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016390# Look for subsecond timestamps in struct stat
16391echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
16392echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
16393if test "${ac_cv_stat_tv_nsec+set}" = set; then
16394 echo $ECHO_N "(cached) $ECHO_C" >&6
16395else
16396 cat >conftest.$ac_ext <<_ACEOF
16397#line $LINENO "configure"
16398#include "confdefs.h"
16399#include <sys/stat.h>
16400#ifdef F77_DUMMY_MAIN
16401# ifdef __cplusplus
16402 extern "C"
16403# endif
16404 int F77_DUMMY_MAIN() { return 1; }
16405#endif
16406int
16407main ()
16408{
16409
16410struct stat st;
16411st.st_mtim.tv_nsec = 1;
16412
16413 ;
16414 return 0;
16415}
16416_ACEOF
16417rm -f conftest.$ac_objext
16418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16419 (eval $ac_compile) 2>&5
16420 ac_status=$?
16421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16422 (exit $ac_status); } &&
16423 { ac_try='test -s conftest.$ac_objext'
16424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16425 (eval $ac_try) 2>&5
16426 ac_status=$?
16427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16428 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016429 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016430else
16431 echo "$as_me: failed program was:" >&5
16432cat conftest.$ac_ext >&5
16433ac_cv_stat_tv_nsec=no
16434fi
16435rm -f conftest.$ac_objext conftest.$ac_ext
16436fi
16437
16438echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
16439echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
16440if test "$ac_cv_stat_tv_nsec" = yes
16441then
16442
16443cat >>confdefs.h <<\_ACEOF
16444#define HAVE_STAT_TV_NSEC 1
16445_ACEOF
16446
16447fi
16448
Jack Jansen666b1e72001-10-31 12:11:48 +000016449# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000016450echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
16451echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
16452if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
16453 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016454else
Martin v. Löwis11437992002-04-12 09:54:03 +000016455 cat >conftest.$ac_ext <<_ACEOF
16456#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016457#include "confdefs.h"
16458#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016459#ifdef F77_DUMMY_MAIN
16460# ifdef __cplusplus
16461 extern "C"
16462# endif
16463 int F77_DUMMY_MAIN() { return 1; }
16464#endif
16465int
16466main ()
16467{
Jack Jansen666b1e72001-10-31 12:11:48 +000016468
16469 int rtn;
16470 rtn = mvwdelch(0,0,0);
16471
Martin v. Löwis11437992002-04-12 09:54:03 +000016472 ;
16473 return 0;
16474}
16475_ACEOF
16476rm -f conftest.$ac_objext
16477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16478 (eval $ac_compile) 2>&5
16479 ac_status=$?
16480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16481 (exit $ac_status); } &&
16482 { ac_try='test -s conftest.$ac_objext'
16483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16484 (eval $ac_try) 2>&5
16485 ac_status=$?
16486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16487 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016488 ac_cv_mvwdelch_is_expression=yes
16489else
Martin v. Löwis11437992002-04-12 09:54:03 +000016490 echo "$as_me: failed program was:" >&5
16491cat conftest.$ac_ext >&5
16492ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016493fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016494rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016495fi
16496
Martin v. Löwis11437992002-04-12 09:54:03 +000016497echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
16498echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016499
16500if test "$ac_cv_mvwdelch_is_expression" = yes
16501then
Martin v. Löwis11437992002-04-12 09:54:03 +000016502
16503cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016504#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016505_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016506
16507fi
16508
Martin v. Löwis11437992002-04-12 09:54:03 +000016509echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
16510echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
16511if test "${ac_cv_window_has_flags+set}" = set; then
16512 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016513else
Martin v. Löwis11437992002-04-12 09:54:03 +000016514 cat >conftest.$ac_ext <<_ACEOF
16515#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016516#include "confdefs.h"
16517#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016518#ifdef F77_DUMMY_MAIN
16519# ifdef __cplusplus
16520 extern "C"
16521# endif
16522 int F77_DUMMY_MAIN() { return 1; }
16523#endif
16524int
16525main ()
16526{
Jack Jansen666b1e72001-10-31 12:11:48 +000016527
16528 WINDOW *w;
16529 w->_flags = 0;
16530
Martin v. Löwis11437992002-04-12 09:54:03 +000016531 ;
16532 return 0;
16533}
16534_ACEOF
16535rm -f conftest.$ac_objext
16536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16537 (eval $ac_compile) 2>&5
16538 ac_status=$?
16539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16540 (exit $ac_status); } &&
16541 { ac_try='test -s conftest.$ac_objext'
16542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16543 (eval $ac_try) 2>&5
16544 ac_status=$?
16545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16546 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016547 ac_cv_window_has_flags=yes
16548else
Martin v. Löwis11437992002-04-12 09:54:03 +000016549 echo "$as_me: failed program was:" >&5
16550cat conftest.$ac_ext >&5
16551ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016552fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016553rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016554fi
16555
Martin v. Löwis11437992002-04-12 09:54:03 +000016556echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
16557echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016558
Jack Jansen666b1e72001-10-31 12:11:48 +000016559
16560if test "$ac_cv_window_has_flags" = yes
16561then
Martin v. Löwis11437992002-04-12 09:54:03 +000016562
16563cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016564#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016565_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016566
16567fi
16568
Martin v. Löwis11437992002-04-12 09:54:03 +000016569echo "$as_me:$LINENO: checking for socklen_t" >&5
16570echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
16571if test "${ac_cv_type_socklen_t+set}" = set; then
16572 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000016573else
Martin v. Löwis11437992002-04-12 09:54:03 +000016574 cat >conftest.$ac_ext <<_ACEOF
16575#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000016576#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000016577
16578#ifdef HAVE_SYS_TYPES_H
16579#include <sys/types.h>
16580#endif
16581#ifdef HAVE_SYS_SOCKET_H
16582#include <sys/socket.h>
16583#endif
16584
16585
Martin v. Löwis11437992002-04-12 09:54:03 +000016586#ifdef F77_DUMMY_MAIN
16587# ifdef __cplusplus
16588 extern "C"
16589# endif
16590 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016591#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016592int
16593main ()
16594{
16595if ((socklen_t *) 0)
16596 return 0;
16597if (sizeof (socklen_t))
16598 return 0;
16599 ;
16600 return 0;
16601}
16602_ACEOF
16603rm -f conftest.$ac_objext
16604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16605 (eval $ac_compile) 2>&5
16606 ac_status=$?
16607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16608 (exit $ac_status); } &&
16609 { ac_try='test -s conftest.$ac_objext'
16610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16611 (eval $ac_try) 2>&5
16612 ac_status=$?
16613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16614 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016615 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000016616else
Martin v. Löwis11437992002-04-12 09:54:03 +000016617 echo "$as_me: failed program was:" >&5
16618cat conftest.$ac_ext >&5
16619ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000016620fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016621rm -f conftest.$ac_objext conftest.$ac_ext
16622fi
16623echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
16624echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
16625if test $ac_cv_type_socklen_t = yes; then
16626 :
16627else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016628
Martin v. Löwis01c04012002-11-11 14:58:44 +000016629cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016630#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000016631_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016632
16633fi
16634
Michael W. Hudson54241132001-12-07 15:38:26 +000016635
Michael W. Hudson54241132001-12-07 15:38:26 +000016636
16637
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016638for h in `(cd $srcdir;echo Python/thread_*.h)`
16639do
16640 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16641done
16642
Michael W. Hudson54241132001-12-07 15:38:26 +000016643
Jack Jansen0b06be72002-06-21 14:48:38 +000016644SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000016645echo "$as_me:$LINENO: checking for build directories" >&5
16646echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016647for dir in $SRCDIRS; do
16648 if test ! -d $dir; then
16649 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016650 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016651done
Martin v. Löwis11437992002-04-12 09:54:03 +000016652echo "$as_me:$LINENO: result: done" >&5
16653echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016654
Guido van Rossum627b2d71993-12-24 10:39:16 +000016655# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016656ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016657
Martin v. Löwis11437992002-04-12 09:54:03 +000016658cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016659# This file is a shell script that caches the results of configure
16660# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016661# scripts and configure runs, see configure's option --config-cache.
16662# It is not useful on other systems. If it contains results you don't
16663# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016664#
Martin v. Löwis11437992002-04-12 09:54:03 +000016665# config.status only pays attention to the cache file if you give it
16666# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016667#
Martin v. Löwis11437992002-04-12 09:54:03 +000016668# `ac_cv_env_foo' variables (set or unset) will be overriden when
16669# loading this file, other *unset* `ac_cv_foo' will be assigned the
16670# following values.
16671
16672_ACEOF
16673
Guido van Rossumf78abae1997-01-21 22:02:36 +000016674# The following way of writing the cache mishandles newlines in values,
16675# but we know of no workaround that is simple, portable, and efficient.
16676# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016677# Ultrix sh set writes to stderr and can't be redirected directly,
16678# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016679{
16680 (set) 2>&1 |
16681 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16682 *ac_space=\ *)
16683 # `set' does not quote correctly, so add quotes (double-quote
16684 # substitution turns \\\\ into \\, and sed turns \\ into \).
16685 sed -n \
16686 "s/'/'\\\\''/g;
16687 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16688 ;;
16689 *)
16690 # `set' quotes correctly as required by POSIX, so do not add quotes.
16691 sed -n \
16692 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16693 ;;
16694 esac;
16695} |
16696 sed '
16697 t clear
16698 : clear
16699 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16700 t end
16701 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16702 : end' >>confcache
16703if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016704 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016705 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16706 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016707 else
16708 echo "not updating unwritable cache $cache_file"
16709 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016710fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016711rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016712
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016713test "x$prefix" = xNONE && prefix=$ac_default_prefix
16714# Let make expand exec_prefix.
16715test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016716
Martin v. Löwis11437992002-04-12 09:54:03 +000016717# VPATH may cause trouble with some makes, so we remove $(srcdir),
16718# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16719# trailing colons and then remove the whole line if VPATH becomes empty
16720# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016721if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016722 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16723s/:*\$(srcdir):*/:/;
16724s/:*\${srcdir}:*/:/;
16725s/:*@srcdir@:*/:/;
16726s/^\([^=]*=[ ]*\):*/\1/;
16727s/:*$//;
16728s/^[^=]*=[ ]*$//;
16729}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016730fi
16731
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016732DEFS=-DHAVE_CONFIG_H
16733
Martin v. Löwis11437992002-04-12 09:54:03 +000016734
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016735: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016736ac_clean_files_save=$ac_clean_files
16737ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16738{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16739echo "$as_me: creating $CONFIG_STATUS" >&6;}
16740cat >$CONFIG_STATUS <<_ACEOF
16741#! $SHELL
16742# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016743# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016744# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016745# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016746
Martin v. Löwis11437992002-04-12 09:54:03 +000016747debug=false
16748SHELL=\${CONFIG_SHELL-$SHELL}
16749_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016750
Martin v. Löwis11437992002-04-12 09:54:03 +000016751cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016752
Martin v. Löwis11437992002-04-12 09:54:03 +000016753## --------------------- ##
16754## M4sh Initialization. ##
16755## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016756
Martin v. Löwis11437992002-04-12 09:54:03 +000016757# Be Bourne compatible
16758if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16759 emulate sh
16760 NULLCMD=:
16761elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16762 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016763fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016764
Martin v. Löwis11437992002-04-12 09:54:03 +000016765# NLS nuisances.
16766# Support unset when possible.
16767if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16768 as_unset=unset
16769else
16770 as_unset=false
16771fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016772
Martin v. Löwis11437992002-04-12 09:54:03 +000016773(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16774 { $as_unset LANG || test "${LANG+set}" != set; } ||
16775 { LANG=C; export LANG; }
16776(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16777 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16778 { LC_ALL=C; export LC_ALL; }
16779(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16780 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16781 { LC_TIME=C; export LC_TIME; }
16782(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16783 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16784 { LC_CTYPE=C; export LC_CTYPE; }
16785(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16786 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16787 { LANGUAGE=C; export LANGUAGE; }
16788(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16789 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16790 { LC_COLLATE=C; export LC_COLLATE; }
16791(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16792 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16793 { LC_NUMERIC=C; export LC_NUMERIC; }
16794(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16795 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16796 { LC_MESSAGES=C; export LC_MESSAGES; }
16797
16798
16799# Name of the executable.
16800as_me=`(basename "$0") 2>/dev/null ||
16801$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16802 X"$0" : 'X\(//\)$' \| \
16803 X"$0" : 'X\(/\)$' \| \
16804 . : '\(.\)' 2>/dev/null ||
16805echo X/"$0" |
16806 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16807 /^X\/\(\/\/\)$/{ s//\1/; q; }
16808 /^X\/\(\/\).*/{ s//\1/; q; }
16809 s/.*/./; q'`
16810
16811# PATH needs CR, and LINENO needs CR and PATH.
16812# Avoid depending upon Character Ranges.
16813as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16814as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16815as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16816as_cr_digits='0123456789'
16817as_cr_alnum=$as_cr_Letters$as_cr_digits
16818
16819# The user is always right.
16820if test "${PATH_SEPARATOR+set}" != set; then
16821 echo "#! /bin/sh" >conftest.sh
16822 echo "exit 0" >>conftest.sh
16823 chmod +x conftest.sh
16824 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16825 PATH_SEPARATOR=';'
16826 else
16827 PATH_SEPARATOR=:
16828 fi
16829 rm -f conftest.sh
16830fi
16831
16832
16833 as_lineno_1=$LINENO
16834 as_lineno_2=$LINENO
16835 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16836 test "x$as_lineno_1" != "x$as_lineno_2" &&
16837 test "x$as_lineno_3" = "x$as_lineno_2" || {
16838 # Find who we are. Look in the path if we contain no path at all
16839 # relative or not.
16840 case $0 in
16841 *[\\/]* ) as_myself=$0 ;;
16842 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16843for as_dir in $PATH
16844do
16845 IFS=$as_save_IFS
16846 test -z "$as_dir" && as_dir=.
16847 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16848done
16849
16850 ;;
16851 esac
16852 # We did not find ourselves, most probably we were run as `sh COMMAND'
16853 # in which case we are not to be found in the path.
16854 if test "x$as_myself" = x; then
16855 as_myself=$0
16856 fi
16857 if test ! -f "$as_myself"; then
16858 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16859echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16860 { (exit 1); exit 1; }; }
16861 fi
16862 case $CONFIG_SHELL in
16863 '')
16864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16865for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16866do
16867 IFS=$as_save_IFS
16868 test -z "$as_dir" && as_dir=.
16869 for as_base in sh bash ksh sh5; do
16870 case $as_dir in
16871 /*)
16872 if ("$as_dir/$as_base" -c '
16873 as_lineno_1=$LINENO
16874 as_lineno_2=$LINENO
16875 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16876 test "x$as_lineno_1" != "x$as_lineno_2" &&
16877 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16878 CONFIG_SHELL=$as_dir/$as_base
16879 export CONFIG_SHELL
16880 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16881 fi;;
16882 esac
16883 done
16884done
16885;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016886 esac
16887
Martin v. Löwis11437992002-04-12 09:54:03 +000016888 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16889 # uniformly replaced by the line number. The first 'sed' inserts a
16890 # line-number line before each line; the second 'sed' does the real
16891 # work. The second script uses 'N' to pair each line-number line
16892 # with the numbered line, and appends trailing '-' during
16893 # substitution so that $LINENO is not a special case at line end.
16894 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16895 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16896 sed '=' <$as_myself |
16897 sed '
16898 N
16899 s,$,-,
16900 : loop
16901 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16902 t loop
16903 s,-$,,
16904 s,^['$as_cr_digits']*\n,,
16905 ' >$as_me.lineno &&
16906 chmod +x $as_me.lineno ||
16907 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16908echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16909 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016910
Martin v. Löwis11437992002-04-12 09:54:03 +000016911 # Don't try to exec as it changes $[0], causing all sort of problems
16912 # (the dirname of $[0] is not the place where we might find the
16913 # original and so on. Autoconf is especially sensible to this).
16914 . ./$as_me.lineno
16915 # Exit status is that of the last command.
16916 exit
16917}
16918
16919
16920case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16921 *c*,-n*) ECHO_N= ECHO_C='
16922' ECHO_T=' ' ;;
16923 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16924 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16925esac
16926
16927if expr a : '\(a\)' >/dev/null 2>&1; then
16928 as_expr=expr
16929else
16930 as_expr=false
16931fi
16932
16933rm -f conf$$ conf$$.exe conf$$.file
16934echo >conf$$.file
16935if ln -s conf$$.file conf$$ 2>/dev/null; then
16936 # We could just check for DJGPP; but this test a) works b) is more generic
16937 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16938 if test -f conf$$.exe; then
16939 # Don't use ln at all; we don't have any links
16940 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016941 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016942 as_ln_s='ln -s'
16943 fi
16944elif ln conf$$.file conf$$ 2>/dev/null; then
16945 as_ln_s=ln
16946else
16947 as_ln_s='cp -p'
16948fi
16949rm -f conf$$ conf$$.exe conf$$.file
16950
16951as_executable_p="test -f"
16952
16953# Sed expression to map a string onto a valid CPP name.
16954as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16955
16956# Sed expression to map a string onto a valid variable name.
16957as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16958
16959
16960# IFS
16961# We need space, tab and new line, in precisely that order.
16962as_nl='
16963'
16964IFS=" $as_nl"
16965
16966# CDPATH.
16967$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16968
16969exec 6>&1
16970
16971# Open the log real soon, to keep \$[0] and so on meaningful, and to
16972# report actual input values of CONFIG_FILES etc. instead of their
16973# values after options handling. Logging --version etc. is OK.
16974exec 5>>config.log
16975{
16976 echo
16977 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16978## Running $as_me. ##
16979_ASBOX
16980} >&5
16981cat >&5 <<_CSEOF
16982
Martin v. Löwis88afe662002-10-26 13:47:44 +000016983This file was extended by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +000016984generated by GNU Autoconf 2.53. Invocation command line was
16985
16986 CONFIG_FILES = $CONFIG_FILES
16987 CONFIG_HEADERS = $CONFIG_HEADERS
16988 CONFIG_LINKS = $CONFIG_LINKS
16989 CONFIG_COMMANDS = $CONFIG_COMMANDS
16990 $ $0 $@
16991
16992_CSEOF
16993echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16994echo >&5
16995_ACEOF
16996
16997# Files that config.status was made for.
16998if test -n "$ac_config_files"; then
16999 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17000fi
17001
17002if test -n "$ac_config_headers"; then
17003 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17004fi
17005
17006if test -n "$ac_config_links"; then
17007 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17008fi
17009
17010if test -n "$ac_config_commands"; then
17011 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17012fi
17013
17014cat >>$CONFIG_STATUS <<\_ACEOF
17015
17016ac_cs_usage="\
17017\`$as_me' instantiates files from templates according to the
17018current configuration.
17019
17020Usage: $0 [OPTIONS] [FILE]...
17021
17022 -h, --help print this help, then exit
17023 -V, --version print version number, then exit
17024 -d, --debug don't remove temporary files
17025 --recheck update $as_me by reconfiguring in the same conditions
17026 --file=FILE[:TEMPLATE]
17027 instantiate the configuration file FILE
17028 --header=FILE[:TEMPLATE]
17029 instantiate the configuration header FILE
17030
17031Configuration files:
17032$config_files
17033
17034Configuration headers:
17035$config_headers
17036
17037Report bugs to <bug-autoconf@gnu.org>."
17038_ACEOF
17039
17040cat >>$CONFIG_STATUS <<_ACEOF
17041ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017042python config.status 2.3
Martin v. Löwis11437992002-04-12 09:54:03 +000017043configured by $0, generated by GNU Autoconf 2.53,
17044 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17045
17046Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17047Free Software Foundation, Inc.
17048This config.status script is free software; the Free Software Foundation
17049gives unlimited permission to copy, distribute and modify it."
17050srcdir=$srcdir
17051INSTALL="$INSTALL"
17052_ACEOF
17053
17054cat >>$CONFIG_STATUS <<\_ACEOF
17055# If no file are specified by the user, then we need to provide default
17056# value. By we need to know if files were specified by the user.
17057ac_need_defaults=:
17058while test $# != 0
17059do
17060 case $1 in
17061 --*=*)
17062 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17063 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17064 shift
17065 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17066 shift
17067 ;;
17068 -*);;
17069 *) # This is not an option, so the user has probably given explicit
17070 # arguments.
17071 ac_need_defaults=false;;
17072 esac
17073
17074 case $1 in
17075 # Handling of the options.
17076_ACEOF
17077cat >>$CONFIG_STATUS <<_ACEOF
17078 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17079 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17080 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17081_ACEOF
17082cat >>$CONFIG_STATUS <<\_ACEOF
17083 --version | --vers* | -V )
17084 echo "$ac_cs_version"; exit 0 ;;
17085 --he | --h)
17086 # Conflict between --help and --header
17087 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17088Try \`$0 --help' for more information." >&5
17089echo "$as_me: error: ambiguous option: $1
17090Try \`$0 --help' for more information." >&2;}
17091 { (exit 1); exit 1; }; };;
17092 --help | --hel | -h )
17093 echo "$ac_cs_usage"; exit 0 ;;
17094 --debug | --d* | -d )
17095 debug=: ;;
17096 --file | --fil | --fi | --f )
17097 shift
17098 CONFIG_FILES="$CONFIG_FILES $1"
17099 ac_need_defaults=false;;
17100 --header | --heade | --head | --hea )
17101 shift
17102 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17103 ac_need_defaults=false;;
17104
17105 # This is an error.
17106 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17107Try \`$0 --help' for more information." >&5
17108echo "$as_me: error: unrecognized option: $1
17109Try \`$0 --help' for more information." >&2;}
17110 { (exit 1); exit 1; }; } ;;
17111
17112 *) ac_config_targets="$ac_config_targets $1" ;;
17113
17114 esac
17115 shift
17116done
17117
17118_ACEOF
17119
17120
17121
17122
17123
17124cat >>$CONFIG_STATUS <<\_ACEOF
17125for ac_config_target in $ac_config_targets
17126do
17127 case "$ac_config_target" in
17128 # Handling of arguments.
17129 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17130 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17131 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17132 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17133echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17134 { (exit 1); exit 1; }; };;
17135 esac
17136done
17137
17138# If the user did not use the arguments to specify the items to instantiate,
17139# then the envvar interface is used. Set only those that are not.
17140# We use the long form for the default assignment because of an extremely
17141# bizarre bug on SunOS 4.1.3.
17142if $ac_need_defaults; then
17143 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17144 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17145fi
17146
17147# Create a temporary directory, and hook for its removal unless debugging.
17148$debug ||
17149{
17150 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17151 trap '{ (exit 1); exit 1; }' 1 2 13 15
17152}
17153
17154# Create a (secure) tmp directory for tmp files.
17155: ${TMPDIR=/tmp}
17156{
17157 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17158 test -n "$tmp" && test -d "$tmp"
17159} ||
17160{
17161 tmp=$TMPDIR/cs$$-$RANDOM
17162 (umask 077 && mkdir $tmp)
17163} ||
17164{
17165 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17166 { (exit 1); exit 1; }
17167}
17168
17169_ACEOF
17170
17171cat >>$CONFIG_STATUS <<_ACEOF
17172
17173#
17174# CONFIG_FILES section.
17175#
17176
17177# No need to generate the scripts if there are no CONFIG_FILES.
17178# This happens for instance when ./config.status config.h
17179if test -n "\$CONFIG_FILES"; then
17180 # Protect against being on the right side of a sed subst in config.status.
17181 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17182 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17183s,@SHELL@,$SHELL,;t t
17184s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17185s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17186s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17187s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17188s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17189s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17190s,@exec_prefix@,$exec_prefix,;t t
17191s,@prefix@,$prefix,;t t
17192s,@program_transform_name@,$program_transform_name,;t t
17193s,@bindir@,$bindir,;t t
17194s,@sbindir@,$sbindir,;t t
17195s,@libexecdir@,$libexecdir,;t t
17196s,@datadir@,$datadir,;t t
17197s,@sysconfdir@,$sysconfdir,;t t
17198s,@sharedstatedir@,$sharedstatedir,;t t
17199s,@localstatedir@,$localstatedir,;t t
17200s,@libdir@,$libdir,;t t
17201s,@includedir@,$includedir,;t t
17202s,@oldincludedir@,$oldincludedir,;t t
17203s,@infodir@,$infodir,;t t
17204s,@mandir@,$mandir,;t t
17205s,@build_alias@,$build_alias,;t t
17206s,@host_alias@,$host_alias,;t t
17207s,@target_alias@,$target_alias,;t t
17208s,@DEFS@,$DEFS,;t t
17209s,@ECHO_C@,$ECHO_C,;t t
17210s,@ECHO_N@,$ECHO_N,;t t
17211s,@ECHO_T@,$ECHO_T,;t t
17212s,@LIBS@,$LIBS,;t t
17213s,@VERSION@,$VERSION,;t t
17214s,@SOVERSION@,$SOVERSION,;t t
17215s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
17216s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
17217s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
17218s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17219s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17220s,@MACHDEP@,$MACHDEP,;t t
17221s,@SGI_ABI@,$SGI_ABI,;t t
17222s,@CXX@,$CXX,;t t
17223s,@MAINOBJ@,$MAINOBJ,;t t
17224s,@EXEEXT@,$EXEEXT,;t t
17225s,@CC@,$CC,;t t
17226s,@CFLAGS@,$CFLAGS,;t t
17227s,@LDFLAGS@,$LDFLAGS,;t t
17228s,@CPPFLAGS@,$CPPFLAGS,;t t
17229s,@ac_ct_CC@,$ac_ct_CC,;t t
17230s,@OBJEXT@,$OBJEXT,;t t
17231s,@CPP@,$CPP,;t t
17232s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17233s,@LIBRARY@,$LIBRARY,;t t
17234s,@LDLIBRARY@,$LDLIBRARY,;t t
17235s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17236s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17237s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17238s,@INSTSONAME@,$INSTSONAME,;t t
17239s,@RUNSHARED@,$RUNSHARED,;t t
17240s,@LINKCC@,$LINKCC,;t t
17241s,@RANLIB@,$RANLIB,;t t
17242s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17243s,@AR@,$AR,;t t
17244s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17245s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17246s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17247s,@LN@,$LN,;t t
17248s,@OPT@,$OPT,;t t
17249s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17250s,@SO@,$SO,;t t
17251s,@LDSHARED@,$LDSHARED,;t t
17252s,@BLDSHARED@,$BLDSHARED,;t t
17253s,@CCSHARED@,$CCSHARED,;t t
17254s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17255s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017256s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017257s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17258s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17259s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17260s,@LDLAST@,$LDLAST,;t t
17261s,@THREADOBJ@,$THREADOBJ,;t t
17262s,@DLINCLDIR@,$DLINCLDIR,;t t
17263s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17264s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17265s,@LIBOBJS@,$LIBOBJS,;t t
17266s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17267s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17268s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17269s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17270s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17271s,@LIBM@,$LIBM,;t t
17272s,@LIBC@,$LIBC,;t t
17273s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
17274s,@THREADHEADERS@,$THREADHEADERS,;t t
17275s,@SRCDIRS@,$SRCDIRS,;t t
17276CEOF
17277
17278_ACEOF
17279
17280 cat >>$CONFIG_STATUS <<\_ACEOF
17281 # Split the substitutions into bite-sized pieces for seds with
17282 # small command number limits, like on Digital OSF/1 and HP-UX.
17283 ac_max_sed_lines=48
17284 ac_sed_frag=1 # Number of current file.
17285 ac_beg=1 # First line for current file.
17286 ac_end=$ac_max_sed_lines # Line after last line for current file.
17287 ac_more_lines=:
17288 ac_sed_cmds=
17289 while $ac_more_lines; do
17290 if test $ac_beg -gt 1; then
17291 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17292 else
17293 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17294 fi
17295 if test ! -s $tmp/subs.frag; then
17296 ac_more_lines=false
17297 else
17298 # The purpose of the label and of the branching condition is to
17299 # speed up the sed processing (if there are no `@' at all, there
17300 # is no need to browse any of the substitutions).
17301 # These are the two extra sed commands mentioned above.
17302 (echo ':t
17303 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17304 if test -z "$ac_sed_cmds"; then
17305 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17306 else
17307 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17308 fi
17309 ac_sed_frag=`expr $ac_sed_frag + 1`
17310 ac_beg=$ac_end
17311 ac_end=`expr $ac_end + $ac_max_sed_lines`
17312 fi
17313 done
17314 if test -z "$ac_sed_cmds"; then
17315 ac_sed_cmds=cat
17316 fi
17317fi # test -n "$CONFIG_FILES"
17318
17319_ACEOF
17320cat >>$CONFIG_STATUS <<\_ACEOF
17321for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17322 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17323 case $ac_file in
17324 - | *:- | *:-:* ) # input from stdin
17325 cat >$tmp/stdin
17326 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17327 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17328 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17329 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17330 * ) ac_file_in=$ac_file.in ;;
17331 esac
17332
17333 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17334 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17335$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17336 X"$ac_file" : 'X\(//\)[^/]' \| \
17337 X"$ac_file" : 'X\(//\)$' \| \
17338 X"$ac_file" : 'X\(/\)' \| \
17339 . : '\(.\)' 2>/dev/null ||
17340echo X"$ac_file" |
17341 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17342 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17343 /^X\(\/\/\)$/{ s//\1/; q; }
17344 /^X\(\/\).*/{ s//\1/; q; }
17345 s/.*/./; q'`
17346 { case "$ac_dir" in
17347 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17348 *) as_incr_dir=.;;
17349esac
17350as_dummy="$ac_dir"
17351for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17352 case $as_mkdir_dir in
17353 # Skip DOS drivespec
17354 ?:) as_incr_dir=$as_mkdir_dir ;;
17355 *)
17356 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17357 test -d "$as_incr_dir" ||
17358 mkdir "$as_incr_dir" ||
17359 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17360echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17361 { (exit 1); exit 1; }; }
17362 ;;
17363 esac
17364done; }
17365
17366 ac_builddir=.
17367
17368if test "$ac_dir" != .; then
17369 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17370 # A "../" for each directory in $ac_dir_suffix.
17371 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17372else
17373 ac_dir_suffix= ac_top_builddir=
17374fi
17375
17376case $srcdir in
17377 .) # No --srcdir option. We are building in place.
17378 ac_srcdir=.
17379 if test -z "$ac_top_builddir"; then
17380 ac_top_srcdir=.
17381 else
17382 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17383 fi ;;
17384 [\\/]* | ?:[\\/]* ) # Absolute path.
17385 ac_srcdir=$srcdir$ac_dir_suffix;
17386 ac_top_srcdir=$srcdir ;;
17387 *) # Relative path.
17388 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17389 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17390esac
17391# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17392# absolute.
17393ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise3271202002-11-07 07:42:30 +000017394ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000017395ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17396ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17397
17398
17399 case $INSTALL in
17400 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17401 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17402 esac
17403
17404 if test x"$ac_file" != x-; then
17405 { echo "$as_me:$LINENO: creating $ac_file" >&5
17406echo "$as_me: creating $ac_file" >&6;}
17407 rm -f "$ac_file"
17408 fi
17409 # Let's still pretend it is `configure' which instantiates (i.e., don't
17410 # use $as_me), people would be surprised to read:
17411 # /* config.h. Generated by config.status. */
17412 if test x"$ac_file" = x-; then
17413 configure_input=
17414 else
17415 configure_input="$ac_file. "
17416 fi
17417 configure_input=$configure_input"Generated from `echo $ac_file_in |
17418 sed 's,.*/,,'` by configure."
17419
17420 # First look for the input files in the build tree, otherwise in the
17421 # src tree.
17422 ac_file_inputs=`IFS=:
17423 for f in $ac_file_in; do
17424 case $f in
17425 -) echo $tmp/stdin ;;
17426 [\\/$]*)
17427 # Absolute (can't be DOS-style, as IFS=:)
17428 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17429echo "$as_me: error: cannot find input file: $f" >&2;}
17430 { (exit 1); exit 1; }; }
17431 echo $f;;
17432 *) # Relative
17433 if test -f "$f"; then
17434 # Build tree
17435 echo $f
17436 elif test -f "$srcdir/$f"; then
17437 # Source tree
17438 echo $srcdir/$f
17439 else
17440 # /dev/null tree
17441 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17442echo "$as_me: error: cannot find input file: $f" >&2;}
17443 { (exit 1); exit 1; }; }
17444 fi;;
17445 esac
17446 done` || { (exit 1); exit 1; }
17447_ACEOF
17448cat >>$CONFIG_STATUS <<_ACEOF
17449 sed "$ac_vpsub
17450$extrasub
17451_ACEOF
17452cat >>$CONFIG_STATUS <<\_ACEOF
17453:t
17454/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17455s,@configure_input@,$configure_input,;t t
17456s,@srcdir@,$ac_srcdir,;t t
17457s,@abs_srcdir@,$ac_abs_srcdir,;t t
17458s,@top_srcdir@,$ac_top_srcdir,;t t
17459s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17460s,@builddir@,$ac_builddir,;t t
17461s,@abs_builddir@,$ac_abs_builddir,;t t
17462s,@top_builddir@,$ac_top_builddir,;t t
17463s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17464s,@INSTALL@,$ac_INSTALL,;t t
17465" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17466 rm -f $tmp/stdin
17467 if test x"$ac_file" != x-; then
17468 mv $tmp/out $ac_file
17469 else
17470 cat $tmp/out
17471 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017472 fi
17473
Martin v. Löwis11437992002-04-12 09:54:03 +000017474done
17475_ACEOF
17476cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017477
Martin v. Löwis11437992002-04-12 09:54:03 +000017478#
17479# CONFIG_HEADER section.
17480#
Guido van Rossum627b2d71993-12-24 10:39:16 +000017481
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017482# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17483# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017484#
17485# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000017486ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17487ac_dB='[ ].*$,\1#\2'
17488ac_dC=' '
17489ac_dD=',;t'
17490# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17491ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17492ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017493ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000017494ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017495
Martin v. Löwis11437992002-04-12 09:54:03 +000017496for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000017497 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000017498 case $ac_file in
17499 - | *:- | *:-:* ) # input from stdin
17500 cat >$tmp/stdin
17501 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17502 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17503 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17504 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17505 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017506 esac
17507
Martin v. Löwis11437992002-04-12 09:54:03 +000017508 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17509echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017510
Martin v. Löwis11437992002-04-12 09:54:03 +000017511 # First look for the input files in the build tree, otherwise in the
17512 # src tree.
17513 ac_file_inputs=`IFS=:
17514 for f in $ac_file_in; do
17515 case $f in
17516 -) echo $tmp/stdin ;;
17517 [\\/$]*)
17518 # Absolute (can't be DOS-style, as IFS=:)
17519 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17520echo "$as_me: error: cannot find input file: $f" >&2;}
17521 { (exit 1); exit 1; }; }
17522 echo $f;;
17523 *) # Relative
17524 if test -f "$f"; then
17525 # Build tree
17526 echo $f
17527 elif test -f "$srcdir/$f"; then
17528 # Source tree
17529 echo $srcdir/$f
17530 else
17531 # /dev/null tree
17532 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17533echo "$as_me: error: cannot find input file: $f" >&2;}
17534 { (exit 1); exit 1; }; }
17535 fi;;
17536 esac
17537 done` || { (exit 1); exit 1; }
17538 # Remove the trailing spaces.
17539 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017540
Martin v. Löwis11437992002-04-12 09:54:03 +000017541_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017542
Martin v. Löwis11437992002-04-12 09:54:03 +000017543# Transform confdefs.h into two sed scripts, `conftest.defines' and
17544# `conftest.undefs', that substitutes the proper values into
17545# config.h.in to produce config.h. The first handles `#define'
17546# templates, and the second `#undef' templates.
17547# And first: Protect against being on the right side of a sed subst in
17548# config.status. Protect against being in an unquoted here document
17549# in config.status.
17550rm -f conftest.defines conftest.undefs
17551# Using a here document instead of a string reduces the quoting nightmare.
17552# Putting comments in sed scripts is not portable.
17553#
17554# `end' is used to avoid that the second main sed command (meant for
17555# 0-ary CPP macros) applies to n-ary macro definitions.
17556# See the Autoconf documentation for `clear'.
17557cat >confdef2sed.sed <<\_ACEOF
17558s/[\\&,]/\\&/g
17559s,[\\$`],\\&,g
17560t clear
17561: clear
17562s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17563t end
17564s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17565: end
17566_ACEOF
17567# If some macros were called several times there might be several times
17568# the same #defines, which is useless. Nevertheless, we may not want to
17569# sort them, since we want the *last* AC-DEFINE to be honored.
17570uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17571sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17572rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017573
17574# This sed command replaces #undef with comments. This is necessary, for
17575# example, in the case of _POSIX_SOURCE, which is predefined and required
17576# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017577cat >>conftest.undefs <<\_ACEOF
17578s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17579_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017580
Martin v. Löwis11437992002-04-12 09:54:03 +000017581# Break up conftest.defines because some shells have a limit on the size
17582# of here documents, and old seds have small limits too (100 cmds).
17583echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17584echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17585echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17586echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017587rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000017588while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000017589do
Martin v. Löwis11437992002-04-12 09:54:03 +000017590 # Write a limited-size here document to $tmp/defines.sed.
17591 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17592 # Speed up: don't consider the non `#define' lines.
17593 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
17594 # Work around the forget-to-reset-the-flag bug.
17595 echo 't clr' >>$CONFIG_STATUS
17596 echo ': clr' >>$CONFIG_STATUS
17597 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017598 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017599 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17600 rm -f $tmp/in
17601 mv $tmp/out $tmp/in
17602' >>$CONFIG_STATUS
17603 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17604 rm -f conftest.defines
17605 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000017606done
Martin v. Löwis11437992002-04-12 09:54:03 +000017607rm -f conftest.defines
17608echo ' fi # egrep' >>$CONFIG_STATUS
17609echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017610
Martin v. Löwis11437992002-04-12 09:54:03 +000017611# Break up conftest.undefs because some shells have a limit on the size
17612# of here documents, and old seds have small limits too (100 cmds).
17613echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17614rm -f conftest.tail
17615while grep . conftest.undefs >/dev/null
17616do
17617 # Write a limited-size here document to $tmp/undefs.sed.
17618 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17619 # Speed up: don't consider the non `#undef'
17620 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17621 # Work around the forget-to-reset-the-flag bug.
17622 echo 't clr' >>$CONFIG_STATUS
17623 echo ': clr' >>$CONFIG_STATUS
17624 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17625 echo 'CEOF
17626 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17627 rm -f $tmp/in
17628 mv $tmp/out $tmp/in
17629' >>$CONFIG_STATUS
17630 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17631 rm -f conftest.undefs
17632 mv conftest.tail conftest.undefs
17633done
17634rm -f conftest.undefs
17635
17636cat >>$CONFIG_STATUS <<\_ACEOF
17637 # Let's still pretend it is `configure' which instantiates (i.e., don't
17638 # use $as_me), people would be surprised to read:
17639 # /* config.h. Generated by config.status. */
17640 if test x"$ac_file" = x-; then
17641 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000017642 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017643 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000017644 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017645 cat $tmp/in >>$tmp/config.h
17646 rm -f $tmp/in
17647 if test x"$ac_file" != x-; then
17648 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17649 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17650echo "$as_me: $ac_file is unchanged" >&6;}
17651 else
17652 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17653$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17654 X"$ac_file" : 'X\(//\)[^/]' \| \
17655 X"$ac_file" : 'X\(//\)$' \| \
17656 X"$ac_file" : 'X\(/\)' \| \
17657 . : '\(.\)' 2>/dev/null ||
17658echo X"$ac_file" |
17659 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17660 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17661 /^X\(\/\/\)$/{ s//\1/; q; }
17662 /^X\(\/\).*/{ s//\1/; q; }
17663 s/.*/./; q'`
17664 { case "$ac_dir" in
17665 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17666 *) as_incr_dir=.;;
17667esac
17668as_dummy="$ac_dir"
17669for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17670 case $as_mkdir_dir in
17671 # Skip DOS drivespec
17672 ?:) as_incr_dir=$as_mkdir_dir ;;
17673 *)
17674 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17675 test -d "$as_incr_dir" ||
17676 mkdir "$as_incr_dir" ||
17677 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17678echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17679 { (exit 1); exit 1; }; }
17680 ;;
17681 esac
17682done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017683
Martin v. Löwis11437992002-04-12 09:54:03 +000017684 rm -f $ac_file
17685 mv $tmp/config.h $ac_file
17686 fi
17687 else
17688 cat $tmp/config.h
17689 rm -f $tmp/config.h
17690 fi
17691done
17692_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017693
Martin v. Löwis11437992002-04-12 09:54:03 +000017694cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017695
Martin v. Löwis11437992002-04-12 09:54:03 +000017696{ (exit 0); exit 0; }
17697_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017698chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017699ac_clean_files=$ac_clean_files_save
17700
17701
17702# configure is writing to config.log, and then calls config.status.
17703# config.status does its own redirection, appending to config.log.
17704# Unfortunately, on DOS this fails, as config.log is still kept open
17705# by configure, so config.status won't be able to write to it; its
17706# output is simply discarded. So we exec the FD to /dev/null,
17707# effectively closing config.log, so it can be properly (re)opened and
17708# appended to by config.status. When coming back to configure, we
17709# need to make the FD available again.
17710if test "$no_create" != yes; then
17711 ac_cs_success=:
17712 exec 5>/dev/null
17713 $SHELL $CONFIG_STATUS || ac_cs_success=false
17714 exec 5>>config.log
17715 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17716 # would make configure fail if this is the last instruction.
17717 $ac_cs_success || { (exit 1); exit 1; }
17718fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017719
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017720
17721echo "creating Setup"
17722if test ! -f Modules/Setup
17723then
17724 cp $srcdir/Modules/Setup.dist Modules/Setup
17725fi
17726
17727echo "creating Setup.local"
17728if test ! -f Modules/Setup.local
17729then
17730 echo "# Edit this file for local setup changes" >Modules/Setup.local
17731fi
17732
17733echo "creating Makefile"
17734$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17735 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017736 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017737mv config.c Modules