blob: 3c902f8c3fe4f06ace5d6153e32561262e8b961d [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002# From configure.in Revision: 1.366 .
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
1255# The definition of _GNU_SOURCE potentially causes a change of the value
1256# of _XOPEN_SOURCE. So define it only conditionally.
1257
1258
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001259
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001260define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001261
Martin v. Löwise4826582002-10-26 13:33:00 +00001262# On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition
1263# of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else several APIs
1264# are not declared. Since this is also needed in some cases for HP-UX,
1265# we define it globally.
1266
1267cat >>confdefs.h <<\_ACEOF
1268#define _XOPEN_SOURCE_EXTENDED 1
1269_ACEOF
1270
1271
1272cat >>confdefs.h <<\_ACEOF
1273#define _POSIX_C_SOURCE 199506L
1274_ACEOF
1275
1276
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001277# Arguments passed to configure.
1278
1279CONFIG_ARGS="$ac_configure_args"
1280
Jack Jansene578a632001-08-15 01:27:14 +00001281# Check whether --enable-framework or --disable-framework was given.
1282if test "${enable_framework+set}" = set; then
1283 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001284
Jack Jansene578a632001-08-15 01:27:14 +00001285 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001286 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001287 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001288 esac
1289 case $enableval in
1290 no)
1291 PYTHONFRAMEWORK=
1292 PYTHONFRAMEWORKDIR=no-framework
1293 PYTHONFRAMEWORKPREFIX=
1294 PYTHONFRAMEWORKINSTALLDIR=
1295 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001296 ;;
1297 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001298 PYTHONFRAMEWORK=Python
1299 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001300 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001301 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1302 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001303 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001304
Guido van Rossum563e7081996-09-10 18:20:48 +00001305else
Martin v. Löwis11437992002-04-12 09:54:03 +00001306
Jack Jansene578a632001-08-15 01:27:14 +00001307 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001308 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001309 PYTHONFRAMEWORKPREFIX=
1310 PYTHONFRAMEWORKINSTALLDIR=
1311 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001314
1315
1316
1317
Jack Jansene578a632001-08-15 01:27:14 +00001318
1319##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001320## AC_HELP_STRING(--with-dyld,
1321## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001322##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001323# Set name for machine-dependent library files
1324
Martin v. Löwis11437992002-04-12 09:54:03 +00001325echo "$as_me:$LINENO: checking MACHDEP" >&5
1326echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001327if test -z "$MACHDEP"
1328then
Guido van Rossum563e7081996-09-10 18:20:48 +00001329 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001330 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1331 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001332 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001333 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001334 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001335 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001336 ac_md_system=`echo $ac_sys_system |
1337 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1338 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001339 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001340 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001341
Guido van Rossum07397971997-04-29 21:49:50 +00001342 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001343 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001344 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001345 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001346 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001347 esac
1348fi
Guido van Rossum91922671997-10-09 20:24:13 +00001349
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001350# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1351# disable features if it is defined, without any means to access these
1352# features as extensions. For these systems, we skip the definition of
1353# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1354# some feature, make sure there is no alternative way to access this
1355# feature. Also, when using wildcards, make sure you have verified the
1356# need for not defining _XOPEN_SOURCE on all systems matching the
1357# wildcard, and that the wildcard does not include future systems
1358# (which may remove their limitations).
1359case $ac_sys_system/$ac_sys_release in
1360 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1361 # even though select is a POSIX function. Reported by J. Ribbens.
1362 OpenBSD/2.* | OpenBSD/3.[012])
1363 define_xopen_source=no;;
1364esac
1365
1366if test $define_xopen_source = yes
1367then
1368 cat >>confdefs.h <<\_ACEOF
1369#define _XOPEN_SOURCE 500
1370_ACEOF
1371
1372fi
1373
Guido van Rossum91922671997-10-09 20:24:13 +00001374#
1375# SGI compilers allow the specification of the both the ABI and the
1376# ISA on the command line. Depending on the values of these switches,
1377# different and often incompatable code will be generated.
1378#
1379# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1380# thus supply support for various ABI/ISA combinations. The MACHDEP
1381# variable is also adjusted.
1382#
1383
1384if test ! -z "$SGI_ABI"
1385then
1386 CC="cc $SGI_ABI"
1387 LDFLAGS="$SGI_ABI $LDFLAGS"
1388 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1389fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001390echo "$as_me:$LINENO: result: $MACHDEP" >&5
1391echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001392
Guido van Rossum627b2d71993-12-24 10:39:16 +00001393# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001394echo "$as_me:$LINENO: checking for --without-gcc" >&5
1395echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1396
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001397# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001398if test "${with_gcc+set}" = set; then
1399 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001400
Guido van Rossum7f43da71994-08-01 12:15:30 +00001401 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001402 no) CC=cc
1403 without_gcc=yes;;
1404 yes) CC=gcc
1405 without_gcc=no;;
1406 *) CC=$withval
1407 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001408 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001409else
Martin v. Löwis11437992002-04-12 09:54:03 +00001410
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001411 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001412 AIX*) CC=cc_r
1413 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001414 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001415 case $BE_HOST_CPU in
1416 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001417 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001418 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001419 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001420 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001421 ;;
1422 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001423 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001424 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001425 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001426 ;;
1427 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001428 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1429echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1430 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001431 ;;
1432 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001433 AR="\$(srcdir)/Modules/ar_beos"
1434 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001435 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001436 Monterey*)
1437 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001438 without_gcc=;;
1439 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001440 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001441fi;
1442echo "$as_me:$LINENO: result: $without_gcc" >&5
1443echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001444
1445
Guido van Rossum95012191999-12-16 17:50:52 +00001446
Fred Drakea1a84e72001-03-06 05:52:16 +00001447MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001448echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1449echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1450
Guido van Rossum95012191999-12-16 17:50:52 +00001451# Check whether --with-cxx or --without-cxx was given.
1452if test "${with_cxx+set}" = set; then
1453 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001454
Martin v. Löwis22352952000-12-13 17:37:02 +00001455 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001456 case $withval in
1457 no) CXX=
1458 with_cxx=no;;
1459 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001460 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001461 with_cxx=$withval;;
1462 esac
1463else
Martin v. Löwis11437992002-04-12 09:54:03 +00001464
Guido van Rossum95012191999-12-16 17:50:52 +00001465 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001466 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001467
Martin v. Löwis11437992002-04-12 09:54:03 +00001468fi;
1469echo "$as_me:$LINENO: result: $with_cxx" >&5
1470echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001471
1472if test "$with_cxx" = "yes"
1473then
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1475echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1476 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001477fi
1478
1479
1480
1481
Martin v. Löwis11437992002-04-12 09:54:03 +00001482if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001483then
1484 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1485do
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 # 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 +00001487set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001488echo "$as_me:$LINENO: checking for $ac_word" >&5
1489echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1490if test "${ac_cv_prog_CXX+set}" = set; then
1491 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001492else
1493 if test -n "$CXX"; then
1494 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1495else
Martin v. Löwis11437992002-04-12 09:54:03 +00001496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1497for as_dir in $PATH
1498do
1499 IFS=$as_save_IFS
1500 test -z "$as_dir" && as_dir=.
1501 for ac_exec_ext in '' $ac_executable_extensions; do
1502 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1503 ac_cv_prog_CXX="$ac_prog"
1504 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1505 break 2
1506 fi
1507done
1508done
1509
Martin v. Löwis22352952000-12-13 17:37:02 +00001510fi
1511fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001512CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001513if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 echo "$as_me:$LINENO: result: $CXX" >&5
1515echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001516else
Martin v. Löwis11437992002-04-12 09:54:03 +00001517 echo "$as_me:$LINENO: result: no" >&5
1518echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001519fi
1520
Martin v. Löwis11437992002-04-12 09:54:03 +00001521 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001522done
1523test -n "$CXX" || CXX="notfound"
1524
1525 if test "$CXX" = "notfound"
1526 then
1527 CXX=
1528 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001529 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001530ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001531ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1532ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1533ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1534 cat >conftest.$ac_ext <<_ACEOF
1535#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001536#include "confdefs.h"
1537
Martin v. Löwis11437992002-04-12 09:54:03 +00001538#ifdef F77_DUMMY_MAIN
1539# ifdef __cplusplus
1540 extern "C"
1541# endif
1542 int F77_DUMMY_MAIN() { return 1; }
1543#endif
1544int
1545main ()
1546{
Michael W. Hudson54241132001-12-07 15:38:26 +00001547
Martin v. Löwis11437992002-04-12 09:54:03 +00001548 ;
1549 return 0;
1550}
1551_ACEOF
1552ac_clean_files_save=$ac_clean_files
1553ac_clean_files="$ac_clean_files a.out a.exe"
1554# Try to create an executable without -o first, disregard a.out.
1555# It will help us diagnose broken compilers, and finding out an intuition
1556# of exeext.
1557echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1558echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1559ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1560if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1561 (eval $ac_link_default) 2>&5
1562 ac_status=$?
1563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1564 (exit $ac_status); }; then
1565 # Find the output, starting from the most likely. This scheme is
1566# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1567# resort.
1568
1569# Be careful to initialize this variable, since it used to be cached.
1570# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1571ac_cv_exeext=
1572for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1573 ls a.out conftest 2>/dev/null;
1574 ls a.* conftest.* 2>/dev/null`; do
1575 case $ac_file in
1576 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1577 a.out ) # We found the default executable, but exeext='' is most
1578 # certainly right.
1579 break;;
1580 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1581 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1582 export ac_cv_exeext
1583 break;;
1584 * ) break;;
1585 esac
1586done
1587else
1588 echo "$as_me: failed program was:" >&5
1589cat conftest.$ac_ext >&5
1590{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1591echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1592 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001593fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001594
1595ac_exeext=$ac_cv_exeext
1596echo "$as_me:$LINENO: result: $ac_file" >&5
1597echo "${ECHO_T}$ac_file" >&6
1598
1599# Check the compiler produces executables we can run. If not, either
1600# the compiler is broken, or we cross compile.
1601echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1602echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1603# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1604# If not cross compiling, check that we can run a simple program.
1605if test "$cross_compiling" != yes; then
1606 if { ac_try='./$ac_file'
1607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1608 (eval $ac_try) 2>&5
1609 ac_status=$?
1610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1611 (exit $ac_status); }; }; then
1612 cross_compiling=no
1613 else
1614 if test "$cross_compiling" = maybe; then
1615 cross_compiling=yes
1616 else
1617 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1618If you meant to cross compile, use \`--host'." >&5
1619echo "$as_me: error: cannot run C++ compiled programs.
1620If you meant to cross compile, use \`--host'." >&2;}
1621 { (exit 1); exit 1; }; }
1622 fi
1623 fi
1624fi
1625echo "$as_me:$LINENO: result: yes" >&5
1626echo "${ECHO_T}yes" >&6
1627
1628rm -f a.out a.exe conftest$ac_cv_exeext
1629ac_clean_files=$ac_clean_files_save
1630# Check the compiler produces executables we can run. If not, either
1631# the compiler is broken, or we cross compile.
1632echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1633echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1634echo "$as_me:$LINENO: result: $cross_compiling" >&5
1635echo "${ECHO_T}$cross_compiling" >&6
1636
1637echo "$as_me:$LINENO: checking for suffix of executables" >&5
1638echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1639if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1640 (eval $ac_link) 2>&5
1641 ac_status=$?
1642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1643 (exit $ac_status); }; then
1644 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1645# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1646# work properly (i.e., refer to `conftest.exe'), while it won't with
1647# `rm'.
1648for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1649 case $ac_file in
1650 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1651 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1652 export ac_cv_exeext
1653 break;;
1654 * ) break;;
1655 esac
1656done
1657else
1658 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1659echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1660 { (exit 1); exit 1; }; }
1661fi
1662
1663rm -f conftest$ac_cv_exeext
1664echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1665echo "${ECHO_T}$ac_cv_exeext" >&6
1666
1667rm -f conftest.$ac_ext
1668EXEEXT=$ac_cv_exeext
1669ac_exeext=$EXEEXT
1670
1671 ac_ext=c
1672ac_cpp='$CPP $CPPFLAGS'
1673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1675ac_compiler_gnu=$ac_cv_c_compiler_gnu
1676
1677
Martin v. Löwis22352952000-12-13 17:37:02 +00001678
1679 fi
1680fi
1681
Guido van Rossum8b131c51995-03-09 14:10:13 +00001682# If the user switches compilers, we can't believe the cache
1683if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1684then
Martin v. Löwis11437992002-04-12 09:54:03 +00001685 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1686(it is also a good idea to do 'make clean' before compiling)" >&5
1687echo "$as_me: error: cached CC is different -- throw away $cache_file
1688(it is also a good idea to do 'make clean' before compiling)" >&2;}
1689 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001690fi
1691
Martin v. Löwis11437992002-04-12 09:54:03 +00001692ac_ext=c
1693ac_cpp='$CPP $CPPFLAGS'
1694ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1695ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1696ac_compiler_gnu=$ac_cv_c_compiler_gnu
1697if test -n "$ac_tool_prefix"; then
1698 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1699set dummy ${ac_tool_prefix}gcc; ac_word=$2
1700echo "$as_me:$LINENO: checking for $ac_word" >&5
1701echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1702if test "${ac_cv_prog_CC+set}" = set; then
1703 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001704else
1705 if test -n "$CC"; then
1706 ac_cv_prog_CC="$CC" # Let the user override the test.
1707else
Martin v. Löwis11437992002-04-12 09:54:03 +00001708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1709for as_dir in $PATH
1710do
1711 IFS=$as_save_IFS
1712 test -z "$as_dir" && as_dir=.
1713 for ac_exec_ext in '' $ac_executable_extensions; do
1714 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1715 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1716 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1717 break 2
1718 fi
1719done
1720done
1721
Jack Jansendd19cf82001-12-06 22:36:17 +00001722fi
1723fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001724CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001725if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001726 echo "$as_me:$LINENO: result: $CC" >&5
1727echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001728else
Martin v. Löwis11437992002-04-12 09:54:03 +00001729 echo "$as_me:$LINENO: result: no" >&5
1730echo "${ECHO_T}no" >&6
1731fi
1732
1733fi
1734if test -z "$ac_cv_prog_CC"; then
1735 ac_ct_CC=$CC
1736 # Extract the first word of "gcc", so it can be a program name with args.
1737set dummy gcc; ac_word=$2
1738echo "$as_me:$LINENO: checking for $ac_word" >&5
1739echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1740if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1741 echo $ECHO_N "(cached) $ECHO_C" >&6
1742else
1743 if test -n "$ac_ct_CC"; then
1744 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1745else
1746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1747for as_dir in $PATH
1748do
1749 IFS=$as_save_IFS
1750 test -z "$as_dir" && as_dir=.
1751 for ac_exec_ext in '' $ac_executable_extensions; do
1752 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1753 ac_cv_prog_ac_ct_CC="gcc"
1754 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1755 break 2
1756 fi
1757done
1758done
1759
1760fi
1761fi
1762ac_ct_CC=$ac_cv_prog_ac_ct_CC
1763if test -n "$ac_ct_CC"; then
1764 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1765echo "${ECHO_T}$ac_ct_CC" >&6
1766else
1767 echo "$as_me:$LINENO: result: no" >&5
1768echo "${ECHO_T}no" >&6
1769fi
1770
1771 CC=$ac_ct_CC
1772else
1773 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001774fi
1775
Jack Jansendd19cf82001-12-06 22:36:17 +00001776if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001777 if test -n "$ac_tool_prefix"; then
1778 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1779set dummy ${ac_tool_prefix}cc; ac_word=$2
1780echo "$as_me:$LINENO: checking for $ac_word" >&5
1781echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1782if test "${ac_cv_prog_CC+set}" = set; then
1783 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001784else
1785 if test -n "$CC"; then
1786 ac_cv_prog_CC="$CC" # Let the user override the test.
1787else
Martin v. Löwis11437992002-04-12 09:54:03 +00001788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1789for as_dir in $PATH
1790do
1791 IFS=$as_save_IFS
1792 test -z "$as_dir" && as_dir=.
1793 for ac_exec_ext in '' $ac_executable_extensions; do
1794 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1795 ac_cv_prog_CC="${ac_tool_prefix}cc"
1796 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1797 break 2
1798 fi
1799done
1800done
1801
1802fi
1803fi
1804CC=$ac_cv_prog_CC
1805if test -n "$CC"; then
1806 echo "$as_me:$LINENO: result: $CC" >&5
1807echo "${ECHO_T}$CC" >&6
1808else
1809 echo "$as_me:$LINENO: result: no" >&5
1810echo "${ECHO_T}no" >&6
1811fi
1812
1813fi
1814if test -z "$ac_cv_prog_CC"; then
1815 ac_ct_CC=$CC
1816 # Extract the first word of "cc", so it can be a program name with args.
1817set dummy cc; ac_word=$2
1818echo "$as_me:$LINENO: checking for $ac_word" >&5
1819echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1820if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1821 echo $ECHO_N "(cached) $ECHO_C" >&6
1822else
1823 if test -n "$ac_ct_CC"; then
1824 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1825else
1826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1827for as_dir in $PATH
1828do
1829 IFS=$as_save_IFS
1830 test -z "$as_dir" && as_dir=.
1831 for ac_exec_ext in '' $ac_executable_extensions; do
1832 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1833 ac_cv_prog_ac_ct_CC="cc"
1834 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1835 break 2
1836 fi
1837done
1838done
1839
1840fi
1841fi
1842ac_ct_CC=$ac_cv_prog_ac_ct_CC
1843if test -n "$ac_ct_CC"; then
1844 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1845echo "${ECHO_T}$ac_ct_CC" >&6
1846else
1847 echo "$as_me:$LINENO: result: no" >&5
1848echo "${ECHO_T}no" >&6
1849fi
1850
1851 CC=$ac_ct_CC
1852else
1853 CC="$ac_cv_prog_CC"
1854fi
1855
1856fi
1857if test -z "$CC"; then
1858 # Extract the first word of "cc", so it can be a program name with args.
1859set dummy cc; ac_word=$2
1860echo "$as_me:$LINENO: checking for $ac_word" >&5
1861echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1862if test "${ac_cv_prog_CC+set}" = set; then
1863 echo $ECHO_N "(cached) $ECHO_C" >&6
1864else
1865 if test -n "$CC"; then
1866 ac_cv_prog_CC="$CC" # Let the user override the test.
1867else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001868 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1870for as_dir in $PATH
1871do
1872 IFS=$as_save_IFS
1873 test -z "$as_dir" && as_dir=.
1874 for ac_exec_ext in '' $ac_executable_extensions; do
1875 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1876 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1877 ac_prog_rejected=yes
1878 continue
1879 fi
1880 ac_cv_prog_CC="cc"
1881 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1882 break 2
1883 fi
1884done
1885done
1886
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001887if test $ac_prog_rejected = yes; then
1888 # We found a bogon in the path, so make sure we never use it.
1889 set dummy $ac_cv_prog_CC
1890 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001891 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001892 # We chose a different compiler from the bogus one.
1893 # However, it has the same basename, so the bogon will be chosen
1894 # first if we set CC to just the basename; use the full file name.
1895 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001896 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001897 shift
1898 ac_cv_prog_CC="$@"
1899 fi
1900fi
1901fi
1902fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001903CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001904if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001905 echo "$as_me:$LINENO: result: $CC" >&5
1906echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001907else
Martin v. Löwis11437992002-04-12 09:54:03 +00001908 echo "$as_me:$LINENO: result: no" >&5
1909echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001910fi
1911
Martin v. Löwis11437992002-04-12 09:54:03 +00001912fi
1913if test -z "$CC"; then
1914 if test -n "$ac_tool_prefix"; then
1915 for ac_prog in cl
1916 do
1917 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1918set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1919echo "$as_me:$LINENO: checking for $ac_word" >&5
1920echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1921if test "${ac_cv_prog_CC+set}" = set; then
1922 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001923else
1924 if test -n "$CC"; then
1925 ac_cv_prog_CC="$CC" # Let the user override the test.
1926else
Martin v. Löwis11437992002-04-12 09:54:03 +00001927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1928for as_dir in $PATH
1929do
1930 IFS=$as_save_IFS
1931 test -z "$as_dir" && as_dir=.
1932 for ac_exec_ext in '' $ac_executable_extensions; do
1933 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1934 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1935 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1936 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001937 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001938done
1939done
1940
1941fi
1942fi
1943CC=$ac_cv_prog_CC
1944if test -n "$CC"; then
1945 echo "$as_me:$LINENO: result: $CC" >&5
1946echo "${ECHO_T}$CC" >&6
1947else
1948 echo "$as_me:$LINENO: result: no" >&5
1949echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001950fi
1951
Martin v. Löwis11437992002-04-12 09:54:03 +00001952 test -n "$CC" && break
1953 done
1954fi
1955if test -z "$CC"; then
1956 ac_ct_CC=$CC
1957 for ac_prog in cl
1958do
1959 # Extract the first word of "$ac_prog", so it can be a program name with args.
1960set dummy $ac_prog; ac_word=$2
1961echo "$as_me:$LINENO: checking for $ac_word" >&5
1962echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1963if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1964 echo $ECHO_N "(cached) $ECHO_C" >&6
1965else
1966 if test -n "$ac_ct_CC"; then
1967 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1968else
1969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1970for as_dir in $PATH
1971do
1972 IFS=$as_save_IFS
1973 test -z "$as_dir" && as_dir=.
1974 for ac_exec_ext in '' $ac_executable_extensions; do
1975 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1976 ac_cv_prog_ac_ct_CC="$ac_prog"
1977 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1978 break 2
1979 fi
1980done
1981done
Jack Jansendd19cf82001-12-06 22:36:17 +00001982
Martin v. Löwis11437992002-04-12 09:54:03 +00001983fi
1984fi
1985ac_ct_CC=$ac_cv_prog_ac_ct_CC
1986if test -n "$ac_ct_CC"; then
1987 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1988echo "${ECHO_T}$ac_ct_CC" >&6
1989else
1990 echo "$as_me:$LINENO: result: no" >&5
1991echo "${ECHO_T}no" >&6
1992fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001993
Martin v. Löwis11437992002-04-12 09:54:03 +00001994 test -n "$ac_ct_CC" && break
1995done
Michael W. Hudson54241132001-12-07 15:38:26 +00001996
Martin v. Löwis11437992002-04-12 09:54:03 +00001997 CC=$ac_ct_CC
1998fi
1999
2000fi
2001
2002
2003test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2004echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2005 { (exit 1); exit 1; }; }
2006
2007# Provide some information about the compiler.
2008echo "$as_me:$LINENO:" \
2009 "checking for C compiler version" >&5
2010ac_compiler=`set X $ac_compile; echo $2`
2011{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2012 (eval $ac_compiler --version </dev/null >&5) 2>&5
2013 ac_status=$?
2014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2015 (exit $ac_status); }
2016{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2017 (eval $ac_compiler -v </dev/null >&5) 2>&5
2018 ac_status=$?
2019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2020 (exit $ac_status); }
2021{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2022 (eval $ac_compiler -V </dev/null >&5) 2>&5
2023 ac_status=$?
2024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2025 (exit $ac_status); }
2026
2027cat >conftest.$ac_ext <<_ACEOF
2028#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002029#include "confdefs.h"
2030
Martin v. Löwis11437992002-04-12 09:54:03 +00002031#ifdef F77_DUMMY_MAIN
2032# ifdef __cplusplus
2033 extern "C"
2034# endif
2035 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002037int
2038main ()
2039{
2040
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045ac_clean_files_save=$ac_clean_files
2046ac_clean_files="$ac_clean_files a.out a.exe"
2047# Try to create an executable without -o first, disregard a.out.
2048# It will help us diagnose broken compilers, and finding out an intuition
2049# of exeext.
2050echo "$as_me:$LINENO: checking for C compiler default output" >&5
2051echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2052ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2053if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2054 (eval $ac_link_default) 2>&5
2055 ac_status=$?
2056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2057 (exit $ac_status); }; then
2058 # Find the output, starting from the most likely. This scheme is
2059# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2060# resort.
2061
2062# Be careful to initialize this variable, since it used to be cached.
2063# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2064ac_cv_exeext=
2065for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2066 ls a.out conftest 2>/dev/null;
2067 ls a.* conftest.* 2>/dev/null`; do
2068 case $ac_file in
2069 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2070 a.out ) # We found the default executable, but exeext='' is most
2071 # certainly right.
2072 break;;
2073 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2074 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2075 export ac_cv_exeext
2076 break;;
2077 * ) break;;
2078 esac
2079done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002080else
Martin v. Löwis11437992002-04-12 09:54:03 +00002081 echo "$as_me: failed program was:" >&5
2082cat conftest.$ac_ext >&5
2083{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2084echo "$as_me: error: C compiler cannot create executables" >&2;}
2085 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002086fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002087
Martin v. Löwis11437992002-04-12 09:54:03 +00002088ac_exeext=$ac_cv_exeext
2089echo "$as_me:$LINENO: result: $ac_file" >&5
2090echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002091
Martin v. Löwis11437992002-04-12 09:54:03 +00002092# Check the compiler produces executables we can run. If not, either
2093# the compiler is broken, or we cross compile.
2094echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2095echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2096# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2097# If not cross compiling, check that we can run a simple program.
2098if test "$cross_compiling" != yes; then
2099 if { ac_try='./$ac_file'
2100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2101 (eval $ac_try) 2>&5
2102 ac_status=$?
2103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2104 (exit $ac_status); }; }; then
2105 cross_compiling=no
2106 else
2107 if test "$cross_compiling" = maybe; then
2108 cross_compiling=yes
2109 else
2110 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2111If you meant to cross compile, use \`--host'." >&5
2112echo "$as_me: error: cannot run C compiled programs.
2113If you meant to cross compile, use \`--host'." >&2;}
2114 { (exit 1); exit 1; }; }
2115 fi
2116 fi
2117fi
2118echo "$as_me:$LINENO: result: yes" >&5
2119echo "${ECHO_T}yes" >&6
2120
2121rm -f a.out a.exe conftest$ac_cv_exeext
2122ac_clean_files=$ac_clean_files_save
2123# Check the compiler produces executables we can run. If not, either
2124# the compiler is broken, or we cross compile.
2125echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2126echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2127echo "$as_me:$LINENO: result: $cross_compiling" >&5
2128echo "${ECHO_T}$cross_compiling" >&6
2129
2130echo "$as_me:$LINENO: checking for suffix of executables" >&5
2131echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2133 (eval $ac_link) 2>&5
2134 ac_status=$?
2135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2136 (exit $ac_status); }; then
2137 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2138# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2139# work properly (i.e., refer to `conftest.exe'), while it won't with
2140# `rm'.
2141for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2142 case $ac_file in
2143 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2144 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2145 export ac_cv_exeext
2146 break;;
2147 * ) break;;
2148 esac
2149done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002150else
Martin v. Löwis11437992002-04-12 09:54:03 +00002151 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2152echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2153 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002154fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002155
Martin v. Löwis11437992002-04-12 09:54:03 +00002156rm -f conftest$ac_cv_exeext
2157echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2158echo "${ECHO_T}$ac_cv_exeext" >&6
2159
2160rm -f conftest.$ac_ext
2161EXEEXT=$ac_cv_exeext
2162ac_exeext=$EXEEXT
2163echo "$as_me:$LINENO: checking for suffix of object files" >&5
2164echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2165if test "${ac_cv_objext+set}" = set; then
2166 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002167else
Martin v. Löwis11437992002-04-12 09:54:03 +00002168 cat >conftest.$ac_ext <<_ACEOF
2169#line $LINENO "configure"
2170#include "confdefs.h"
2171
2172#ifdef F77_DUMMY_MAIN
2173# ifdef __cplusplus
2174 extern "C"
2175# endif
2176 int F77_DUMMY_MAIN() { return 1; }
2177#endif
2178int
2179main ()
2180{
2181
2182 ;
2183 return 0;
2184}
2185_ACEOF
2186rm -f conftest.o conftest.obj
2187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2188 (eval $ac_compile) 2>&5
2189 ac_status=$?
2190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2191 (exit $ac_status); }; then
2192 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2193 case $ac_file in
2194 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2195 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2196 break;;
2197 esac
2198done
2199else
2200 echo "$as_me: failed program was:" >&5
2201cat conftest.$ac_ext >&5
2202{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2203echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2204 { (exit 1); exit 1; }; }
2205fi
2206
2207rm -f conftest.$ac_cv_objext conftest.$ac_ext
2208fi
2209echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2210echo "${ECHO_T}$ac_cv_objext" >&6
2211OBJEXT=$ac_cv_objext
2212ac_objext=$OBJEXT
2213echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2214echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2215if test "${ac_cv_c_compiler_gnu+set}" = set; then
2216 echo $ECHO_N "(cached) $ECHO_C" >&6
2217else
2218 cat >conftest.$ac_ext <<_ACEOF
2219#line $LINENO "configure"
2220#include "confdefs.h"
2221
2222#ifdef F77_DUMMY_MAIN
2223# ifdef __cplusplus
2224 extern "C"
2225# endif
2226 int F77_DUMMY_MAIN() { return 1; }
2227#endif
2228int
2229main ()
2230{
2231#ifndef __GNUC__
2232 choke me
2233#endif
2234
2235 ;
2236 return 0;
2237}
2238_ACEOF
2239rm -f conftest.$ac_objext
2240if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2241 (eval $ac_compile) 2>&5
2242 ac_status=$?
2243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2244 (exit $ac_status); } &&
2245 { ac_try='test -s conftest.$ac_objext'
2246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2247 (eval $ac_try) 2>&5
2248 ac_status=$?
2249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2250 (exit $ac_status); }; }; then
2251 ac_compiler_gnu=yes
2252else
2253 echo "$as_me: failed program was:" >&5
2254cat conftest.$ac_ext >&5
2255ac_compiler_gnu=no
2256fi
2257rm -f conftest.$ac_objext conftest.$ac_ext
2258ac_cv_c_compiler_gnu=$ac_compiler_gnu
2259
2260fi
2261echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2262echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2263GCC=`test $ac_compiler_gnu = yes && echo yes`
2264ac_test_CFLAGS=${CFLAGS+set}
2265ac_save_CFLAGS=$CFLAGS
2266CFLAGS="-g"
2267echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2268echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2269if test "${ac_cv_prog_cc_g+set}" = set; then
2270 echo $ECHO_N "(cached) $ECHO_C" >&6
2271else
2272 cat >conftest.$ac_ext <<_ACEOF
2273#line $LINENO "configure"
2274#include "confdefs.h"
2275
2276#ifdef F77_DUMMY_MAIN
2277# ifdef __cplusplus
2278 extern "C"
2279# endif
2280 int F77_DUMMY_MAIN() { return 1; }
2281#endif
2282int
2283main ()
2284{
2285
2286 ;
2287 return 0;
2288}
2289_ACEOF
2290rm -f conftest.$ac_objext
2291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2292 (eval $ac_compile) 2>&5
2293 ac_status=$?
2294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2295 (exit $ac_status); } &&
2296 { ac_try='test -s conftest.$ac_objext'
2297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2298 (eval $ac_try) 2>&5
2299 ac_status=$?
2300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2301 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002302 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002303else
Martin v. Löwis11437992002-04-12 09:54:03 +00002304 echo "$as_me: failed program was:" >&5
2305cat conftest.$ac_ext >&5
2306ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002307fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002308rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002309fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002310echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2311echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002312if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002313 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002314elif test $ac_cv_prog_cc_g = yes; then
2315 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002316 CFLAGS="-g -O2"
2317 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002318 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002319 fi
2320else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002321 if test "$GCC" = yes; then
2322 CFLAGS="-O2"
2323 else
2324 CFLAGS=
2325 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002326fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002327# Some people use a C++ compiler to compile C. Since we use `exit',
2328# in C++ we need to declare it. In case someone uses the same compiler
2329# for both compiling C and C++ we need to have the C++ compiler decide
2330# the declaration of exit, since it's the most demanding environment.
2331cat >conftest.$ac_ext <<_ACEOF
2332#ifndef __cplusplus
2333 choke me
2334#endif
2335_ACEOF
2336rm -f conftest.$ac_objext
2337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2338 (eval $ac_compile) 2>&5
2339 ac_status=$?
2340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2341 (exit $ac_status); } &&
2342 { ac_try='test -s conftest.$ac_objext'
2343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2344 (eval $ac_try) 2>&5
2345 ac_status=$?
2346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2347 (exit $ac_status); }; }; then
2348 for ac_declaration in \
2349 ''\
2350 '#include <stdlib.h>' \
2351 'extern "C" void std::exit (int) throw (); using std::exit;' \
2352 'extern "C" void std::exit (int); using std::exit;' \
2353 'extern "C" void exit (int) throw ();' \
2354 'extern "C" void exit (int);' \
2355 'void exit (int);'
2356do
2357 cat >conftest.$ac_ext <<_ACEOF
2358#line $LINENO "configure"
2359#include "confdefs.h"
2360#include <stdlib.h>
2361$ac_declaration
2362#ifdef F77_DUMMY_MAIN
2363# ifdef __cplusplus
2364 extern "C"
2365# endif
2366 int F77_DUMMY_MAIN() { return 1; }
2367#endif
2368int
2369main ()
2370{
2371exit (42);
2372 ;
2373 return 0;
2374}
2375_ACEOF
2376rm -f conftest.$ac_objext
2377if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2378 (eval $ac_compile) 2>&5
2379 ac_status=$?
2380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2381 (exit $ac_status); } &&
2382 { ac_try='test -s conftest.$ac_objext'
2383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2384 (eval $ac_try) 2>&5
2385 ac_status=$?
2386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2387 (exit $ac_status); }; }; then
2388 :
2389else
2390 echo "$as_me: failed program was:" >&5
2391cat conftest.$ac_ext >&5
2392continue
2393fi
2394rm -f conftest.$ac_objext conftest.$ac_ext
2395 cat >conftest.$ac_ext <<_ACEOF
2396#line $LINENO "configure"
2397#include "confdefs.h"
2398$ac_declaration
2399#ifdef F77_DUMMY_MAIN
2400# ifdef __cplusplus
2401 extern "C"
2402# endif
2403 int F77_DUMMY_MAIN() { return 1; }
2404#endif
2405int
2406main ()
2407{
2408exit (42);
2409 ;
2410 return 0;
2411}
2412_ACEOF
2413rm -f conftest.$ac_objext
2414if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2415 (eval $ac_compile) 2>&5
2416 ac_status=$?
2417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2418 (exit $ac_status); } &&
2419 { ac_try='test -s conftest.$ac_objext'
2420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2421 (eval $ac_try) 2>&5
2422 ac_status=$?
2423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2424 (exit $ac_status); }; }; then
2425 break
2426else
2427 echo "$as_me: failed program was:" >&5
2428cat conftest.$ac_ext >&5
2429fi
2430rm -f conftest.$ac_objext conftest.$ac_ext
2431done
2432rm -f conftest*
2433if test -n "$ac_declaration"; then
2434 echo '#ifdef __cplusplus' >>confdefs.h
2435 echo $ac_declaration >>confdefs.h
2436 echo '#endif' >>confdefs.h
2437fi
2438
2439else
2440 echo "$as_me: failed program was:" >&5
2441cat conftest.$ac_ext >&5
2442fi
2443rm -f conftest.$ac_objext conftest.$ac_ext
2444ac_ext=c
2445ac_cpp='$CPP $CPPFLAGS'
2446ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2447ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2448ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002449
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002450
2451# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453ac_ext=c
2454ac_cpp='$CPP $CPPFLAGS'
2455ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2456ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2457ac_compiler_gnu=$ac_cv_c_compiler_gnu
2458echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2459echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002460# On Suns, sometimes $CPP names a directory.
2461if test -n "$CPP" && test -d "$CPP"; then
2462 CPP=
2463fi
2464if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 if test "${ac_cv_prog_CPP+set}" = set; then
2466 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002467else
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 # Double quotes because CPP needs to be expanded
2469 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2470 do
2471 ac_preproc_ok=false
2472for ac_c_preproc_warn_flag in '' yes
2473do
2474 # Use a header file that comes with gcc, so configuring glibc
2475 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002476 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 # not just through cpp. "Syntax error" is here to catch this case.
2478 cat >conftest.$ac_ext <<_ACEOF
2479#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002480#include "confdefs.h"
2481#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002482 Syntax error
2483_ACEOF
2484if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2485 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2486 ac_status=$?
2487 egrep -v '^ *\+' conftest.er1 >conftest.err
2488 rm -f conftest.er1
2489 cat conftest.err >&5
2490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2491 (exit $ac_status); } >/dev/null; then
2492 if test -s conftest.err; then
2493 ac_cpp_err=$ac_c_preproc_warn_flag
2494 else
2495 ac_cpp_err=
2496 fi
2497else
2498 ac_cpp_err=yes
2499fi
2500if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002501 :
2502else
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002504 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002505 # Broken: fails on valid input.
2506continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002507fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002508rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002509
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 # OK, works on sane cases. Now check whether non-existent headers
2511 # can be detected and how.
2512 cat >conftest.$ac_ext <<_ACEOF
2513#line $LINENO "configure"
2514#include "confdefs.h"
2515#include <ac_nonexistent.h>
2516_ACEOF
2517if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2518 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2519 ac_status=$?
2520 egrep -v '^ *\+' conftest.er1 >conftest.err
2521 rm -f conftest.er1
2522 cat conftest.err >&5
2523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2524 (exit $ac_status); } >/dev/null; then
2525 if test -s conftest.err; then
2526 ac_cpp_err=$ac_c_preproc_warn_flag
2527 else
2528 ac_cpp_err=
2529 fi
2530else
2531 ac_cpp_err=yes
2532fi
2533if test -z "$ac_cpp_err"; then
2534 # Broken: success on invalid input.
2535continue
2536else
2537 echo "$as_me: failed program was:" >&5
2538 cat conftest.$ac_ext >&5
2539 # Passes both tests.
2540ac_preproc_ok=:
2541break
2542fi
2543rm -f conftest.err conftest.$ac_ext
2544
2545done
2546# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2547rm -f conftest.err conftest.$ac_ext
2548if $ac_preproc_ok; then
2549 break
2550fi
2551
2552 done
2553 ac_cv_prog_CPP=$CPP
2554
2555fi
2556 CPP=$ac_cv_prog_CPP
2557else
2558 ac_cv_prog_CPP=$CPP
2559fi
2560echo "$as_me:$LINENO: result: $CPP" >&5
2561echo "${ECHO_T}$CPP" >&6
2562ac_preproc_ok=false
2563for ac_c_preproc_warn_flag in '' yes
2564do
2565 # Use a header file that comes with gcc, so configuring glibc
2566 # with a fresh cross-compiler works.
2567 # On the NeXT, cc -E runs the code through the compiler's parser,
2568 # not just through cpp. "Syntax error" is here to catch this case.
2569 cat >conftest.$ac_ext <<_ACEOF
2570#line $LINENO "configure"
2571#include "confdefs.h"
2572#include <assert.h>
2573 Syntax error
2574_ACEOF
2575if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2576 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2577 ac_status=$?
2578 egrep -v '^ *\+' conftest.er1 >conftest.err
2579 rm -f conftest.er1
2580 cat conftest.err >&5
2581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2582 (exit $ac_status); } >/dev/null; then
2583 if test -s conftest.err; then
2584 ac_cpp_err=$ac_c_preproc_warn_flag
2585 else
2586 ac_cpp_err=
2587 fi
2588else
2589 ac_cpp_err=yes
2590fi
2591if test -z "$ac_cpp_err"; then
2592 :
2593else
2594 echo "$as_me: failed program was:" >&5
2595 cat conftest.$ac_ext >&5
2596 # Broken: fails on valid input.
2597continue
2598fi
2599rm -f conftest.err conftest.$ac_ext
2600
2601 # OK, works on sane cases. Now check whether non-existent headers
2602 # can be detected and how.
2603 cat >conftest.$ac_ext <<_ACEOF
2604#line $LINENO "configure"
2605#include "confdefs.h"
2606#include <ac_nonexistent.h>
2607_ACEOF
2608if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2609 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2610 ac_status=$?
2611 egrep -v '^ *\+' conftest.er1 >conftest.err
2612 rm -f conftest.er1
2613 cat conftest.err >&5
2614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2615 (exit $ac_status); } >/dev/null; then
2616 if test -s conftest.err; then
2617 ac_cpp_err=$ac_c_preproc_warn_flag
2618 else
2619 ac_cpp_err=
2620 fi
2621else
2622 ac_cpp_err=yes
2623fi
2624if test -z "$ac_cpp_err"; then
2625 # Broken: success on invalid input.
2626continue
2627else
2628 echo "$as_me: failed program was:" >&5
2629 cat conftest.$ac_ext >&5
2630 # Passes both tests.
2631ac_preproc_ok=:
2632break
2633fi
2634rm -f conftest.err conftest.$ac_ext
2635
2636done
2637# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2638rm -f conftest.err conftest.$ac_ext
2639if $ac_preproc_ok; then
2640 :
2641else
2642 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2643echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2644 { (exit 1); exit 1; }; }
2645fi
2646
2647ac_ext=c
2648ac_cpp='$CPP $CPPFLAGS'
2649ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2650ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2651ac_compiler_gnu=$ac_cv_c_compiler_gnu
2652
2653
2654
2655echo "$as_me:$LINENO: checking for AIX" >&5
2656echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2657cat >conftest.$ac_ext <<_ACEOF
2658#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002659#include "confdefs.h"
2660#ifdef _AIX
2661 yes
2662#endif
2663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002665if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2666 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 echo "$as_me:$LINENO: result: yes" >&5
2668echo "${ECHO_T}yes" >&6
2669cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002670#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002671_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002672
2673else
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 echo "$as_me:$LINENO: result: no" >&5
2675echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002676fi
2677rm -f conftest*
2678
Michael W. Hudson54241132001-12-07 15:38:26 +00002679
Martin v. Löwis11437992002-04-12 09:54:03 +00002680echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2681echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2682if test "${ac_cv_header_stdc+set}" = set; then
2683 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002684else
Martin v. Löwis11437992002-04-12 09:54:03 +00002685 cat >conftest.$ac_ext <<_ACEOF
2686#line $LINENO "configure"
2687#include "confdefs.h"
2688#include <stdlib.h>
2689#include <stdarg.h>
2690#include <string.h>
2691#include <float.h>
2692
2693_ACEOF
2694if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2695 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2696 ac_status=$?
2697 egrep -v '^ *\+' conftest.er1 >conftest.err
2698 rm -f conftest.er1
2699 cat conftest.err >&5
2700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2701 (exit $ac_status); } >/dev/null; then
2702 if test -s conftest.err; then
2703 ac_cpp_err=$ac_c_preproc_warn_flag
2704 else
2705 ac_cpp_err=
2706 fi
2707else
2708 ac_cpp_err=yes
2709fi
2710if test -z "$ac_cpp_err"; then
2711 ac_cv_header_stdc=yes
2712else
2713 echo "$as_me: failed program was:" >&5
2714 cat conftest.$ac_ext >&5
2715 ac_cv_header_stdc=no
2716fi
2717rm -f conftest.err conftest.$ac_ext
2718
2719if test $ac_cv_header_stdc = yes; then
2720 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2721 cat >conftest.$ac_ext <<_ACEOF
2722#line $LINENO "configure"
2723#include "confdefs.h"
2724#include <string.h>
2725
2726_ACEOF
2727if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2728 egrep "memchr" >/dev/null 2>&1; then
2729 :
2730else
2731 ac_cv_header_stdc=no
2732fi
2733rm -f conftest*
2734
2735fi
2736
2737if test $ac_cv_header_stdc = yes; then
2738 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2739 cat >conftest.$ac_ext <<_ACEOF
2740#line $LINENO "configure"
2741#include "confdefs.h"
2742#include <stdlib.h>
2743
2744_ACEOF
2745if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2746 egrep "free" >/dev/null 2>&1; then
2747 :
2748else
2749 ac_cv_header_stdc=no
2750fi
2751rm -f conftest*
2752
2753fi
2754
2755if test $ac_cv_header_stdc = yes; then
2756 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2757 if test "$cross_compiling" = yes; then
2758 :
2759else
2760 cat >conftest.$ac_ext <<_ACEOF
2761#line $LINENO "configure"
2762#include "confdefs.h"
2763#include <ctype.h>
2764#if ((' ' & 0x0FF) == 0x020)
2765# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2766# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2767#else
2768# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2769 || ('j' <= (c) && (c) <= 'r') \
2770 || ('s' <= (c) && (c) <= 'z'))
2771# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2772#endif
2773
2774#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2775int
2776main ()
2777{
2778 int i;
2779 for (i = 0; i < 256; i++)
2780 if (XOR (islower (i), ISLOWER (i))
2781 || toupper (i) != TOUPPER (i))
2782 exit(2);
2783 exit (0);
2784}
2785_ACEOF
2786rm -f conftest$ac_exeext
2787if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2788 (eval $ac_link) 2>&5
2789 ac_status=$?
2790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2791 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2793 (eval $ac_try) 2>&5
2794 ac_status=$?
2795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2796 (exit $ac_status); }; }; then
2797 :
2798else
2799 echo "$as_me: program exited with status $ac_status" >&5
2800echo "$as_me: failed program was:" >&5
2801cat conftest.$ac_ext >&5
2802( exit $ac_status )
2803ac_cv_header_stdc=no
2804fi
2805rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2806fi
2807fi
2808fi
2809echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2810echo "${ECHO_T}$ac_cv_header_stdc" >&6
2811if test $ac_cv_header_stdc = yes; then
2812
2813cat >>confdefs.h <<\_ACEOF
2814#define STDC_HEADERS 1
2815_ACEOF
2816
2817fi
2818
2819# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2830 inttypes.h stdint.h unistd.h
2831do
2832as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2833echo "$as_me:$LINENO: checking for $ac_header" >&5
2834echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2835if eval "test \"\${$as_ac_Header+set}\" = set"; then
2836 echo $ECHO_N "(cached) $ECHO_C" >&6
2837else
2838 cat >conftest.$ac_ext <<_ACEOF
2839#line $LINENO "configure"
2840#include "confdefs.h"
2841$ac_includes_default
2842
2843#include <$ac_header>
2844_ACEOF
2845rm -f conftest.$ac_objext
2846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2847 (eval $ac_compile) 2>&5
2848 ac_status=$?
2849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2850 (exit $ac_status); } &&
2851 { ac_try='test -s conftest.$ac_objext'
2852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2853 (eval $ac_try) 2>&5
2854 ac_status=$?
2855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2856 (exit $ac_status); }; }; then
2857 eval "$as_ac_Header=yes"
2858else
2859 echo "$as_me: failed program was:" >&5
2860cat conftest.$ac_ext >&5
2861eval "$as_ac_Header=no"
2862fi
2863rm -f conftest.$ac_objext conftest.$ac_ext
2864fi
2865echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2866echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2867if test `eval echo '${'$as_ac_Header'}'` = yes; then
2868 cat >>confdefs.h <<_ACEOF
2869#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2870_ACEOF
2871
2872fi
2873
2874done
2875
2876
2877if test "${ac_cv_header_minix_config_h+set}" = set; then
2878 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2879echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2880if test "${ac_cv_header_minix_config_h+set}" = set; then
2881 echo $ECHO_N "(cached) $ECHO_C" >&6
2882fi
2883echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2884echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2885else
2886 # Is the header compilable?
2887echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2888echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2889cat >conftest.$ac_ext <<_ACEOF
2890#line $LINENO "configure"
2891#include "confdefs.h"
2892$ac_includes_default
2893#include <minix/config.h>
2894_ACEOF
2895rm -f conftest.$ac_objext
2896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2897 (eval $ac_compile) 2>&5
2898 ac_status=$?
2899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2900 (exit $ac_status); } &&
2901 { ac_try='test -s conftest.$ac_objext'
2902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2903 (eval $ac_try) 2>&5
2904 ac_status=$?
2905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2906 (exit $ac_status); }; }; then
2907 ac_header_compiler=yes
2908else
2909 echo "$as_me: failed program was:" >&5
2910cat conftest.$ac_ext >&5
2911ac_header_compiler=no
2912fi
2913rm -f conftest.$ac_objext conftest.$ac_ext
2914echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2915echo "${ECHO_T}$ac_header_compiler" >&6
2916
2917# Is the header present?
2918echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2919echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2920cat >conftest.$ac_ext <<_ACEOF
2921#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002922#include "confdefs.h"
2923#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002924_ACEOF
2925if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2926 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2927 ac_status=$?
2928 egrep -v '^ *\+' conftest.er1 >conftest.err
2929 rm -f conftest.er1
2930 cat conftest.err >&5
2931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2932 (exit $ac_status); } >/dev/null; then
2933 if test -s conftest.err; then
2934 ac_cpp_err=$ac_c_preproc_warn_flag
2935 else
2936 ac_cpp_err=
2937 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002938else
Martin v. Löwis11437992002-04-12 09:54:03 +00002939 ac_cpp_err=yes
2940fi
2941if test -z "$ac_cpp_err"; then
2942 ac_header_preproc=yes
2943else
2944 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002945 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002946 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002947fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002948rm -f conftest.err conftest.$ac_ext
2949echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2950echo "${ECHO_T}$ac_header_preproc" >&6
2951
2952# So? What about this header?
2953case $ac_header_compiler:$ac_header_preproc in
2954 yes:no )
2955 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2956echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2957 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2958echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2959 no:yes )
2960 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2961echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2962 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2963echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2964 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2965echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2966esac
2967echo "$as_me:$LINENO: checking for minix/config.h" >&5
2968echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2969if test "${ac_cv_header_minix_config_h+set}" = set; then
2970 echo $ECHO_N "(cached) $ECHO_C" >&6
2971else
2972 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002973fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002974echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2975echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2976
2977fi
2978if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002979 MINIX=yes
2980else
Martin v. Löwis11437992002-04-12 09:54:03 +00002981 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002982fi
2983
Martin v. Löwis11437992002-04-12 09:54:03 +00002984
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002985if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002986
2987cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002988#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002989_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991
2992cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002993#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002994_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002995
Martin v. Löwis11437992002-04-12 09:54:03 +00002996
2997cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002998#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002999_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003000
3001fi
3002
3003
Michael W. Hudson54241132001-12-07 15:38:26 +00003004
Martin v. Löwis11437992002-04-12 09:54:03 +00003005echo "$as_me:$LINENO: checking for --with-suffix" >&5
3006echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003007
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003008# Check whether --with-suffix or --without-suffix was given.
3009if test "${with_suffix+set}" = set; then
3010 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003011
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003012 case $withval in
3013 no) EXEEXT=;;
3014 yes) EXEEXT=.exe;;
3015 *) EXEEXT=$withval;;
3016 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003017fi;
3018echo "$as_me:$LINENO: result: $EXEEXT" >&5
3019echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003020
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003021# Test whether we're running on a non-case-sensitive system, in which
3022# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003023
Martin v. Löwis11437992002-04-12 09:54:03 +00003024echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3025echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003026if test ! -d CaseSensitiveTestDir; then
3027mkdir CaseSensitiveTestDir
3028fi
3029
3030if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003031then
Martin v. Löwis11437992002-04-12 09:54:03 +00003032 echo "$as_me:$LINENO: result: yes" >&5
3033echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003034 BUILDEXEEXT=.exe
3035else
Martin v. Löwis11437992002-04-12 09:54:03 +00003036 echo "$as_me:$LINENO: result: no" >&5
3037echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003038 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003039fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003040rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003041
Guido van Rossumdd997f71998-10-07 19:58:26 +00003042case $MACHDEP in
3043bsdos*)
3044 case $CC in
3045 gcc) CC="$CC -D_HAVE_BSDI";;
3046 esac;;
3047esac
3048
Guido van Rossum24b1e751997-08-21 02:29:16 +00003049case $ac_sys_system in
3050hp*|HP*)
3051 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003052 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003053 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003054Monterey*)
3055 case $CC in
3056 cc) CC="$CC -Wl,-Bexport";;
3057 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003058SunOS*)
3059 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003060
3061cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003062#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003063_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003064
3065 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003066esac
3067
Michael W. Hudson54241132001-12-07 15:38:26 +00003068
3069
Martin v. Löwis11437992002-04-12 09:54:03 +00003070echo "$as_me:$LINENO: checking LIBRARY" >&5
3071echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003072if test -z "$LIBRARY"
3073then
3074 LIBRARY='libpython$(VERSION).a'
3075fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003076echo "$as_me:$LINENO: result: $LIBRARY" >&5
3077echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003078
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003079# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003080# name of the library into which to insert object files). BLDLIBRARY is also
3081# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3082# is blank as the main program is not linked directly against LDLIBRARY.
3083# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3084# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3085# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3086# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003087#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003088# RUNSHARED is used to run shared python without installed libraries
3089#
3090# INSTSONAME is the name of the shared library that will be use to install
3091# on the system - some systems like version suffix, others don't
3092
3093
Michael W. Hudson54241132001-12-07 15:38:26 +00003094
3095
3096
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003097
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003098LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003099BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003100INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003101DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003102LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003103RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003104
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003105# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003106# If CXX is set, and if it is needed to link a main function that was
3107# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3108# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003109# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003110# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003111
Martin v. Löwis11437992002-04-12 09:54:03 +00003112echo "$as_me:$LINENO: checking LINKCC" >&5
3113echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003114if test -z "$LINKCC"
3115then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003116 if test -z "$CXX"; then
3117 LINKCC="\$(PURIFY) \$(CC)"
3118 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003119 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003120 $CXX -c conftest.$ac_ext 2>&5
3121 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3122 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3123 then
3124 LINKCC="\$(PURIFY) \$(CC)"
3125 else
3126 LINKCC="\$(PURIFY) \$(CXX)"
3127 fi
3128 rm -fr conftest*
3129 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003130 case $ac_sys_system in
3131 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003132 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003133 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003134 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003135 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003136 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003137 esac
3138fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003139echo "$as_me:$LINENO: result: $LINKCC" >&5
3140echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003141
Martin v. Löwis11437992002-04-12 09:54:03 +00003142echo "$as_me:$LINENO: checking for --enable-shared" >&5
3143echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003144# Check whether --enable-shared or --disable-shared was given.
3145if test "${enable_shared+set}" = set; then
3146 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003147
Martin v. Löwis11437992002-04-12 09:54:03 +00003148fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003149
3150if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003151then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003152 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003153 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003154 enable_shared="yes";;
3155 *)
3156 enable_shared="no";;
3157 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003158fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003159echo "$as_me:$LINENO: result: $enable_shared" >&5
3160echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003161
3162
Martin v. Löwis11437992002-04-12 09:54:03 +00003163echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3164echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003165
Guido van Rossumb8552162001-09-05 14:58:11 +00003166# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3167# library that we build, but we do not want to link against it (we
3168# will find it with a -framework option). For this reason there is an
3169# extra variable BLDLIBRARY against which Python and the extension
3170# modules are linked, BLDLIBRARY. This is normally the same as
3171# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003172if test "$enable_framework"
3173then
3174 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3175 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3176 BLDLIBRARY=''
3177else
3178 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003179fi
Jack Jansene578a632001-08-15 01:27:14 +00003180
Martin v. Löwis1142de32002-03-29 16:28:31 +00003181# Other platforms follow
3182if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003183
3184cat >>confdefs.h <<\_ACEOF
3185#define Py_ENABLE_SHARED 1
3186_ACEOF
3187
Martin v. Löwis1142de32002-03-29 16:28:31 +00003188 case $ac_sys_system in
3189 BeOS*)
3190 LDLIBRARY='libpython$(VERSION).so'
3191 ;;
3192 CYGWIN*)
3193 LDLIBRARY='libpython$(VERSION).dll.a'
3194 DLLLIBRARY='libpython$(VERSION).dll'
3195 ;;
3196 SunOS*)
3197 LDLIBRARY='libpython$(VERSION).so'
3198 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3199 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3200 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003201 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003202 LDLIBRARY='libpython$(VERSION).so'
3203 BLDLIBRARY='-L. -lpython$(VERSION)'
3204 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3205 INSTSONAME="$LDLIBRARY".$SOVERSION
3206 ;;
3207 hp*|HP*)
3208 LDLIBRARY='libpython$(VERSION).sl'
3209 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3210 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3211 ;;
3212 OSF*)
3213 LDLIBRARY='libpython$(VERSION).so'
3214 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3215 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3216 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003217 atheos*)
3218 LDLIBRARY='libpython$(VERSION).so'
3219 BLDLIBRARY='-L. -lpython$(VERSION)'
3220 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3221 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003222 esac
3223 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3224 case $MACHDEP in
3225 dguxR4)
3226 LDLIBRARY='libpython$(VERSION).so'
3227 OPT="$OPT -pic"
3228 ;;
3229 esac
3230fi
3231
Martin v. Löwis11437992002-04-12 09:54:03 +00003232echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3233echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003234
Martin v. Löwis11437992002-04-12 09:54:03 +00003235if test -n "$ac_tool_prefix"; then
3236 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3237set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3238echo "$as_me:$LINENO: checking for $ac_word" >&5
3239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3240if test "${ac_cv_prog_RANLIB+set}" = set; then
3241 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003242else
3243 if test -n "$RANLIB"; then
3244 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3245else
Martin v. Löwis11437992002-04-12 09:54:03 +00003246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3247for as_dir in $PATH
3248do
3249 IFS=$as_save_IFS
3250 test -z "$as_dir" && as_dir=.
3251 for ac_exec_ext in '' $ac_executable_extensions; do
3252 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3253 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3255 break 2
3256 fi
3257done
3258done
3259
Guido van Rossum627b2d71993-12-24 10:39:16 +00003260fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003261fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003262RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003263if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003264 echo "$as_me:$LINENO: result: $RANLIB" >&5
3265echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003266else
Martin v. Löwis11437992002-04-12 09:54:03 +00003267 echo "$as_me:$LINENO: result: no" >&5
3268echo "${ECHO_T}no" >&6
3269fi
3270
3271fi
3272if test -z "$ac_cv_prog_RANLIB"; then
3273 ac_ct_RANLIB=$RANLIB
3274 # Extract the first word of "ranlib", so it can be a program name with args.
3275set dummy ranlib; ac_word=$2
3276echo "$as_me:$LINENO: checking for $ac_word" >&5
3277echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3278if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3279 echo $ECHO_N "(cached) $ECHO_C" >&6
3280else
3281 if test -n "$ac_ct_RANLIB"; then
3282 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3283else
3284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3285for as_dir in $PATH
3286do
3287 IFS=$as_save_IFS
3288 test -z "$as_dir" && as_dir=.
3289 for ac_exec_ext in '' $ac_executable_extensions; do
3290 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3291 ac_cv_prog_ac_ct_RANLIB="ranlib"
3292 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3293 break 2
3294 fi
3295done
3296done
3297
3298 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3299fi
3300fi
3301ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3302if test -n "$ac_ct_RANLIB"; then
3303 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3304echo "${ECHO_T}$ac_ct_RANLIB" >&6
3305else
3306 echo "$as_me:$LINENO: result: no" >&5
3307echo "${ECHO_T}no" >&6
3308fi
3309
3310 RANLIB=$ac_ct_RANLIB
3311else
3312 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003313fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003314
3315
Guido van Rossum7f43da71994-08-01 12:15:30 +00003316for ac_prog in ar aal
3317do
Martin v. Löwis11437992002-04-12 09:54:03 +00003318 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003319set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003320echo "$as_me:$LINENO: checking for $ac_word" >&5
3321echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3322if test "${ac_cv_prog_AR+set}" = set; then
3323 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003324else
3325 if test -n "$AR"; then
3326 ac_cv_prog_AR="$AR" # Let the user override the test.
3327else
Martin v. Löwis11437992002-04-12 09:54:03 +00003328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3329for as_dir in $PATH
3330do
3331 IFS=$as_save_IFS
3332 test -z "$as_dir" && as_dir=.
3333 for ac_exec_ext in '' $ac_executable_extensions; do
3334 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3335 ac_cv_prog_AR="$ac_prog"
3336 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3337 break 2
3338 fi
3339done
3340done
3341
Guido van Rossum7f43da71994-08-01 12:15:30 +00003342fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003343fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003344AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003345if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003346 echo "$as_me:$LINENO: result: $AR" >&5
3347echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003348else
Martin v. Löwis11437992002-04-12 09:54:03 +00003349 echo "$as_me:$LINENO: result: no" >&5
3350echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003351fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003352
Martin v. Löwis11437992002-04-12 09:54:03 +00003353 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003354done
3355test -n "$AR" || AR="ar"
3356
Michael W. Hudson54241132001-12-07 15:38:26 +00003357
Neil Schemenauera42c8272001-03-31 00:01:55 +00003358case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003359bsdos*|hp*|HP*)
3360 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003361 if test -z "$INSTALL"
3362 then
3363 INSTALL="${srcdir}/install-sh -c"
3364 fi
3365esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003366ac_aux_dir=
3367for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3368 if test -f $ac_dir/install-sh; then
3369 ac_aux_dir=$ac_dir
3370 ac_install_sh="$ac_aux_dir/install-sh -c"
3371 break
3372 elif test -f $ac_dir/install.sh; then
3373 ac_aux_dir=$ac_dir
3374 ac_install_sh="$ac_aux_dir/install.sh -c"
3375 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003376 elif test -f $ac_dir/shtool; then
3377 ac_aux_dir=$ac_dir
3378 ac_install_sh="$ac_aux_dir/shtool install -c"
3379 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003380 fi
3381done
3382if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003383 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3384echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3385 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003386fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003387ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3388ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3389ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003390
3391# Find a good install program. We prefer a C program (faster),
3392# so one script is as good as another. But avoid the broken or
3393# incompatible versions:
3394# SysV /etc/install, /usr/sbin/install
3395# SunOS /usr/etc/install
3396# IRIX /sbin/install
3397# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003398# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003399# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3400# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3401# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3402# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003403echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3404echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003405if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003406if test "${ac_cv_path_install+set}" = set; then
3407 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003408else
Martin v. Löwis11437992002-04-12 09:54:03 +00003409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3410for as_dir in $PATH
3411do
3412 IFS=$as_save_IFS
3413 test -z "$as_dir" && as_dir=.
3414 # Account for people who put trailing slashes in PATH elements.
3415case $as_dir/ in
3416 ./ | .// | /cC/* | \
3417 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3418 /usr/ucb/* ) ;;
3419 *)
3420 # OSF1 and SCO ODT 3.0 have their own names for install.
3421 # Don't use installbsd from OSF since it installs stuff as root
3422 # by default.
3423 for ac_prog in ginstall scoinst install; do
3424 for ac_exec_ext in '' $ac_executable_extensions; do
3425 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3426 if test $ac_prog = install &&
3427 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3428 # AIX install. It has an incompatible calling convention.
3429 :
3430 elif test $ac_prog = install &&
3431 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3432 # program-specific install script used by HP pwplus--don't use.
3433 :
3434 else
3435 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3436 break 3
3437 fi
3438 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003439 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003440 done
3441 ;;
3442esac
3443done
3444
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003445
3446fi
3447 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003449 else
3450 # As a last resort, use the slow shell script. We don't cache a
3451 # path for INSTALL within a source directory, because that will
3452 # break other packages using the cache if that directory is
3453 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003454 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003455 fi
3456fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003457echo "$as_me:$LINENO: result: $INSTALL" >&5
3458echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003459
3460# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3461# It thinks the first close brace ends the variable substitution.
3462test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3463
Martin v. Löwis11437992002-04-12 09:54:03 +00003464test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003465
3466test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3467
Michael W. Hudson54241132001-12-07 15:38:26 +00003468
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003469# Not every filesystem supports hard links
3470
3471if test -z "$LN" ; then
3472 case $ac_sys_system in
3473 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003474 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003475 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003476 *) LN=ln;;
3477 esac
3478fi
3479
Fred Drake109d9862001-07-11 06:27:56 +00003480# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003481echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3482echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3483
Fred Drake109d9862001-07-11 06:27:56 +00003484# Check whether --with-pydebug or --without-pydebug was given.
3485if test "${with_pydebug+set}" = set; then
3486 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003487
Fred Drake109d9862001-07-11 06:27:56 +00003488if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003489then
3490
3491cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003492#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003493_ACEOF
3494
3495 echo "$as_me:$LINENO: result: yes" >&5
3496echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003497 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003498else echo "$as_me:$LINENO: result: no" >&5
3499echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003500fi
3501else
Martin v. Löwis11437992002-04-12 09:54:03 +00003502 echo "$as_me:$LINENO: result: no" >&5
3503echo "${ECHO_T}no" >&6
3504fi;
Fred Drake109d9862001-07-11 06:27:56 +00003505
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003506# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003507
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003508if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003509then
Neal Norwitzd957f392002-09-25 21:26:19 +00003510 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003511 yes)
3512 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003513 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003514 if test "$Py_DEBUG" = 'true' ; then
3515 # Optimization messes up debuggers, so turn it off for
3516 # debug builds.
3517 OPT="-g -Wall -Wstrict-prototypes"
3518 else
3519 OPT="-g -O3 -Wall -Wstrict-prototypes"
3520 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003521 *)
Fred Drake109d9862001-07-11 06:27:56 +00003522 OPT="-O3 -Wall -Wstrict-prototypes";;
3523 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003524 case $ac_sys_system in
3525 SCO_SV*) OPT="$OPT -m486 -DSCO5";;
3526 esac
Fred Drake109d9862001-07-11 06:27:56 +00003527 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003528 *)
3529 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003530 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003531 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003532 SCO_SV*)
3533 CFLAGS="$CFLAGS -belf"
3534 OPT="-belf -O -Ki486 -DSCO5";;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003535 *)
3536 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003537 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003538 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003539 case $ac_sys_system in
3540 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003541 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003542 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003543fi
3544
Fred Drakee1ceaa02001-12-04 20:55:47 +00003545if test "$Py_DEBUG" = 'true'; then
3546 :
3547else
3548 OPT="-DNDEBUG $OPT"
3549fi
3550
Trent Mick635f6fb2000-08-23 21:33:05 +00003551# The current (beta) Monterey compiler dies with optimizations
3552case $ac_sys_system in
3553Monterey*) OPT="";;
3554esac
3555
Guido van Rossum563e7081996-09-10 18:20:48 +00003556if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003557then
3558 OPT="$OPT $ac_arch_flags"
3559fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003560
Martin v. Löwis11437992002-04-12 09:54:03 +00003561echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3562echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3563if test "${ac_cv_opt_olimit_ok+set}" = set; then
3564 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003565else
3566 ac_save_cc="$CC"
3567CC="$CC -OPT:Olimit=0"
3568if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003569 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003570else
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 cat >conftest.$ac_ext <<_ACEOF
3572#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003573#include "confdefs.h"
3574int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003575_ACEOF
3576rm -f conftest$ac_exeext
3577if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3578 (eval $ac_link) 2>&5
3579 ac_status=$?
3580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3581 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3583 (eval $ac_try) 2>&5
3584 ac_status=$?
3585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3586 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003587 ac_cv_opt_olimit_ok=yes
3588else
Martin v. Löwis11437992002-04-12 09:54:03 +00003589 echo "$as_me: program exited with status $ac_status" >&5
3590echo "$as_me: failed program was:" >&5
3591cat conftest.$ac_ext >&5
3592( exit $ac_status )
3593ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003595rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003596fi
Guido van Rossum91922671997-10-09 20:24:13 +00003597CC="$ac_save_cc"
3598fi
3599
Martin v. Löwis11437992002-04-12 09:54:03 +00003600echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3601echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003602if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003603 case $ac_sys_system in
3604 Darwin*) OPT="$OPT" ;;
3605 *) OPT="$OPT -OPT:Olimit=0";;
3606 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003607else
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3609echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3610 if test "${ac_cv_olimit_ok+set}" = set; then
3611 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003612else
3613 ac_save_cc="$CC"
3614 CC="$CC -Olimit 1500"
3615 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003616 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003617else
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 cat >conftest.$ac_ext <<_ACEOF
3619#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003620#include "confdefs.h"
3621int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003622_ACEOF
3623rm -f conftest$ac_exeext
3624if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3625 (eval $ac_link) 2>&5
3626 ac_status=$?
3627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3628 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3630 (eval $ac_try) 2>&5
3631 ac_status=$?
3632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3633 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003634 ac_cv_olimit_ok=yes
3635else
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 echo "$as_me: program exited with status $ac_status" >&5
3637echo "$as_me: failed program was:" >&5
3638cat conftest.$ac_ext >&5
3639( exit $ac_status )
3640ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003641fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003642rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003643fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003644 CC="$ac_save_cc"
3645fi
3646
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3648echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003649 if test $ac_cv_olimit_ok = yes; then
3650 OPT="$OPT -Olimit 1500"
3651 fi
3652fi
3653
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003654# On some compilers, pthreads are available without further options
3655# (e.g. MacOS X). On some of these systems, the compiler will not
3656# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3657# So we have to see first whether pthreads are available without
3658# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003659echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3660echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3661if test "${ac_cv_pthread_is_default+set}" = set; then
3662 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003663else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003664 if test "$cross_compiling" = yes; then
3665 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003666else
Martin v. Löwis11437992002-04-12 09:54:03 +00003667 cat >conftest.$ac_ext <<_ACEOF
3668#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003669#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003670
Martin v. Löwis130fb172001-07-19 11:00:41 +00003671#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003672
3673void* routine(void* p){return NULL;}
3674
3675int main(){
3676 pthread_t p;
3677 if(pthread_create(&p,NULL,routine,NULL)!=0)
3678 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003679 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003680 return 0;
3681}
3682
Martin v. Löwis11437992002-04-12 09:54:03 +00003683_ACEOF
3684rm -f conftest$ac_exeext
3685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3686 (eval $ac_link) 2>&5
3687 ac_status=$?
3688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3689 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3691 (eval $ac_try) 2>&5
3692 ac_status=$?
3693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3694 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003695 ac_cv_pthread_is_default=yes
3696else
Martin v. Löwis11437992002-04-12 09:54:03 +00003697 echo "$as_me: program exited with status $ac_status" >&5
3698echo "$as_me: failed program was:" >&5
3699cat conftest.$ac_ext >&5
3700( exit $ac_status )
3701ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003702fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003703rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003704fi
3705
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003706fi
3707
Martin v. Löwis11437992002-04-12 09:54:03 +00003708echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3709echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003710
Michael W. Hudson54241132001-12-07 15:38:26 +00003711
Martin v. Löwis11437992002-04-12 09:54:03 +00003712if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003713then
3714 ac_cv_kpthread=no
3715else
3716# -Kpthread, if available, provides the right #defines
3717# and linker options to make pthread_create available
3718# Some compilers won't report that they do not support -Kpthread,
3719# so we need to run a program to see whether it really made the
3720# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003721echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3722echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3723if test "${ac_cv_kpthread+set}" = set; then
3724 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003725else
3726 ac_save_cc="$CC"
3727CC="$CC -Kpthread"
3728if test "$cross_compiling" = yes; then
3729 ac_cv_kpthread=no
3730else
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 cat >conftest.$ac_ext <<_ACEOF
3732#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003733#include "confdefs.h"
3734
3735#include <pthread.h>
3736
3737void* routine(void* p){return NULL;}
3738
3739int main(){
3740 pthread_t p;
3741 if(pthread_create(&p,NULL,routine,NULL)!=0)
3742 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003743 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003744 return 0;
3745}
3746
Martin v. Löwis11437992002-04-12 09:54:03 +00003747_ACEOF
3748rm -f conftest$ac_exeext
3749if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3750 (eval $ac_link) 2>&5
3751 ac_status=$?
3752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3753 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3755 (eval $ac_try) 2>&5
3756 ac_status=$?
3757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3758 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003759 ac_cv_kpthread=yes
3760else
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 echo "$as_me: program exited with status $ac_status" >&5
3762echo "$as_me: failed program was:" >&5
3763cat conftest.$ac_ext >&5
3764( exit $ac_status )
3765ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003766fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003767rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003768fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003769CC="$ac_save_cc"
3770fi
3771
Martin v. Löwis11437992002-04-12 09:54:03 +00003772echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3773echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003774fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003775
Michael W. Hudson54241132001-12-07 15:38:26 +00003776
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003777# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003778echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3779echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3780if test "${ac_cv_header_stdc+set}" = set; then
3781 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003782else
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 cat >conftest.$ac_ext <<_ACEOF
3784#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003785#include "confdefs.h"
3786#include <stdlib.h>
3787#include <stdarg.h>
3788#include <string.h>
3789#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003790
3791_ACEOF
3792if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3793 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3794 ac_status=$?
3795 egrep -v '^ *\+' conftest.er1 >conftest.err
3796 rm -f conftest.er1
3797 cat conftest.err >&5
3798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3799 (exit $ac_status); } >/dev/null; then
3800 if test -s conftest.err; then
3801 ac_cpp_err=$ac_c_preproc_warn_flag
3802 else
3803 ac_cpp_err=
3804 fi
3805else
3806 ac_cpp_err=yes
3807fi
3808if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003809 ac_cv_header_stdc=yes
3810else
Martin v. Löwis11437992002-04-12 09:54:03 +00003811 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003812 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003813 ac_cv_header_stdc=no
3814fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003815rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003816
3817if test $ac_cv_header_stdc = yes; then
3818 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003819 cat >conftest.$ac_ext <<_ACEOF
3820#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003821#include "confdefs.h"
3822#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003823
3824_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3826 egrep "memchr" >/dev/null 2>&1; then
3827 :
3828else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003829 ac_cv_header_stdc=no
3830fi
3831rm -f conftest*
3832
3833fi
3834
3835if test $ac_cv_header_stdc = yes; then
3836 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003837 cat >conftest.$ac_ext <<_ACEOF
3838#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003839#include "confdefs.h"
3840#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003841
3842_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3844 egrep "free" >/dev/null 2>&1; then
3845 :
3846else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003847 ac_cv_header_stdc=no
3848fi
3849rm -f conftest*
3850
3851fi
3852
3853if test $ac_cv_header_stdc = yes; then
3854 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003855 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003856 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003857else
Martin v. Löwis11437992002-04-12 09:54:03 +00003858 cat >conftest.$ac_ext <<_ACEOF
3859#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003860#include "confdefs.h"
3861#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003862#if ((' ' & 0x0FF) == 0x020)
3863# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3864# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3865#else
3866# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3867 || ('j' <= (c) && (c) <= 'r') \
3868 || ('s' <= (c) && (c) <= 'z'))
3869# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3870#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003871
Martin v. Löwis11437992002-04-12 09:54:03 +00003872#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3873int
3874main ()
3875{
3876 int i;
3877 for (i = 0; i < 256; i++)
3878 if (XOR (islower (i), ISLOWER (i))
3879 || toupper (i) != TOUPPER (i))
3880 exit(2);
3881 exit (0);
3882}
3883_ACEOF
3884rm -f conftest$ac_exeext
3885if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3886 (eval $ac_link) 2>&5
3887 ac_status=$?
3888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3889 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3891 (eval $ac_try) 2>&5
3892 ac_status=$?
3893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3894 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003895 :
3896else
Martin v. Löwis11437992002-04-12 09:54:03 +00003897 echo "$as_me: program exited with status $ac_status" >&5
3898echo "$as_me: failed program was:" >&5
3899cat conftest.$ac_ext >&5
3900( exit $ac_status )
3901ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003902fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003903rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003904fi
3905fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003906fi
3907echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3908echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003909if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003910
3911cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003912#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003913_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003914
3915fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003916
Martin v. Löwis11437992002-04-12 09:54:03 +00003917
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
3952
3953
Martin v. Löwis11437992002-04-12 09:54:03 +00003954for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003955libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003956signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003957sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003958sys/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 +00003959sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003960sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003961do
Martin v. Löwis11437992002-04-12 09:54:03 +00003962as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3963if eval "test \"\${$as_ac_Header+set}\" = set"; then
3964 echo "$as_me:$LINENO: checking for $ac_header" >&5
3965echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3966if eval "test \"\${$as_ac_Header+set}\" = set"; then
3967 echo $ECHO_N "(cached) $ECHO_C" >&6
3968fi
3969echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3970echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003971else
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 # Is the header compilable?
3973echo "$as_me:$LINENO: checking $ac_header usability" >&5
3974echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3975cat >conftest.$ac_ext <<_ACEOF
3976#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003977#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003978$ac_includes_default
3979#include <$ac_header>
3980_ACEOF
3981rm -f conftest.$ac_objext
3982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3983 (eval $ac_compile) 2>&5
3984 ac_status=$?
3985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3986 (exit $ac_status); } &&
3987 { ac_try='test -s conftest.$ac_objext'
3988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3989 (eval $ac_try) 2>&5
3990 ac_status=$?
3991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3992 (exit $ac_status); }; }; then
3993 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003994else
Martin v. Löwis11437992002-04-12 09:54:03 +00003995 echo "$as_me: failed program was:" >&5
3996cat conftest.$ac_ext >&5
3997ac_header_compiler=no
3998fi
3999rm -f conftest.$ac_objext conftest.$ac_ext
4000echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4001echo "${ECHO_T}$ac_header_compiler" >&6
4002
4003# Is the header present?
4004echo "$as_me:$LINENO: checking $ac_header presence" >&5
4005echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4006cat >conftest.$ac_ext <<_ACEOF
4007#line $LINENO "configure"
4008#include "confdefs.h"
4009#include <$ac_header>
4010_ACEOF
4011if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4012 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4013 ac_status=$?
4014 egrep -v '^ *\+' conftest.er1 >conftest.err
4015 rm -f conftest.er1
4016 cat conftest.err >&5
4017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4018 (exit $ac_status); } >/dev/null; then
4019 if test -s conftest.err; then
4020 ac_cpp_err=$ac_c_preproc_warn_flag
4021 else
4022 ac_cpp_err=
4023 fi
4024else
4025 ac_cpp_err=yes
4026fi
4027if test -z "$ac_cpp_err"; then
4028 ac_header_preproc=yes
4029else
4030 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004031 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004032 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004033fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004034rm -f conftest.err conftest.$ac_ext
4035echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4036echo "${ECHO_T}$ac_header_preproc" >&6
4037
4038# So? What about this header?
4039case $ac_header_compiler:$ac_header_preproc in
4040 yes:no )
4041 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4042echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4043 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4044echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4045 no:yes )
4046 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4047echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4048 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4049echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4050 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4051echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4052esac
4053echo "$as_me:$LINENO: checking for $ac_header" >&5
4054echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4055if eval "test \"\${$as_ac_Header+set}\" = set"; then
4056 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004057else
Martin v. Löwis11437992002-04-12 09:54:03 +00004058 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004060echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4061echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4062
4063fi
4064if test `eval echo '${'$as_ac_Header'}'` = yes; then
4065 cat >>confdefs.h <<_ACEOF
4066#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4067_ACEOF
4068
4069fi
4070
Guido van Rossum627b2d71993-12-24 10:39:16 +00004071done
4072
Martin v. Löwis11437992002-04-12 09:54:03 +00004073
4074
4075
4076
4077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004078ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004079for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4080 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4081echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4082echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4083if eval "test \"\${$as_ac_Header+set}\" = set"; then
4084 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004085else
Martin v. Löwis11437992002-04-12 09:54:03 +00004086 cat >conftest.$ac_ext <<_ACEOF
4087#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004088#include "confdefs.h"
4089#include <sys/types.h>
4090#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004091
4092#ifdef F77_DUMMY_MAIN
4093# ifdef __cplusplus
4094 extern "C"
4095# endif
4096 int F77_DUMMY_MAIN() { return 1; }
4097#endif
4098int
4099main ()
4100{
4101if ((DIR *) 0)
4102return 0;
4103 ;
4104 return 0;
4105}
4106_ACEOF
4107rm -f conftest.$ac_objext
4108if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4109 (eval $ac_compile) 2>&5
4110 ac_status=$?
4111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4112 (exit $ac_status); } &&
4113 { ac_try='test -s conftest.$ac_objext'
4114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4115 (eval $ac_try) 2>&5
4116 ac_status=$?
4117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4118 (exit $ac_status); }; }; then
4119 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004120else
Martin v. Löwis11437992002-04-12 09:54:03 +00004121 echo "$as_me: failed program was:" >&5
4122cat conftest.$ac_ext >&5
4123eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004124fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004125rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004126fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004127echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4128echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4129if test `eval echo '${'$as_ac_Header'}'` = yes; then
4130 cat >>confdefs.h <<_ACEOF
4131#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4132_ACEOF
4133
4134ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004135fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004136
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004137done
4138# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4139if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004140 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4141echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4142if test "${ac_cv_search_opendir+set}" = set; then
4143 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004144else
Martin v. Löwis11437992002-04-12 09:54:03 +00004145 ac_func_search_save_LIBS=$LIBS
4146ac_cv_search_opendir=no
4147cat >conftest.$ac_ext <<_ACEOF
4148#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004150
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004151/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004152#ifdef __cplusplus
4153extern "C"
4154#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004155/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004156 builtin and then its argument prototype would still apply. */
4157char opendir ();
4158#ifdef F77_DUMMY_MAIN
4159# ifdef __cplusplus
4160 extern "C"
4161# endif
4162 int F77_DUMMY_MAIN() { return 1; }
4163#endif
4164int
4165main ()
4166{
4167opendir ();
4168 ;
4169 return 0;
4170}
4171_ACEOF
4172rm -f conftest.$ac_objext conftest$ac_exeext
4173if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4174 (eval $ac_link) 2>&5
4175 ac_status=$?
4176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4177 (exit $ac_status); } &&
4178 { ac_try='test -s conftest$ac_exeext'
4179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4180 (eval $ac_try) 2>&5
4181 ac_status=$?
4182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4183 (exit $ac_status); }; }; then
4184 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004185else
Martin v. Löwis11437992002-04-12 09:54:03 +00004186 echo "$as_me: failed program was:" >&5
4187cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004188fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004189rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4190if test "$ac_cv_search_opendir" = no; then
4191 for ac_lib in dir; do
4192 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4193 cat >conftest.$ac_ext <<_ACEOF
4194#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004195#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004196
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004197/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004198#ifdef __cplusplus
4199extern "C"
4200#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004201/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 builtin and then its argument prototype would still apply. */
4203char opendir ();
4204#ifdef F77_DUMMY_MAIN
4205# ifdef __cplusplus
4206 extern "C"
4207# endif
4208 int F77_DUMMY_MAIN() { return 1; }
4209#endif
4210int
4211main ()
4212{
4213opendir ();
4214 ;
4215 return 0;
4216}
4217_ACEOF
4218rm -f conftest.$ac_objext conftest$ac_exeext
4219if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4220 (eval $ac_link) 2>&5
4221 ac_status=$?
4222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4223 (exit $ac_status); } &&
4224 { ac_try='test -s conftest$ac_exeext'
4225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4226 (eval $ac_try) 2>&5
4227 ac_status=$?
4228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4229 (exit $ac_status); }; }; then
4230 ac_cv_search_opendir="-l$ac_lib"
4231break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232else
Martin v. Löwis11437992002-04-12 09:54:03 +00004233 echo "$as_me: failed program was:" >&5
4234cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004235fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004236rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4237 done
4238fi
4239LIBS=$ac_func_search_save_LIBS
4240fi
4241echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4242echo "${ECHO_T}$ac_cv_search_opendir" >&6
4243if test "$ac_cv_search_opendir" != no; then
4244 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004245
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004246fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004247
Michael W. Hudson54241132001-12-07 15:38:26 +00004248else
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4250echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4251if test "${ac_cv_search_opendir+set}" = set; then
4252 echo $ECHO_N "(cached) $ECHO_C" >&6
4253else
4254 ac_func_search_save_LIBS=$LIBS
4255ac_cv_search_opendir=no
4256cat >conftest.$ac_ext <<_ACEOF
4257#line $LINENO "configure"
4258#include "confdefs.h"
4259
4260/* Override any gcc2 internal prototype to avoid an error. */
4261#ifdef __cplusplus
4262extern "C"
4263#endif
4264/* We use char because int might match the return type of a gcc2
4265 builtin and then its argument prototype would still apply. */
4266char opendir ();
4267#ifdef F77_DUMMY_MAIN
4268# ifdef __cplusplus
4269 extern "C"
4270# endif
4271 int F77_DUMMY_MAIN() { return 1; }
4272#endif
4273int
4274main ()
4275{
4276opendir ();
4277 ;
4278 return 0;
4279}
4280_ACEOF
4281rm -f conftest.$ac_objext conftest$ac_exeext
4282if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4283 (eval $ac_link) 2>&5
4284 ac_status=$?
4285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4286 (exit $ac_status); } &&
4287 { ac_try='test -s conftest$ac_exeext'
4288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4289 (eval $ac_try) 2>&5
4290 ac_status=$?
4291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4292 (exit $ac_status); }; }; then
4293 ac_cv_search_opendir="none required"
4294else
4295 echo "$as_me: failed program was:" >&5
4296cat conftest.$ac_ext >&5
4297fi
4298rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4299if test "$ac_cv_search_opendir" = no; then
4300 for ac_lib in x; do
4301 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4302 cat >conftest.$ac_ext <<_ACEOF
4303#line $LINENO "configure"
4304#include "confdefs.h"
4305
4306/* Override any gcc2 internal prototype to avoid an error. */
4307#ifdef __cplusplus
4308extern "C"
4309#endif
4310/* We use char because int might match the return type of a gcc2
4311 builtin and then its argument prototype would still apply. */
4312char opendir ();
4313#ifdef F77_DUMMY_MAIN
4314# ifdef __cplusplus
4315 extern "C"
4316# endif
4317 int F77_DUMMY_MAIN() { return 1; }
4318#endif
4319int
4320main ()
4321{
4322opendir ();
4323 ;
4324 return 0;
4325}
4326_ACEOF
4327rm -f conftest.$ac_objext conftest$ac_exeext
4328if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4329 (eval $ac_link) 2>&5
4330 ac_status=$?
4331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4332 (exit $ac_status); } &&
4333 { ac_try='test -s conftest$ac_exeext'
4334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4335 (eval $ac_try) 2>&5
4336 ac_status=$?
4337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4338 (exit $ac_status); }; }; then
4339 ac_cv_search_opendir="-l$ac_lib"
4340break
4341else
4342 echo "$as_me: failed program was:" >&5
4343cat conftest.$ac_ext >&5
4344fi
4345rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4346 done
4347fi
4348LIBS=$ac_func_search_save_LIBS
4349fi
4350echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4351echo "${ECHO_T}$ac_cv_search_opendir" >&6
4352if test "$ac_cv_search_opendir" != no; then
4353 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4354
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004355fi
4356
4357fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004358
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004359echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4360echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4361if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4362 echo $ECHO_N "(cached) $ECHO_C" >&6
4363else
4364 cat >conftest.$ac_ext <<_ACEOF
4365#line $LINENO "configure"
4366#include "confdefs.h"
4367#include <sys/types.h>
4368#ifdef F77_DUMMY_MAIN
4369# ifdef __cplusplus
4370 extern "C"
4371# endif
4372 int F77_DUMMY_MAIN() { return 1; }
4373#endif
4374int
4375main ()
4376{
4377return makedev(0, 0);
4378 ;
4379 return 0;
4380}
4381_ACEOF
4382rm -f conftest.$ac_objext conftest$ac_exeext
4383if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4384 (eval $ac_link) 2>&5
4385 ac_status=$?
4386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4387 (exit $ac_status); } &&
4388 { ac_try='test -s conftest$ac_exeext'
4389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4390 (eval $ac_try) 2>&5
4391 ac_status=$?
4392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4393 (exit $ac_status); }; }; then
4394 ac_cv_header_sys_types_h_makedev=yes
4395else
4396 echo "$as_me: failed program was:" >&5
4397cat conftest.$ac_ext >&5
4398ac_cv_header_sys_types_h_makedev=no
4399fi
4400rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4401
4402fi
4403echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4404echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4405
4406if test $ac_cv_header_sys_types_h_makedev = no; then
4407if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4408 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4409echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4410if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4411 echo $ECHO_N "(cached) $ECHO_C" >&6
4412fi
4413echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4414echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4415else
4416 # Is the header compilable?
4417echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4418echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4419cat >conftest.$ac_ext <<_ACEOF
4420#line $LINENO "configure"
4421#include "confdefs.h"
4422$ac_includes_default
4423#include <sys/mkdev.h>
4424_ACEOF
4425rm -f conftest.$ac_objext
4426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4427 (eval $ac_compile) 2>&5
4428 ac_status=$?
4429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4430 (exit $ac_status); } &&
4431 { ac_try='test -s conftest.$ac_objext'
4432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4433 (eval $ac_try) 2>&5
4434 ac_status=$?
4435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4436 (exit $ac_status); }; }; then
4437 ac_header_compiler=yes
4438else
4439 echo "$as_me: failed program was:" >&5
4440cat conftest.$ac_ext >&5
4441ac_header_compiler=no
4442fi
4443rm -f conftest.$ac_objext conftest.$ac_ext
4444echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4445echo "${ECHO_T}$ac_header_compiler" >&6
4446
4447# Is the header present?
4448echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4449echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4450cat >conftest.$ac_ext <<_ACEOF
4451#line $LINENO "configure"
4452#include "confdefs.h"
4453#include <sys/mkdev.h>
4454_ACEOF
4455if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4456 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4457 ac_status=$?
4458 egrep -v '^ *\+' conftest.er1 >conftest.err
4459 rm -f conftest.er1
4460 cat conftest.err >&5
4461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4462 (exit $ac_status); } >/dev/null; then
4463 if test -s conftest.err; then
4464 ac_cpp_err=$ac_c_preproc_warn_flag
4465 else
4466 ac_cpp_err=
4467 fi
4468else
4469 ac_cpp_err=yes
4470fi
4471if test -z "$ac_cpp_err"; then
4472 ac_header_preproc=yes
4473else
4474 echo "$as_me: failed program was:" >&5
4475 cat conftest.$ac_ext >&5
4476 ac_header_preproc=no
4477fi
4478rm -f conftest.err conftest.$ac_ext
4479echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4480echo "${ECHO_T}$ac_header_preproc" >&6
4481
4482# So? What about this header?
4483case $ac_header_compiler:$ac_header_preproc in
4484 yes:no )
4485 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4486echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4487 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4488echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4489 no:yes )
4490 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4491echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4492 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4493echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4494 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4495echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4496esac
4497echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4498echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4499if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4500 echo $ECHO_N "(cached) $ECHO_C" >&6
4501else
4502 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4503fi
4504echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4505echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4506
4507fi
4508if test $ac_cv_header_sys_mkdev_h = yes; then
4509
4510cat >>confdefs.h <<\_ACEOF
4511#define MAJOR_IN_MKDEV 1
4512_ACEOF
4513
4514fi
4515
4516
4517
4518 if test $ac_cv_header_sys_mkdev_h = no; then
4519 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4520 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4521echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4522if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4523 echo $ECHO_N "(cached) $ECHO_C" >&6
4524fi
4525echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4526echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4527else
4528 # Is the header compilable?
4529echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4530echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4531cat >conftest.$ac_ext <<_ACEOF
4532#line $LINENO "configure"
4533#include "confdefs.h"
4534$ac_includes_default
4535#include <sys/sysmacros.h>
4536_ACEOF
4537rm -f conftest.$ac_objext
4538if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4539 (eval $ac_compile) 2>&5
4540 ac_status=$?
4541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4542 (exit $ac_status); } &&
4543 { ac_try='test -s conftest.$ac_objext'
4544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4545 (eval $ac_try) 2>&5
4546 ac_status=$?
4547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4548 (exit $ac_status); }; }; then
4549 ac_header_compiler=yes
4550else
4551 echo "$as_me: failed program was:" >&5
4552cat conftest.$ac_ext >&5
4553ac_header_compiler=no
4554fi
4555rm -f conftest.$ac_objext conftest.$ac_ext
4556echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4557echo "${ECHO_T}$ac_header_compiler" >&6
4558
4559# Is the header present?
4560echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4561echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4562cat >conftest.$ac_ext <<_ACEOF
4563#line $LINENO "configure"
4564#include "confdefs.h"
4565#include <sys/sysmacros.h>
4566_ACEOF
4567if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4568 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4569 ac_status=$?
4570 egrep -v '^ *\+' conftest.er1 >conftest.err
4571 rm -f conftest.er1
4572 cat conftest.err >&5
4573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4574 (exit $ac_status); } >/dev/null; then
4575 if test -s conftest.err; then
4576 ac_cpp_err=$ac_c_preproc_warn_flag
4577 else
4578 ac_cpp_err=
4579 fi
4580else
4581 ac_cpp_err=yes
4582fi
4583if test -z "$ac_cpp_err"; then
4584 ac_header_preproc=yes
4585else
4586 echo "$as_me: failed program was:" >&5
4587 cat conftest.$ac_ext >&5
4588 ac_header_preproc=no
4589fi
4590rm -f conftest.err conftest.$ac_ext
4591echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4592echo "${ECHO_T}$ac_header_preproc" >&6
4593
4594# So? What about this header?
4595case $ac_header_compiler:$ac_header_preproc in
4596 yes:no )
4597 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4598echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4599 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4600echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4601 no:yes )
4602 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4603echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4604 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4605echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4606 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4607echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4608esac
4609echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4610echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4611if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4612 echo $ECHO_N "(cached) $ECHO_C" >&6
4613else
4614 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4615fi
4616echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4617echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4618
4619fi
4620if test $ac_cv_header_sys_sysmacros_h = yes; then
4621
4622cat >>confdefs.h <<\_ACEOF
4623#define MAJOR_IN_SYSMACROS 1
4624_ACEOF
4625
4626fi
4627
4628
4629 fi
4630fi
4631
Michael W. Hudson54241132001-12-07 15:38:26 +00004632
Guido van Rossum627b2d71993-12-24 10:39:16 +00004633# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004634was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004635echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4636echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4637cat >conftest.$ac_ext <<_ACEOF
4638#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004639#include "confdefs.h"
4640#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004641
4642_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004643if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4644 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004645 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004646else
Martin v. Löwis11437992002-04-12 09:54:03 +00004647
4648
4649cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004650#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004651_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004652
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004653
Guido van Rossum627b2d71993-12-24 10:39:16 +00004654fi
4655rm -f conftest*
4656
Martin v. Löwis11437992002-04-12 09:54:03 +00004657echo "$as_me:$LINENO: result: $was_it_defined" >&5
4658echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004659
Neal Norwitz11690112002-07-30 01:08:28 +00004660# Check whether using makedev requires defining _OSF_SOURCE
4661echo "$as_me:$LINENO: checking for makedev" >&5
4662echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4663cat >conftest.$ac_ext <<_ACEOF
4664#line $LINENO "configure"
4665#include "confdefs.h"
4666 #include <sys/types.h>
4667#ifdef F77_DUMMY_MAIN
4668# ifdef __cplusplus
4669 extern "C"
4670# endif
4671 int F77_DUMMY_MAIN() { return 1; }
4672#endif
4673int
4674main ()
4675{
4676 makedev(0, 0)
4677 ;
4678 return 0;
4679}
4680_ACEOF
4681rm -f conftest.$ac_objext conftest$ac_exeext
4682if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4683 (eval $ac_link) 2>&5
4684 ac_status=$?
4685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4686 (exit $ac_status); } &&
4687 { ac_try='test -s conftest$ac_exeext'
4688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4689 (eval $ac_try) 2>&5
4690 ac_status=$?
4691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4692 (exit $ac_status); }; }; then
4693 ac_cv_has_makedev=yes
4694else
4695 echo "$as_me: failed program was:" >&5
4696cat conftest.$ac_ext >&5
4697ac_cv_has_makedev=no
4698fi
4699rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4700if test "$ac_cv_has_makedev" = "no"; then
4701 # we didn't link, try if _OSF_SOURCE will allow us to link
4702 cat >conftest.$ac_ext <<_ACEOF
4703#line $LINENO "configure"
4704#include "confdefs.h"
4705
4706 #define _OSF_SOURCE 1
4707 #include <sys/types.h>
4708
4709#ifdef F77_DUMMY_MAIN
4710# ifdef __cplusplus
4711 extern "C"
4712# endif
4713 int F77_DUMMY_MAIN() { return 1; }
4714#endif
4715int
4716main ()
4717{
4718 makedev(0, 0)
4719 ;
4720 return 0;
4721}
4722_ACEOF
4723rm -f conftest.$ac_objext conftest$ac_exeext
4724if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4725 (eval $ac_link) 2>&5
4726 ac_status=$?
4727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4728 (exit $ac_status); } &&
4729 { ac_try='test -s conftest$ac_exeext'
4730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4731 (eval $ac_try) 2>&5
4732 ac_status=$?
4733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4734 (exit $ac_status); }; }; then
4735 ac_cv_has_makedev=yes
4736else
4737 echo "$as_me: failed program was:" >&5
4738cat conftest.$ac_ext >&5
4739ac_cv_has_makedev=no
4740fi
4741rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4742 if test "$ac_cv_has_makedev" = "yes"; then
4743
4744cat >>confdefs.h <<\_ACEOF
4745#define _OSF_SOURCE 1
4746_ACEOF
4747
4748 fi
4749fi
4750echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4751echo "${ECHO_T}$ac_cv_has_makedev" >&6
4752if test "$ac_cv_has_makedev" = "yes"; then
4753
4754cat >>confdefs.h <<\_ACEOF
4755#define HAVE_MAKEDEV 1
4756_ACEOF
4757
4758fi
4759
Martin v. Löwis399a6892002-10-04 10:22:02 +00004760# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4761# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4762# defined, but the compiler does not support pragma redefine_extname,
4763# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4764# structures (such as rlimit64) without declaring them. As a
4765# work-around, disable LFS on such configurations
4766
4767use_lfs=yes
4768echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4769echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4770cat >conftest.$ac_ext <<_ACEOF
4771#line $LINENO "configure"
4772#include "confdefs.h"
4773
4774#define _LARGEFILE_SOURCE 1
4775#define _FILE_OFFSET_BITS 64
4776#include <sys/resource.h>
4777
4778#ifdef F77_DUMMY_MAIN
4779# ifdef __cplusplus
4780 extern "C"
4781# endif
4782 int F77_DUMMY_MAIN() { return 1; }
4783#endif
4784int
4785main ()
4786{
4787struct rlimit foo;
4788 ;
4789 return 0;
4790}
4791_ACEOF
4792rm -f conftest.$ac_objext
4793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4794 (eval $ac_compile) 2>&5
4795 ac_status=$?
4796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4797 (exit $ac_status); } &&
4798 { ac_try='test -s conftest.$ac_objext'
4799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4800 (eval $ac_try) 2>&5
4801 ac_status=$?
4802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4803 (exit $ac_status); }; }; then
4804 sol_lfs_bug=no
4805else
4806 echo "$as_me: failed program was:" >&5
4807cat conftest.$ac_ext >&5
4808sol_lfs_bug=yes
4809fi
4810rm -f conftest.$ac_objext conftest.$ac_ext
4811echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4812echo "${ECHO_T}$sol_lfs_bug" >&6
4813if test "$sol_lfs_bug" = "yes"; then
4814 use_lfs=no
4815fi
4816
4817if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004818# Two defines needed to enable largefile support on various platforms
4819# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004820
Martin v. Löwis11437992002-04-12 09:54:03 +00004821cat >>confdefs.h <<\_ACEOF
4822#define _LARGEFILE_SOURCE 1
4823_ACEOF
4824
4825
4826cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004827#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004828_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004829
Martin v. Löwis399a6892002-10-04 10:22:02 +00004830fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004831
Guido van Rossum84e7b241996-08-19 21:59:00 +00004832# Add some code to confdefs.h so that the test for off_t works on SCO
4833cat >> confdefs.h <<\EOF
4834#if defined(SCO_DS)
4835#undef _OFF_T
4836#endif
4837EOF
4838
Guido van Rossumef2255b2000-03-10 22:30:29 +00004839# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004840echo "$as_me:$LINENO: checking for mode_t" >&5
4841echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4842if test "${ac_cv_type_mode_t+set}" = set; then
4843 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004844else
Martin v. Löwis11437992002-04-12 09:54:03 +00004845 cat >conftest.$ac_ext <<_ACEOF
4846#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004847#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004848$ac_includes_default
4849#ifdef F77_DUMMY_MAIN
4850# ifdef __cplusplus
4851 extern "C"
4852# endif
4853 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004854#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004855int
4856main ()
4857{
4858if ((mode_t *) 0)
4859 return 0;
4860if (sizeof (mode_t))
4861 return 0;
4862 ;
4863 return 0;
4864}
4865_ACEOF
4866rm -f conftest.$ac_objext
4867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4868 (eval $ac_compile) 2>&5
4869 ac_status=$?
4870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4871 (exit $ac_status); } &&
4872 { ac_try='test -s conftest.$ac_objext'
4873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4874 (eval $ac_try) 2>&5
4875 ac_status=$?
4876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4877 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004878 ac_cv_type_mode_t=yes
4879else
Martin v. Löwis11437992002-04-12 09:54:03 +00004880 echo "$as_me: failed program was:" >&5
4881cat conftest.$ac_ext >&5
4882ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004883fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004884rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004885fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004886echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4887echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4888if test $ac_cv_type_mode_t = yes; then
4889 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004890else
Martin v. Löwis11437992002-04-12 09:54:03 +00004891
4892cat >>confdefs.h <<_ACEOF
4893#define mode_t int
4894_ACEOF
4895
4896fi
4897
4898echo "$as_me:$LINENO: checking for off_t" >&5
4899echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4900if test "${ac_cv_type_off_t+set}" = set; then
4901 echo $ECHO_N "(cached) $ECHO_C" >&6
4902else
4903 cat >conftest.$ac_ext <<_ACEOF
4904#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004905#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004906$ac_includes_default
4907#ifdef F77_DUMMY_MAIN
4908# ifdef __cplusplus
4909 extern "C"
4910# endif
4911 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004913int
4914main ()
4915{
4916if ((off_t *) 0)
4917 return 0;
4918if (sizeof (off_t))
4919 return 0;
4920 ;
4921 return 0;
4922}
4923_ACEOF
4924rm -f conftest.$ac_objext
4925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4926 (eval $ac_compile) 2>&5
4927 ac_status=$?
4928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4929 (exit $ac_status); } &&
4930 { ac_try='test -s conftest.$ac_objext'
4931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4932 (eval $ac_try) 2>&5
4933 ac_status=$?
4934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4935 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004936 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004937else
Martin v. Löwis11437992002-04-12 09:54:03 +00004938 echo "$as_me: failed program was:" >&5
4939cat conftest.$ac_ext >&5
4940ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004941fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004942rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004943fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004944echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4945echo "${ECHO_T}$ac_cv_type_off_t" >&6
4946if test $ac_cv_type_off_t = yes; then
4947 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004948else
Martin v. Löwis11437992002-04-12 09:54:03 +00004949
4950cat >>confdefs.h <<_ACEOF
4951#define off_t long
4952_ACEOF
4953
4954fi
4955
4956echo "$as_me:$LINENO: checking for pid_t" >&5
4957echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4958if test "${ac_cv_type_pid_t+set}" = set; then
4959 echo $ECHO_N "(cached) $ECHO_C" >&6
4960else
4961 cat >conftest.$ac_ext <<_ACEOF
4962#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004963#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004964$ac_includes_default
4965#ifdef F77_DUMMY_MAIN
4966# ifdef __cplusplus
4967 extern "C"
4968# endif
4969 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004970#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004971int
4972main ()
4973{
4974if ((pid_t *) 0)
4975 return 0;
4976if (sizeof (pid_t))
4977 return 0;
4978 ;
4979 return 0;
4980}
4981_ACEOF
4982rm -f conftest.$ac_objext
4983if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4984 (eval $ac_compile) 2>&5
4985 ac_status=$?
4986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4987 (exit $ac_status); } &&
4988 { ac_try='test -s conftest.$ac_objext'
4989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4990 (eval $ac_try) 2>&5
4991 ac_status=$?
4992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4993 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004994 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004995else
Martin v. Löwis11437992002-04-12 09:54:03 +00004996 echo "$as_me: failed program was:" >&5
4997cat conftest.$ac_ext >&5
4998ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004999fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005000rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005001fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005002echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5003echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5004if test $ac_cv_type_pid_t = yes; then
5005 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005006else
Martin v. Löwis11437992002-04-12 09:54:03 +00005007
5008cat >>confdefs.h <<_ACEOF
5009#define pid_t int
5010_ACEOF
5011
5012fi
5013
5014echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5015echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5016if test "${ac_cv_type_signal+set}" = set; then
5017 echo $ECHO_N "(cached) $ECHO_C" >&6
5018else
5019 cat >conftest.$ac_ext <<_ACEOF
5020#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005021#include "confdefs.h"
5022#include <sys/types.h>
5023#include <signal.h>
5024#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005025# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005026#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005027#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005028extern "C" void (*signal (int, void (*)(int)))(int);
5029#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005030void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005031#endif
5032
Martin v. Löwis11437992002-04-12 09:54:03 +00005033#ifdef F77_DUMMY_MAIN
5034# ifdef __cplusplus
5035 extern "C"
5036# endif
5037 int F77_DUMMY_MAIN() { return 1; }
5038#endif
5039int
5040main ()
5041{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005042int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005043 ;
5044 return 0;
5045}
5046_ACEOF
5047rm -f conftest.$ac_objext
5048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5049 (eval $ac_compile) 2>&5
5050 ac_status=$?
5051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5052 (exit $ac_status); } &&
5053 { ac_try='test -s conftest.$ac_objext'
5054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5055 (eval $ac_try) 2>&5
5056 ac_status=$?
5057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5058 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005059 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005060else
Martin v. Löwis11437992002-04-12 09:54:03 +00005061 echo "$as_me: failed program was:" >&5
5062cat conftest.$ac_ext >&5
5063ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005064fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005065rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005066fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005067echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5068echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005069
Martin v. Löwis11437992002-04-12 09:54:03 +00005070cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005071#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005072_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005073
Michael W. Hudson54241132001-12-07 15:38:26 +00005074
Martin v. Löwis11437992002-04-12 09:54:03 +00005075echo "$as_me:$LINENO: checking for size_t" >&5
5076echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5077if test "${ac_cv_type_size_t+set}" = set; then
5078 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005079else
Martin v. Löwis11437992002-04-12 09:54:03 +00005080 cat >conftest.$ac_ext <<_ACEOF
5081#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005082#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005083$ac_includes_default
5084#ifdef F77_DUMMY_MAIN
5085# ifdef __cplusplus
5086 extern "C"
5087# endif
5088 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005089#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005090int
5091main ()
5092{
5093if ((size_t *) 0)
5094 return 0;
5095if (sizeof (size_t))
5096 return 0;
5097 ;
5098 return 0;
5099}
5100_ACEOF
5101rm -f conftest.$ac_objext
5102if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5103 (eval $ac_compile) 2>&5
5104 ac_status=$?
5105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5106 (exit $ac_status); } &&
5107 { ac_try='test -s conftest.$ac_objext'
5108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5109 (eval $ac_try) 2>&5
5110 ac_status=$?
5111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5112 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005113 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005114else
Martin v. Löwis11437992002-04-12 09:54:03 +00005115 echo "$as_me: failed program was:" >&5
5116cat conftest.$ac_ext >&5
5117ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005118fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005119rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005120fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005121echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5122echo "${ECHO_T}$ac_cv_type_size_t" >&6
5123if test $ac_cv_type_size_t = yes; then
5124 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005125else
Martin v. Löwis11437992002-04-12 09:54:03 +00005126
5127cat >>confdefs.h <<_ACEOF
5128#define size_t unsigned
5129_ACEOF
5130
5131fi
5132
5133echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5134echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5135if test "${ac_cv_type_uid_t+set}" = set; then
5136 echo $ECHO_N "(cached) $ECHO_C" >&6
5137else
5138 cat >conftest.$ac_ext <<_ACEOF
5139#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005140#include "confdefs.h"
5141#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005142
5143_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005144if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5145 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005146 ac_cv_type_uid_t=yes
5147else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005148 ac_cv_type_uid_t=no
5149fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005150rm -f conftest*
5151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005152fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005153echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5154echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005155if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005156
Martin v. Löwis11437992002-04-12 09:54:03 +00005157cat >>confdefs.h <<\_ACEOF
5158#define uid_t int
5159_ACEOF
5160
5161
5162cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005163#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005164_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005165
5166fi
5167
Jack Jansendd19cf82001-12-06 22:36:17 +00005168
Michael W. Hudson54241132001-12-07 15:38:26 +00005169# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005170echo "$as_me:$LINENO: checking for int" >&5
5171echo $ECHO_N "checking for int... $ECHO_C" >&6
5172if test "${ac_cv_type_int+set}" = set; then
5173 echo $ECHO_N "(cached) $ECHO_C" >&6
5174else
5175 cat >conftest.$ac_ext <<_ACEOF
5176#line $LINENO "configure"
5177#include "confdefs.h"
5178$ac_includes_default
5179#ifdef F77_DUMMY_MAIN
5180# ifdef __cplusplus
5181 extern "C"
5182# endif
5183 int F77_DUMMY_MAIN() { return 1; }
5184#endif
5185int
5186main ()
5187{
5188if ((int *) 0)
5189 return 0;
5190if (sizeof (int))
5191 return 0;
5192 ;
5193 return 0;
5194}
5195_ACEOF
5196rm -f conftest.$ac_objext
5197if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5198 (eval $ac_compile) 2>&5
5199 ac_status=$?
5200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5201 (exit $ac_status); } &&
5202 { ac_try='test -s conftest.$ac_objext'
5203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5204 (eval $ac_try) 2>&5
5205 ac_status=$?
5206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5207 (exit $ac_status); }; }; then
5208 ac_cv_type_int=yes
5209else
5210 echo "$as_me: failed program was:" >&5
5211cat conftest.$ac_ext >&5
5212ac_cv_type_int=no
5213fi
5214rm -f conftest.$ac_objext conftest.$ac_ext
5215fi
5216echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5217echo "${ECHO_T}$ac_cv_type_int" >&6
5218
5219echo "$as_me:$LINENO: checking size of int" >&5
5220echo $ECHO_N "checking size of int... $ECHO_C" >&6
5221if test "${ac_cv_sizeof_int+set}" = set; then
5222 echo $ECHO_N "(cached) $ECHO_C" >&6
5223else
5224 if test "$ac_cv_type_int" = yes; then
5225 # The cast to unsigned long works around a bug in the HP C Compiler
5226 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5227 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5228 # This bug is HP SR number 8606223364.
5229 if test "$cross_compiling" = yes; then
5230 # Depending upon the size, compute the lo and hi bounds.
5231cat >conftest.$ac_ext <<_ACEOF
5232#line $LINENO "configure"
5233#include "confdefs.h"
5234$ac_includes_default
5235#ifdef F77_DUMMY_MAIN
5236# ifdef __cplusplus
5237 extern "C"
5238# endif
5239 int F77_DUMMY_MAIN() { return 1; }
5240#endif
5241int
5242main ()
5243{
5244static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5245test_array [0] = 0
5246
5247 ;
5248 return 0;
5249}
5250_ACEOF
5251rm -f conftest.$ac_objext
5252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5253 (eval $ac_compile) 2>&5
5254 ac_status=$?
5255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5256 (exit $ac_status); } &&
5257 { ac_try='test -s conftest.$ac_objext'
5258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5259 (eval $ac_try) 2>&5
5260 ac_status=$?
5261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5262 (exit $ac_status); }; }; then
5263 ac_lo=0 ac_mid=0
5264 while :; do
5265 cat >conftest.$ac_ext <<_ACEOF
5266#line $LINENO "configure"
5267#include "confdefs.h"
5268$ac_includes_default
5269#ifdef F77_DUMMY_MAIN
5270# ifdef __cplusplus
5271 extern "C"
5272# endif
5273 int F77_DUMMY_MAIN() { return 1; }
5274#endif
5275int
5276main ()
5277{
5278static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5279test_array [0] = 0
5280
5281 ;
5282 return 0;
5283}
5284_ACEOF
5285rm -f conftest.$ac_objext
5286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5287 (eval $ac_compile) 2>&5
5288 ac_status=$?
5289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5290 (exit $ac_status); } &&
5291 { ac_try='test -s conftest.$ac_objext'
5292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5293 (eval $ac_try) 2>&5
5294 ac_status=$?
5295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5296 (exit $ac_status); }; }; then
5297 ac_hi=$ac_mid; break
5298else
5299 echo "$as_me: failed program was:" >&5
5300cat conftest.$ac_ext >&5
5301ac_lo=`expr $ac_mid + 1`
5302 if test $ac_lo -le $ac_mid; then
5303 ac_lo= ac_hi=
5304 break
5305 fi
5306 ac_mid=`expr 2 '*' $ac_mid + 1`
5307fi
5308rm -f conftest.$ac_objext conftest.$ac_ext
5309 done
5310else
5311 echo "$as_me: failed program was:" >&5
5312cat conftest.$ac_ext >&5
5313cat >conftest.$ac_ext <<_ACEOF
5314#line $LINENO "configure"
5315#include "confdefs.h"
5316$ac_includes_default
5317#ifdef F77_DUMMY_MAIN
5318# ifdef __cplusplus
5319 extern "C"
5320# endif
5321 int F77_DUMMY_MAIN() { return 1; }
5322#endif
5323int
5324main ()
5325{
5326static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5327test_array [0] = 0
5328
5329 ;
5330 return 0;
5331}
5332_ACEOF
5333rm -f conftest.$ac_objext
5334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5335 (eval $ac_compile) 2>&5
5336 ac_status=$?
5337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5338 (exit $ac_status); } &&
5339 { ac_try='test -s conftest.$ac_objext'
5340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5341 (eval $ac_try) 2>&5
5342 ac_status=$?
5343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5344 (exit $ac_status); }; }; then
5345 ac_hi=-1 ac_mid=-1
5346 while :; do
5347 cat >conftest.$ac_ext <<_ACEOF
5348#line $LINENO "configure"
5349#include "confdefs.h"
5350$ac_includes_default
5351#ifdef F77_DUMMY_MAIN
5352# ifdef __cplusplus
5353 extern "C"
5354# endif
5355 int F77_DUMMY_MAIN() { return 1; }
5356#endif
5357int
5358main ()
5359{
5360static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5361test_array [0] = 0
5362
5363 ;
5364 return 0;
5365}
5366_ACEOF
5367rm -f conftest.$ac_objext
5368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5369 (eval $ac_compile) 2>&5
5370 ac_status=$?
5371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5372 (exit $ac_status); } &&
5373 { ac_try='test -s conftest.$ac_objext'
5374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5375 (eval $ac_try) 2>&5
5376 ac_status=$?
5377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5378 (exit $ac_status); }; }; then
5379 ac_lo=$ac_mid; break
5380else
5381 echo "$as_me: failed program was:" >&5
5382cat conftest.$ac_ext >&5
5383ac_hi=`expr '(' $ac_mid ')' - 1`
5384 if test $ac_mid -le $ac_hi; then
5385 ac_lo= ac_hi=
5386 break
5387 fi
5388 ac_mid=`expr 2 '*' $ac_mid`
5389fi
5390rm -f conftest.$ac_objext conftest.$ac_ext
5391 done
5392else
5393 echo "$as_me: failed program was:" >&5
5394cat conftest.$ac_ext >&5
5395ac_lo= ac_hi=
5396fi
5397rm -f conftest.$ac_objext conftest.$ac_ext
5398fi
5399rm -f conftest.$ac_objext conftest.$ac_ext
5400# Binary search between lo and hi bounds.
5401while test "x$ac_lo" != "x$ac_hi"; do
5402 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5403 cat >conftest.$ac_ext <<_ACEOF
5404#line $LINENO "configure"
5405#include "confdefs.h"
5406$ac_includes_default
5407#ifdef F77_DUMMY_MAIN
5408# ifdef __cplusplus
5409 extern "C"
5410# endif
5411 int F77_DUMMY_MAIN() { return 1; }
5412#endif
5413int
5414main ()
5415{
5416static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5417test_array [0] = 0
5418
5419 ;
5420 return 0;
5421}
5422_ACEOF
5423rm -f conftest.$ac_objext
5424if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5425 (eval $ac_compile) 2>&5
5426 ac_status=$?
5427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5428 (exit $ac_status); } &&
5429 { ac_try='test -s conftest.$ac_objext'
5430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5431 (eval $ac_try) 2>&5
5432 ac_status=$?
5433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5434 (exit $ac_status); }; }; then
5435 ac_hi=$ac_mid
5436else
5437 echo "$as_me: failed program was:" >&5
5438cat conftest.$ac_ext >&5
5439ac_lo=`expr '(' $ac_mid ')' + 1`
5440fi
5441rm -f conftest.$ac_objext conftest.$ac_ext
5442done
5443case $ac_lo in
5444?*) ac_cv_sizeof_int=$ac_lo;;
5445'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5446echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5447 { (exit 1); exit 1; }; } ;;
5448esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005449else
5450 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005451 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5452echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5453 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005454else
Martin v. Löwis11437992002-04-12 09:54:03 +00005455 cat >conftest.$ac_ext <<_ACEOF
5456#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005457#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005458$ac_includes_default
5459long longval () { return (long) (sizeof (int)); }
5460unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005461#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005462#include <stdlib.h>
5463#ifdef F77_DUMMY_MAIN
5464# ifdef __cplusplus
5465 extern "C"
5466# endif
5467 int F77_DUMMY_MAIN() { return 1; }
5468#endif
5469int
5470main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005471{
Martin v. Löwis11437992002-04-12 09:54:03 +00005472
5473 FILE *f = fopen ("conftest.val", "w");
5474 if (! f)
5475 exit (1);
5476 if (((long) (sizeof (int))) < 0)
5477 {
5478 long i = longval ();
5479 if (i != ((long) (sizeof (int))))
5480 exit (1);
5481 fprintf (f, "%ld\n", i);
5482 }
5483 else
5484 {
5485 unsigned long i = ulongval ();
5486 if (i != ((long) (sizeof (int))))
5487 exit (1);
5488 fprintf (f, "%lu\n", i);
5489 }
5490 exit (ferror (f) || fclose (f) != 0);
5491
5492 ;
5493 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005494}
Martin v. Löwis11437992002-04-12 09:54:03 +00005495_ACEOF
5496rm -f conftest$ac_exeext
5497if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5498 (eval $ac_link) 2>&5
5499 ac_status=$?
5500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5501 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5503 (eval $ac_try) 2>&5
5504 ac_status=$?
5505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5506 (exit $ac_status); }; }; then
5507 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005508else
Martin v. Löwis11437992002-04-12 09:54:03 +00005509 echo "$as_me: program exited with status $ac_status" >&5
5510echo "$as_me: failed program was:" >&5
5511cat conftest.$ac_ext >&5
5512( exit $ac_status )
5513{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5514echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5515 { (exit 1); exit 1; }; }
5516fi
5517rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5518fi
5519fi
5520rm -f conftest.val
5521else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005522 ac_cv_sizeof_int=0
5523fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005524fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005525echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5526echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5527cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005528#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005529_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005530
5531
Martin v. Löwis11437992002-04-12 09:54:03 +00005532echo "$as_me:$LINENO: checking for long" >&5
5533echo $ECHO_N "checking for long... $ECHO_C" >&6
5534if test "${ac_cv_type_long+set}" = set; then
5535 echo $ECHO_N "(cached) $ECHO_C" >&6
5536else
5537 cat >conftest.$ac_ext <<_ACEOF
5538#line $LINENO "configure"
5539#include "confdefs.h"
5540$ac_includes_default
5541#ifdef F77_DUMMY_MAIN
5542# ifdef __cplusplus
5543 extern "C"
5544# endif
5545 int F77_DUMMY_MAIN() { return 1; }
5546#endif
5547int
5548main ()
5549{
5550if ((long *) 0)
5551 return 0;
5552if (sizeof (long))
5553 return 0;
5554 ;
5555 return 0;
5556}
5557_ACEOF
5558rm -f conftest.$ac_objext
5559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5560 (eval $ac_compile) 2>&5
5561 ac_status=$?
5562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5563 (exit $ac_status); } &&
5564 { ac_try='test -s conftest.$ac_objext'
5565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5566 (eval $ac_try) 2>&5
5567 ac_status=$?
5568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5569 (exit $ac_status); }; }; then
5570 ac_cv_type_long=yes
5571else
5572 echo "$as_me: failed program was:" >&5
5573cat conftest.$ac_ext >&5
5574ac_cv_type_long=no
5575fi
5576rm -f conftest.$ac_objext conftest.$ac_ext
5577fi
5578echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5579echo "${ECHO_T}$ac_cv_type_long" >&6
5580
5581echo "$as_me:$LINENO: checking size of long" >&5
5582echo $ECHO_N "checking size of long... $ECHO_C" >&6
5583if test "${ac_cv_sizeof_long+set}" = set; then
5584 echo $ECHO_N "(cached) $ECHO_C" >&6
5585else
5586 if test "$ac_cv_type_long" = yes; then
5587 # The cast to unsigned long works around a bug in the HP C Compiler
5588 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5589 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5590 # This bug is HP SR number 8606223364.
5591 if test "$cross_compiling" = yes; then
5592 # Depending upon the size, compute the lo and hi bounds.
5593cat >conftest.$ac_ext <<_ACEOF
5594#line $LINENO "configure"
5595#include "confdefs.h"
5596$ac_includes_default
5597#ifdef F77_DUMMY_MAIN
5598# ifdef __cplusplus
5599 extern "C"
5600# endif
5601 int F77_DUMMY_MAIN() { return 1; }
5602#endif
5603int
5604main ()
5605{
5606static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5607test_array [0] = 0
5608
5609 ;
5610 return 0;
5611}
5612_ACEOF
5613rm -f conftest.$ac_objext
5614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5615 (eval $ac_compile) 2>&5
5616 ac_status=$?
5617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5618 (exit $ac_status); } &&
5619 { ac_try='test -s conftest.$ac_objext'
5620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5621 (eval $ac_try) 2>&5
5622 ac_status=$?
5623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5624 (exit $ac_status); }; }; then
5625 ac_lo=0 ac_mid=0
5626 while :; do
5627 cat >conftest.$ac_ext <<_ACEOF
5628#line $LINENO "configure"
5629#include "confdefs.h"
5630$ac_includes_default
5631#ifdef F77_DUMMY_MAIN
5632# ifdef __cplusplus
5633 extern "C"
5634# endif
5635 int F77_DUMMY_MAIN() { return 1; }
5636#endif
5637int
5638main ()
5639{
5640static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5641test_array [0] = 0
5642
5643 ;
5644 return 0;
5645}
5646_ACEOF
5647rm -f conftest.$ac_objext
5648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5649 (eval $ac_compile) 2>&5
5650 ac_status=$?
5651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5652 (exit $ac_status); } &&
5653 { ac_try='test -s conftest.$ac_objext'
5654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5655 (eval $ac_try) 2>&5
5656 ac_status=$?
5657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5658 (exit $ac_status); }; }; then
5659 ac_hi=$ac_mid; break
5660else
5661 echo "$as_me: failed program was:" >&5
5662cat conftest.$ac_ext >&5
5663ac_lo=`expr $ac_mid + 1`
5664 if test $ac_lo -le $ac_mid; then
5665 ac_lo= ac_hi=
5666 break
5667 fi
5668 ac_mid=`expr 2 '*' $ac_mid + 1`
5669fi
5670rm -f conftest.$ac_objext conftest.$ac_ext
5671 done
5672else
5673 echo "$as_me: failed program was:" >&5
5674cat conftest.$ac_ext >&5
5675cat >conftest.$ac_ext <<_ACEOF
5676#line $LINENO "configure"
5677#include "confdefs.h"
5678$ac_includes_default
5679#ifdef F77_DUMMY_MAIN
5680# ifdef __cplusplus
5681 extern "C"
5682# endif
5683 int F77_DUMMY_MAIN() { return 1; }
5684#endif
5685int
5686main ()
5687{
5688static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5689test_array [0] = 0
5690
5691 ;
5692 return 0;
5693}
5694_ACEOF
5695rm -f conftest.$ac_objext
5696if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5697 (eval $ac_compile) 2>&5
5698 ac_status=$?
5699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5700 (exit $ac_status); } &&
5701 { ac_try='test -s conftest.$ac_objext'
5702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5703 (eval $ac_try) 2>&5
5704 ac_status=$?
5705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5706 (exit $ac_status); }; }; then
5707 ac_hi=-1 ac_mid=-1
5708 while :; do
5709 cat >conftest.$ac_ext <<_ACEOF
5710#line $LINENO "configure"
5711#include "confdefs.h"
5712$ac_includes_default
5713#ifdef F77_DUMMY_MAIN
5714# ifdef __cplusplus
5715 extern "C"
5716# endif
5717 int F77_DUMMY_MAIN() { return 1; }
5718#endif
5719int
5720main ()
5721{
5722static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5723test_array [0] = 0
5724
5725 ;
5726 return 0;
5727}
5728_ACEOF
5729rm -f conftest.$ac_objext
5730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5731 (eval $ac_compile) 2>&5
5732 ac_status=$?
5733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5734 (exit $ac_status); } &&
5735 { ac_try='test -s conftest.$ac_objext'
5736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5737 (eval $ac_try) 2>&5
5738 ac_status=$?
5739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5740 (exit $ac_status); }; }; then
5741 ac_lo=$ac_mid; break
5742else
5743 echo "$as_me: failed program was:" >&5
5744cat conftest.$ac_ext >&5
5745ac_hi=`expr '(' $ac_mid ')' - 1`
5746 if test $ac_mid -le $ac_hi; then
5747 ac_lo= ac_hi=
5748 break
5749 fi
5750 ac_mid=`expr 2 '*' $ac_mid`
5751fi
5752rm -f conftest.$ac_objext conftest.$ac_ext
5753 done
5754else
5755 echo "$as_me: failed program was:" >&5
5756cat conftest.$ac_ext >&5
5757ac_lo= ac_hi=
5758fi
5759rm -f conftest.$ac_objext conftest.$ac_ext
5760fi
5761rm -f conftest.$ac_objext conftest.$ac_ext
5762# Binary search between lo and hi bounds.
5763while test "x$ac_lo" != "x$ac_hi"; do
5764 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5765 cat >conftest.$ac_ext <<_ACEOF
5766#line $LINENO "configure"
5767#include "confdefs.h"
5768$ac_includes_default
5769#ifdef F77_DUMMY_MAIN
5770# ifdef __cplusplus
5771 extern "C"
5772# endif
5773 int F77_DUMMY_MAIN() { return 1; }
5774#endif
5775int
5776main ()
5777{
5778static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5779test_array [0] = 0
5780
5781 ;
5782 return 0;
5783}
5784_ACEOF
5785rm -f conftest.$ac_objext
5786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5787 (eval $ac_compile) 2>&5
5788 ac_status=$?
5789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5790 (exit $ac_status); } &&
5791 { ac_try='test -s conftest.$ac_objext'
5792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5793 (eval $ac_try) 2>&5
5794 ac_status=$?
5795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5796 (exit $ac_status); }; }; then
5797 ac_hi=$ac_mid
5798else
5799 echo "$as_me: failed program was:" >&5
5800cat conftest.$ac_ext >&5
5801ac_lo=`expr '(' $ac_mid ')' + 1`
5802fi
5803rm -f conftest.$ac_objext conftest.$ac_ext
5804done
5805case $ac_lo in
5806?*) ac_cv_sizeof_long=$ac_lo;;
5807'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5808echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5809 { (exit 1); exit 1; }; } ;;
5810esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005811else
5812 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005813 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5814echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5815 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005816else
Martin v. Löwis11437992002-04-12 09:54:03 +00005817 cat >conftest.$ac_ext <<_ACEOF
5818#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005819#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005820$ac_includes_default
5821long longval () { return (long) (sizeof (long)); }
5822unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005823#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005824#include <stdlib.h>
5825#ifdef F77_DUMMY_MAIN
5826# ifdef __cplusplus
5827 extern "C"
5828# endif
5829 int F77_DUMMY_MAIN() { return 1; }
5830#endif
5831int
5832main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005833{
Martin v. Löwis11437992002-04-12 09:54:03 +00005834
5835 FILE *f = fopen ("conftest.val", "w");
5836 if (! f)
5837 exit (1);
5838 if (((long) (sizeof (long))) < 0)
5839 {
5840 long i = longval ();
5841 if (i != ((long) (sizeof (long))))
5842 exit (1);
5843 fprintf (f, "%ld\n", i);
5844 }
5845 else
5846 {
5847 unsigned long i = ulongval ();
5848 if (i != ((long) (sizeof (long))))
5849 exit (1);
5850 fprintf (f, "%lu\n", i);
5851 }
5852 exit (ferror (f) || fclose (f) != 0);
5853
5854 ;
5855 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005856}
Martin v. Löwis11437992002-04-12 09:54:03 +00005857_ACEOF
5858rm -f conftest$ac_exeext
5859if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5860 (eval $ac_link) 2>&5
5861 ac_status=$?
5862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5863 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5865 (eval $ac_try) 2>&5
5866 ac_status=$?
5867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5868 (exit $ac_status); }; }; then
5869 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005870else
Martin v. Löwis11437992002-04-12 09:54:03 +00005871 echo "$as_me: program exited with status $ac_status" >&5
5872echo "$as_me: failed program was:" >&5
5873cat conftest.$ac_ext >&5
5874( exit $ac_status )
5875{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5876echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5877 { (exit 1); exit 1; }; }
5878fi
5879rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5880fi
5881fi
5882rm -f conftest.val
5883else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005884 ac_cv_sizeof_long=0
5885fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005886fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005887echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5888echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5889cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005890#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005891_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005892
5893
Martin v. Löwis11437992002-04-12 09:54:03 +00005894echo "$as_me:$LINENO: checking for void *" >&5
5895echo $ECHO_N "checking for void *... $ECHO_C" >&6
5896if test "${ac_cv_type_void_p+set}" = set; then
5897 echo $ECHO_N "(cached) $ECHO_C" >&6
5898else
5899 cat >conftest.$ac_ext <<_ACEOF
5900#line $LINENO "configure"
5901#include "confdefs.h"
5902$ac_includes_default
5903#ifdef F77_DUMMY_MAIN
5904# ifdef __cplusplus
5905 extern "C"
5906# endif
5907 int F77_DUMMY_MAIN() { return 1; }
5908#endif
5909int
5910main ()
5911{
5912if ((void * *) 0)
5913 return 0;
5914if (sizeof (void *))
5915 return 0;
5916 ;
5917 return 0;
5918}
5919_ACEOF
5920rm -f conftest.$ac_objext
5921if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5922 (eval $ac_compile) 2>&5
5923 ac_status=$?
5924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5925 (exit $ac_status); } &&
5926 { ac_try='test -s conftest.$ac_objext'
5927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5928 (eval $ac_try) 2>&5
5929 ac_status=$?
5930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5931 (exit $ac_status); }; }; then
5932 ac_cv_type_void_p=yes
5933else
5934 echo "$as_me: failed program was:" >&5
5935cat conftest.$ac_ext >&5
5936ac_cv_type_void_p=no
5937fi
5938rm -f conftest.$ac_objext conftest.$ac_ext
5939fi
5940echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5941echo "${ECHO_T}$ac_cv_type_void_p" >&6
5942
5943echo "$as_me:$LINENO: checking size of void *" >&5
5944echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5945if test "${ac_cv_sizeof_void_p+set}" = set; then
5946 echo $ECHO_N "(cached) $ECHO_C" >&6
5947else
5948 if test "$ac_cv_type_void_p" = yes; then
5949 # The cast to unsigned long works around a bug in the HP C Compiler
5950 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5951 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5952 # This bug is HP SR number 8606223364.
5953 if test "$cross_compiling" = yes; then
5954 # Depending upon the size, compute the lo and hi bounds.
5955cat >conftest.$ac_ext <<_ACEOF
5956#line $LINENO "configure"
5957#include "confdefs.h"
5958$ac_includes_default
5959#ifdef F77_DUMMY_MAIN
5960# ifdef __cplusplus
5961 extern "C"
5962# endif
5963 int F77_DUMMY_MAIN() { return 1; }
5964#endif
5965int
5966main ()
5967{
5968static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5969test_array [0] = 0
5970
5971 ;
5972 return 0;
5973}
5974_ACEOF
5975rm -f conftest.$ac_objext
5976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5977 (eval $ac_compile) 2>&5
5978 ac_status=$?
5979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5980 (exit $ac_status); } &&
5981 { ac_try='test -s conftest.$ac_objext'
5982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5983 (eval $ac_try) 2>&5
5984 ac_status=$?
5985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5986 (exit $ac_status); }; }; then
5987 ac_lo=0 ac_mid=0
5988 while :; do
5989 cat >conftest.$ac_ext <<_ACEOF
5990#line $LINENO "configure"
5991#include "confdefs.h"
5992$ac_includes_default
5993#ifdef F77_DUMMY_MAIN
5994# ifdef __cplusplus
5995 extern "C"
5996# endif
5997 int F77_DUMMY_MAIN() { return 1; }
5998#endif
5999int
6000main ()
6001{
6002static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6003test_array [0] = 0
6004
6005 ;
6006 return 0;
6007}
6008_ACEOF
6009rm -f conftest.$ac_objext
6010if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6011 (eval $ac_compile) 2>&5
6012 ac_status=$?
6013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6014 (exit $ac_status); } &&
6015 { ac_try='test -s conftest.$ac_objext'
6016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6017 (eval $ac_try) 2>&5
6018 ac_status=$?
6019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6020 (exit $ac_status); }; }; then
6021 ac_hi=$ac_mid; break
6022else
6023 echo "$as_me: failed program was:" >&5
6024cat conftest.$ac_ext >&5
6025ac_lo=`expr $ac_mid + 1`
6026 if test $ac_lo -le $ac_mid; then
6027 ac_lo= ac_hi=
6028 break
6029 fi
6030 ac_mid=`expr 2 '*' $ac_mid + 1`
6031fi
6032rm -f conftest.$ac_objext conftest.$ac_ext
6033 done
6034else
6035 echo "$as_me: failed program was:" >&5
6036cat conftest.$ac_ext >&5
6037cat >conftest.$ac_ext <<_ACEOF
6038#line $LINENO "configure"
6039#include "confdefs.h"
6040$ac_includes_default
6041#ifdef F77_DUMMY_MAIN
6042# ifdef __cplusplus
6043 extern "C"
6044# endif
6045 int F77_DUMMY_MAIN() { return 1; }
6046#endif
6047int
6048main ()
6049{
6050static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6051test_array [0] = 0
6052
6053 ;
6054 return 0;
6055}
6056_ACEOF
6057rm -f conftest.$ac_objext
6058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6059 (eval $ac_compile) 2>&5
6060 ac_status=$?
6061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6062 (exit $ac_status); } &&
6063 { ac_try='test -s conftest.$ac_objext'
6064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6065 (eval $ac_try) 2>&5
6066 ac_status=$?
6067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6068 (exit $ac_status); }; }; then
6069 ac_hi=-1 ac_mid=-1
6070 while :; do
6071 cat >conftest.$ac_ext <<_ACEOF
6072#line $LINENO "configure"
6073#include "confdefs.h"
6074$ac_includes_default
6075#ifdef F77_DUMMY_MAIN
6076# ifdef __cplusplus
6077 extern "C"
6078# endif
6079 int F77_DUMMY_MAIN() { return 1; }
6080#endif
6081int
6082main ()
6083{
6084static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6085test_array [0] = 0
6086
6087 ;
6088 return 0;
6089}
6090_ACEOF
6091rm -f conftest.$ac_objext
6092if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6093 (eval $ac_compile) 2>&5
6094 ac_status=$?
6095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6096 (exit $ac_status); } &&
6097 { ac_try='test -s conftest.$ac_objext'
6098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6099 (eval $ac_try) 2>&5
6100 ac_status=$?
6101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6102 (exit $ac_status); }; }; then
6103 ac_lo=$ac_mid; break
6104else
6105 echo "$as_me: failed program was:" >&5
6106cat conftest.$ac_ext >&5
6107ac_hi=`expr '(' $ac_mid ')' - 1`
6108 if test $ac_mid -le $ac_hi; then
6109 ac_lo= ac_hi=
6110 break
6111 fi
6112 ac_mid=`expr 2 '*' $ac_mid`
6113fi
6114rm -f conftest.$ac_objext conftest.$ac_ext
6115 done
6116else
6117 echo "$as_me: failed program was:" >&5
6118cat conftest.$ac_ext >&5
6119ac_lo= ac_hi=
6120fi
6121rm -f conftest.$ac_objext conftest.$ac_ext
6122fi
6123rm -f conftest.$ac_objext conftest.$ac_ext
6124# Binary search between lo and hi bounds.
6125while test "x$ac_lo" != "x$ac_hi"; do
6126 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6127 cat >conftest.$ac_ext <<_ACEOF
6128#line $LINENO "configure"
6129#include "confdefs.h"
6130$ac_includes_default
6131#ifdef F77_DUMMY_MAIN
6132# ifdef __cplusplus
6133 extern "C"
6134# endif
6135 int F77_DUMMY_MAIN() { return 1; }
6136#endif
6137int
6138main ()
6139{
6140static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6141test_array [0] = 0
6142
6143 ;
6144 return 0;
6145}
6146_ACEOF
6147rm -f conftest.$ac_objext
6148if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6149 (eval $ac_compile) 2>&5
6150 ac_status=$?
6151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6152 (exit $ac_status); } &&
6153 { ac_try='test -s conftest.$ac_objext'
6154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6155 (eval $ac_try) 2>&5
6156 ac_status=$?
6157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6158 (exit $ac_status); }; }; then
6159 ac_hi=$ac_mid
6160else
6161 echo "$as_me: failed program was:" >&5
6162cat conftest.$ac_ext >&5
6163ac_lo=`expr '(' $ac_mid ')' + 1`
6164fi
6165rm -f conftest.$ac_objext conftest.$ac_ext
6166done
6167case $ac_lo in
6168?*) ac_cv_sizeof_void_p=$ac_lo;;
6169'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6170echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6171 { (exit 1); exit 1; }; } ;;
6172esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006173else
6174 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006175 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6176echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6177 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006178else
Martin v. Löwis11437992002-04-12 09:54:03 +00006179 cat >conftest.$ac_ext <<_ACEOF
6180#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006181#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006182$ac_includes_default
6183long longval () { return (long) (sizeof (void *)); }
6184unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006185#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006186#include <stdlib.h>
6187#ifdef F77_DUMMY_MAIN
6188# ifdef __cplusplus
6189 extern "C"
6190# endif
6191 int F77_DUMMY_MAIN() { return 1; }
6192#endif
6193int
6194main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006195{
Martin v. Löwis11437992002-04-12 09:54:03 +00006196
6197 FILE *f = fopen ("conftest.val", "w");
6198 if (! f)
6199 exit (1);
6200 if (((long) (sizeof (void *))) < 0)
6201 {
6202 long i = longval ();
6203 if (i != ((long) (sizeof (void *))))
6204 exit (1);
6205 fprintf (f, "%ld\n", i);
6206 }
6207 else
6208 {
6209 unsigned long i = ulongval ();
6210 if (i != ((long) (sizeof (void *))))
6211 exit (1);
6212 fprintf (f, "%lu\n", i);
6213 }
6214 exit (ferror (f) || fclose (f) != 0);
6215
6216 ;
6217 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006218}
Martin v. Löwis11437992002-04-12 09:54:03 +00006219_ACEOF
6220rm -f conftest$ac_exeext
6221if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6222 (eval $ac_link) 2>&5
6223 ac_status=$?
6224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6225 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6227 (eval $ac_try) 2>&5
6228 ac_status=$?
6229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6230 (exit $ac_status); }; }; then
6231 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006232else
Martin v. Löwis11437992002-04-12 09:54:03 +00006233 echo "$as_me: program exited with status $ac_status" >&5
6234echo "$as_me: failed program was:" >&5
6235cat conftest.$ac_ext >&5
6236( exit $ac_status )
6237{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6238echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6239 { (exit 1); exit 1; }; }
6240fi
6241rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6242fi
6243fi
6244rm -f conftest.val
6245else
Guido van Rossumad678af1998-10-02 14:42:15 +00006246 ac_cv_sizeof_void_p=0
6247fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006248fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006249echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6250echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6251cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006252#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006253_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006254
6255
Martin v. Löwis11437992002-04-12 09:54:03 +00006256echo "$as_me:$LINENO: checking for char" >&5
6257echo $ECHO_N "checking for char... $ECHO_C" >&6
6258if test "${ac_cv_type_char+set}" = set; then
6259 echo $ECHO_N "(cached) $ECHO_C" >&6
6260else
6261 cat >conftest.$ac_ext <<_ACEOF
6262#line $LINENO "configure"
6263#include "confdefs.h"
6264$ac_includes_default
6265#ifdef F77_DUMMY_MAIN
6266# ifdef __cplusplus
6267 extern "C"
6268# endif
6269 int F77_DUMMY_MAIN() { return 1; }
6270#endif
6271int
6272main ()
6273{
6274if ((char *) 0)
6275 return 0;
6276if (sizeof (char))
6277 return 0;
6278 ;
6279 return 0;
6280}
6281_ACEOF
6282rm -f conftest.$ac_objext
6283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6284 (eval $ac_compile) 2>&5
6285 ac_status=$?
6286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6287 (exit $ac_status); } &&
6288 { ac_try='test -s conftest.$ac_objext'
6289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6290 (eval $ac_try) 2>&5
6291 ac_status=$?
6292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6293 (exit $ac_status); }; }; then
6294 ac_cv_type_char=yes
6295else
6296 echo "$as_me: failed program was:" >&5
6297cat conftest.$ac_ext >&5
6298ac_cv_type_char=no
6299fi
6300rm -f conftest.$ac_objext conftest.$ac_ext
6301fi
6302echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6303echo "${ECHO_T}$ac_cv_type_char" >&6
6304
6305echo "$as_me:$LINENO: checking size of char" >&5
6306echo $ECHO_N "checking size of char... $ECHO_C" >&6
6307if test "${ac_cv_sizeof_char+set}" = set; then
6308 echo $ECHO_N "(cached) $ECHO_C" >&6
6309else
6310 if test "$ac_cv_type_char" = yes; then
6311 # The cast to unsigned long works around a bug in the HP C Compiler
6312 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6313 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6314 # This bug is HP SR number 8606223364.
6315 if test "$cross_compiling" = yes; then
6316 # Depending upon the size, compute the lo and hi bounds.
6317cat >conftest.$ac_ext <<_ACEOF
6318#line $LINENO "configure"
6319#include "confdefs.h"
6320$ac_includes_default
6321#ifdef F77_DUMMY_MAIN
6322# ifdef __cplusplus
6323 extern "C"
6324# endif
6325 int F77_DUMMY_MAIN() { return 1; }
6326#endif
6327int
6328main ()
6329{
6330static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6331test_array [0] = 0
6332
6333 ;
6334 return 0;
6335}
6336_ACEOF
6337rm -f conftest.$ac_objext
6338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6339 (eval $ac_compile) 2>&5
6340 ac_status=$?
6341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6342 (exit $ac_status); } &&
6343 { ac_try='test -s conftest.$ac_objext'
6344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6345 (eval $ac_try) 2>&5
6346 ac_status=$?
6347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6348 (exit $ac_status); }; }; then
6349 ac_lo=0 ac_mid=0
6350 while :; do
6351 cat >conftest.$ac_ext <<_ACEOF
6352#line $LINENO "configure"
6353#include "confdefs.h"
6354$ac_includes_default
6355#ifdef F77_DUMMY_MAIN
6356# ifdef __cplusplus
6357 extern "C"
6358# endif
6359 int F77_DUMMY_MAIN() { return 1; }
6360#endif
6361int
6362main ()
6363{
6364static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6365test_array [0] = 0
6366
6367 ;
6368 return 0;
6369}
6370_ACEOF
6371rm -f conftest.$ac_objext
6372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6373 (eval $ac_compile) 2>&5
6374 ac_status=$?
6375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6376 (exit $ac_status); } &&
6377 { ac_try='test -s conftest.$ac_objext'
6378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6379 (eval $ac_try) 2>&5
6380 ac_status=$?
6381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6382 (exit $ac_status); }; }; then
6383 ac_hi=$ac_mid; break
6384else
6385 echo "$as_me: failed program was:" >&5
6386cat conftest.$ac_ext >&5
6387ac_lo=`expr $ac_mid + 1`
6388 if test $ac_lo -le $ac_mid; then
6389 ac_lo= ac_hi=
6390 break
6391 fi
6392 ac_mid=`expr 2 '*' $ac_mid + 1`
6393fi
6394rm -f conftest.$ac_objext conftest.$ac_ext
6395 done
6396else
6397 echo "$as_me: failed program was:" >&5
6398cat conftest.$ac_ext >&5
6399cat >conftest.$ac_ext <<_ACEOF
6400#line $LINENO "configure"
6401#include "confdefs.h"
6402$ac_includes_default
6403#ifdef F77_DUMMY_MAIN
6404# ifdef __cplusplus
6405 extern "C"
6406# endif
6407 int F77_DUMMY_MAIN() { return 1; }
6408#endif
6409int
6410main ()
6411{
6412static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6413test_array [0] = 0
6414
6415 ;
6416 return 0;
6417}
6418_ACEOF
6419rm -f conftest.$ac_objext
6420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6421 (eval $ac_compile) 2>&5
6422 ac_status=$?
6423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6424 (exit $ac_status); } &&
6425 { ac_try='test -s conftest.$ac_objext'
6426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6427 (eval $ac_try) 2>&5
6428 ac_status=$?
6429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6430 (exit $ac_status); }; }; then
6431 ac_hi=-1 ac_mid=-1
6432 while :; do
6433 cat >conftest.$ac_ext <<_ACEOF
6434#line $LINENO "configure"
6435#include "confdefs.h"
6436$ac_includes_default
6437#ifdef F77_DUMMY_MAIN
6438# ifdef __cplusplus
6439 extern "C"
6440# endif
6441 int F77_DUMMY_MAIN() { return 1; }
6442#endif
6443int
6444main ()
6445{
6446static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6447test_array [0] = 0
6448
6449 ;
6450 return 0;
6451}
6452_ACEOF
6453rm -f conftest.$ac_objext
6454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6455 (eval $ac_compile) 2>&5
6456 ac_status=$?
6457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6458 (exit $ac_status); } &&
6459 { ac_try='test -s conftest.$ac_objext'
6460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6461 (eval $ac_try) 2>&5
6462 ac_status=$?
6463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6464 (exit $ac_status); }; }; then
6465 ac_lo=$ac_mid; break
6466else
6467 echo "$as_me: failed program was:" >&5
6468cat conftest.$ac_ext >&5
6469ac_hi=`expr '(' $ac_mid ')' - 1`
6470 if test $ac_mid -le $ac_hi; then
6471 ac_lo= ac_hi=
6472 break
6473 fi
6474 ac_mid=`expr 2 '*' $ac_mid`
6475fi
6476rm -f conftest.$ac_objext conftest.$ac_ext
6477 done
6478else
6479 echo "$as_me: failed program was:" >&5
6480cat conftest.$ac_ext >&5
6481ac_lo= ac_hi=
6482fi
6483rm -f conftest.$ac_objext conftest.$ac_ext
6484fi
6485rm -f conftest.$ac_objext conftest.$ac_ext
6486# Binary search between lo and hi bounds.
6487while test "x$ac_lo" != "x$ac_hi"; do
6488 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6489 cat >conftest.$ac_ext <<_ACEOF
6490#line $LINENO "configure"
6491#include "confdefs.h"
6492$ac_includes_default
6493#ifdef F77_DUMMY_MAIN
6494# ifdef __cplusplus
6495 extern "C"
6496# endif
6497 int F77_DUMMY_MAIN() { return 1; }
6498#endif
6499int
6500main ()
6501{
6502static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6503test_array [0] = 0
6504
6505 ;
6506 return 0;
6507}
6508_ACEOF
6509rm -f conftest.$ac_objext
6510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6511 (eval $ac_compile) 2>&5
6512 ac_status=$?
6513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6514 (exit $ac_status); } &&
6515 { ac_try='test -s conftest.$ac_objext'
6516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6517 (eval $ac_try) 2>&5
6518 ac_status=$?
6519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6520 (exit $ac_status); }; }; then
6521 ac_hi=$ac_mid
6522else
6523 echo "$as_me: failed program was:" >&5
6524cat conftest.$ac_ext >&5
6525ac_lo=`expr '(' $ac_mid ')' + 1`
6526fi
6527rm -f conftest.$ac_objext conftest.$ac_ext
6528done
6529case $ac_lo in
6530?*) ac_cv_sizeof_char=$ac_lo;;
6531'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6532echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6533 { (exit 1); exit 1; }; } ;;
6534esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006535else
6536 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006537 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6538echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6539 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006540else
Martin v. Löwis11437992002-04-12 09:54:03 +00006541 cat >conftest.$ac_ext <<_ACEOF
6542#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006543#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006544$ac_includes_default
6545long longval () { return (long) (sizeof (char)); }
6546unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006547#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006548#include <stdlib.h>
6549#ifdef F77_DUMMY_MAIN
6550# ifdef __cplusplus
6551 extern "C"
6552# endif
6553 int F77_DUMMY_MAIN() { return 1; }
6554#endif
6555int
6556main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006557{
Martin v. Löwis11437992002-04-12 09:54:03 +00006558
6559 FILE *f = fopen ("conftest.val", "w");
6560 if (! f)
6561 exit (1);
6562 if (((long) (sizeof (char))) < 0)
6563 {
6564 long i = longval ();
6565 if (i != ((long) (sizeof (char))))
6566 exit (1);
6567 fprintf (f, "%ld\n", i);
6568 }
6569 else
6570 {
6571 unsigned long i = ulongval ();
6572 if (i != ((long) (sizeof (char))))
6573 exit (1);
6574 fprintf (f, "%lu\n", i);
6575 }
6576 exit (ferror (f) || fclose (f) != 0);
6577
6578 ;
6579 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006580}
Martin v. Löwis11437992002-04-12 09:54:03 +00006581_ACEOF
6582rm -f conftest$ac_exeext
6583if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6584 (eval $ac_link) 2>&5
6585 ac_status=$?
6586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6587 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6589 (eval $ac_try) 2>&5
6590 ac_status=$?
6591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6592 (exit $ac_status); }; }; then
6593 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006594else
Martin v. Löwis11437992002-04-12 09:54:03 +00006595 echo "$as_me: program exited with status $ac_status" >&5
6596echo "$as_me: failed program was:" >&5
6597cat conftest.$ac_ext >&5
6598( exit $ac_status )
6599{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6600echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6601 { (exit 1); exit 1; }; }
6602fi
6603rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6604fi
6605fi
6606rm -f conftest.val
6607else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006608 ac_cv_sizeof_char=0
6609fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006610fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006611echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6612echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6613cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006614#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006615_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006616
6617
Martin v. Löwis11437992002-04-12 09:54:03 +00006618echo "$as_me:$LINENO: checking for short" >&5
6619echo $ECHO_N "checking for short... $ECHO_C" >&6
6620if test "${ac_cv_type_short+set}" = set; then
6621 echo $ECHO_N "(cached) $ECHO_C" >&6
6622else
6623 cat >conftest.$ac_ext <<_ACEOF
6624#line $LINENO "configure"
6625#include "confdefs.h"
6626$ac_includes_default
6627#ifdef F77_DUMMY_MAIN
6628# ifdef __cplusplus
6629 extern "C"
6630# endif
6631 int F77_DUMMY_MAIN() { return 1; }
6632#endif
6633int
6634main ()
6635{
6636if ((short *) 0)
6637 return 0;
6638if (sizeof (short))
6639 return 0;
6640 ;
6641 return 0;
6642}
6643_ACEOF
6644rm -f conftest.$ac_objext
6645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6646 (eval $ac_compile) 2>&5
6647 ac_status=$?
6648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6649 (exit $ac_status); } &&
6650 { ac_try='test -s conftest.$ac_objext'
6651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6652 (eval $ac_try) 2>&5
6653 ac_status=$?
6654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6655 (exit $ac_status); }; }; then
6656 ac_cv_type_short=yes
6657else
6658 echo "$as_me: failed program was:" >&5
6659cat conftest.$ac_ext >&5
6660ac_cv_type_short=no
6661fi
6662rm -f conftest.$ac_objext conftest.$ac_ext
6663fi
6664echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6665echo "${ECHO_T}$ac_cv_type_short" >&6
6666
6667echo "$as_me:$LINENO: checking size of short" >&5
6668echo $ECHO_N "checking size of short... $ECHO_C" >&6
6669if test "${ac_cv_sizeof_short+set}" = set; then
6670 echo $ECHO_N "(cached) $ECHO_C" >&6
6671else
6672 if test "$ac_cv_type_short" = yes; then
6673 # The cast to unsigned long works around a bug in the HP C Compiler
6674 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6675 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6676 # This bug is HP SR number 8606223364.
6677 if test "$cross_compiling" = yes; then
6678 # Depending upon the size, compute the lo and hi bounds.
6679cat >conftest.$ac_ext <<_ACEOF
6680#line $LINENO "configure"
6681#include "confdefs.h"
6682$ac_includes_default
6683#ifdef F77_DUMMY_MAIN
6684# ifdef __cplusplus
6685 extern "C"
6686# endif
6687 int F77_DUMMY_MAIN() { return 1; }
6688#endif
6689int
6690main ()
6691{
6692static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6693test_array [0] = 0
6694
6695 ;
6696 return 0;
6697}
6698_ACEOF
6699rm -f conftest.$ac_objext
6700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6701 (eval $ac_compile) 2>&5
6702 ac_status=$?
6703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6704 (exit $ac_status); } &&
6705 { ac_try='test -s conftest.$ac_objext'
6706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6707 (eval $ac_try) 2>&5
6708 ac_status=$?
6709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6710 (exit $ac_status); }; }; then
6711 ac_lo=0 ac_mid=0
6712 while :; do
6713 cat >conftest.$ac_ext <<_ACEOF
6714#line $LINENO "configure"
6715#include "confdefs.h"
6716$ac_includes_default
6717#ifdef F77_DUMMY_MAIN
6718# ifdef __cplusplus
6719 extern "C"
6720# endif
6721 int F77_DUMMY_MAIN() { return 1; }
6722#endif
6723int
6724main ()
6725{
6726static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6727test_array [0] = 0
6728
6729 ;
6730 return 0;
6731}
6732_ACEOF
6733rm -f conftest.$ac_objext
6734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6735 (eval $ac_compile) 2>&5
6736 ac_status=$?
6737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6738 (exit $ac_status); } &&
6739 { ac_try='test -s conftest.$ac_objext'
6740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6741 (eval $ac_try) 2>&5
6742 ac_status=$?
6743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6744 (exit $ac_status); }; }; then
6745 ac_hi=$ac_mid; break
6746else
6747 echo "$as_me: failed program was:" >&5
6748cat conftest.$ac_ext >&5
6749ac_lo=`expr $ac_mid + 1`
6750 if test $ac_lo -le $ac_mid; then
6751 ac_lo= ac_hi=
6752 break
6753 fi
6754 ac_mid=`expr 2 '*' $ac_mid + 1`
6755fi
6756rm -f conftest.$ac_objext conftest.$ac_ext
6757 done
6758else
6759 echo "$as_me: failed program was:" >&5
6760cat conftest.$ac_ext >&5
6761cat >conftest.$ac_ext <<_ACEOF
6762#line $LINENO "configure"
6763#include "confdefs.h"
6764$ac_includes_default
6765#ifdef F77_DUMMY_MAIN
6766# ifdef __cplusplus
6767 extern "C"
6768# endif
6769 int F77_DUMMY_MAIN() { return 1; }
6770#endif
6771int
6772main ()
6773{
6774static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6775test_array [0] = 0
6776
6777 ;
6778 return 0;
6779}
6780_ACEOF
6781rm -f conftest.$ac_objext
6782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6783 (eval $ac_compile) 2>&5
6784 ac_status=$?
6785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6786 (exit $ac_status); } &&
6787 { ac_try='test -s conftest.$ac_objext'
6788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6789 (eval $ac_try) 2>&5
6790 ac_status=$?
6791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6792 (exit $ac_status); }; }; then
6793 ac_hi=-1 ac_mid=-1
6794 while :; do
6795 cat >conftest.$ac_ext <<_ACEOF
6796#line $LINENO "configure"
6797#include "confdefs.h"
6798$ac_includes_default
6799#ifdef F77_DUMMY_MAIN
6800# ifdef __cplusplus
6801 extern "C"
6802# endif
6803 int F77_DUMMY_MAIN() { return 1; }
6804#endif
6805int
6806main ()
6807{
6808static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6809test_array [0] = 0
6810
6811 ;
6812 return 0;
6813}
6814_ACEOF
6815rm -f conftest.$ac_objext
6816if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6817 (eval $ac_compile) 2>&5
6818 ac_status=$?
6819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6820 (exit $ac_status); } &&
6821 { ac_try='test -s conftest.$ac_objext'
6822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6823 (eval $ac_try) 2>&5
6824 ac_status=$?
6825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6826 (exit $ac_status); }; }; then
6827 ac_lo=$ac_mid; break
6828else
6829 echo "$as_me: failed program was:" >&5
6830cat conftest.$ac_ext >&5
6831ac_hi=`expr '(' $ac_mid ')' - 1`
6832 if test $ac_mid -le $ac_hi; then
6833 ac_lo= ac_hi=
6834 break
6835 fi
6836 ac_mid=`expr 2 '*' $ac_mid`
6837fi
6838rm -f conftest.$ac_objext conftest.$ac_ext
6839 done
6840else
6841 echo "$as_me: failed program was:" >&5
6842cat conftest.$ac_ext >&5
6843ac_lo= ac_hi=
6844fi
6845rm -f conftest.$ac_objext conftest.$ac_ext
6846fi
6847rm -f conftest.$ac_objext conftest.$ac_ext
6848# Binary search between lo and hi bounds.
6849while test "x$ac_lo" != "x$ac_hi"; do
6850 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6851 cat >conftest.$ac_ext <<_ACEOF
6852#line $LINENO "configure"
6853#include "confdefs.h"
6854$ac_includes_default
6855#ifdef F77_DUMMY_MAIN
6856# ifdef __cplusplus
6857 extern "C"
6858# endif
6859 int F77_DUMMY_MAIN() { return 1; }
6860#endif
6861int
6862main ()
6863{
6864static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6865test_array [0] = 0
6866
6867 ;
6868 return 0;
6869}
6870_ACEOF
6871rm -f conftest.$ac_objext
6872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6873 (eval $ac_compile) 2>&5
6874 ac_status=$?
6875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6876 (exit $ac_status); } &&
6877 { ac_try='test -s conftest.$ac_objext'
6878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6879 (eval $ac_try) 2>&5
6880 ac_status=$?
6881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6882 (exit $ac_status); }; }; then
6883 ac_hi=$ac_mid
6884else
6885 echo "$as_me: failed program was:" >&5
6886cat conftest.$ac_ext >&5
6887ac_lo=`expr '(' $ac_mid ')' + 1`
6888fi
6889rm -f conftest.$ac_objext conftest.$ac_ext
6890done
6891case $ac_lo in
6892?*) ac_cv_sizeof_short=$ac_lo;;
6893'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6894echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6895 { (exit 1); exit 1; }; } ;;
6896esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006897else
6898 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006899 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6900echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6901 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006902else
Martin v. Löwis11437992002-04-12 09:54:03 +00006903 cat >conftest.$ac_ext <<_ACEOF
6904#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006905#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006906$ac_includes_default
6907long longval () { return (long) (sizeof (short)); }
6908unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006909#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006910#include <stdlib.h>
6911#ifdef F77_DUMMY_MAIN
6912# ifdef __cplusplus
6913 extern "C"
6914# endif
6915 int F77_DUMMY_MAIN() { return 1; }
6916#endif
6917int
6918main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006919{
Martin v. Löwis11437992002-04-12 09:54:03 +00006920
6921 FILE *f = fopen ("conftest.val", "w");
6922 if (! f)
6923 exit (1);
6924 if (((long) (sizeof (short))) < 0)
6925 {
6926 long i = longval ();
6927 if (i != ((long) (sizeof (short))))
6928 exit (1);
6929 fprintf (f, "%ld\n", i);
6930 }
6931 else
6932 {
6933 unsigned long i = ulongval ();
6934 if (i != ((long) (sizeof (short))))
6935 exit (1);
6936 fprintf (f, "%lu\n", i);
6937 }
6938 exit (ferror (f) || fclose (f) != 0);
6939
6940 ;
6941 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006942}
Martin v. Löwis11437992002-04-12 09:54:03 +00006943_ACEOF
6944rm -f conftest$ac_exeext
6945if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6946 (eval $ac_link) 2>&5
6947 ac_status=$?
6948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6949 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6951 (eval $ac_try) 2>&5
6952 ac_status=$?
6953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6954 (exit $ac_status); }; }; then
6955 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006956else
Martin v. Löwis11437992002-04-12 09:54:03 +00006957 echo "$as_me: program exited with status $ac_status" >&5
6958echo "$as_me: failed program was:" >&5
6959cat conftest.$ac_ext >&5
6960( exit $ac_status )
6961{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6962echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6963 { (exit 1); exit 1; }; }
6964fi
6965rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6966fi
6967fi
6968rm -f conftest.val
6969else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006970 ac_cv_sizeof_short=0
6971fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006972fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006973echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6974echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6975cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006976#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006977_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006978
6979
Martin v. Löwis11437992002-04-12 09:54:03 +00006980echo "$as_me:$LINENO: checking for float" >&5
6981echo $ECHO_N "checking for float... $ECHO_C" >&6
6982if test "${ac_cv_type_float+set}" = set; then
6983 echo $ECHO_N "(cached) $ECHO_C" >&6
6984else
6985 cat >conftest.$ac_ext <<_ACEOF
6986#line $LINENO "configure"
6987#include "confdefs.h"
6988$ac_includes_default
6989#ifdef F77_DUMMY_MAIN
6990# ifdef __cplusplus
6991 extern "C"
6992# endif
6993 int F77_DUMMY_MAIN() { return 1; }
6994#endif
6995int
6996main ()
6997{
6998if ((float *) 0)
6999 return 0;
7000if (sizeof (float))
7001 return 0;
7002 ;
7003 return 0;
7004}
7005_ACEOF
7006rm -f conftest.$ac_objext
7007if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7008 (eval $ac_compile) 2>&5
7009 ac_status=$?
7010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7011 (exit $ac_status); } &&
7012 { ac_try='test -s conftest.$ac_objext'
7013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7014 (eval $ac_try) 2>&5
7015 ac_status=$?
7016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7017 (exit $ac_status); }; }; then
7018 ac_cv_type_float=yes
7019else
7020 echo "$as_me: failed program was:" >&5
7021cat conftest.$ac_ext >&5
7022ac_cv_type_float=no
7023fi
7024rm -f conftest.$ac_objext conftest.$ac_ext
7025fi
7026echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7027echo "${ECHO_T}$ac_cv_type_float" >&6
7028
7029echo "$as_me:$LINENO: checking size of float" >&5
7030echo $ECHO_N "checking size of float... $ECHO_C" >&6
7031if test "${ac_cv_sizeof_float+set}" = set; then
7032 echo $ECHO_N "(cached) $ECHO_C" >&6
7033else
7034 if test "$ac_cv_type_float" = yes; then
7035 # The cast to unsigned long works around a bug in the HP C Compiler
7036 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7037 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7038 # This bug is HP SR number 8606223364.
7039 if test "$cross_compiling" = yes; then
7040 # Depending upon the size, compute the lo and hi bounds.
7041cat >conftest.$ac_ext <<_ACEOF
7042#line $LINENO "configure"
7043#include "confdefs.h"
7044$ac_includes_default
7045#ifdef F77_DUMMY_MAIN
7046# ifdef __cplusplus
7047 extern "C"
7048# endif
7049 int F77_DUMMY_MAIN() { return 1; }
7050#endif
7051int
7052main ()
7053{
7054static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7055test_array [0] = 0
7056
7057 ;
7058 return 0;
7059}
7060_ACEOF
7061rm -f conftest.$ac_objext
7062if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7063 (eval $ac_compile) 2>&5
7064 ac_status=$?
7065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7066 (exit $ac_status); } &&
7067 { ac_try='test -s conftest.$ac_objext'
7068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7069 (eval $ac_try) 2>&5
7070 ac_status=$?
7071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7072 (exit $ac_status); }; }; then
7073 ac_lo=0 ac_mid=0
7074 while :; do
7075 cat >conftest.$ac_ext <<_ACEOF
7076#line $LINENO "configure"
7077#include "confdefs.h"
7078$ac_includes_default
7079#ifdef F77_DUMMY_MAIN
7080# ifdef __cplusplus
7081 extern "C"
7082# endif
7083 int F77_DUMMY_MAIN() { return 1; }
7084#endif
7085int
7086main ()
7087{
7088static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7089test_array [0] = 0
7090
7091 ;
7092 return 0;
7093}
7094_ACEOF
7095rm -f conftest.$ac_objext
7096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7097 (eval $ac_compile) 2>&5
7098 ac_status=$?
7099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7100 (exit $ac_status); } &&
7101 { ac_try='test -s conftest.$ac_objext'
7102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7103 (eval $ac_try) 2>&5
7104 ac_status=$?
7105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7106 (exit $ac_status); }; }; then
7107 ac_hi=$ac_mid; break
7108else
7109 echo "$as_me: failed program was:" >&5
7110cat conftest.$ac_ext >&5
7111ac_lo=`expr $ac_mid + 1`
7112 if test $ac_lo -le $ac_mid; then
7113 ac_lo= ac_hi=
7114 break
7115 fi
7116 ac_mid=`expr 2 '*' $ac_mid + 1`
7117fi
7118rm -f conftest.$ac_objext conftest.$ac_ext
7119 done
7120else
7121 echo "$as_me: failed program was:" >&5
7122cat conftest.$ac_ext >&5
7123cat >conftest.$ac_ext <<_ACEOF
7124#line $LINENO "configure"
7125#include "confdefs.h"
7126$ac_includes_default
7127#ifdef F77_DUMMY_MAIN
7128# ifdef __cplusplus
7129 extern "C"
7130# endif
7131 int F77_DUMMY_MAIN() { return 1; }
7132#endif
7133int
7134main ()
7135{
7136static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7137test_array [0] = 0
7138
7139 ;
7140 return 0;
7141}
7142_ACEOF
7143rm -f conftest.$ac_objext
7144if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7145 (eval $ac_compile) 2>&5
7146 ac_status=$?
7147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7148 (exit $ac_status); } &&
7149 { ac_try='test -s conftest.$ac_objext'
7150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7151 (eval $ac_try) 2>&5
7152 ac_status=$?
7153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7154 (exit $ac_status); }; }; then
7155 ac_hi=-1 ac_mid=-1
7156 while :; do
7157 cat >conftest.$ac_ext <<_ACEOF
7158#line $LINENO "configure"
7159#include "confdefs.h"
7160$ac_includes_default
7161#ifdef F77_DUMMY_MAIN
7162# ifdef __cplusplus
7163 extern "C"
7164# endif
7165 int F77_DUMMY_MAIN() { return 1; }
7166#endif
7167int
7168main ()
7169{
7170static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7171test_array [0] = 0
7172
7173 ;
7174 return 0;
7175}
7176_ACEOF
7177rm -f conftest.$ac_objext
7178if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7179 (eval $ac_compile) 2>&5
7180 ac_status=$?
7181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7182 (exit $ac_status); } &&
7183 { ac_try='test -s conftest.$ac_objext'
7184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7185 (eval $ac_try) 2>&5
7186 ac_status=$?
7187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7188 (exit $ac_status); }; }; then
7189 ac_lo=$ac_mid; break
7190else
7191 echo "$as_me: failed program was:" >&5
7192cat conftest.$ac_ext >&5
7193ac_hi=`expr '(' $ac_mid ')' - 1`
7194 if test $ac_mid -le $ac_hi; then
7195 ac_lo= ac_hi=
7196 break
7197 fi
7198 ac_mid=`expr 2 '*' $ac_mid`
7199fi
7200rm -f conftest.$ac_objext conftest.$ac_ext
7201 done
7202else
7203 echo "$as_me: failed program was:" >&5
7204cat conftest.$ac_ext >&5
7205ac_lo= ac_hi=
7206fi
7207rm -f conftest.$ac_objext conftest.$ac_ext
7208fi
7209rm -f conftest.$ac_objext conftest.$ac_ext
7210# Binary search between lo and hi bounds.
7211while test "x$ac_lo" != "x$ac_hi"; do
7212 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7213 cat >conftest.$ac_ext <<_ACEOF
7214#line $LINENO "configure"
7215#include "confdefs.h"
7216$ac_includes_default
7217#ifdef F77_DUMMY_MAIN
7218# ifdef __cplusplus
7219 extern "C"
7220# endif
7221 int F77_DUMMY_MAIN() { return 1; }
7222#endif
7223int
7224main ()
7225{
7226static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7227test_array [0] = 0
7228
7229 ;
7230 return 0;
7231}
7232_ACEOF
7233rm -f conftest.$ac_objext
7234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7235 (eval $ac_compile) 2>&5
7236 ac_status=$?
7237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7238 (exit $ac_status); } &&
7239 { ac_try='test -s conftest.$ac_objext'
7240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7241 (eval $ac_try) 2>&5
7242 ac_status=$?
7243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7244 (exit $ac_status); }; }; then
7245 ac_hi=$ac_mid
7246else
7247 echo "$as_me: failed program was:" >&5
7248cat conftest.$ac_ext >&5
7249ac_lo=`expr '(' $ac_mid ')' + 1`
7250fi
7251rm -f conftest.$ac_objext conftest.$ac_ext
7252done
7253case $ac_lo in
7254?*) ac_cv_sizeof_float=$ac_lo;;
7255'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7256echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7257 { (exit 1); exit 1; }; } ;;
7258esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007259else
7260 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007261 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7262echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7263 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007264else
Martin v. Löwis11437992002-04-12 09:54:03 +00007265 cat >conftest.$ac_ext <<_ACEOF
7266#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007267#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007268$ac_includes_default
7269long longval () { return (long) (sizeof (float)); }
7270unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007271#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007272#include <stdlib.h>
7273#ifdef F77_DUMMY_MAIN
7274# ifdef __cplusplus
7275 extern "C"
7276# endif
7277 int F77_DUMMY_MAIN() { return 1; }
7278#endif
7279int
7280main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007281{
Martin v. Löwis11437992002-04-12 09:54:03 +00007282
7283 FILE *f = fopen ("conftest.val", "w");
7284 if (! f)
7285 exit (1);
7286 if (((long) (sizeof (float))) < 0)
7287 {
7288 long i = longval ();
7289 if (i != ((long) (sizeof (float))))
7290 exit (1);
7291 fprintf (f, "%ld\n", i);
7292 }
7293 else
7294 {
7295 unsigned long i = ulongval ();
7296 if (i != ((long) (sizeof (float))))
7297 exit (1);
7298 fprintf (f, "%lu\n", i);
7299 }
7300 exit (ferror (f) || fclose (f) != 0);
7301
7302 ;
7303 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007304}
Martin v. Löwis11437992002-04-12 09:54:03 +00007305_ACEOF
7306rm -f conftest$ac_exeext
7307if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7308 (eval $ac_link) 2>&5
7309 ac_status=$?
7310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7311 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7313 (eval $ac_try) 2>&5
7314 ac_status=$?
7315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7316 (exit $ac_status); }; }; then
7317 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007318else
Martin v. Löwis11437992002-04-12 09:54:03 +00007319 echo "$as_me: program exited with status $ac_status" >&5
7320echo "$as_me: failed program was:" >&5
7321cat conftest.$ac_ext >&5
7322( exit $ac_status )
7323{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7324echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7325 { (exit 1); exit 1; }; }
7326fi
7327rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7328fi
7329fi
7330rm -f conftest.val
7331else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007332 ac_cv_sizeof_float=0
7333fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007334fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007335echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7336echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7337cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007338#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007339_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007340
7341
Martin v. Löwis11437992002-04-12 09:54:03 +00007342echo "$as_me:$LINENO: checking for double" >&5
7343echo $ECHO_N "checking for double... $ECHO_C" >&6
7344if test "${ac_cv_type_double+set}" = set; then
7345 echo $ECHO_N "(cached) $ECHO_C" >&6
7346else
7347 cat >conftest.$ac_ext <<_ACEOF
7348#line $LINENO "configure"
7349#include "confdefs.h"
7350$ac_includes_default
7351#ifdef F77_DUMMY_MAIN
7352# ifdef __cplusplus
7353 extern "C"
7354# endif
7355 int F77_DUMMY_MAIN() { return 1; }
7356#endif
7357int
7358main ()
7359{
7360if ((double *) 0)
7361 return 0;
7362if (sizeof (double))
7363 return 0;
7364 ;
7365 return 0;
7366}
7367_ACEOF
7368rm -f conftest.$ac_objext
7369if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7370 (eval $ac_compile) 2>&5
7371 ac_status=$?
7372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7373 (exit $ac_status); } &&
7374 { ac_try='test -s conftest.$ac_objext'
7375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7376 (eval $ac_try) 2>&5
7377 ac_status=$?
7378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7379 (exit $ac_status); }; }; then
7380 ac_cv_type_double=yes
7381else
7382 echo "$as_me: failed program was:" >&5
7383cat conftest.$ac_ext >&5
7384ac_cv_type_double=no
7385fi
7386rm -f conftest.$ac_objext conftest.$ac_ext
7387fi
7388echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7389echo "${ECHO_T}$ac_cv_type_double" >&6
7390
7391echo "$as_me:$LINENO: checking size of double" >&5
7392echo $ECHO_N "checking size of double... $ECHO_C" >&6
7393if test "${ac_cv_sizeof_double+set}" = set; then
7394 echo $ECHO_N "(cached) $ECHO_C" >&6
7395else
7396 if test "$ac_cv_type_double" = yes; then
7397 # The cast to unsigned long works around a bug in the HP C Compiler
7398 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7399 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7400 # This bug is HP SR number 8606223364.
7401 if test "$cross_compiling" = yes; then
7402 # Depending upon the size, compute the lo and hi bounds.
7403cat >conftest.$ac_ext <<_ACEOF
7404#line $LINENO "configure"
7405#include "confdefs.h"
7406$ac_includes_default
7407#ifdef F77_DUMMY_MAIN
7408# ifdef __cplusplus
7409 extern "C"
7410# endif
7411 int F77_DUMMY_MAIN() { return 1; }
7412#endif
7413int
7414main ()
7415{
7416static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7417test_array [0] = 0
7418
7419 ;
7420 return 0;
7421}
7422_ACEOF
7423rm -f conftest.$ac_objext
7424if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7425 (eval $ac_compile) 2>&5
7426 ac_status=$?
7427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7428 (exit $ac_status); } &&
7429 { ac_try='test -s conftest.$ac_objext'
7430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7431 (eval $ac_try) 2>&5
7432 ac_status=$?
7433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7434 (exit $ac_status); }; }; then
7435 ac_lo=0 ac_mid=0
7436 while :; do
7437 cat >conftest.$ac_ext <<_ACEOF
7438#line $LINENO "configure"
7439#include "confdefs.h"
7440$ac_includes_default
7441#ifdef F77_DUMMY_MAIN
7442# ifdef __cplusplus
7443 extern "C"
7444# endif
7445 int F77_DUMMY_MAIN() { return 1; }
7446#endif
7447int
7448main ()
7449{
7450static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7451test_array [0] = 0
7452
7453 ;
7454 return 0;
7455}
7456_ACEOF
7457rm -f conftest.$ac_objext
7458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7459 (eval $ac_compile) 2>&5
7460 ac_status=$?
7461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7462 (exit $ac_status); } &&
7463 { ac_try='test -s conftest.$ac_objext'
7464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7465 (eval $ac_try) 2>&5
7466 ac_status=$?
7467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7468 (exit $ac_status); }; }; then
7469 ac_hi=$ac_mid; break
7470else
7471 echo "$as_me: failed program was:" >&5
7472cat conftest.$ac_ext >&5
7473ac_lo=`expr $ac_mid + 1`
7474 if test $ac_lo -le $ac_mid; then
7475 ac_lo= ac_hi=
7476 break
7477 fi
7478 ac_mid=`expr 2 '*' $ac_mid + 1`
7479fi
7480rm -f conftest.$ac_objext conftest.$ac_ext
7481 done
7482else
7483 echo "$as_me: failed program was:" >&5
7484cat conftest.$ac_ext >&5
7485cat >conftest.$ac_ext <<_ACEOF
7486#line $LINENO "configure"
7487#include "confdefs.h"
7488$ac_includes_default
7489#ifdef F77_DUMMY_MAIN
7490# ifdef __cplusplus
7491 extern "C"
7492# endif
7493 int F77_DUMMY_MAIN() { return 1; }
7494#endif
7495int
7496main ()
7497{
7498static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7499test_array [0] = 0
7500
7501 ;
7502 return 0;
7503}
7504_ACEOF
7505rm -f conftest.$ac_objext
7506if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7507 (eval $ac_compile) 2>&5
7508 ac_status=$?
7509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7510 (exit $ac_status); } &&
7511 { ac_try='test -s conftest.$ac_objext'
7512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7513 (eval $ac_try) 2>&5
7514 ac_status=$?
7515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7516 (exit $ac_status); }; }; then
7517 ac_hi=-1 ac_mid=-1
7518 while :; do
7519 cat >conftest.$ac_ext <<_ACEOF
7520#line $LINENO "configure"
7521#include "confdefs.h"
7522$ac_includes_default
7523#ifdef F77_DUMMY_MAIN
7524# ifdef __cplusplus
7525 extern "C"
7526# endif
7527 int F77_DUMMY_MAIN() { return 1; }
7528#endif
7529int
7530main ()
7531{
7532static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7533test_array [0] = 0
7534
7535 ;
7536 return 0;
7537}
7538_ACEOF
7539rm -f conftest.$ac_objext
7540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7541 (eval $ac_compile) 2>&5
7542 ac_status=$?
7543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7544 (exit $ac_status); } &&
7545 { ac_try='test -s conftest.$ac_objext'
7546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7547 (eval $ac_try) 2>&5
7548 ac_status=$?
7549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7550 (exit $ac_status); }; }; then
7551 ac_lo=$ac_mid; break
7552else
7553 echo "$as_me: failed program was:" >&5
7554cat conftest.$ac_ext >&5
7555ac_hi=`expr '(' $ac_mid ')' - 1`
7556 if test $ac_mid -le $ac_hi; then
7557 ac_lo= ac_hi=
7558 break
7559 fi
7560 ac_mid=`expr 2 '*' $ac_mid`
7561fi
7562rm -f conftest.$ac_objext conftest.$ac_ext
7563 done
7564else
7565 echo "$as_me: failed program was:" >&5
7566cat conftest.$ac_ext >&5
7567ac_lo= ac_hi=
7568fi
7569rm -f conftest.$ac_objext conftest.$ac_ext
7570fi
7571rm -f conftest.$ac_objext conftest.$ac_ext
7572# Binary search between lo and hi bounds.
7573while test "x$ac_lo" != "x$ac_hi"; do
7574 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7575 cat >conftest.$ac_ext <<_ACEOF
7576#line $LINENO "configure"
7577#include "confdefs.h"
7578$ac_includes_default
7579#ifdef F77_DUMMY_MAIN
7580# ifdef __cplusplus
7581 extern "C"
7582# endif
7583 int F77_DUMMY_MAIN() { return 1; }
7584#endif
7585int
7586main ()
7587{
7588static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7589test_array [0] = 0
7590
7591 ;
7592 return 0;
7593}
7594_ACEOF
7595rm -f conftest.$ac_objext
7596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7597 (eval $ac_compile) 2>&5
7598 ac_status=$?
7599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7600 (exit $ac_status); } &&
7601 { ac_try='test -s conftest.$ac_objext'
7602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7603 (eval $ac_try) 2>&5
7604 ac_status=$?
7605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7606 (exit $ac_status); }; }; then
7607 ac_hi=$ac_mid
7608else
7609 echo "$as_me: failed program was:" >&5
7610cat conftest.$ac_ext >&5
7611ac_lo=`expr '(' $ac_mid ')' + 1`
7612fi
7613rm -f conftest.$ac_objext conftest.$ac_ext
7614done
7615case $ac_lo in
7616?*) ac_cv_sizeof_double=$ac_lo;;
7617'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7618echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7619 { (exit 1); exit 1; }; } ;;
7620esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007621else
7622 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007623 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7624echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7625 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007626else
Martin v. Löwis11437992002-04-12 09:54:03 +00007627 cat >conftest.$ac_ext <<_ACEOF
7628#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007629#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007630$ac_includes_default
7631long longval () { return (long) (sizeof (double)); }
7632unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007633#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007634#include <stdlib.h>
7635#ifdef F77_DUMMY_MAIN
7636# ifdef __cplusplus
7637 extern "C"
7638# endif
7639 int F77_DUMMY_MAIN() { return 1; }
7640#endif
7641int
7642main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007643{
Martin v. Löwis11437992002-04-12 09:54:03 +00007644
7645 FILE *f = fopen ("conftest.val", "w");
7646 if (! f)
7647 exit (1);
7648 if (((long) (sizeof (double))) < 0)
7649 {
7650 long i = longval ();
7651 if (i != ((long) (sizeof (double))))
7652 exit (1);
7653 fprintf (f, "%ld\n", i);
7654 }
7655 else
7656 {
7657 unsigned long i = ulongval ();
7658 if (i != ((long) (sizeof (double))))
7659 exit (1);
7660 fprintf (f, "%lu\n", i);
7661 }
7662 exit (ferror (f) || fclose (f) != 0);
7663
7664 ;
7665 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007666}
Martin v. Löwis11437992002-04-12 09:54:03 +00007667_ACEOF
7668rm -f conftest$ac_exeext
7669if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7670 (eval $ac_link) 2>&5
7671 ac_status=$?
7672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7675 (eval $ac_try) 2>&5
7676 ac_status=$?
7677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7678 (exit $ac_status); }; }; then
7679 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007680else
Martin v. Löwis11437992002-04-12 09:54:03 +00007681 echo "$as_me: program exited with status $ac_status" >&5
7682echo "$as_me: failed program was:" >&5
7683cat conftest.$ac_ext >&5
7684( exit $ac_status )
7685{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7686echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7687 { (exit 1); exit 1; }; }
7688fi
7689rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7690fi
7691fi
7692rm -f conftest.val
7693else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007694 ac_cv_sizeof_double=0
7695fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007696fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007697echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7698echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7699cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007700#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007701_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007702
7703
Martin v. Löwis11437992002-04-12 09:54:03 +00007704echo "$as_me:$LINENO: checking for fpos_t" >&5
7705echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7706if test "${ac_cv_type_fpos_t+set}" = set; then
7707 echo $ECHO_N "(cached) $ECHO_C" >&6
7708else
7709 cat >conftest.$ac_ext <<_ACEOF
7710#line $LINENO "configure"
7711#include "confdefs.h"
7712$ac_includes_default
7713#ifdef F77_DUMMY_MAIN
7714# ifdef __cplusplus
7715 extern "C"
7716# endif
7717 int F77_DUMMY_MAIN() { return 1; }
7718#endif
7719int
7720main ()
7721{
7722if ((fpos_t *) 0)
7723 return 0;
7724if (sizeof (fpos_t))
7725 return 0;
7726 ;
7727 return 0;
7728}
7729_ACEOF
7730rm -f conftest.$ac_objext
7731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7732 (eval $ac_compile) 2>&5
7733 ac_status=$?
7734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7735 (exit $ac_status); } &&
7736 { ac_try='test -s conftest.$ac_objext'
7737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7738 (eval $ac_try) 2>&5
7739 ac_status=$?
7740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7741 (exit $ac_status); }; }; then
7742 ac_cv_type_fpos_t=yes
7743else
7744 echo "$as_me: failed program was:" >&5
7745cat conftest.$ac_ext >&5
7746ac_cv_type_fpos_t=no
7747fi
7748rm -f conftest.$ac_objext conftest.$ac_ext
7749fi
7750echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7751echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7752
7753echo "$as_me:$LINENO: checking size of fpos_t" >&5
7754echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7755if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7756 echo $ECHO_N "(cached) $ECHO_C" >&6
7757else
7758 if test "$ac_cv_type_fpos_t" = yes; then
7759 # The cast to unsigned long works around a bug in the HP C Compiler
7760 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7761 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7762 # This bug is HP SR number 8606223364.
7763 if test "$cross_compiling" = yes; then
7764 # Depending upon the size, compute the lo and hi bounds.
7765cat >conftest.$ac_ext <<_ACEOF
7766#line $LINENO "configure"
7767#include "confdefs.h"
7768$ac_includes_default
7769#ifdef F77_DUMMY_MAIN
7770# ifdef __cplusplus
7771 extern "C"
7772# endif
7773 int F77_DUMMY_MAIN() { return 1; }
7774#endif
7775int
7776main ()
7777{
7778static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7779test_array [0] = 0
7780
7781 ;
7782 return 0;
7783}
7784_ACEOF
7785rm -f conftest.$ac_objext
7786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7787 (eval $ac_compile) 2>&5
7788 ac_status=$?
7789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7790 (exit $ac_status); } &&
7791 { ac_try='test -s conftest.$ac_objext'
7792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7793 (eval $ac_try) 2>&5
7794 ac_status=$?
7795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7796 (exit $ac_status); }; }; then
7797 ac_lo=0 ac_mid=0
7798 while :; do
7799 cat >conftest.$ac_ext <<_ACEOF
7800#line $LINENO "configure"
7801#include "confdefs.h"
7802$ac_includes_default
7803#ifdef F77_DUMMY_MAIN
7804# ifdef __cplusplus
7805 extern "C"
7806# endif
7807 int F77_DUMMY_MAIN() { return 1; }
7808#endif
7809int
7810main ()
7811{
7812static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7813test_array [0] = 0
7814
7815 ;
7816 return 0;
7817}
7818_ACEOF
7819rm -f conftest.$ac_objext
7820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7821 (eval $ac_compile) 2>&5
7822 ac_status=$?
7823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7824 (exit $ac_status); } &&
7825 { ac_try='test -s conftest.$ac_objext'
7826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7827 (eval $ac_try) 2>&5
7828 ac_status=$?
7829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7830 (exit $ac_status); }; }; then
7831 ac_hi=$ac_mid; break
7832else
7833 echo "$as_me: failed program was:" >&5
7834cat conftest.$ac_ext >&5
7835ac_lo=`expr $ac_mid + 1`
7836 if test $ac_lo -le $ac_mid; then
7837 ac_lo= ac_hi=
7838 break
7839 fi
7840 ac_mid=`expr 2 '*' $ac_mid + 1`
7841fi
7842rm -f conftest.$ac_objext conftest.$ac_ext
7843 done
7844else
7845 echo "$as_me: failed program was:" >&5
7846cat conftest.$ac_ext >&5
7847cat >conftest.$ac_ext <<_ACEOF
7848#line $LINENO "configure"
7849#include "confdefs.h"
7850$ac_includes_default
7851#ifdef F77_DUMMY_MAIN
7852# ifdef __cplusplus
7853 extern "C"
7854# endif
7855 int F77_DUMMY_MAIN() { return 1; }
7856#endif
7857int
7858main ()
7859{
7860static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7861test_array [0] = 0
7862
7863 ;
7864 return 0;
7865}
7866_ACEOF
7867rm -f conftest.$ac_objext
7868if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7869 (eval $ac_compile) 2>&5
7870 ac_status=$?
7871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7872 (exit $ac_status); } &&
7873 { ac_try='test -s conftest.$ac_objext'
7874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7875 (eval $ac_try) 2>&5
7876 ac_status=$?
7877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7878 (exit $ac_status); }; }; then
7879 ac_hi=-1 ac_mid=-1
7880 while :; do
7881 cat >conftest.$ac_ext <<_ACEOF
7882#line $LINENO "configure"
7883#include "confdefs.h"
7884$ac_includes_default
7885#ifdef F77_DUMMY_MAIN
7886# ifdef __cplusplus
7887 extern "C"
7888# endif
7889 int F77_DUMMY_MAIN() { return 1; }
7890#endif
7891int
7892main ()
7893{
7894static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7895test_array [0] = 0
7896
7897 ;
7898 return 0;
7899}
7900_ACEOF
7901rm -f conftest.$ac_objext
7902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7903 (eval $ac_compile) 2>&5
7904 ac_status=$?
7905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7906 (exit $ac_status); } &&
7907 { ac_try='test -s conftest.$ac_objext'
7908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7909 (eval $ac_try) 2>&5
7910 ac_status=$?
7911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7912 (exit $ac_status); }; }; then
7913 ac_lo=$ac_mid; break
7914else
7915 echo "$as_me: failed program was:" >&5
7916cat conftest.$ac_ext >&5
7917ac_hi=`expr '(' $ac_mid ')' - 1`
7918 if test $ac_mid -le $ac_hi; then
7919 ac_lo= ac_hi=
7920 break
7921 fi
7922 ac_mid=`expr 2 '*' $ac_mid`
7923fi
7924rm -f conftest.$ac_objext conftest.$ac_ext
7925 done
7926else
7927 echo "$as_me: failed program was:" >&5
7928cat conftest.$ac_ext >&5
7929ac_lo= ac_hi=
7930fi
7931rm -f conftest.$ac_objext conftest.$ac_ext
7932fi
7933rm -f conftest.$ac_objext conftest.$ac_ext
7934# Binary search between lo and hi bounds.
7935while test "x$ac_lo" != "x$ac_hi"; do
7936 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7937 cat >conftest.$ac_ext <<_ACEOF
7938#line $LINENO "configure"
7939#include "confdefs.h"
7940$ac_includes_default
7941#ifdef F77_DUMMY_MAIN
7942# ifdef __cplusplus
7943 extern "C"
7944# endif
7945 int F77_DUMMY_MAIN() { return 1; }
7946#endif
7947int
7948main ()
7949{
7950static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7951test_array [0] = 0
7952
7953 ;
7954 return 0;
7955}
7956_ACEOF
7957rm -f conftest.$ac_objext
7958if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7959 (eval $ac_compile) 2>&5
7960 ac_status=$?
7961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7962 (exit $ac_status); } &&
7963 { ac_try='test -s conftest.$ac_objext'
7964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7965 (eval $ac_try) 2>&5
7966 ac_status=$?
7967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7968 (exit $ac_status); }; }; then
7969 ac_hi=$ac_mid
7970else
7971 echo "$as_me: failed program was:" >&5
7972cat conftest.$ac_ext >&5
7973ac_lo=`expr '(' $ac_mid ')' + 1`
7974fi
7975rm -f conftest.$ac_objext conftest.$ac_ext
7976done
7977case $ac_lo in
7978?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7979'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7980echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7981 { (exit 1); exit 1; }; } ;;
7982esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007983else
7984 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007985 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7986echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7987 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007988else
Martin v. Löwis11437992002-04-12 09:54:03 +00007989 cat >conftest.$ac_ext <<_ACEOF
7990#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007991#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007992$ac_includes_default
7993long longval () { return (long) (sizeof (fpos_t)); }
7994unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007995#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007996#include <stdlib.h>
7997#ifdef F77_DUMMY_MAIN
7998# ifdef __cplusplus
7999 extern "C"
8000# endif
8001 int F77_DUMMY_MAIN() { return 1; }
8002#endif
8003int
8004main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008005{
Martin v. Löwis11437992002-04-12 09:54:03 +00008006
8007 FILE *f = fopen ("conftest.val", "w");
8008 if (! f)
8009 exit (1);
8010 if (((long) (sizeof (fpos_t))) < 0)
8011 {
8012 long i = longval ();
8013 if (i != ((long) (sizeof (fpos_t))))
8014 exit (1);
8015 fprintf (f, "%ld\n", i);
8016 }
8017 else
8018 {
8019 unsigned long i = ulongval ();
8020 if (i != ((long) (sizeof (fpos_t))))
8021 exit (1);
8022 fprintf (f, "%lu\n", i);
8023 }
8024 exit (ferror (f) || fclose (f) != 0);
8025
8026 ;
8027 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008028}
Martin v. Löwis11437992002-04-12 09:54:03 +00008029_ACEOF
8030rm -f conftest$ac_exeext
8031if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8032 (eval $ac_link) 2>&5
8033 ac_status=$?
8034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8035 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8037 (eval $ac_try) 2>&5
8038 ac_status=$?
8039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8040 (exit $ac_status); }; }; then
8041 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008042else
Martin v. Löwis11437992002-04-12 09:54:03 +00008043 echo "$as_me: program exited with status $ac_status" >&5
8044echo "$as_me: failed program was:" >&5
8045cat conftest.$ac_ext >&5
8046( exit $ac_status )
8047{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8048echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8049 { (exit 1); exit 1; }; }
8050fi
8051rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8052fi
8053fi
8054rm -f conftest.val
8055else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008056 ac_cv_sizeof_fpos_t=0
8057fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008058fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008059echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8060echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8061cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008062#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008063_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008064
Michael W. Hudson54241132001-12-07 15:38:26 +00008065
8066
Martin v. Löwis11437992002-04-12 09:54:03 +00008067echo "$as_me:$LINENO: checking for long long support" >&5
8068echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008069have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008070cat >conftest.$ac_ext <<_ACEOF
8071#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008072#include "confdefs.h"
8073
Martin v. Löwis11437992002-04-12 09:54:03 +00008074#ifdef F77_DUMMY_MAIN
8075# ifdef __cplusplus
8076 extern "C"
8077# endif
8078 int F77_DUMMY_MAIN() { return 1; }
8079#endif
8080int
8081main ()
8082{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008083long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 ;
8085 return 0;
8086}
8087_ACEOF
8088rm -f conftest.$ac_objext
8089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8090 (eval $ac_compile) 2>&5
8091 ac_status=$?
8092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8093 (exit $ac_status); } &&
8094 { ac_try='test -s conftest.$ac_objext'
8095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8096 (eval $ac_try) 2>&5
8097 ac_status=$?
8098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8099 (exit $ac_status); }; }; then
8100
8101
8102cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008103#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008104_ACEOF
8105
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008106 have_long_long=yes
8107
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008108else
Martin v. Löwis11437992002-04-12 09:54:03 +00008109 echo "$as_me: failed program was:" >&5
8110cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008111fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008112rm -f conftest.$ac_objext conftest.$ac_ext
8113echo "$as_me:$LINENO: result: $have_long_long" >&5
8114echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008115if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008116echo "$as_me:$LINENO: checking for long long" >&5
8117echo $ECHO_N "checking for long long... $ECHO_C" >&6
8118if test "${ac_cv_type_long_long+set}" = set; then
8119 echo $ECHO_N "(cached) $ECHO_C" >&6
8120else
8121 cat >conftest.$ac_ext <<_ACEOF
8122#line $LINENO "configure"
8123#include "confdefs.h"
8124$ac_includes_default
8125#ifdef F77_DUMMY_MAIN
8126# ifdef __cplusplus
8127 extern "C"
8128# endif
8129 int F77_DUMMY_MAIN() { return 1; }
8130#endif
8131int
8132main ()
8133{
8134if ((long long *) 0)
8135 return 0;
8136if (sizeof (long long))
8137 return 0;
8138 ;
8139 return 0;
8140}
8141_ACEOF
8142rm -f conftest.$ac_objext
8143if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8144 (eval $ac_compile) 2>&5
8145 ac_status=$?
8146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8147 (exit $ac_status); } &&
8148 { ac_try='test -s conftest.$ac_objext'
8149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8150 (eval $ac_try) 2>&5
8151 ac_status=$?
8152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8153 (exit $ac_status); }; }; then
8154 ac_cv_type_long_long=yes
8155else
8156 echo "$as_me: failed program was:" >&5
8157cat conftest.$ac_ext >&5
8158ac_cv_type_long_long=no
8159fi
8160rm -f conftest.$ac_objext conftest.$ac_ext
8161fi
8162echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8163echo "${ECHO_T}$ac_cv_type_long_long" >&6
8164
8165echo "$as_me:$LINENO: checking size of long long" >&5
8166echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8167if test "${ac_cv_sizeof_long_long+set}" = set; then
8168 echo $ECHO_N "(cached) $ECHO_C" >&6
8169else
8170 if test "$ac_cv_type_long_long" = yes; then
8171 # The cast to unsigned long works around a bug in the HP C Compiler
8172 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8173 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8174 # This bug is HP SR number 8606223364.
8175 if test "$cross_compiling" = yes; then
8176 # Depending upon the size, compute the lo and hi bounds.
8177cat >conftest.$ac_ext <<_ACEOF
8178#line $LINENO "configure"
8179#include "confdefs.h"
8180$ac_includes_default
8181#ifdef F77_DUMMY_MAIN
8182# ifdef __cplusplus
8183 extern "C"
8184# endif
8185 int F77_DUMMY_MAIN() { return 1; }
8186#endif
8187int
8188main ()
8189{
8190static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8191test_array [0] = 0
8192
8193 ;
8194 return 0;
8195}
8196_ACEOF
8197rm -f conftest.$ac_objext
8198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8199 (eval $ac_compile) 2>&5
8200 ac_status=$?
8201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8202 (exit $ac_status); } &&
8203 { ac_try='test -s conftest.$ac_objext'
8204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8205 (eval $ac_try) 2>&5
8206 ac_status=$?
8207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8208 (exit $ac_status); }; }; then
8209 ac_lo=0 ac_mid=0
8210 while :; do
8211 cat >conftest.$ac_ext <<_ACEOF
8212#line $LINENO "configure"
8213#include "confdefs.h"
8214$ac_includes_default
8215#ifdef F77_DUMMY_MAIN
8216# ifdef __cplusplus
8217 extern "C"
8218# endif
8219 int F77_DUMMY_MAIN() { return 1; }
8220#endif
8221int
8222main ()
8223{
8224static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8225test_array [0] = 0
8226
8227 ;
8228 return 0;
8229}
8230_ACEOF
8231rm -f conftest.$ac_objext
8232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8233 (eval $ac_compile) 2>&5
8234 ac_status=$?
8235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8236 (exit $ac_status); } &&
8237 { ac_try='test -s conftest.$ac_objext'
8238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8239 (eval $ac_try) 2>&5
8240 ac_status=$?
8241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8242 (exit $ac_status); }; }; then
8243 ac_hi=$ac_mid; break
8244else
8245 echo "$as_me: failed program was:" >&5
8246cat conftest.$ac_ext >&5
8247ac_lo=`expr $ac_mid + 1`
8248 if test $ac_lo -le $ac_mid; then
8249 ac_lo= ac_hi=
8250 break
8251 fi
8252 ac_mid=`expr 2 '*' $ac_mid + 1`
8253fi
8254rm -f conftest.$ac_objext conftest.$ac_ext
8255 done
8256else
8257 echo "$as_me: failed program was:" >&5
8258cat conftest.$ac_ext >&5
8259cat >conftest.$ac_ext <<_ACEOF
8260#line $LINENO "configure"
8261#include "confdefs.h"
8262$ac_includes_default
8263#ifdef F77_DUMMY_MAIN
8264# ifdef __cplusplus
8265 extern "C"
8266# endif
8267 int F77_DUMMY_MAIN() { return 1; }
8268#endif
8269int
8270main ()
8271{
8272static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8273test_array [0] = 0
8274
8275 ;
8276 return 0;
8277}
8278_ACEOF
8279rm -f conftest.$ac_objext
8280if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8281 (eval $ac_compile) 2>&5
8282 ac_status=$?
8283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8284 (exit $ac_status); } &&
8285 { ac_try='test -s conftest.$ac_objext'
8286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8287 (eval $ac_try) 2>&5
8288 ac_status=$?
8289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8290 (exit $ac_status); }; }; then
8291 ac_hi=-1 ac_mid=-1
8292 while :; do
8293 cat >conftest.$ac_ext <<_ACEOF
8294#line $LINENO "configure"
8295#include "confdefs.h"
8296$ac_includes_default
8297#ifdef F77_DUMMY_MAIN
8298# ifdef __cplusplus
8299 extern "C"
8300# endif
8301 int F77_DUMMY_MAIN() { return 1; }
8302#endif
8303int
8304main ()
8305{
8306static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8307test_array [0] = 0
8308
8309 ;
8310 return 0;
8311}
8312_ACEOF
8313rm -f conftest.$ac_objext
8314if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8315 (eval $ac_compile) 2>&5
8316 ac_status=$?
8317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8318 (exit $ac_status); } &&
8319 { ac_try='test -s conftest.$ac_objext'
8320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8321 (eval $ac_try) 2>&5
8322 ac_status=$?
8323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8324 (exit $ac_status); }; }; then
8325 ac_lo=$ac_mid; break
8326else
8327 echo "$as_me: failed program was:" >&5
8328cat conftest.$ac_ext >&5
8329ac_hi=`expr '(' $ac_mid ')' - 1`
8330 if test $ac_mid -le $ac_hi; then
8331 ac_lo= ac_hi=
8332 break
8333 fi
8334 ac_mid=`expr 2 '*' $ac_mid`
8335fi
8336rm -f conftest.$ac_objext conftest.$ac_ext
8337 done
8338else
8339 echo "$as_me: failed program was:" >&5
8340cat conftest.$ac_ext >&5
8341ac_lo= ac_hi=
8342fi
8343rm -f conftest.$ac_objext conftest.$ac_ext
8344fi
8345rm -f conftest.$ac_objext conftest.$ac_ext
8346# Binary search between lo and hi bounds.
8347while test "x$ac_lo" != "x$ac_hi"; do
8348 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8349 cat >conftest.$ac_ext <<_ACEOF
8350#line $LINENO "configure"
8351#include "confdefs.h"
8352$ac_includes_default
8353#ifdef F77_DUMMY_MAIN
8354# ifdef __cplusplus
8355 extern "C"
8356# endif
8357 int F77_DUMMY_MAIN() { return 1; }
8358#endif
8359int
8360main ()
8361{
8362static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8363test_array [0] = 0
8364
8365 ;
8366 return 0;
8367}
8368_ACEOF
8369rm -f conftest.$ac_objext
8370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8371 (eval $ac_compile) 2>&5
8372 ac_status=$?
8373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8374 (exit $ac_status); } &&
8375 { ac_try='test -s conftest.$ac_objext'
8376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8377 (eval $ac_try) 2>&5
8378 ac_status=$?
8379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8380 (exit $ac_status); }; }; then
8381 ac_hi=$ac_mid
8382else
8383 echo "$as_me: failed program was:" >&5
8384cat conftest.$ac_ext >&5
8385ac_lo=`expr '(' $ac_mid ')' + 1`
8386fi
8387rm -f conftest.$ac_objext conftest.$ac_ext
8388done
8389case $ac_lo in
8390?*) ac_cv_sizeof_long_long=$ac_lo;;
8391'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8392echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8393 { (exit 1); exit 1; }; } ;;
8394esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008395else
8396 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008397 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8398echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8399 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008400else
Martin v. Löwis11437992002-04-12 09:54:03 +00008401 cat >conftest.$ac_ext <<_ACEOF
8402#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008403#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008404$ac_includes_default
8405long longval () { return (long) (sizeof (long long)); }
8406unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008407#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008408#include <stdlib.h>
8409#ifdef F77_DUMMY_MAIN
8410# ifdef __cplusplus
8411 extern "C"
8412# endif
8413 int F77_DUMMY_MAIN() { return 1; }
8414#endif
8415int
8416main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008417{
Martin v. Löwis11437992002-04-12 09:54:03 +00008418
8419 FILE *f = fopen ("conftest.val", "w");
8420 if (! f)
8421 exit (1);
8422 if (((long) (sizeof (long long))) < 0)
8423 {
8424 long i = longval ();
8425 if (i != ((long) (sizeof (long long))))
8426 exit (1);
8427 fprintf (f, "%ld\n", i);
8428 }
8429 else
8430 {
8431 unsigned long i = ulongval ();
8432 if (i != ((long) (sizeof (long long))))
8433 exit (1);
8434 fprintf (f, "%lu\n", i);
8435 }
8436 exit (ferror (f) || fclose (f) != 0);
8437
8438 ;
8439 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008440}
Martin v. Löwis11437992002-04-12 09:54:03 +00008441_ACEOF
8442rm -f conftest$ac_exeext
8443if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8444 (eval $ac_link) 2>&5
8445 ac_status=$?
8446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8447 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8449 (eval $ac_try) 2>&5
8450 ac_status=$?
8451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8452 (exit $ac_status); }; }; then
8453 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008454else
Martin v. Löwis11437992002-04-12 09:54:03 +00008455 echo "$as_me: program exited with status $ac_status" >&5
8456echo "$as_me: failed program was:" >&5
8457cat conftest.$ac_ext >&5
8458( exit $ac_status )
8459{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8460echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8461 { (exit 1); exit 1; }; }
8462fi
8463rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8464fi
8465fi
8466rm -f conftest.val
8467else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008468 ac_cv_sizeof_long_long=0
8469fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008470fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008471echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8472echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8473cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008474#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008475_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008476
Michael W. Hudson54241132001-12-07 15:38:26 +00008477
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008478fi
8479
Martin v. Löwis11437992002-04-12 09:54:03 +00008480echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8481echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008482have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008483cat >conftest.$ac_ext <<_ACEOF
8484#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008485#include "confdefs.h"
8486
Martin v. Löwis11437992002-04-12 09:54:03 +00008487#ifdef F77_DUMMY_MAIN
8488# ifdef __cplusplus
8489 extern "C"
8490# endif
8491 int F77_DUMMY_MAIN() { return 1; }
8492#endif
8493int
8494main ()
8495{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008496uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008497 ;
8498 return 0;
8499}
8500_ACEOF
8501rm -f conftest.$ac_objext
8502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8503 (eval $ac_compile) 2>&5
8504 ac_status=$?
8505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8506 (exit $ac_status); } &&
8507 { ac_try='test -s conftest.$ac_objext'
8508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8509 (eval $ac_try) 2>&5
8510 ac_status=$?
8511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8512 (exit $ac_status); }; }; then
8513
8514
8515cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008516#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008517_ACEOF
8518
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008519 have_uintptr_t=yes
8520
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008521else
Martin v. Löwis11437992002-04-12 09:54:03 +00008522 echo "$as_me: failed program was:" >&5
8523cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008524fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008525rm -f conftest.$ac_objext conftest.$ac_ext
8526echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8527echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008528if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008529echo "$as_me:$LINENO: checking for uintptr_t" >&5
8530echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8531if test "${ac_cv_type_uintptr_t+set}" = set; then
8532 echo $ECHO_N "(cached) $ECHO_C" >&6
8533else
8534 cat >conftest.$ac_ext <<_ACEOF
8535#line $LINENO "configure"
8536#include "confdefs.h"
8537$ac_includes_default
8538#ifdef F77_DUMMY_MAIN
8539# ifdef __cplusplus
8540 extern "C"
8541# endif
8542 int F77_DUMMY_MAIN() { return 1; }
8543#endif
8544int
8545main ()
8546{
8547if ((uintptr_t *) 0)
8548 return 0;
8549if (sizeof (uintptr_t))
8550 return 0;
8551 ;
8552 return 0;
8553}
8554_ACEOF
8555rm -f conftest.$ac_objext
8556if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8557 (eval $ac_compile) 2>&5
8558 ac_status=$?
8559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8560 (exit $ac_status); } &&
8561 { ac_try='test -s conftest.$ac_objext'
8562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8563 (eval $ac_try) 2>&5
8564 ac_status=$?
8565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8566 (exit $ac_status); }; }; then
8567 ac_cv_type_uintptr_t=yes
8568else
8569 echo "$as_me: failed program was:" >&5
8570cat conftest.$ac_ext >&5
8571ac_cv_type_uintptr_t=no
8572fi
8573rm -f conftest.$ac_objext conftest.$ac_ext
8574fi
8575echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8576echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8577
8578echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8579echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8580if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8581 echo $ECHO_N "(cached) $ECHO_C" >&6
8582else
8583 if test "$ac_cv_type_uintptr_t" = yes; then
8584 # The cast to unsigned long works around a bug in the HP C Compiler
8585 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8586 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8587 # This bug is HP SR number 8606223364.
8588 if test "$cross_compiling" = yes; then
8589 # Depending upon the size, compute the lo and hi bounds.
8590cat >conftest.$ac_ext <<_ACEOF
8591#line $LINENO "configure"
8592#include "confdefs.h"
8593$ac_includes_default
8594#ifdef F77_DUMMY_MAIN
8595# ifdef __cplusplus
8596 extern "C"
8597# endif
8598 int F77_DUMMY_MAIN() { return 1; }
8599#endif
8600int
8601main ()
8602{
8603static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8604test_array [0] = 0
8605
8606 ;
8607 return 0;
8608}
8609_ACEOF
8610rm -f conftest.$ac_objext
8611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8612 (eval $ac_compile) 2>&5
8613 ac_status=$?
8614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8615 (exit $ac_status); } &&
8616 { ac_try='test -s conftest.$ac_objext'
8617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8618 (eval $ac_try) 2>&5
8619 ac_status=$?
8620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8621 (exit $ac_status); }; }; then
8622 ac_lo=0 ac_mid=0
8623 while :; do
8624 cat >conftest.$ac_ext <<_ACEOF
8625#line $LINENO "configure"
8626#include "confdefs.h"
8627$ac_includes_default
8628#ifdef F77_DUMMY_MAIN
8629# ifdef __cplusplus
8630 extern "C"
8631# endif
8632 int F77_DUMMY_MAIN() { return 1; }
8633#endif
8634int
8635main ()
8636{
8637static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8638test_array [0] = 0
8639
8640 ;
8641 return 0;
8642}
8643_ACEOF
8644rm -f conftest.$ac_objext
8645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8646 (eval $ac_compile) 2>&5
8647 ac_status=$?
8648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8649 (exit $ac_status); } &&
8650 { ac_try='test -s conftest.$ac_objext'
8651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8652 (eval $ac_try) 2>&5
8653 ac_status=$?
8654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8655 (exit $ac_status); }; }; then
8656 ac_hi=$ac_mid; break
8657else
8658 echo "$as_me: failed program was:" >&5
8659cat conftest.$ac_ext >&5
8660ac_lo=`expr $ac_mid + 1`
8661 if test $ac_lo -le $ac_mid; then
8662 ac_lo= ac_hi=
8663 break
8664 fi
8665 ac_mid=`expr 2 '*' $ac_mid + 1`
8666fi
8667rm -f conftest.$ac_objext conftest.$ac_ext
8668 done
8669else
8670 echo "$as_me: failed program was:" >&5
8671cat conftest.$ac_ext >&5
8672cat >conftest.$ac_ext <<_ACEOF
8673#line $LINENO "configure"
8674#include "confdefs.h"
8675$ac_includes_default
8676#ifdef F77_DUMMY_MAIN
8677# ifdef __cplusplus
8678 extern "C"
8679# endif
8680 int F77_DUMMY_MAIN() { return 1; }
8681#endif
8682int
8683main ()
8684{
8685static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8686test_array [0] = 0
8687
8688 ;
8689 return 0;
8690}
8691_ACEOF
8692rm -f conftest.$ac_objext
8693if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8694 (eval $ac_compile) 2>&5
8695 ac_status=$?
8696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8697 (exit $ac_status); } &&
8698 { ac_try='test -s conftest.$ac_objext'
8699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8700 (eval $ac_try) 2>&5
8701 ac_status=$?
8702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8703 (exit $ac_status); }; }; then
8704 ac_hi=-1 ac_mid=-1
8705 while :; do
8706 cat >conftest.$ac_ext <<_ACEOF
8707#line $LINENO "configure"
8708#include "confdefs.h"
8709$ac_includes_default
8710#ifdef F77_DUMMY_MAIN
8711# ifdef __cplusplus
8712 extern "C"
8713# endif
8714 int F77_DUMMY_MAIN() { return 1; }
8715#endif
8716int
8717main ()
8718{
8719static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8720test_array [0] = 0
8721
8722 ;
8723 return 0;
8724}
8725_ACEOF
8726rm -f conftest.$ac_objext
8727if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8728 (eval $ac_compile) 2>&5
8729 ac_status=$?
8730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8731 (exit $ac_status); } &&
8732 { ac_try='test -s conftest.$ac_objext'
8733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8734 (eval $ac_try) 2>&5
8735 ac_status=$?
8736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8737 (exit $ac_status); }; }; then
8738 ac_lo=$ac_mid; break
8739else
8740 echo "$as_me: failed program was:" >&5
8741cat conftest.$ac_ext >&5
8742ac_hi=`expr '(' $ac_mid ')' - 1`
8743 if test $ac_mid -le $ac_hi; then
8744 ac_lo= ac_hi=
8745 break
8746 fi
8747 ac_mid=`expr 2 '*' $ac_mid`
8748fi
8749rm -f conftest.$ac_objext conftest.$ac_ext
8750 done
8751else
8752 echo "$as_me: failed program was:" >&5
8753cat conftest.$ac_ext >&5
8754ac_lo= ac_hi=
8755fi
8756rm -f conftest.$ac_objext conftest.$ac_ext
8757fi
8758rm -f conftest.$ac_objext conftest.$ac_ext
8759# Binary search between lo and hi bounds.
8760while test "x$ac_lo" != "x$ac_hi"; do
8761 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8762 cat >conftest.$ac_ext <<_ACEOF
8763#line $LINENO "configure"
8764#include "confdefs.h"
8765$ac_includes_default
8766#ifdef F77_DUMMY_MAIN
8767# ifdef __cplusplus
8768 extern "C"
8769# endif
8770 int F77_DUMMY_MAIN() { return 1; }
8771#endif
8772int
8773main ()
8774{
8775static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8776test_array [0] = 0
8777
8778 ;
8779 return 0;
8780}
8781_ACEOF
8782rm -f conftest.$ac_objext
8783if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8784 (eval $ac_compile) 2>&5
8785 ac_status=$?
8786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8787 (exit $ac_status); } &&
8788 { ac_try='test -s conftest.$ac_objext'
8789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8790 (eval $ac_try) 2>&5
8791 ac_status=$?
8792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8793 (exit $ac_status); }; }; then
8794 ac_hi=$ac_mid
8795else
8796 echo "$as_me: failed program was:" >&5
8797cat conftest.$ac_ext >&5
8798ac_lo=`expr '(' $ac_mid ')' + 1`
8799fi
8800rm -f conftest.$ac_objext conftest.$ac_ext
8801done
8802case $ac_lo in
8803?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8804'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8805echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8806 { (exit 1); exit 1; }; } ;;
8807esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008808else
8809 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008810 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8811echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8812 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008813else
Martin v. Löwis11437992002-04-12 09:54:03 +00008814 cat >conftest.$ac_ext <<_ACEOF
8815#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008816#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008817$ac_includes_default
8818long longval () { return (long) (sizeof (uintptr_t)); }
8819unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008820#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008821#include <stdlib.h>
8822#ifdef F77_DUMMY_MAIN
8823# ifdef __cplusplus
8824 extern "C"
8825# endif
8826 int F77_DUMMY_MAIN() { return 1; }
8827#endif
8828int
8829main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008830{
Martin v. Löwis11437992002-04-12 09:54:03 +00008831
8832 FILE *f = fopen ("conftest.val", "w");
8833 if (! f)
8834 exit (1);
8835 if (((long) (sizeof (uintptr_t))) < 0)
8836 {
8837 long i = longval ();
8838 if (i != ((long) (sizeof (uintptr_t))))
8839 exit (1);
8840 fprintf (f, "%ld\n", i);
8841 }
8842 else
8843 {
8844 unsigned long i = ulongval ();
8845 if (i != ((long) (sizeof (uintptr_t))))
8846 exit (1);
8847 fprintf (f, "%lu\n", i);
8848 }
8849 exit (ferror (f) || fclose (f) != 0);
8850
8851 ;
8852 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008853}
Martin v. Löwis11437992002-04-12 09:54:03 +00008854_ACEOF
8855rm -f conftest$ac_exeext
8856if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8857 (eval $ac_link) 2>&5
8858 ac_status=$?
8859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8860 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8862 (eval $ac_try) 2>&5
8863 ac_status=$?
8864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8865 (exit $ac_status); }; }; then
8866 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008867else
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 echo "$as_me: program exited with status $ac_status" >&5
8869echo "$as_me: failed program was:" >&5
8870cat conftest.$ac_ext >&5
8871( exit $ac_status )
8872{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8873echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8874 { (exit 1); exit 1; }; }
8875fi
8876rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8877fi
8878fi
8879rm -f conftest.val
8880else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008881 ac_cv_sizeof_uintptr_t=0
8882fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008883fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008884echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8885echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8886cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008887#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008888_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008889
Michael W. Hudson54241132001-12-07 15:38:26 +00008890
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008891fi
8892
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008893# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008894echo "$as_me:$LINENO: checking size of off_t" >&5
8895echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8896if test "${ac_cv_sizeof_off_t+set}" = set; then
8897 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008898else
8899 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008900 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008901else
Martin v. Löwis11437992002-04-12 09:54:03 +00008902 cat >conftest.$ac_ext <<_ACEOF
8903#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008904#include "confdefs.h"
8905#include <stdio.h>
8906#include <sys/types.h>
8907main()
8908{
8909 FILE *f=fopen("conftestval", "w");
8910 if (!f) exit(1);
8911 fprintf(f, "%d\n", sizeof(off_t));
8912 exit(0);
8913}
Martin v. Löwis11437992002-04-12 09:54:03 +00008914_ACEOF
8915rm -f conftest$ac_exeext
8916if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8917 (eval $ac_link) 2>&5
8918 ac_status=$?
8919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8922 (eval $ac_try) 2>&5
8923 ac_status=$?
8924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8925 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008926 ac_cv_sizeof_off_t=`cat conftestval`
8927else
Martin v. Löwis11437992002-04-12 09:54:03 +00008928 echo "$as_me: program exited with status $ac_status" >&5
8929echo "$as_me: failed program was:" >&5
8930cat conftest.$ac_ext >&5
8931( exit $ac_status )
8932ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008933fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008934rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008935fi
8936
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008937fi
8938
Martin v. Löwis11437992002-04-12 09:54:03 +00008939echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8940echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8941
8942cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008943#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008944_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008945
Michael W. Hudson54241132001-12-07 15:38:26 +00008946
Martin v. Löwis11437992002-04-12 09:54:03 +00008947echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8948echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008949if test "$have_long_long" = yes -a \
8950 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8951 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008952
Martin v. Löwis11437992002-04-12 09:54:03 +00008953cat >>confdefs.h <<\_ACEOF
8954#define HAVE_LARGEFILE_SUPPORT 1
8955_ACEOF
8956
8957 echo "$as_me:$LINENO: result: yes" >&5
8958echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008959else
Martin v. Löwis11437992002-04-12 09:54:03 +00008960 echo "$as_me:$LINENO: result: no" >&5
8961echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008962fi
8963
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008964# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008965echo "$as_me:$LINENO: checking size of time_t" >&5
8966echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8967if test "${ac_cv_sizeof_time_t+set}" = set; then
8968 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008969else
8970 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008971 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008972else
Martin v. Löwis11437992002-04-12 09:54:03 +00008973 cat >conftest.$ac_ext <<_ACEOF
8974#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008975#include "confdefs.h"
8976#include <stdio.h>
8977#include <time.h>
8978main()
8979{
8980 FILE *f=fopen("conftestval", "w");
8981 if (!f) exit(1);
8982 fprintf(f, "%d\n", sizeof(time_t));
8983 exit(0);
8984}
Martin v. Löwis11437992002-04-12 09:54:03 +00008985_ACEOF
8986rm -f conftest$ac_exeext
8987if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8988 (eval $ac_link) 2>&5
8989 ac_status=$?
8990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8991 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8993 (eval $ac_try) 2>&5
8994 ac_status=$?
8995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8996 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008997 ac_cv_sizeof_time_t=`cat conftestval`
8998else
Martin v. Löwis11437992002-04-12 09:54:03 +00008999 echo "$as_me: program exited with status $ac_status" >&5
9000echo "$as_me: failed program was:" >&5
9001cat conftest.$ac_ext >&5
9002( exit $ac_status )
9003ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009004fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009005rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009006fi
9007
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009008fi
9009
Martin v. Löwis11437992002-04-12 09:54:03 +00009010echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9011echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9012
9013cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009014#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009015_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009016
Michael W. Hudson54241132001-12-07 15:38:26 +00009017
9018
Trent Mick635f6fb2000-08-23 21:33:05 +00009019# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009020ac_save_cc="$CC"
9021if test "$ac_cv_kpthread" = "yes"
9022then CC="$CC -Kpthread"
9023fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009024echo "$as_me:$LINENO: checking for pthread_t" >&5
9025echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009026have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009027cat >conftest.$ac_ext <<_ACEOF
9028#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009029#include "confdefs.h"
9030#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009031#ifdef F77_DUMMY_MAIN
9032# ifdef __cplusplus
9033 extern "C"
9034# endif
9035 int F77_DUMMY_MAIN() { return 1; }
9036#endif
9037int
9038main ()
9039{
Guido van Rossum12580492000-09-24 16:47:19 +00009040pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 ;
9042 return 0;
9043}
9044_ACEOF
9045rm -f conftest.$ac_objext
9046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9047 (eval $ac_compile) 2>&5
9048 ac_status=$?
9049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9050 (exit $ac_status); } &&
9051 { ac_try='test -s conftest.$ac_objext'
9052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9053 (eval $ac_try) 2>&5
9054 ac_status=$?
9055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9056 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009057 have_pthread_t=yes
9058else
Martin v. Löwis11437992002-04-12 09:54:03 +00009059 echo "$as_me: failed program was:" >&5
9060cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009061fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009062rm -f conftest.$ac_objext conftest.$ac_ext
9063echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9064echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009065if test "$have_pthread_t" = yes ; then
9066 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009067 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9068echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9069 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9070 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009071else
9072 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009073 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009074else
Martin v. Löwis11437992002-04-12 09:54:03 +00009075 cat >conftest.$ac_ext <<_ACEOF
9076#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009077#include "confdefs.h"
9078#include <stdio.h>
9079 #include <pthread.h>
9080 main()
9081 {
9082 FILE *f=fopen("conftestval", "w");
9083 if (!f) exit(1);
9084 fprintf(f, "%d\n", sizeof(pthread_t));
9085 exit(0);
9086 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009087_ACEOF
9088rm -f conftest$ac_exeext
9089if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9090 (eval $ac_link) 2>&5
9091 ac_status=$?
9092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9093 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9095 (eval $ac_try) 2>&5
9096 ac_status=$?
9097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9098 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009099 ac_cv_sizeof_pthread_t=`cat conftestval`
9100else
Martin v. Löwis11437992002-04-12 09:54:03 +00009101 echo "$as_me: program exited with status $ac_status" >&5
9102echo "$as_me: failed program was:" >&5
9103cat conftest.$ac_ext >&5
9104( exit $ac_status )
9105ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009106fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009107rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009108fi
9109
Trent Mick635f6fb2000-08-23 21:33:05 +00009110fi
9111
Martin v. Löwis11437992002-04-12 09:54:03 +00009112 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9113echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9114
9115cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009116#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009117_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009118
9119fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009120CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009121
Martin v. Löwis11437992002-04-12 09:54:03 +00009122echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9123echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009124# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9125if test "${enable_toolbox_glue+set}" = set; then
9126 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009127
Martin v. Löwis11437992002-04-12 09:54:03 +00009128fi;
Jack Jansene578a632001-08-15 01:27:14 +00009129
9130if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009131then
Jack Jansene578a632001-08-15 01:27:14 +00009132 case $ac_sys_system/$ac_sys_release in
9133 Darwin/*)
9134 enable_toolbox_glue="yes";;
9135 *)
9136 enable_toolbox_glue="no";;
9137 esac
9138fi
9139case "$enable_toolbox_glue" in
9140yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009141 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009142 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009143 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009144
9145cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009146#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009147_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009148
9149 ;;
9150*)
9151 extra_frameworks=""
9152 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009153 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009154 ;;
9155esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009156echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9157echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009158
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009159
9160case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009161 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009162 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009163 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009164 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9165 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009166 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009167 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009168 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009169 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9170 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009171esac
9172
Martin v. Löwis11437992002-04-12 09:54:03 +00009173echo "$as_me:$LINENO: checking for --enable-framework" >&5
9174echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009175if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009176then
Jack Jansenca06bc62001-08-03 15:32:23 +00009177 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009178 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009179 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009180 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009181
Martin v. Löwis11437992002-04-12 09:54:03 +00009182cat >>confdefs.h <<\_ACEOF
9183#define WITH_NEXT_FRAMEWORK 1
9184_ACEOF
9185
9186 echo "$as_me:$LINENO: result: yes" >&5
9187echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009188else
Martin v. Löwis11437992002-04-12 09:54:03 +00009189 echo "$as_me:$LINENO: result: no" >&5
9190echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009191fi
9192
Martin v. Löwis11437992002-04-12 09:54:03 +00009193echo "$as_me:$LINENO: checking for dyld" >&5
9194echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009195case $ac_sys_system/$ac_sys_release in
9196 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009197
Martin v. Löwis11437992002-04-12 09:54:03 +00009198cat >>confdefs.h <<\_ACEOF
9199#define WITH_DYLD 1
9200_ACEOF
9201
9202 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9203echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009204 ;;
9205 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009206 echo "$as_me:$LINENO: result: no" >&5
9207echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009208 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009209esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009210
Guido van Rossum0a516c91994-09-12 10:58:40 +00009211# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009212
Michael W. Hudson54241132001-12-07 15:38:26 +00009213
9214
9215
9216
Guido van Rossum0a516c91994-09-12 10:58:40 +00009217# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009218# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009219echo "$as_me:$LINENO: checking SO" >&5
9220echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009221if test -z "$SO"
9222then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009223 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009224 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009225 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009226 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009227 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009228fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009229echo "$as_me:$LINENO: result: $SO" >&5
9230echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009231# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009232# -- "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 +00009233# (Shared libraries in this instance are shared modules to be loaded into
9234# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009235echo "$as_me:$LINENO: checking LDSHARED" >&5
9236echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009237if test -z "$LDSHARED"
9238then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009239 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009240 AIX*)
9241 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009242 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009243 ;;
9244 BeOS*)
9245 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009246 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009247 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009248 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009249 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009250 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009251 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009252 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009253 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009254 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009255 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009256 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009257 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9258 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009259 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009260 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9261 if test "$enable_framework" ; then
9262 # Link against the framework. All externals should be defined.
9263 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9264 else
9265 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009266 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009267 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009268 Darwin/*)
9269 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9270 if test "$enable_framework" ; then
9271 # Link against the framework. All externals should be defined.
9272 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9273 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009274 # No framework, use the Python app as bundle-loader
9275 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9276 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009277 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009278 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009279 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009280 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009281 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009282 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009283 then
9284 LDSHARED="cc -shared ${LDFLAGS}"
9285 else
9286 LDSHARED="ld -Bshareable ${LDFLAGS}"
9287 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009288 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009289 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009290 if test "$GCC" = "yes"
9291 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009292 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009293 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009294 SCO_SV*) LDSHARED="$(CC) -Wl,-G,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00009295 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009296 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009297 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009298 *) LDSHARED="ld";;
9299 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009300fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009301echo "$as_me:$LINENO: result: $LDSHARED" >&5
9302echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009303BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009304# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009305# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009306echo "$as_me:$LINENO: checking CCSHARED" >&5
9307echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009308if test -z "$CCSHARED"
9309then
Guido van Rossum07397971997-04-29 21:49:50 +00009310 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009311 SunOS*) if test "$GCC" = yes;
9312 then CCSHARED="-fPIC";
9313 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009314 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009315 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009316 else CCSHARED="+z";
9317 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009318 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009319 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009320 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009321 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009322 if test "$GCC" = "yes"
9323 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009324 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009325 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009326 SCO_SV*)
9327 if test "$GCC" = "yes"
9328 then CCSHARED="-fPIC"
9329 else CCSHARED="-Kpic -belf"
9330 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009331 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009332 IRIX*/6*) case $CC in
9333 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009334 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009335 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009336 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009337 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009338fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009339echo "$as_me:$LINENO: result: $CCSHARED" >&5
9340echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009341# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009342# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009343echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9344echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009345if test -z "$LINKFORSHARED"
9346then
Guido van Rossum07397971997-04-29 21:49:50 +00009347 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009348 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009349 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009350 LINKFORSHARED="-Wl,-E -Wl,+s";;
9351# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009352 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009353 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009354 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009355 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009356 # -u __dummy makes the linker aware of the objc runtime
9357 # in System.framework; otherwise, __objcInit (referenced in
9358 # crt1.o) gets erroneously defined as common, which breaks dynamic
9359 # loading of any modules which reference it in System.framework.
9360 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9361 # not used by the core itself but which needs to be in the core so
9362 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009363 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009364 if test "$enable_framework"
9365 then
9366 LINKFORSHARED="$LINKFORSHARED -framework Python"
9367 fi
9368 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009369 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009370 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009371 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009373 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9374 then
9375 LINKFORSHARED="-Wl,--export-dynamic"
9376 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009377 SunOS/5*) case $CC in
9378 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009379 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009380 then
9381 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009382 fi;;
9383 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009384 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009385fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009386echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9387echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009388
Michael W. Hudson54241132001-12-07 15:38:26 +00009389
Martin v. Löwis11437992002-04-12 09:54:03 +00009390echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9391echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009392if test ! "$LIBRARY" = "$LDLIBRARY"
9393then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009394 case $ac_sys_system in
9395 CYGWIN*)
9396 # Cygwin needs CCSHARED when building extension DLLs
9397 # but not when building the interpreter DLL.
9398 CFLAGSFORSHARED='';;
9399 *)
9400 CFLAGSFORSHARED='$(CCSHARED)'
9401 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009402fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009403echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9404echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009405
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009406# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9407# library (with --enable-shared).
9408# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009409# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9410# if it is not required, since it creates a dependency of the shared library
9411# to LIBS. This, in turn, means that applications linking the shared libpython
9412# don't need to link LIBS explicitly. The default should be only changed
9413# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009414
9415echo "$as_me:$LINENO: checking SHLIBS" >&5
9416echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9417case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009418 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009419 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009420esac
9421echo "$as_me:$LINENO: result: $SHLIBS" >&5
9422echo "${ECHO_T}$SHLIBS" >&6
9423
9424
Guido van Rossum627b2d71993-12-24 10:39:16 +00009425# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009426
9427echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9428echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9429if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9430 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009431else
Martin v. Löwis11437992002-04-12 09:54:03 +00009432 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009433LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009434cat >conftest.$ac_ext <<_ACEOF
9435#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009436#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009437
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009438/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009439#ifdef __cplusplus
9440extern "C"
9441#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009442/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 builtin and then its argument prototype would still apply. */
9444char dlopen ();
9445#ifdef F77_DUMMY_MAIN
9446# ifdef __cplusplus
9447 extern "C"
9448# endif
9449 int F77_DUMMY_MAIN() { return 1; }
9450#endif
9451int
9452main ()
9453{
9454dlopen ();
9455 ;
9456 return 0;
9457}
9458_ACEOF
9459rm -f conftest.$ac_objext conftest$ac_exeext
9460if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9461 (eval $ac_link) 2>&5
9462 ac_status=$?
9463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9464 (exit $ac_status); } &&
9465 { ac_try='test -s conftest$ac_exeext'
9466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9467 (eval $ac_try) 2>&5
9468 ac_status=$?
9469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9470 (exit $ac_status); }; }; then
9471 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009472else
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 echo "$as_me: failed program was:" >&5
9474cat conftest.$ac_ext >&5
9475ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009476fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009477rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9478LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009479fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009480echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9481echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9482if test $ac_cv_lib_dl_dlopen = yes; then
9483 cat >>confdefs.h <<_ACEOF
9484#define HAVE_LIBDL 1
9485_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009486
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009487 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009488
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009489fi
9490 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009491
9492echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9493echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9494if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9495 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009496else
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009498LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009499cat >conftest.$ac_ext <<_ACEOF
9500#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009501#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009502
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009503/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009504#ifdef __cplusplus
9505extern "C"
9506#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009507/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 builtin and then its argument prototype would still apply. */
9509char shl_load ();
9510#ifdef F77_DUMMY_MAIN
9511# ifdef __cplusplus
9512 extern "C"
9513# endif
9514 int F77_DUMMY_MAIN() { return 1; }
9515#endif
9516int
9517main ()
9518{
9519shl_load ();
9520 ;
9521 return 0;
9522}
9523_ACEOF
9524rm -f conftest.$ac_objext conftest$ac_exeext
9525if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9526 (eval $ac_link) 2>&5
9527 ac_status=$?
9528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9529 (exit $ac_status); } &&
9530 { ac_try='test -s conftest$ac_exeext'
9531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9532 (eval $ac_try) 2>&5
9533 ac_status=$?
9534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9535 (exit $ac_status); }; }; then
9536 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009537else
Martin v. Löwis11437992002-04-12 09:54:03 +00009538 echo "$as_me: failed program was:" >&5
9539cat conftest.$ac_ext >&5
9540ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009541fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009542rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9543LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009544fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009545echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9546echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9547if test $ac_cv_lib_dld_shl_load = yes; then
9548 cat >>confdefs.h <<_ACEOF
9549#define HAVE_LIBDLD 1
9550_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009551
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009552 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009553
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009554fi
9555 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009556echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9557echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9558if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009559 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009560else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009561 ac_func_search_save_LIBS=$LIBS
9562ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009563cat >conftest.$ac_ext <<_ACEOF
9564#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009565#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009566
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009567/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009568#ifdef __cplusplus
9569extern "C"
9570#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009571/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009572 builtin and then its argument prototype would still apply. */
9573char sem_init ();
9574#ifdef F77_DUMMY_MAIN
9575# ifdef __cplusplus
9576 extern "C"
9577# endif
9578 int F77_DUMMY_MAIN() { return 1; }
9579#endif
9580int
9581main ()
9582{
9583sem_init ();
9584 ;
9585 return 0;
9586}
9587_ACEOF
9588rm -f conftest.$ac_objext conftest$ac_exeext
9589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9590 (eval $ac_link) 2>&5
9591 ac_status=$?
9592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9593 (exit $ac_status); } &&
9594 { ac_try='test -s conftest$ac_exeext'
9595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9596 (eval $ac_try) 2>&5
9597 ac_status=$?
9598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9599 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009600 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009601else
Martin v. Löwis11437992002-04-12 09:54:03 +00009602 echo "$as_me: failed program was:" >&5
9603cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009604fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009605rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009606if test "$ac_cv_search_sem_init" = no; then
9607 for ac_lib in rt posix4; do
9608 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9609 cat >conftest.$ac_ext <<_ACEOF
9610#line $LINENO "configure"
9611#include "confdefs.h"
9612
9613/* Override any gcc2 internal prototype to avoid an error. */
9614#ifdef __cplusplus
9615extern "C"
9616#endif
9617/* We use char because int might match the return type of a gcc2
9618 builtin and then its argument prototype would still apply. */
9619char sem_init ();
9620#ifdef F77_DUMMY_MAIN
9621# ifdef __cplusplus
9622 extern "C"
9623# endif
9624 int F77_DUMMY_MAIN() { return 1; }
9625#endif
9626int
9627main ()
9628{
9629sem_init ();
9630 ;
9631 return 0;
9632}
Martin v. Löwis11437992002-04-12 09:54:03 +00009633_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009634rm -f conftest.$ac_objext conftest$ac_exeext
9635if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9636 (eval $ac_link) 2>&5
9637 ac_status=$?
9638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9639 (exit $ac_status); } &&
9640 { ac_try='test -s conftest$ac_exeext'
9641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9642 (eval $ac_try) 2>&5
9643 ac_status=$?
9644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9645 (exit $ac_status); }; }; then
9646 ac_cv_search_sem_init="-l$ac_lib"
9647break
9648else
9649 echo "$as_me: failed program was:" >&5
9650cat conftest.$ac_ext >&5
9651fi
9652rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9653 done
9654fi
9655LIBS=$ac_func_search_save_LIBS
9656fi
9657echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9658echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9659if test "$ac_cv_search_sem_init" != no; then
9660 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009661
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009662fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009663 # 'Real Time' functions on Solaris,
9664 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009665
9666# checks for system dependent C++ extensions support
9667case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9669echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9670 cat >conftest.$ac_ext <<_ACEOF
9671#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009672#include "confdefs.h"
9673#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009674#ifdef F77_DUMMY_MAIN
9675# ifdef __cplusplus
9676 extern "C"
9677# endif
9678 int F77_DUMMY_MAIN() { return 1; }
9679#endif
9680int
9681main ()
9682{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009683loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 ;
9685 return 0;
9686}
9687_ACEOF
9688rm -f conftest.$ac_objext conftest$ac_exeext
9689if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9690 (eval $ac_link) 2>&5
9691 ac_status=$?
9692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9693 (exit $ac_status); } &&
9694 { ac_try='test -s conftest$ac_exeext'
9695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9696 (eval $ac_try) 2>&5
9697 ac_status=$?
9698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9699 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009700
Martin v. Löwis11437992002-04-12 09:54:03 +00009701cat >>confdefs.h <<\_ACEOF
9702#define AIX_GENUINE_CPLUSPLUS 1
9703_ACEOF
9704
9705 echo "$as_me:$LINENO: result: yes" >&5
9706echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009707else
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 echo "$as_me: failed program was:" >&5
9709cat conftest.$ac_ext >&5
9710echo "$as_me:$LINENO: result: no" >&5
9711echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009712fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009713rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009714 *) ;;
9715esac
9716
Guido van Rossum70c7f481998-03-26 18:44:10 +00009717# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9718# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009719# BeOS' sockets are stashed in libnet.
9720case "$ac_sys_system" in
9721IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009722*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009723echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9724echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9725if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9726 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009727else
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009729LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009730cat >conftest.$ac_ext <<_ACEOF
9731#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009732#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009733
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009734/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009735#ifdef __cplusplus
9736extern "C"
9737#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009738/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 builtin and then its argument prototype would still apply. */
9740char t_open ();
9741#ifdef F77_DUMMY_MAIN
9742# ifdef __cplusplus
9743 extern "C"
9744# endif
9745 int F77_DUMMY_MAIN() { return 1; }
9746#endif
9747int
9748main ()
9749{
9750t_open ();
9751 ;
9752 return 0;
9753}
9754_ACEOF
9755rm -f conftest.$ac_objext conftest$ac_exeext
9756if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9757 (eval $ac_link) 2>&5
9758 ac_status=$?
9759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9760 (exit $ac_status); } &&
9761 { ac_try='test -s conftest$ac_exeext'
9762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9763 (eval $ac_try) 2>&5
9764 ac_status=$?
9765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9766 (exit $ac_status); }; }; then
9767 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009768else
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 echo "$as_me: failed program was:" >&5
9770cat conftest.$ac_ext >&5
9771ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009772fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009773rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9774LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009775fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009776echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9777echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9778if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009779 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009780fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009781 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009782echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9783echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9784if test "${ac_cv_lib_socket_socket+set}" = set; then
9785 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009786else
Martin v. Löwis11437992002-04-12 09:54:03 +00009787 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009788LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009789cat >conftest.$ac_ext <<_ACEOF
9790#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009791#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009792
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009793/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009794#ifdef __cplusplus
9795extern "C"
9796#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009797/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 builtin and then its argument prototype would still apply. */
9799char socket ();
9800#ifdef F77_DUMMY_MAIN
9801# ifdef __cplusplus
9802 extern "C"
9803# endif
9804 int F77_DUMMY_MAIN() { return 1; }
9805#endif
9806int
9807main ()
9808{
9809socket ();
9810 ;
9811 return 0;
9812}
9813_ACEOF
9814rm -f conftest.$ac_objext conftest$ac_exeext
9815if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9816 (eval $ac_link) 2>&5
9817 ac_status=$?
9818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9819 (exit $ac_status); } &&
9820 { ac_try='test -s conftest$ac_exeext'
9821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9822 (eval $ac_try) 2>&5
9823 ac_status=$?
9824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9825 (exit $ac_status); }; }; then
9826 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009827else
Martin v. Löwis11437992002-04-12 09:54:03 +00009828 echo "$as_me: failed program was:" >&5
9829cat conftest.$ac_ext >&5
9830ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009831fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009832rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9833LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009834fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009835echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9836echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9837if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009838 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009839fi
9840 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009841;;
9842esac
9843case "$ac_sys_system" in
9844BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009845echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9846echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9847if test "${ac_cv_lib_net_socket+set}" = set; then
9848 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009849else
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009851LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009852cat >conftest.$ac_ext <<_ACEOF
9853#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009854#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009855
Guido van Rossumad678af1998-10-02 14:42:15 +00009856/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009857#ifdef __cplusplus
9858extern "C"
9859#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009860/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 builtin and then its argument prototype would still apply. */
9862char socket ();
9863#ifdef F77_DUMMY_MAIN
9864# ifdef __cplusplus
9865 extern "C"
9866# endif
9867 int F77_DUMMY_MAIN() { return 1; }
9868#endif
9869int
9870main ()
9871{
9872socket ();
9873 ;
9874 return 0;
9875}
9876_ACEOF
9877rm -f conftest.$ac_objext conftest$ac_exeext
9878if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9879 (eval $ac_link) 2>&5
9880 ac_status=$?
9881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9882 (exit $ac_status); } &&
9883 { ac_try='test -s conftest$ac_exeext'
9884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9885 (eval $ac_try) 2>&5
9886 ac_status=$?
9887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9888 (exit $ac_status); }; }; then
9889 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009890else
Martin v. Löwis11437992002-04-12 09:54:03 +00009891 echo "$as_me: failed program was:" >&5
9892cat conftest.$ac_ext >&5
9893ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009894fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009895rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9896LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009897fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009898echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9899echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9900if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009901 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009902fi
9903 # BeOS
9904;;
9905esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009906
Martin v. Löwis11437992002-04-12 09:54:03 +00009907echo "$as_me:$LINENO: checking for --with-libs" >&5
9908echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9909
Guido van Rossuma68acba1996-07-31 17:36:39 +00009910# Check whether --with-libs or --without-libs was given.
9911if test "${with_libs+set}" = set; then
9912 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009913
9914echo "$as_me:$LINENO: result: $withval" >&5
9915echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009916LIBS="$withval $LIBS"
9917
9918else
Martin v. Löwis11437992002-04-12 09:54:03 +00009919 echo "$as_me:$LINENO: result: no" >&5
9920echo "${ECHO_T}no" >&6
9921fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009922
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009923# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009924
9925
Martin v. Löwis11437992002-04-12 09:54:03 +00009926echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9927echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9928
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009929# Check whether --with-signal-module or --without-signal-module was given.
9930if test "${with_signal_module+set}" = set; then
9931 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009932
Martin v. Löwis11437992002-04-12 09:54:03 +00009933fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009934
9935if test -z "$with_signal_module"
9936then with_signal_module="yes"
9937fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009938echo "$as_me:$LINENO: result: $with_signal_module" >&5
9939echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009940
9941if test "${with_signal_module}" = "yes"; then
9942 USE_SIGNAL_MODULE=""
9943 SIGNAL_OBJS=""
9944else
9945 USE_SIGNAL_MODULE="#"
9946 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9947fi
9948
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009949# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009950
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009951USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009952
Martin v. Löwis11437992002-04-12 09:54:03 +00009953echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9954echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9955
Guido van Rossumec2f0731997-01-22 20:54:01 +00009956
9957# Check whether --with-dec-threads or --without-dec-threads was given.
9958if test "${with_dec_threads+set}" = set; then
9959 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009960
9961echo "$as_me:$LINENO: result: $withval" >&5
9962echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009963LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009964if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009965 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009966fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009967else
Martin v. Löwis11437992002-04-12 09:54:03 +00009968 echo "$as_me:$LINENO: result: no" >&5
9969echo "${ECHO_T}no" >&6
9970fi;
9971
9972# Templates for things AC_DEFINEd more than once.
9973# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009974
9975
Martin v. Löwis11437992002-04-12 09:54:03 +00009976
9977
9978
9979
9980
9981echo "$as_me:$LINENO: checking for --with-threads" >&5
9982echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9983
Guido van Rossumec2f0731997-01-22 20:54:01 +00009984# Check whether --with-threads or --without-threads was given.
9985if test "${with_threads+set}" = set; then
9986 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009987
Martin v. Löwis11437992002-04-12 09:54:03 +00009988fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009989
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009990# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009991
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009992# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009993if test "${with_thread+set}" = set; then
9994 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009995 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +00009996fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009997
9998if test -z "$with_threads"
9999then with_threads="yes"
10000fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010001echo "$as_me:$LINENO: result: $with_threads" >&5
10002echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010003
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010004
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010005if test "$with_threads" = "no"
10006then
10007 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010008elif test "$ac_cv_pthread_is_default" = yes
10009then
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010011#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010012_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010013
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010014 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010015 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010016#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010017_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010018
10019 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010021elif test "$ac_cv_kpthread" = "yes"
10022then
10023 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010024 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010025#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010026_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010027
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010028 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010029 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010030else
10031 if test ! -z "$with_threads" -a -d "$with_threads"
10032 then LDFLAGS="$LDFLAGS -L$with_threads"
10033 fi
10034 if test ! -z "$withval" -a -d "$withval"
10035 then LDFLAGS="$LDFLAGS -L$withval"
10036 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010037
10038 # According to the POSIX spec, a pthreads implementation must
10039 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010040 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10041echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10042 cat >conftest.$ac_ext <<_ACEOF
10043#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010044#include "confdefs.h"
10045#include <unistd.h>
10046 #ifdef _POSIX_THREADS
10047 yes
10048 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010049
10050_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010051if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10052 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010053 unistd_defines_pthreads=yes
10054else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010055 unistd_defines_pthreads=no
10056fi
10057rm -f conftest*
10058
Martin v. Löwis11437992002-04-12 09:54:03 +000010059 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10060echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010061
Martin v. Löwis11437992002-04-12 09:54:03 +000010062 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010063#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010064_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010065
Martin v. Löwis11437992002-04-12 09:54:03 +000010066 if test "${ac_cv_header_cthreads_h+set}" = set; then
10067 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10068echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10069if test "${ac_cv_header_cthreads_h+set}" = set; then
10070 echo $ECHO_N "(cached) $ECHO_C" >&6
10071fi
10072echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10073echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010074else
Martin v. Löwis11437992002-04-12 09:54:03 +000010075 # Is the header compilable?
10076echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10077echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10078cat >conftest.$ac_ext <<_ACEOF
10079#line $LINENO "configure"
10080#include "confdefs.h"
10081$ac_includes_default
10082#include <cthreads.h>
10083_ACEOF
10084rm -f conftest.$ac_objext
10085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10086 (eval $ac_compile) 2>&5
10087 ac_status=$?
10088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10089 (exit $ac_status); } &&
10090 { ac_try='test -s conftest.$ac_objext'
10091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10092 (eval $ac_try) 2>&5
10093 ac_status=$?
10094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10095 (exit $ac_status); }; }; then
10096 ac_header_compiler=yes
10097else
10098 echo "$as_me: failed program was:" >&5
10099cat conftest.$ac_ext >&5
10100ac_header_compiler=no
10101fi
10102rm -f conftest.$ac_objext conftest.$ac_ext
10103echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10104echo "${ECHO_T}$ac_header_compiler" >&6
10105
10106# Is the header present?
10107echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10108echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10109cat >conftest.$ac_ext <<_ACEOF
10110#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010111#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010112#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010113_ACEOF
10114if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10115 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10116 ac_status=$?
10117 egrep -v '^ *\+' conftest.er1 >conftest.err
10118 rm -f conftest.er1
10119 cat conftest.err >&5
10120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10121 (exit $ac_status); } >/dev/null; then
10122 if test -s conftest.err; then
10123 ac_cpp_err=$ac_c_preproc_warn_flag
10124 else
10125 ac_cpp_err=
10126 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010127else
Martin v. Löwis11437992002-04-12 09:54:03 +000010128 ac_cpp_err=yes
10129fi
10130if test -z "$ac_cpp_err"; then
10131 ac_header_preproc=yes
10132else
10133 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010134 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010135 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010137rm -f conftest.err conftest.$ac_ext
10138echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10139echo "${ECHO_T}$ac_header_preproc" >&6
10140
10141# So? What about this header?
10142case $ac_header_compiler:$ac_header_preproc in
10143 yes:no )
10144 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10145echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10146 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10147echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10148 no:yes )
10149 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10150echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10151 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10152echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10153 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10154echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10155esac
10156echo "$as_me:$LINENO: checking for cthreads.h" >&5
10157echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10158if test "${ac_cv_header_cthreads_h+set}" = set; then
10159 echo $ECHO_N "(cached) $ECHO_C" >&6
10160else
10161 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010163echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10164echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10165
10166fi
10167if test $ac_cv_header_cthreads_h = yes; then
10168 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010169#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010170_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010171
Martin v. Löwis11437992002-04-12 09:54:03 +000010172 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010173#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010174_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010175
Martin v. Löwis11437992002-04-12 09:54:03 +000010176
10177cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010178#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010179_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010180
10181 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010182 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010183else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010184
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10186 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10187echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10188if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10189 echo $ECHO_N "(cached) $ECHO_C" >&6
10190fi
10191echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10192echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010193else
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 # Is the header compilable?
10195echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10196echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10197cat >conftest.$ac_ext <<_ACEOF
10198#line $LINENO "configure"
10199#include "confdefs.h"
10200$ac_includes_default
10201#include <mach/cthreads.h>
10202_ACEOF
10203rm -f conftest.$ac_objext
10204if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10205 (eval $ac_compile) 2>&5
10206 ac_status=$?
10207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10208 (exit $ac_status); } &&
10209 { ac_try='test -s conftest.$ac_objext'
10210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10211 (eval $ac_try) 2>&5
10212 ac_status=$?
10213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10214 (exit $ac_status); }; }; then
10215 ac_header_compiler=yes
10216else
10217 echo "$as_me: failed program was:" >&5
10218cat conftest.$ac_ext >&5
10219ac_header_compiler=no
10220fi
10221rm -f conftest.$ac_objext conftest.$ac_ext
10222echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10223echo "${ECHO_T}$ac_header_compiler" >&6
10224
10225# Is the header present?
10226echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10227echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10228cat >conftest.$ac_ext <<_ACEOF
10229#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010230#include "confdefs.h"
10231#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010232_ACEOF
10233if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10234 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10235 ac_status=$?
10236 egrep -v '^ *\+' conftest.er1 >conftest.err
10237 rm -f conftest.er1
10238 cat conftest.err >&5
10239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10240 (exit $ac_status); } >/dev/null; then
10241 if test -s conftest.err; then
10242 ac_cpp_err=$ac_c_preproc_warn_flag
10243 else
10244 ac_cpp_err=
10245 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010246else
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 ac_cpp_err=yes
10248fi
10249if test -z "$ac_cpp_err"; then
10250 ac_header_preproc=yes
10251else
10252 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010253 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010255fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010256rm -f conftest.err conftest.$ac_ext
10257echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10258echo "${ECHO_T}$ac_header_preproc" >&6
10259
10260# So? What about this header?
10261case $ac_header_compiler:$ac_header_preproc in
10262 yes:no )
10263 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10264echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10265 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10266echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10267 no:yes )
10268 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10269echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10270 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10271echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10272 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10273echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10274esac
10275echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10276echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10277if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10278 echo $ECHO_N "(cached) $ECHO_C" >&6
10279else
10280 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010281fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010282echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10283echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10284
10285fi
10286if test $ac_cv_header_mach_cthreads_h = yes; then
10287 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010288#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010289_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010290
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010292#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010293_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010294
Martin v. Löwis11437992002-04-12 09:54:03 +000010295
10296cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010297#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010298_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010299
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010300 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010301else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010302
Martin v. Löwis11437992002-04-12 09:54:03 +000010303 echo "$as_me:$LINENO: checking for --with-pth" >&5
10304echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10305
10306# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010307if test "${with_pth+set}" = set; then
10308 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010309 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010310echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010311 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010312#define WITH_THREAD 1
10313_ACEOF
10314
10315
10316cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010317#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010318_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010319
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010320 LIBS="-lpth $LIBS"
10321 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010322else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010323 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010324echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010325
10326 # Just looking for pthread_create in libpthread is not enough:
10327 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10328 # So we really have to include pthread.h, and then link.
10329 _libs=$LIBS
10330 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10332echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10333 cat >conftest.$ac_ext <<_ACEOF
10334#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010335#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010336#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010337
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010338void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010339#ifdef F77_DUMMY_MAIN
10340# ifdef __cplusplus
10341 extern "C"
10342# endif
10343 int F77_DUMMY_MAIN() { return 1; }
10344#endif
10345int
10346main ()
10347{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010348
10349pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 ;
10351 return 0;
10352}
10353_ACEOF
10354rm -f conftest.$ac_objext conftest$ac_exeext
10355if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10356 (eval $ac_link) 2>&5
10357 ac_status=$?
10358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10359 (exit $ac_status); } &&
10360 { ac_try='test -s conftest$ac_exeext'
10361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10362 (eval $ac_try) 2>&5
10363 ac_status=$?
10364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10365 (exit $ac_status); }; }; then
10366
10367 echo "$as_me:$LINENO: result: yes" >&5
10368echo "${ECHO_T}yes" >&6
10369 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010370#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010371_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010372
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010373 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010374 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010375else
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 echo "$as_me: failed program was:" >&5
10377cat conftest.$ac_ext >&5
10378
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010379 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010380 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10381echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10382if test "${ac_cv_func_pthread_detach+set}" = set; then
10383 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010384else
Martin v. Löwis11437992002-04-12 09:54:03 +000010385 cat >conftest.$ac_ext <<_ACEOF
10386#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010387#include "confdefs.h"
10388/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010390#include <assert.h>
10391/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010392#ifdef __cplusplus
10393extern "C"
10394#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010395/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010396 builtin and then its argument prototype would still apply. */
10397char pthread_detach ();
10398char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010399
Martin v. Löwis11437992002-04-12 09:54:03 +000010400#ifdef F77_DUMMY_MAIN
10401# ifdef __cplusplus
10402 extern "C"
10403# endif
10404 int F77_DUMMY_MAIN() { return 1; }
10405#endif
10406int
10407main ()
10408{
Guido van Rossumad678af1998-10-02 14:42:15 +000010409/* The GNU C library defines this for functions which it implements
10410 to always fail with ENOSYS. Some functions are actually named
10411 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010412#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010413choke me
10414#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010415f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010416#endif
10417
Martin v. Löwis11437992002-04-12 09:54:03 +000010418 ;
10419 return 0;
10420}
10421_ACEOF
10422rm -f conftest.$ac_objext conftest$ac_exeext
10423if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10424 (eval $ac_link) 2>&5
10425 ac_status=$?
10426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10427 (exit $ac_status); } &&
10428 { ac_try='test -s conftest$ac_exeext'
10429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10430 (eval $ac_try) 2>&5
10431 ac_status=$?
10432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10433 (exit $ac_status); }; }; then
10434 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010435else
Martin v. Löwis11437992002-04-12 09:54:03 +000010436 echo "$as_me: failed program was:" >&5
10437cat conftest.$ac_ext >&5
10438ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010440rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010442echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10443echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10444if test $ac_cv_func_pthread_detach = yes; then
10445 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010446#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010447_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010448
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010449 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010450 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010451else
Guido van Rossumad678af1998-10-02 14:42:15 +000010452
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010453 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10454 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10455echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10456if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10457 echo $ECHO_N "(cached) $ECHO_C" >&6
10458fi
10459echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10460echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10461else
10462 # Is the header compilable?
10463echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10464echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10465cat >conftest.$ac_ext <<_ACEOF
10466#line $LINENO "configure"
10467#include "confdefs.h"
10468$ac_includes_default
10469#include <atheos/threads.h>
10470_ACEOF
10471rm -f conftest.$ac_objext
10472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10473 (eval $ac_compile) 2>&5
10474 ac_status=$?
10475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10476 (exit $ac_status); } &&
10477 { ac_try='test -s conftest.$ac_objext'
10478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10479 (eval $ac_try) 2>&5
10480 ac_status=$?
10481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10482 (exit $ac_status); }; }; then
10483 ac_header_compiler=yes
10484else
10485 echo "$as_me: failed program was:" >&5
10486cat conftest.$ac_ext >&5
10487ac_header_compiler=no
10488fi
10489rm -f conftest.$ac_objext conftest.$ac_ext
10490echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10491echo "${ECHO_T}$ac_header_compiler" >&6
10492
10493# Is the header present?
10494echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10495echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10496cat >conftest.$ac_ext <<_ACEOF
10497#line $LINENO "configure"
10498#include "confdefs.h"
10499#include <atheos/threads.h>
10500_ACEOF
10501if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10502 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10503 ac_status=$?
10504 egrep -v '^ *\+' conftest.er1 >conftest.err
10505 rm -f conftest.er1
10506 cat conftest.err >&5
10507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10508 (exit $ac_status); } >/dev/null; then
10509 if test -s conftest.err; then
10510 ac_cpp_err=$ac_c_preproc_warn_flag
10511 else
10512 ac_cpp_err=
10513 fi
10514else
10515 ac_cpp_err=yes
10516fi
10517if test -z "$ac_cpp_err"; then
10518 ac_header_preproc=yes
10519else
10520 echo "$as_me: failed program was:" >&5
10521 cat conftest.$ac_ext >&5
10522 ac_header_preproc=no
10523fi
10524rm -f conftest.err conftest.$ac_ext
10525echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10526echo "${ECHO_T}$ac_header_preproc" >&6
10527
10528# So? What about this header?
10529case $ac_header_compiler:$ac_header_preproc in
10530 yes:no )
10531 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10532echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10533 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10534echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10535 no:yes )
10536 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10537echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10538 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10539echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10540 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10541echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10542esac
10543echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10544echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10545if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10546 echo $ECHO_N "(cached) $ECHO_C" >&6
10547else
10548 ac_cv_header_atheos_threads_h=$ac_header_preproc
10549fi
10550echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10551echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10552
10553fi
10554if test $ac_cv_header_atheos_threads_h = yes; then
10555 cat >>confdefs.h <<\_ACEOF
10556#define WITH_THREAD 1
10557_ACEOF
10558
10559
10560cat >>confdefs.h <<\_ACEOF
10561#define ATHEOS_THREADS 1
10562_ACEOF
10563
10564 THREADOBJ="Python/thread.o"
10565else
10566
Martin v. Löwis11437992002-04-12 09:54:03 +000010567 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10568 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10569echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10570if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10571 echo $ECHO_N "(cached) $ECHO_C" >&6
10572fi
10573echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10574echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010575else
Martin v. Löwis11437992002-04-12 09:54:03 +000010576 # Is the header compilable?
10577echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10578echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10579cat >conftest.$ac_ext <<_ACEOF
10580#line $LINENO "configure"
10581#include "confdefs.h"
10582$ac_includes_default
10583#include <kernel/OS.h>
10584_ACEOF
10585rm -f conftest.$ac_objext
10586if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10587 (eval $ac_compile) 2>&5
10588 ac_status=$?
10589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10590 (exit $ac_status); } &&
10591 { ac_try='test -s conftest.$ac_objext'
10592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10593 (eval $ac_try) 2>&5
10594 ac_status=$?
10595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10596 (exit $ac_status); }; }; then
10597 ac_header_compiler=yes
10598else
10599 echo "$as_me: failed program was:" >&5
10600cat conftest.$ac_ext >&5
10601ac_header_compiler=no
10602fi
10603rm -f conftest.$ac_objext conftest.$ac_ext
10604echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10605echo "${ECHO_T}$ac_header_compiler" >&6
10606
10607# Is the header present?
10608echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10609echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10610cat >conftest.$ac_ext <<_ACEOF
10611#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010612#include "confdefs.h"
10613#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010614_ACEOF
10615if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10616 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10617 ac_status=$?
10618 egrep -v '^ *\+' conftest.er1 >conftest.err
10619 rm -f conftest.er1
10620 cat conftest.err >&5
10621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10622 (exit $ac_status); } >/dev/null; then
10623 if test -s conftest.err; then
10624 ac_cpp_err=$ac_c_preproc_warn_flag
10625 else
10626 ac_cpp_err=
10627 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010628else
Martin v. Löwis11437992002-04-12 09:54:03 +000010629 ac_cpp_err=yes
10630fi
10631if test -z "$ac_cpp_err"; then
10632 ac_header_preproc=yes
10633else
10634 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010635 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010636 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010637fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010638rm -f conftest.err conftest.$ac_ext
10639echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10640echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010641
Martin v. Löwis11437992002-04-12 09:54:03 +000010642# So? What about this header?
10643case $ac_header_compiler:$ac_header_preproc in
10644 yes:no )
10645 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10646echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10647 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10648echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10649 no:yes )
10650 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10651echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10652 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10653echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10654 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10655echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10656esac
10657echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10658echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10659if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10660 echo $ECHO_N "(cached) $ECHO_C" >&6
10661else
10662 ac_cv_header_kernel_OS_h=$ac_header_preproc
10663fi
10664echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10665echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10666
10667fi
10668if test $ac_cv_header_kernel_OS_h = yes; then
10669 cat >>confdefs.h <<\_ACEOF
10670#define WITH_THREAD 1
10671_ACEOF
10672
10673
10674cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010675#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010676_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010677
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010678 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010679else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010680
Martin v. Löwis11437992002-04-12 09:54:03 +000010681 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10682echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10683if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10684 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010685else
Martin v. Löwis11437992002-04-12 09:54:03 +000010686 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010687LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010688cat >conftest.$ac_ext <<_ACEOF
10689#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010690#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010691
Greg Steinadf63d62000-07-05 10:38:09 +000010692/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010693#ifdef __cplusplus
10694extern "C"
10695#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010696/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010697 builtin and then its argument prototype would still apply. */
10698char pthread_create ();
10699#ifdef F77_DUMMY_MAIN
10700# ifdef __cplusplus
10701 extern "C"
10702# endif
10703 int F77_DUMMY_MAIN() { return 1; }
10704#endif
10705int
10706main ()
10707{
10708pthread_create ();
10709 ;
10710 return 0;
10711}
10712_ACEOF
10713rm -f conftest.$ac_objext conftest$ac_exeext
10714if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10715 (eval $ac_link) 2>&5
10716 ac_status=$?
10717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10718 (exit $ac_status); } &&
10719 { ac_try='test -s conftest$ac_exeext'
10720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10721 (eval $ac_try) 2>&5
10722 ac_status=$?
10723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10724 (exit $ac_status); }; }; then
10725 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010726else
Martin v. Löwis11437992002-04-12 09:54:03 +000010727 echo "$as_me: failed program was:" >&5
10728cat conftest.$ac_ext >&5
10729ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010730fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010731rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10732LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010733fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010734echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10735echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10736if test $ac_cv_lib_pthreads_pthread_create = yes; then
10737 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010738#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010739_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010740
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010741 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010742 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010743 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010744else
Greg Steinadf63d62000-07-05 10:38:09 +000010745
Martin v. Löwis11437992002-04-12 09:54:03 +000010746 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10747echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10748if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10749 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010750else
Martin v. Löwis11437992002-04-12 09:54:03 +000010751 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010752LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010753cat >conftest.$ac_ext <<_ACEOF
10754#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010755#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010756
Guido van Rossum49545951997-12-02 19:28:29 +000010757/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010758#ifdef __cplusplus
10759extern "C"
10760#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010761/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010762 builtin and then its argument prototype would still apply. */
10763char pthread_create ();
10764#ifdef F77_DUMMY_MAIN
10765# ifdef __cplusplus
10766 extern "C"
10767# endif
10768 int F77_DUMMY_MAIN() { return 1; }
10769#endif
10770int
10771main ()
10772{
10773pthread_create ();
10774 ;
10775 return 0;
10776}
10777_ACEOF
10778rm -f conftest.$ac_objext conftest$ac_exeext
10779if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10780 (eval $ac_link) 2>&5
10781 ac_status=$?
10782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10783 (exit $ac_status); } &&
10784 { ac_try='test -s conftest$ac_exeext'
10785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10786 (eval $ac_try) 2>&5
10787 ac_status=$?
10788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10789 (exit $ac_status); }; }; then
10790 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010791else
Martin v. Löwis11437992002-04-12 09:54:03 +000010792 echo "$as_me: failed program was:" >&5
10793cat conftest.$ac_ext >&5
10794ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010795fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010796rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10797LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010798fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010799echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10800echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10801if test $ac_cv_lib_c_r_pthread_create = yes; then
10802 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010803#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010804_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010805
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010806 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010807 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010808 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010809else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010810
Martin v. Löwis11437992002-04-12 09:54:03 +000010811 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10812echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10813if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10814 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010815else
Martin v. Löwis11437992002-04-12 09:54:03 +000010816 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010817LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010818cat >conftest.$ac_ext <<_ACEOF
10819#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010820#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010821
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010822/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010823#ifdef __cplusplus
10824extern "C"
10825#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010826/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010827 builtin and then its argument prototype would still apply. */
10828char __d6_pthread_create ();
10829#ifdef F77_DUMMY_MAIN
10830# ifdef __cplusplus
10831 extern "C"
10832# endif
10833 int F77_DUMMY_MAIN() { return 1; }
10834#endif
10835int
10836main ()
10837{
10838__d6_pthread_create ();
10839 ;
10840 return 0;
10841}
10842_ACEOF
10843rm -f conftest.$ac_objext conftest$ac_exeext
10844if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10845 (eval $ac_link) 2>&5
10846 ac_status=$?
10847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10848 (exit $ac_status); } &&
10849 { ac_try='test -s conftest$ac_exeext'
10850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10851 (eval $ac_try) 2>&5
10852 ac_status=$?
10853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10854 (exit $ac_status); }; }; then
10855 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010856else
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 echo "$as_me: failed program was:" >&5
10858cat conftest.$ac_ext >&5
10859ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010860fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010861rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10862LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010863fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010864echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10865echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10866if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10867 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010868#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010869_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010870
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010871 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010872 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010873 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010874else
Guido van Rossum49545951997-12-02 19:28:29 +000010875
Martin v. Löwis11437992002-04-12 09:54:03 +000010876 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10877echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10878if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10879 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010880else
Martin v. Löwis11437992002-04-12 09:54:03 +000010881 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010882LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010883cat >conftest.$ac_ext <<_ACEOF
10884#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010885#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010886
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010887/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010888#ifdef __cplusplus
10889extern "C"
10890#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010891/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010892 builtin and then its argument prototype would still apply. */
10893char __pthread_create_system ();
10894#ifdef F77_DUMMY_MAIN
10895# ifdef __cplusplus
10896 extern "C"
10897# endif
10898 int F77_DUMMY_MAIN() { return 1; }
10899#endif
10900int
10901main ()
10902{
10903__pthread_create_system ();
10904 ;
10905 return 0;
10906}
10907_ACEOF
10908rm -f conftest.$ac_objext conftest$ac_exeext
10909if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10910 (eval $ac_link) 2>&5
10911 ac_status=$?
10912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10913 (exit $ac_status); } &&
10914 { ac_try='test -s conftest$ac_exeext'
10915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10916 (eval $ac_try) 2>&5
10917 ac_status=$?
10918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10919 (exit $ac_status); }; }; then
10920 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010921else
Martin v. Löwis11437992002-04-12 09:54:03 +000010922 echo "$as_me: failed program was:" >&5
10923cat conftest.$ac_ext >&5
10924ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010925fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010926rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10927LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010928fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010929echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10930echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10931if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10932 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010933#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010934_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010935
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010936 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010937 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010938 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010939else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010940
Martin v. Löwis11437992002-04-12 09:54:03 +000010941 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10942echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10943if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10944 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010945else
Martin v. Löwis11437992002-04-12 09:54:03 +000010946 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010947LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010948cat >conftest.$ac_ext <<_ACEOF
10949#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010950#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010951
Guido van Rossumb93a8621998-05-07 13:27:32 +000010952/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010953#ifdef __cplusplus
10954extern "C"
10955#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010956/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010957 builtin and then its argument prototype would still apply. */
10958char pthread_create ();
10959#ifdef F77_DUMMY_MAIN
10960# ifdef __cplusplus
10961 extern "C"
10962# endif
10963 int F77_DUMMY_MAIN() { return 1; }
10964#endif
10965int
10966main ()
10967{
10968pthread_create ();
10969 ;
10970 return 0;
10971}
10972_ACEOF
10973rm -f conftest.$ac_objext conftest$ac_exeext
10974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10975 (eval $ac_link) 2>&5
10976 ac_status=$?
10977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10978 (exit $ac_status); } &&
10979 { ac_try='test -s conftest$ac_exeext'
10980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10981 (eval $ac_try) 2>&5
10982 ac_status=$?
10983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10984 (exit $ac_status); }; }; then
10985 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010986else
Martin v. Löwis11437992002-04-12 09:54:03 +000010987 echo "$as_me: failed program was:" >&5
10988cat conftest.$ac_ext >&5
10989ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010990fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010991rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10992LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010993fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010994echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10995echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10996if test $ac_cv_lib_cma_pthread_create = yes; then
10997 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010998#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010999_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011000
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011001 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011002 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011003 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011004else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011005
Martin v. Löwis130fb172001-07-19 11:00:41 +000011006 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011007fi
11008
Guido van Rossum627b2d71993-12-24 10:39:16 +000011009
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011010fi
11011
Guido van Rossum0be3e491997-05-22 20:33:33 +000011012fi
11013
Guido van Rossum49545951997-12-02 19:28:29 +000011014fi
11015
Guido van Rossumb93a8621998-05-07 13:27:32 +000011016fi
11017
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011018fi
11019
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011020
Michael W. Hudson54241132001-12-07 15:38:26 +000011021fi
11022
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011023
11024fi
11025
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011026fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011027rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11028fi;
11029fi
11030
11031
11032fi
11033
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011034
Michael W. Hudson54241132001-12-07 15:38:26 +000011035
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011036 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011037 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011038
11039cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011040#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011041_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011042
11043 fi
11044
Martin v. Löwis11437992002-04-12 09:54:03 +000011045 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11046echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11047 if test "${ac_cv_pthread_system_supported+set}" = set; then
11048 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011049else
11050 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011051 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011052else
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 cat >conftest.$ac_ext <<_ACEOF
11054#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011055#include "confdefs.h"
11056#include <pthread.h>
11057 void *foo(void *parm) {
11058 return NULL;
11059 }
11060 main() {
11061 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011062 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011063 if (pthread_attr_init(&attr)) exit(-1);
11064 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011065 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011066 exit(0);
11067 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011068_ACEOF
11069rm -f conftest$ac_exeext
11070if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11071 (eval $ac_link) 2>&5
11072 ac_status=$?
11073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11074 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11076 (eval $ac_try) 2>&5
11077 ac_status=$?
11078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11079 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011080 ac_cv_pthread_system_supported=yes
11081else
Martin v. Löwis11437992002-04-12 09:54:03 +000011082 echo "$as_me: program exited with status $ac_status" >&5
11083echo "$as_me: failed program was:" >&5
11084cat conftest.$ac_ext >&5
11085( exit $ac_status )
11086ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011087fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011088rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011089fi
11090
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011091fi
11092
Martin v. Löwis11437992002-04-12 09:54:03 +000011093 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11094echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011095 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011096
11097cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011098#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011099_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011100
11101 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011102
11103for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011104do
Martin v. Löwis11437992002-04-12 09:54:03 +000011105as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11106echo "$as_me:$LINENO: checking for $ac_func" >&5
11107echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11108if eval "test \"\${$as_ac_var+set}\" = set"; then
11109 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011110else
Martin v. Löwis11437992002-04-12 09:54:03 +000011111 cat >conftest.$ac_ext <<_ACEOF
11112#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011113#include "confdefs.h"
11114/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011116#include <assert.h>
11117/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011118#ifdef __cplusplus
11119extern "C"
11120#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011121/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 builtin and then its argument prototype would still apply. */
11123char $ac_func ();
11124char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011125
Martin v. Löwis11437992002-04-12 09:54:03 +000011126#ifdef F77_DUMMY_MAIN
11127# ifdef __cplusplus
11128 extern "C"
11129# endif
11130 int F77_DUMMY_MAIN() { return 1; }
11131#endif
11132int
11133main ()
11134{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011135/* The GNU C library defines this for functions which it implements
11136 to always fail with ENOSYS. Some functions are actually named
11137 something starting with __ and the normal name is an alias. */
11138#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11139choke me
11140#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011141f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011142#endif
11143
Martin v. Löwis11437992002-04-12 09:54:03 +000011144 ;
11145 return 0;
11146}
11147_ACEOF
11148rm -f conftest.$ac_objext conftest$ac_exeext
11149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11150 (eval $ac_link) 2>&5
11151 ac_status=$?
11152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11153 (exit $ac_status); } &&
11154 { ac_try='test -s conftest$ac_exeext'
11155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11156 (eval $ac_try) 2>&5
11157 ac_status=$?
11158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11159 (exit $ac_status); }; }; then
11160 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011161else
Martin v. Löwis11437992002-04-12 09:54:03 +000011162 echo "$as_me: failed program was:" >&5
11163cat conftest.$ac_ext >&5
11164eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011165fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011166rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011167fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011168echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11169echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11170if test `eval echo '${'$as_ac_var'}'` = yes; then
11171 cat >>confdefs.h <<_ACEOF
11172#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11173_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011174
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011175fi
11176done
11177
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011178 fi
11179
Martin v. Löwis11437992002-04-12 09:54:03 +000011180 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11181echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11182if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11183 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011184else
Martin v. Löwis11437992002-04-12 09:54:03 +000011185 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011186LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011187cat >conftest.$ac_ext <<_ACEOF
11188#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011189#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011190
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011191/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011192#ifdef __cplusplus
11193extern "C"
11194#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011195/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011196 builtin and then its argument prototype would still apply. */
11197char usconfig ();
11198#ifdef F77_DUMMY_MAIN
11199# ifdef __cplusplus
11200 extern "C"
11201# endif
11202 int F77_DUMMY_MAIN() { return 1; }
11203#endif
11204int
11205main ()
11206{
11207usconfig ();
11208 ;
11209 return 0;
11210}
11211_ACEOF
11212rm -f conftest.$ac_objext conftest$ac_exeext
11213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11214 (eval $ac_link) 2>&5
11215 ac_status=$?
11216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11217 (exit $ac_status); } &&
11218 { ac_try='test -s conftest$ac_exeext'
11219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11220 (eval $ac_try) 2>&5
11221 ac_status=$?
11222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11223 (exit $ac_status); }; }; then
11224 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011225else
Martin v. Löwis11437992002-04-12 09:54:03 +000011226 echo "$as_me: failed program was:" >&5
11227cat conftest.$ac_ext >&5
11228ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011229fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011230rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11231LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011232fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011233echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11234echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11235if test $ac_cv_lib_mpc_usconfig = yes; then
11236 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011237#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011238_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011239
Martin v. Löwis130fb172001-07-19 11:00:41 +000011240 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011241 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011242 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011243fi
11244
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011245
Neal Norwitza978ab02002-11-02 16:58:05 +000011246 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011247 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11248echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11249if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11250 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011251else
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011253LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011254cat >conftest.$ac_ext <<_ACEOF
11255#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011256#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011257
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011258/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011259#ifdef __cplusplus
11260extern "C"
11261#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011262/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011263 builtin and then its argument prototype would still apply. */
11264char thr_create ();
11265#ifdef F77_DUMMY_MAIN
11266# ifdef __cplusplus
11267 extern "C"
11268# endif
11269 int F77_DUMMY_MAIN() { return 1; }
11270#endif
11271int
11272main ()
11273{
11274thr_create ();
11275 ;
11276 return 0;
11277}
11278_ACEOF
11279rm -f conftest.$ac_objext conftest$ac_exeext
11280if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11281 (eval $ac_link) 2>&5
11282 ac_status=$?
11283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11284 (exit $ac_status); } &&
11285 { ac_try='test -s conftest$ac_exeext'
11286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11287 (eval $ac_try) 2>&5
11288 ac_status=$?
11289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11290 (exit $ac_status); }; }; then
11291 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011292else
Martin v. Löwis11437992002-04-12 09:54:03 +000011293 echo "$as_me: failed program was:" >&5
11294cat conftest.$ac_ext >&5
11295ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011296fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011297rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11298LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011299fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011300echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11301echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11302if test $ac_cv_lib_thread_thr_create = yes; then
11303 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011304#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011305_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011306
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011307 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011308 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011309 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011310fi
11311
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011312 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011313
Martin v. Löwis130fb172001-07-19 11:00:41 +000011314 if test "$USE_THREAD_MODULE" != "#"
11315 then
11316 # If the above checks didn't disable threads, (at least) OSF1
11317 # needs this '-threads' argument during linking.
11318 case $ac_sys_system in
11319 OSF1) LDLAST=-threads;;
11320 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011321 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011322
11323 if test "$posix_threads" = yes -a \
11324 "$ac_sys_system" = "SunOS" -a \
11325 "$ac_sys_release" = "5.6"; then
11326
11327cat >>confdefs.h <<\_ACEOF
11328#define HAVE_PTHREAD_DESTRUCTOR 1
11329_ACEOF
11330
11331 fi
11332
Guido van Rossum627b2d71993-12-24 10:39:16 +000011333fi
11334
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011335# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011336
11337
11338echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11339echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011340# Check whether --enable-ipv6 or --disable-ipv6 was given.
11341if test "${enable_ipv6+set}" = set; then
11342 enableval="$enable_ipv6"
11343 case "$enableval" in
11344 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011345 echo "$as_me:$LINENO: result: no" >&5
11346echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011347 ipv6=no
11348 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011349 *) echo "$as_me:$LINENO: result: yes" >&5
11350echo "${ECHO_T}yes" >&6
11351 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011352#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011353_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011354
11355 ipv6=yes
11356 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011358else
Martin v. Löwis11437992002-04-12 09:54:03 +000011359
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011360 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 echo "$as_me:$LINENO: result: no" >&5
11362echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011363 ipv6=no
11364
11365else
Martin v. Löwis11437992002-04-12 09:54:03 +000011366 cat >conftest.$ac_ext <<_ACEOF
11367#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011368#include "confdefs.h"
11369 /* AF_INET6 available check */
11370#include <sys/types.h>
11371#include <sys/socket.h>
11372main()
11373{
11374 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11375 exit(1);
11376 else
11377 exit(0);
11378}
11379
Martin v. Löwis11437992002-04-12 09:54:03 +000011380_ACEOF
11381rm -f conftest$ac_exeext
11382if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11383 (eval $ac_link) 2>&5
11384 ac_status=$?
11385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11386 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11388 (eval $ac_try) 2>&5
11389 ac_status=$?
11390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11391 (exit $ac_status); }; }; then
11392 echo "$as_me:$LINENO: result: yes" >&5
11393echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011394 ipv6=yes
11395else
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 echo "$as_me: program exited with status $ac_status" >&5
11397echo "$as_me: failed program was:" >&5
11398cat conftest.$ac_ext >&5
11399( exit $ac_status )
11400echo "$as_me:$LINENO: result: no" >&5
11401echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011402 ipv6=no
11403fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011404rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011405fi
11406
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011407if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11409echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11410 cat >conftest.$ac_ext <<_ACEOF
11411#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011412#include "confdefs.h"
11413#include <sys/types.h>
11414#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011415#ifdef F77_DUMMY_MAIN
11416# ifdef __cplusplus
11417 extern "C"
11418# endif
11419 int F77_DUMMY_MAIN() { return 1; }
11420#endif
11421int
11422main ()
11423{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011424struct sockaddr_in6 x;
11425x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011426 ;
11427 return 0;
11428}
11429_ACEOF
11430rm -f conftest.$ac_objext
11431if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11432 (eval $ac_compile) 2>&5
11433 ac_status=$?
11434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11435 (exit $ac_status); } &&
11436 { ac_try='test -s conftest.$ac_objext'
11437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11438 (eval $ac_try) 2>&5
11439 ac_status=$?
11440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11441 (exit $ac_status); }; }; then
11442 echo "$as_me:$LINENO: result: yes" >&5
11443echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011444 ipv6=yes
11445else
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 echo "$as_me: failed program was:" >&5
11447cat conftest.$ac_ext >&5
11448echo "$as_me:$LINENO: result: no" >&5
11449echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011450 ipv6=no
11451fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011452rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011453fi
11454
11455if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011457#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011458_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011459
11460fi
11461
Martin v. Löwis11437992002-04-12 09:54:03 +000011462fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011463
11464ipv6type=unknown
11465ipv6lib=none
11466ipv6trylibc=no
11467
11468if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11470echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011471 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11472 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011473 case $i in
11474 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011475 cat >conftest.$ac_ext <<_ACEOF
11476#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011477#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011478
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011479#include <netinet/in.h>
11480#ifdef IPV6_INRIA_VERSION
11481yes
11482#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011483_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11485 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011486 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011487fi
11488rm -f conftest*
11489
11490 ;;
11491 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011492 cat >conftest.$ac_ext <<_ACEOF
11493#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011494#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011495
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011496#include <netinet/in.h>
11497#ifdef __KAME__
11498yes
11499#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011500_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11502 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011503 ipv6type=$i;
11504 ipv6lib=inet6
11505 ipv6libdir=/usr/local/v6/lib
11506 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011507fi
11508rm -f conftest*
11509
11510 ;;
11511 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011512 cat >conftest.$ac_ext <<_ACEOF
11513#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011514#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011515
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011516#include <features.h>
11517#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11518yes
11519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011520_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11522 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011523 ipv6type=$i;
11524 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011525fi
11526rm -f conftest*
11527
11528 ;;
11529 linux-inet6)
11530 if test -d /usr/inet6; then
11531 ipv6type=$i
11532 ipv6lib=inet6
11533 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011534 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011535 fi
11536 ;;
11537 solaris)
11538 if test -f /etc/netconfig; then
11539 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11540 ipv6type=$i
11541 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011542 fi
11543 fi
11544 ;;
11545 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011546 cat >conftest.$ac_ext <<_ACEOF
11547#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011548#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011549
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011550#include <sys/param.h>
11551#ifdef _TOSHIBA_INET6
11552yes
11553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011554_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011555if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11556 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011557 ipv6type=$i;
11558 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011559 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011560fi
11561rm -f conftest*
11562
11563 ;;
11564 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011565 cat >conftest.$ac_ext <<_ACEOF
11566#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011567#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011568
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011569#include </usr/local/v6/include/sys/v6config.h>
11570#ifdef __V6D__
11571yes
11572#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011573_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011574if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11575 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011576 ipv6type=$i;
11577 ipv6lib=v6;
11578 ipv6libdir=/usr/local/v6/lib;
11579 OPT="-I/usr/local/v6/include $OPT"
11580fi
11581rm -f conftest*
11582
11583 ;;
11584 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011585 cat >conftest.$ac_ext <<_ACEOF
11586#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011587#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011588
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011589#include <sys/param.h>
11590#ifdef _ZETA_MINAMI_INET6
11591yes
11592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011593_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011594if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11595 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011596 ipv6type=$i;
11597 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011598 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011599fi
11600rm -f conftest*
11601
11602 ;;
11603 esac
11604 if test "$ipv6type" != "unknown"; then
11605 break
11606 fi
11607 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011608 echo "$as_me:$LINENO: result: $ipv6type" >&5
11609echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011610fi
11611
11612if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11613 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11614 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11615 echo "using lib$ipv6lib"
11616 else
11617 if test $ipv6trylibc = "yes"; then
11618 echo "using libc"
11619 else
11620 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11621 echo "You need to fetch lib$ipv6lib.a from appropriate"
11622 echo 'ipv6 kit and compile beforehand.'
11623 exit 1
11624 fi
11625 fi
11626fi
11627
Jack Jansen7b8c7542002-04-14 20:12:41 +000011628# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011629echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11630echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011631
11632# Check whether --with-universal-newlines or --without-universal-newlines was given.
11633if test "${with_universal_newlines+set}" = set; then
11634 withval="$with_universal_newlines"
11635
11636fi;
11637
11638if test -z "$with_universal_newlines"
11639then with_universal_newlines="yes"
11640fi
11641if test "$with_universal_newlines" != "no"
11642then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011643
11644cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011645#define WITH_UNIVERSAL_NEWLINES 1
11646_ACEOF
11647
11648fi
11649echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11650echo "${ECHO_T}$with_universal_newlines" >&6
11651
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011652# Check for --with-doc-strings
11653echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11654echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11655
11656# Check whether --with-doc-strings or --without-doc-strings was given.
11657if test "${with_doc_strings+set}" = set; then
11658 withval="$with_doc_strings"
11659
11660fi;
11661
11662if test -z "$with_doc_strings"
11663then with_doc_strings="yes"
11664fi
11665if test "$with_doc_strings" != "no"
11666then
11667
11668cat >>confdefs.h <<\_ACEOF
11669#define WITH_DOC_STRINGS 1
11670_ACEOF
11671
11672fi
11673echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11674echo "${ECHO_T}$with_doc_strings" >&6
11675
Neil Schemenauera35c6882001-02-27 04:45:05 +000011676# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011677echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11678echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11679
Neil Schemenauera35c6882001-02-27 04:45:05 +000011680# Check whether --with-pymalloc or --without-pymalloc was given.
11681if test "${with_pymalloc+set}" = set; then
11682 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011683
Martin v. Löwis11437992002-04-12 09:54:03 +000011684fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011685
Neil Schemenauer16c22972002-03-22 15:34:49 +000011686if test -z "$with_pymalloc"
11687then with_pymalloc="yes"
11688fi
11689if test "$with_pymalloc" != "no"
11690then
Martin v. Löwis11437992002-04-12 09:54:03 +000011691
11692cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011693#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011694_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011695
11696fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011697echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11698echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011699
Barry Warsawef82cd72000-06-30 16:21:01 +000011700# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011701echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11702echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11703
Barry Warsawef82cd72000-06-30 16:21:01 +000011704# Check whether --with-wctype-functions or --without-wctype-functions was given.
11705if test "${with_wctype_functions+set}" = set; then
11706 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011707
Barry Warsawef82cd72000-06-30 16:21:01 +000011708if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011709then
11710
11711cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011712#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011713_ACEOF
11714
11715 echo "$as_me:$LINENO: result: yes" >&5
11716echo "${ECHO_T}yes" >&6
11717else echo "$as_me:$LINENO: result: no" >&5
11718echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011719fi
11720else
Martin v. Löwis11437992002-04-12 09:54:03 +000011721 echo "$as_me:$LINENO: result: no" >&5
11722echo "${ECHO_T}no" >&6
11723fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011724
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011725# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011726
Guido van Rossum98935bf2001-09-05 19:13:16 +000011727DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011728
Martin v. Löwis11437992002-04-12 09:54:03 +000011729echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11730echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11731
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011732# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011733if test "${with_sgi_dl+set}" = set; then
11734 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011735
11736echo "$as_me:$LINENO: result: $withval" >&5
11737echo "${ECHO_T}$withval" >&6
11738
11739cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011740#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011741_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011742
Guido van Rossume97ee181999-12-20 21:27:22 +000011743DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011744dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011745if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011746then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011747else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11748echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11749 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011750fi
11751DLINCLDIR=${dldir}
11752LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011753else
Martin v. Löwis11437992002-04-12 09:54:03 +000011754 echo "$as_me:$LINENO: result: no" >&5
11755echo "${ECHO_T}no" >&6
11756fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011757
Martin v. Löwis11437992002-04-12 09:54:03 +000011758echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11759echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011760
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011761# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011762if test "${with_dl_dld+set}" = set; then
11763 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011764
11765echo "$as_me:$LINENO: result: $withval" >&5
11766echo "${ECHO_T}$withval" >&6
11767
11768cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011769#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011770_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011771
Guido van Rossume97ee181999-12-20 21:27:22 +000011772DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011773dldir=`echo "$withval" | sed 's/,.*//'`
11774dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011775if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011776then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011777else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11778echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11779 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011780fi
11781DLINCLDIR=${dldir}
11782LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011783else
Martin v. Löwis11437992002-04-12 09:54:03 +000011784 echo "$as_me:$LINENO: result: no" >&5
11785echo "${ECHO_T}no" >&6
11786fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011787
Guido van Rossume97ee181999-12-20 21:27:22 +000011788# the dlopen() function means we might want to use dynload_shlib.o. some
11789# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011790
Thomas Wouters3a584202000-08-05 23:28:51 +000011791for ac_func in dlopen
11792do
Martin v. Löwis11437992002-04-12 09:54:03 +000011793as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11794echo "$as_me:$LINENO: checking for $ac_func" >&5
11795echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11796if eval "test \"\${$as_ac_var+set}\" = set"; then
11797 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011798else
Martin v. Löwis11437992002-04-12 09:54:03 +000011799 cat >conftest.$ac_ext <<_ACEOF
11800#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011801#include "confdefs.h"
11802/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011803 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011804#include <assert.h>
11805/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011806#ifdef __cplusplus
11807extern "C"
11808#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011809/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011810 builtin and then its argument prototype would still apply. */
11811char $ac_func ();
11812char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011813
Martin v. Löwis11437992002-04-12 09:54:03 +000011814#ifdef F77_DUMMY_MAIN
11815# ifdef __cplusplus
11816 extern "C"
11817# endif
11818 int F77_DUMMY_MAIN() { return 1; }
11819#endif
11820int
11821main ()
11822{
Guido van Rossume97ee181999-12-20 21:27:22 +000011823/* The GNU C library defines this for functions which it implements
11824 to always fail with ENOSYS. Some functions are actually named
11825 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011826#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011827choke me
11828#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011829f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011830#endif
11831
Martin v. Löwis11437992002-04-12 09:54:03 +000011832 ;
11833 return 0;
11834}
11835_ACEOF
11836rm -f conftest.$ac_objext conftest$ac_exeext
11837if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11838 (eval $ac_link) 2>&5
11839 ac_status=$?
11840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11841 (exit $ac_status); } &&
11842 { ac_try='test -s conftest$ac_exeext'
11843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11844 (eval $ac_try) 2>&5
11845 ac_status=$?
11846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11847 (exit $ac_status); }; }; then
11848 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011849else
Martin v. Löwis11437992002-04-12 09:54:03 +000011850 echo "$as_me: failed program was:" >&5
11851cat conftest.$ac_ext >&5
11852eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011853fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011854rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011855fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011856echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11857echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11858if test `eval echo '${'$as_ac_var'}'` = yes; then
11859 cat >>confdefs.h <<_ACEOF
11860#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11861_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011862
Guido van Rossume97ee181999-12-20 21:27:22 +000011863fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011864done
Guido van Rossume97ee181999-12-20 21:27:22 +000011865
Michael W. Hudson54241132001-12-07 15:38:26 +000011866
Guido van Rossume97ee181999-12-20 21:27:22 +000011867# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11868# loading of modules.
11869
Martin v. Löwis11437992002-04-12 09:54:03 +000011870echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11871echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011872if test -z "$DYNLOADFILE"
11873then
11874 case $ac_sys_system/$ac_sys_release in
11875 AIX*) DYNLOADFILE="dynload_aix.o";;
11876 BeOS*) DYNLOADFILE="dynload_beos.o";;
11877 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011878 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011879 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011880 *)
11881 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11882 # out any dynamic loading
11883 if test "$ac_cv_func_dlopen" = yes
11884 then DYNLOADFILE="dynload_shlib.o"
11885 else DYNLOADFILE="dynload_stub.o"
11886 fi
11887 ;;
11888 esac
11889fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011890echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11891echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011892if test "$DYNLOADFILE" != "dynload_stub.o"
11893then
Martin v. Löwis11437992002-04-12 09:54:03 +000011894
11895cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011896#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011897_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011898
11899fi
11900
Neil Schemenauer4e425612001-06-19 15:44:15 +000011901# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11902
Michael W. Hudson54241132001-12-07 15:38:26 +000011903
Martin v. Löwis11437992002-04-12 09:54:03 +000011904echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11905echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011906if test -z "$MACHDEP_OBJS"
11907then
Jack Jansene578a632001-08-15 01:27:14 +000011908 MACHDEP_OBJS=$extra_machdep_objs
11909else
11910 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011911fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011912echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11913echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011914
Guido van Rossum627b2d71993-12-24 10:39:16 +000011915# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011916
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
11987
11988
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011989
Fred Drake6b3cc522002-04-15 19:20:27 +000011990
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011991for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011992 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011993 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011994 hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000011995 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011996 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011997 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011998 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011999 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012000 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000012001 truncate uname unsetenv utimes waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000012002do
Martin v. Löwis11437992002-04-12 09:54:03 +000012003as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12004echo "$as_me:$LINENO: checking for $ac_func" >&5
12005echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12006if eval "test \"\${$as_ac_var+set}\" = set"; then
12007 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012008else
Martin v. Löwis11437992002-04-12 09:54:03 +000012009 cat >conftest.$ac_ext <<_ACEOF
12010#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012011#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012012/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012013 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012014#include <assert.h>
12015/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012016#ifdef __cplusplus
12017extern "C"
12018#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012019/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012020 builtin and then its argument prototype would still apply. */
12021char $ac_func ();
12022char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012023
Martin v. Löwis11437992002-04-12 09:54:03 +000012024#ifdef F77_DUMMY_MAIN
12025# ifdef __cplusplus
12026 extern "C"
12027# endif
12028 int F77_DUMMY_MAIN() { return 1; }
12029#endif
12030int
12031main ()
12032{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012033/* The GNU C library defines this for functions which it implements
12034 to always fail with ENOSYS. Some functions are actually named
12035 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012036#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012037choke me
12038#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012039f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012040#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012041
Martin v. Löwis11437992002-04-12 09:54:03 +000012042 ;
12043 return 0;
12044}
12045_ACEOF
12046rm -f conftest.$ac_objext conftest$ac_exeext
12047if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12048 (eval $ac_link) 2>&5
12049 ac_status=$?
12050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12051 (exit $ac_status); } &&
12052 { ac_try='test -s conftest$ac_exeext'
12053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12054 (eval $ac_try) 2>&5
12055 ac_status=$?
12056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12057 (exit $ac_status); }; }; then
12058 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012059else
Martin v. Löwis11437992002-04-12 09:54:03 +000012060 echo "$as_me: failed program was:" >&5
12061cat conftest.$ac_ext >&5
12062eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012063fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012064rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012065fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012066echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12067echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12068if test `eval echo '${'$as_ac_var'}'` = yes; then
12069 cat >>confdefs.h <<_ACEOF
12070#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12071_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012072
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012073fi
12074done
12075
Michael W. Hudson54241132001-12-07 15:38:26 +000012076
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012077# For some functions, having a definition is not sufficient, since
12078# we want to take their address.
12079echo "$as_me:$LINENO: checking for chroot" >&5
12080echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12081cat >conftest.$ac_ext <<_ACEOF
12082#line $LINENO "configure"
12083#include "confdefs.h"
12084#include <unistd.h>
12085#ifdef F77_DUMMY_MAIN
12086# ifdef __cplusplus
12087 extern "C"
12088# endif
12089 int F77_DUMMY_MAIN() { return 1; }
12090#endif
12091int
12092main ()
12093{
12094void *x=chroot
12095 ;
12096 return 0;
12097}
12098_ACEOF
12099rm -f conftest.$ac_objext
12100if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12101 (eval $ac_compile) 2>&5
12102 ac_status=$?
12103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12104 (exit $ac_status); } &&
12105 { ac_try='test -s conftest.$ac_objext'
12106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12107 (eval $ac_try) 2>&5
12108 ac_status=$?
12109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12110 (exit $ac_status); }; }; then
12111
12112cat >>confdefs.h <<\_ACEOF
12113#define HAVE_CHROOT 1
12114_ACEOF
12115
12116 echo "$as_me:$LINENO: result: yes" >&5
12117echo "${ECHO_T}yes" >&6
12118else
12119 echo "$as_me: failed program was:" >&5
12120cat conftest.$ac_ext >&5
12121echo "$as_me:$LINENO: result: no" >&5
12122echo "${ECHO_T}no" >&6
12123
12124fi
12125rm -f conftest.$ac_objext conftest.$ac_ext
12126echo "$as_me:$LINENO: checking for link" >&5
12127echo $ECHO_N "checking for link... $ECHO_C" >&6
12128cat >conftest.$ac_ext <<_ACEOF
12129#line $LINENO "configure"
12130#include "confdefs.h"
12131#include <unistd.h>
12132#ifdef F77_DUMMY_MAIN
12133# ifdef __cplusplus
12134 extern "C"
12135# endif
12136 int F77_DUMMY_MAIN() { return 1; }
12137#endif
12138int
12139main ()
12140{
12141void *x=link
12142 ;
12143 return 0;
12144}
12145_ACEOF
12146rm -f conftest.$ac_objext
12147if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12148 (eval $ac_compile) 2>&5
12149 ac_status=$?
12150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12151 (exit $ac_status); } &&
12152 { ac_try='test -s conftest.$ac_objext'
12153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12154 (eval $ac_try) 2>&5
12155 ac_status=$?
12156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12157 (exit $ac_status); }; }; then
12158
12159cat >>confdefs.h <<\_ACEOF
12160#define HAVE_LINK 1
12161_ACEOF
12162
12163 echo "$as_me:$LINENO: result: yes" >&5
12164echo "${ECHO_T}yes" >&6
12165else
12166 echo "$as_me: failed program was:" >&5
12167cat conftest.$ac_ext >&5
12168echo "$as_me:$LINENO: result: no" >&5
12169echo "${ECHO_T}no" >&6
12170
12171fi
12172rm -f conftest.$ac_objext conftest.$ac_ext
12173echo "$as_me:$LINENO: checking for symlink" >&5
12174echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12175cat >conftest.$ac_ext <<_ACEOF
12176#line $LINENO "configure"
12177#include "confdefs.h"
12178#include <unistd.h>
12179#ifdef F77_DUMMY_MAIN
12180# ifdef __cplusplus
12181 extern "C"
12182# endif
12183 int F77_DUMMY_MAIN() { return 1; }
12184#endif
12185int
12186main ()
12187{
12188void *x=symlink
12189 ;
12190 return 0;
12191}
12192_ACEOF
12193rm -f conftest.$ac_objext
12194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12195 (eval $ac_compile) 2>&5
12196 ac_status=$?
12197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12198 (exit $ac_status); } &&
12199 { ac_try='test -s conftest.$ac_objext'
12200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12201 (eval $ac_try) 2>&5
12202 ac_status=$?
12203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12204 (exit $ac_status); }; }; then
12205
12206cat >>confdefs.h <<\_ACEOF
12207#define HAVE_SYMLINK 1
12208_ACEOF
12209
12210 echo "$as_me:$LINENO: result: yes" >&5
12211echo "${ECHO_T}yes" >&6
12212else
12213 echo "$as_me: failed program was:" >&5
12214cat conftest.$ac_ext >&5
12215echo "$as_me:$LINENO: result: no" >&5
12216echo "${ECHO_T}no" >&6
12217
12218fi
12219rm -f conftest.$ac_objext conftest.$ac_ext
12220
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012221# check for openpty and forkpty
12222
Martin v. Löwis11437992002-04-12 09:54:03 +000012223
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012224for ac_func in openpty
12225do
Martin v. Löwis11437992002-04-12 09:54:03 +000012226as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12227echo "$as_me:$LINENO: checking for $ac_func" >&5
12228echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12229if eval "test \"\${$as_ac_var+set}\" = set"; then
12230 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012231else
Martin v. Löwis11437992002-04-12 09:54:03 +000012232 cat >conftest.$ac_ext <<_ACEOF
12233#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012234#include "confdefs.h"
12235/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012236 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012237#include <assert.h>
12238/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012239#ifdef __cplusplus
12240extern "C"
12241#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012242/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012243 builtin and then its argument prototype would still apply. */
12244char $ac_func ();
12245char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012246
Martin v. Löwis11437992002-04-12 09:54:03 +000012247#ifdef F77_DUMMY_MAIN
12248# ifdef __cplusplus
12249 extern "C"
12250# endif
12251 int F77_DUMMY_MAIN() { return 1; }
12252#endif
12253int
12254main ()
12255{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012256/* The GNU C library defines this for functions which it implements
12257 to always fail with ENOSYS. Some functions are actually named
12258 something starting with __ and the normal name is an alias. */
12259#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12260choke me
12261#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012262f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012263#endif
12264
Martin v. Löwis11437992002-04-12 09:54:03 +000012265 ;
12266 return 0;
12267}
12268_ACEOF
12269rm -f conftest.$ac_objext conftest$ac_exeext
12270if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12271 (eval $ac_link) 2>&5
12272 ac_status=$?
12273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12274 (exit $ac_status); } &&
12275 { ac_try='test -s conftest$ac_exeext'
12276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12277 (eval $ac_try) 2>&5
12278 ac_status=$?
12279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12280 (exit $ac_status); }; }; then
12281 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012282else
Martin v. Löwis11437992002-04-12 09:54:03 +000012283 echo "$as_me: failed program was:" >&5
12284cat conftest.$ac_ext >&5
12285eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012286fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012287rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012288fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012289echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12290echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12291if test `eval echo '${'$as_ac_var'}'` = yes; then
12292 cat >>confdefs.h <<_ACEOF
12293#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12294_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012295
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012296else
Martin v. Löwis11437992002-04-12 09:54:03 +000012297 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12298echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12299if test "${ac_cv_lib_util_openpty+set}" = set; then
12300 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012301else
Martin v. Löwis11437992002-04-12 09:54:03 +000012302 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012303LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012304cat >conftest.$ac_ext <<_ACEOF
12305#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012306#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012307
Fred Drake8cef4cf2000-06-28 16:40:38 +000012308/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012309#ifdef __cplusplus
12310extern "C"
12311#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012312/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012313 builtin and then its argument prototype would still apply. */
12314char openpty ();
12315#ifdef F77_DUMMY_MAIN
12316# ifdef __cplusplus
12317 extern "C"
12318# endif
12319 int F77_DUMMY_MAIN() { return 1; }
12320#endif
12321int
12322main ()
12323{
12324openpty ();
12325 ;
12326 return 0;
12327}
12328_ACEOF
12329rm -f conftest.$ac_objext conftest$ac_exeext
12330if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12331 (eval $ac_link) 2>&5
12332 ac_status=$?
12333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12334 (exit $ac_status); } &&
12335 { ac_try='test -s conftest$ac_exeext'
12336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12337 (eval $ac_try) 2>&5
12338 ac_status=$?
12339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12340 (exit $ac_status); }; }; then
12341 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012342else
Martin v. Löwis11437992002-04-12 09:54:03 +000012343 echo "$as_me: failed program was:" >&5
12344cat conftest.$ac_ext >&5
12345ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012346fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012347rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12348LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012349fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012350echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12351echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12352if test $ac_cv_lib_util_openpty = yes; then
12353 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012354#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012355_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012356 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012357fi
12358
12359fi
12360done
12361
Martin v. Löwis11437992002-04-12 09:54:03 +000012362
Fred Drake8cef4cf2000-06-28 16:40:38 +000012363for ac_func in forkpty
12364do
Martin v. Löwis11437992002-04-12 09:54:03 +000012365as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12366echo "$as_me:$LINENO: checking for $ac_func" >&5
12367echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12368if eval "test \"\${$as_ac_var+set}\" = set"; then
12369 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012370else
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 cat >conftest.$ac_ext <<_ACEOF
12372#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012373#include "confdefs.h"
12374/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012375 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000012376#include <assert.h>
12377/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012378#ifdef __cplusplus
12379extern "C"
12380#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012381/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012382 builtin and then its argument prototype would still apply. */
12383char $ac_func ();
12384char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012385
Martin v. Löwis11437992002-04-12 09:54:03 +000012386#ifdef F77_DUMMY_MAIN
12387# ifdef __cplusplus
12388 extern "C"
12389# endif
12390 int F77_DUMMY_MAIN() { return 1; }
12391#endif
12392int
12393main ()
12394{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012395/* The GNU C library defines this for functions which it implements
12396 to always fail with ENOSYS. Some functions are actually named
12397 something starting with __ and the normal name is an alias. */
12398#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12399choke me
12400#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012401f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012402#endif
12403
Martin v. Löwis11437992002-04-12 09:54:03 +000012404 ;
12405 return 0;
12406}
12407_ACEOF
12408rm -f conftest.$ac_objext conftest$ac_exeext
12409if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12410 (eval $ac_link) 2>&5
12411 ac_status=$?
12412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12413 (exit $ac_status); } &&
12414 { ac_try='test -s conftest$ac_exeext'
12415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12416 (eval $ac_try) 2>&5
12417 ac_status=$?
12418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12419 (exit $ac_status); }; }; then
12420 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012421else
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 echo "$as_me: failed program was:" >&5
12423cat conftest.$ac_ext >&5
12424eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012425fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012426rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012428echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12429echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12430if test `eval echo '${'$as_ac_var'}'` = yes; then
12431 cat >>confdefs.h <<_ACEOF
12432#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12433_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012434
Fred Drake8cef4cf2000-06-28 16:40:38 +000012435else
Martin v. Löwis11437992002-04-12 09:54:03 +000012436 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12437echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12438if test "${ac_cv_lib_util_forkpty+set}" = set; then
12439 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012440else
Martin v. Löwis11437992002-04-12 09:54:03 +000012441 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012442LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012443cat >conftest.$ac_ext <<_ACEOF
12444#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012445#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012446
Fred Drake8cef4cf2000-06-28 16:40:38 +000012447/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012448#ifdef __cplusplus
12449extern "C"
12450#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012451/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012452 builtin and then its argument prototype would still apply. */
12453char forkpty ();
12454#ifdef F77_DUMMY_MAIN
12455# ifdef __cplusplus
12456 extern "C"
12457# endif
12458 int F77_DUMMY_MAIN() { return 1; }
12459#endif
12460int
12461main ()
12462{
12463forkpty ();
12464 ;
12465 return 0;
12466}
12467_ACEOF
12468rm -f conftest.$ac_objext conftest$ac_exeext
12469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12470 (eval $ac_link) 2>&5
12471 ac_status=$?
12472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12473 (exit $ac_status); } &&
12474 { ac_try='test -s conftest$ac_exeext'
12475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12476 (eval $ac_try) 2>&5
12477 ac_status=$?
12478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12479 (exit $ac_status); }; }; then
12480 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012481else
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 echo "$as_me: failed program was:" >&5
12483cat conftest.$ac_ext >&5
12484ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012486rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12487LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012488fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012489echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12490echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12491if test $ac_cv_lib_util_forkpty = yes; then
12492 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012493#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012494_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012495 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012496fi
12497
12498fi
12499done
12500
Jack Jansendd19cf82001-12-06 22:36:17 +000012501
Michael W. Hudson54241132001-12-07 15:38:26 +000012502# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012503
12504
12505
12506
12507
12508
Fred Drake8cef4cf2000-06-28 16:40:38 +000012509for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12510do
Martin v. Löwis11437992002-04-12 09:54:03 +000012511as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12512echo "$as_me:$LINENO: checking for $ac_func" >&5
12513echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12514if eval "test \"\${$as_ac_var+set}\" = set"; then
12515 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012516else
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 cat >conftest.$ac_ext <<_ACEOF
12518#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012519#include "confdefs.h"
12520/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012521 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012522#include <assert.h>
12523/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012524#ifdef __cplusplus
12525extern "C"
12526#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012527/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012528 builtin and then its argument prototype would still apply. */
12529char $ac_func ();
12530char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012531
Martin v. Löwis11437992002-04-12 09:54:03 +000012532#ifdef F77_DUMMY_MAIN
12533# ifdef __cplusplus
12534 extern "C"
12535# endif
12536 int F77_DUMMY_MAIN() { return 1; }
12537#endif
12538int
12539main ()
12540{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012541/* The GNU C library defines this for functions which it implements
12542 to always fail with ENOSYS. Some functions are actually named
12543 something starting with __ and the normal name is an alias. */
12544#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12545choke me
12546#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012547f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012548#endif
12549
Martin v. Löwis11437992002-04-12 09:54:03 +000012550 ;
12551 return 0;
12552}
12553_ACEOF
12554rm -f conftest.$ac_objext conftest$ac_exeext
12555if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12556 (eval $ac_link) 2>&5
12557 ac_status=$?
12558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12559 (exit $ac_status); } &&
12560 { ac_try='test -s conftest$ac_exeext'
12561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12562 (eval $ac_try) 2>&5
12563 ac_status=$?
12564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12565 (exit $ac_status); }; }; then
12566 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012567else
Martin v. Löwis11437992002-04-12 09:54:03 +000012568 echo "$as_me: failed program was:" >&5
12569cat conftest.$ac_ext >&5
12570eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012571fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012572rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012573fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012574echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12575echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12576if test `eval echo '${'$as_ac_var'}'` = yes; then
12577 cat >>confdefs.h <<_ACEOF
12578#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12579_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012580
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012581fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012582done
12583
Michael W. Hudson54241132001-12-07 15:38:26 +000012584
Martin v. Löwis11437992002-04-12 09:54:03 +000012585
12586
12587
12588
12589
Martin v. Löwis1142de32002-03-29 16:28:31 +000012590for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012591do
Martin v. Löwis11437992002-04-12 09:54:03 +000012592as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12593echo "$as_me:$LINENO: checking for $ac_func" >&5
12594echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12595if eval "test \"\${$as_ac_var+set}\" = set"; then
12596 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012597else
Martin v. Löwis11437992002-04-12 09:54:03 +000012598 cat >conftest.$ac_ext <<_ACEOF
12599#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012600#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012601/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012602 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012603#include <assert.h>
12604/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012605#ifdef __cplusplus
12606extern "C"
12607#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012608/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012609 builtin and then its argument prototype would still apply. */
12610char $ac_func ();
12611char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012612
Martin v. Löwis11437992002-04-12 09:54:03 +000012613#ifdef F77_DUMMY_MAIN
12614# ifdef __cplusplus
12615 extern "C"
12616# endif
12617 int F77_DUMMY_MAIN() { return 1; }
12618#endif
12619int
12620main ()
12621{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012622/* The GNU C library defines this for functions which it implements
12623 to always fail with ENOSYS. Some functions are actually named
12624 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012625#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012626choke me
12627#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012628f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012629#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012630
Martin v. Löwis11437992002-04-12 09:54:03 +000012631 ;
12632 return 0;
12633}
12634_ACEOF
12635rm -f conftest.$ac_objext conftest$ac_exeext
12636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12637 (eval $ac_link) 2>&5
12638 ac_status=$?
12639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12640 (exit $ac_status); } &&
12641 { ac_try='test -s conftest$ac_exeext'
12642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12643 (eval $ac_try) 2>&5
12644 ac_status=$?
12645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12646 (exit $ac_status); }; }; then
12647 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012648else
Martin v. Löwis11437992002-04-12 09:54:03 +000012649 echo "$as_me: failed program was:" >&5
12650cat conftest.$ac_ext >&5
12651eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012652fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012653rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012654fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012655echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12656echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12657if test `eval echo '${'$as_ac_var'}'` = yes; then
12658 cat >>confdefs.h <<_ACEOF
12659#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12660_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012661
Martin v. Löwis1142de32002-03-29 16:28:31 +000012662else
Martin v. Löwis11437992002-04-12 09:54:03 +000012663 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012664fi
12665done
12666
12667
Martin v. Löwis11437992002-04-12 09:54:03 +000012668
Martin v. Löwis1142de32002-03-29 16:28:31 +000012669for ac_func in getpgrp
12670do
Martin v. Löwis11437992002-04-12 09:54:03 +000012671as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12672echo "$as_me:$LINENO: checking for $ac_func" >&5
12673echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12674if eval "test \"\${$as_ac_var+set}\" = set"; then
12675 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012676else
Martin v. Löwis11437992002-04-12 09:54:03 +000012677 cat >conftest.$ac_ext <<_ACEOF
12678#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012679#include "confdefs.h"
12680/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012682#include <assert.h>
12683/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012684#ifdef __cplusplus
12685extern "C"
12686#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012687/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012688 builtin and then its argument prototype would still apply. */
12689char $ac_func ();
12690char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012691
Martin v. Löwis11437992002-04-12 09:54:03 +000012692#ifdef F77_DUMMY_MAIN
12693# ifdef __cplusplus
12694 extern "C"
12695# endif
12696 int F77_DUMMY_MAIN() { return 1; }
12697#endif
12698int
12699main ()
12700{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012701/* The GNU C library defines this for functions which it implements
12702 to always fail with ENOSYS. Some functions are actually named
12703 something starting with __ and the normal name is an alias. */
12704#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12705choke me
12706#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012707f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012708#endif
12709
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 ;
12711 return 0;
12712}
12713_ACEOF
12714rm -f conftest.$ac_objext conftest$ac_exeext
12715if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12716 (eval $ac_link) 2>&5
12717 ac_status=$?
12718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12719 (exit $ac_status); } &&
12720 { ac_try='test -s conftest$ac_exeext'
12721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12722 (eval $ac_try) 2>&5
12723 ac_status=$?
12724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12725 (exit $ac_status); }; }; then
12726 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012727else
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 echo "$as_me: failed program was:" >&5
12729cat conftest.$ac_ext >&5
12730eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012731fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012732rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012733fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012734echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12735echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12736if test `eval echo '${'$as_ac_var'}'` = yes; then
12737 cat >>confdefs.h <<_ACEOF
12738#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12739_ACEOF
12740 cat >conftest.$ac_ext <<_ACEOF
12741#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012742#include "confdefs.h"
12743#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012744#ifdef F77_DUMMY_MAIN
12745# ifdef __cplusplus
12746 extern "C"
12747# endif
12748 int F77_DUMMY_MAIN() { return 1; }
12749#endif
12750int
12751main ()
12752{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012753getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012754 ;
12755 return 0;
12756}
12757_ACEOF
12758rm -f conftest.$ac_objext
12759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12760 (eval $ac_compile) 2>&5
12761 ac_status=$?
12762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12763 (exit $ac_status); } &&
12764 { ac_try='test -s conftest.$ac_objext'
12765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12766 (eval $ac_try) 2>&5
12767 ac_status=$?
12768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12769 (exit $ac_status); }; }; then
12770
12771cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012772#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012773_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012774
Martin v. Löwis11437992002-04-12 09:54:03 +000012775
Guido van Rossumf78abae1997-01-21 22:02:36 +000012776else
Martin v. Löwis11437992002-04-12 09:54:03 +000012777 echo "$as_me: failed program was:" >&5
12778cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012779fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012780rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012781
Guido van Rossum627b2d71993-12-24 10:39:16 +000012782fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012783done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012784
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012785echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12786echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12787if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012788 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012789else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012790 if test "$cross_compiling" = yes; then
12791 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12792echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12793 { (exit 1); exit 1; }; }
12794else
Martin v. Löwis11437992002-04-12 09:54:03 +000012795 cat >conftest.$ac_ext <<_ACEOF
12796#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012797#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012798#if HAVE_UNISTD_H
12799# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012800#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012801
Martin v. Löwis11437992002-04-12 09:54:03 +000012802#ifdef F77_DUMMY_MAIN
12803# ifdef __cplusplus
12804 extern "C"
12805# endif
12806 int F77_DUMMY_MAIN() { return 1; }
12807#endif
12808int
12809main ()
12810{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012811/* If this system has a BSD-style setpgrp which takes arguments,
12812 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12813 exit successfully. */
12814 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 ;
12816 return 0;
12817}
12818_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012819rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012820if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12821 (eval $ac_link) 2>&5
12822 ac_status=$?
12823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012824 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012825 { (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
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012830 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012831else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012832 echo "$as_me: program exited with status $ac_status" >&5
12833echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012834cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012835( exit $ac_status )
12836ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012837fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012838rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012839fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012840fi
12841echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12842echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12843if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012844
12845cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012846#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012847_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012848
12849fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012850
Martin v. Löwis11437992002-04-12 09:54:03 +000012851
Thomas Wouters3a584202000-08-05 23:28:51 +000012852for ac_func in gettimeofday
12853do
Martin v. Löwis11437992002-04-12 09:54:03 +000012854as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12855echo "$as_me:$LINENO: checking for $ac_func" >&5
12856echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12857if eval "test \"\${$as_ac_var+set}\" = set"; then
12858 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012859else
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 cat >conftest.$ac_ext <<_ACEOF
12861#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012862#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012863/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012864 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012865#include <assert.h>
12866/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012867#ifdef __cplusplus
12868extern "C"
12869#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012870/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012871 builtin and then its argument prototype would still apply. */
12872char $ac_func ();
12873char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012874
Martin v. Löwis11437992002-04-12 09:54:03 +000012875#ifdef F77_DUMMY_MAIN
12876# ifdef __cplusplus
12877 extern "C"
12878# endif
12879 int F77_DUMMY_MAIN() { return 1; }
12880#endif
12881int
12882main ()
12883{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012884/* The GNU C library defines this for functions which it implements
12885 to always fail with ENOSYS. Some functions are actually named
12886 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012887#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012888choke me
12889#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012890f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012891#endif
12892
Martin v. Löwis11437992002-04-12 09:54:03 +000012893 ;
12894 return 0;
12895}
12896_ACEOF
12897rm -f conftest.$ac_objext conftest$ac_exeext
12898if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12899 (eval $ac_link) 2>&5
12900 ac_status=$?
12901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12902 (exit $ac_status); } &&
12903 { ac_try='test -s conftest$ac_exeext'
12904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12905 (eval $ac_try) 2>&5
12906 ac_status=$?
12907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12908 (exit $ac_status); }; }; then
12909 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012910else
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 echo "$as_me: failed program was:" >&5
12912cat conftest.$ac_ext >&5
12913eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012914fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012915rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012916fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012917echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12918echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12919if test `eval echo '${'$as_ac_var'}'` = yes; then
12920 cat >>confdefs.h <<_ACEOF
12921#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12922_ACEOF
12923 cat >conftest.$ac_ext <<_ACEOF
12924#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012925#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012926#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012927#ifdef F77_DUMMY_MAIN
12928# ifdef __cplusplus
12929 extern "C"
12930# endif
12931 int F77_DUMMY_MAIN() { return 1; }
12932#endif
12933int
12934main ()
12935{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012936gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012937 ;
12938 return 0;
12939}
12940_ACEOF
12941rm -f conftest.$ac_objext
12942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12943 (eval $ac_compile) 2>&5
12944 ac_status=$?
12945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12946 (exit $ac_status); } &&
12947 { ac_try='test -s conftest.$ac_objext'
12948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12949 (eval $ac_try) 2>&5
12950 ac_status=$?
12951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12952 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012953 :
12954else
Martin v. Löwis11437992002-04-12 09:54:03 +000012955 echo "$as_me: failed program was:" >&5
12956cat conftest.$ac_ext >&5
12957
12958cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012959#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012960_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012961
Martin v. Löwis11437992002-04-12 09:54:03 +000012962
Guido van Rossum627b2d71993-12-24 10:39:16 +000012963fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012964rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012965
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012966fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012967done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012968
Michael W. Hudson54241132001-12-07 15:38:26 +000012969
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012970echo "$as_me:$LINENO: checking for major" >&5
12971echo $ECHO_N "checking for major... $ECHO_C" >&6
12972cat >conftest.$ac_ext <<_ACEOF
12973#line $LINENO "configure"
12974#include "confdefs.h"
12975
12976 #if defined(MAJOR_IN_MKDEV)
12977 #include <sys/mkdev.h>
12978 #elif defined(MAJOR_IN_SYSMACROS)
12979 #include <sys/sysmacros.h>
12980 #else
12981 #include <sys/types.h>
12982 #endif
12983
12984#ifdef F77_DUMMY_MAIN
12985# ifdef __cplusplus
12986 extern "C"
12987# endif
12988 int F77_DUMMY_MAIN() { return 1; }
12989#endif
12990int
12991main ()
12992{
12993
12994 makedev(major(0),minor(0));
12995
12996 ;
12997 return 0;
12998}
12999_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013000rm -f conftest.$ac_objext conftest$ac_exeext
13001if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13002 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013003 ac_status=$?
13004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13005 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013006 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13008 (eval $ac_try) 2>&5
13009 ac_status=$?
13010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13011 (exit $ac_status); }; }; then
13012
13013
13014cat >>confdefs.h <<\_ACEOF
13015#define HAVE_DEVICE_MACROS 1
13016_ACEOF
13017
13018 echo "$as_me:$LINENO: result: yes" >&5
13019echo "${ECHO_T}yes" >&6
13020
13021else
13022 echo "$as_me: failed program was:" >&5
13023cat conftest.$ac_ext >&5
13024
13025 echo "$as_me:$LINENO: result: no" >&5
13026echo "${ECHO_T}no" >&6
13027
13028fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013029rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013030
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013031# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013032# for [no]getaddrinfo in netdb.h.
13033echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13034echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13035cat >conftest.$ac_ext <<_ACEOF
13036#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013037#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013038
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013039#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013040#include <sys/socket.h>
13041#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013042#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013043
Martin v. Löwis11437992002-04-12 09:54:03 +000013044#ifdef F77_DUMMY_MAIN
13045# ifdef __cplusplus
13046 extern "C"
13047# endif
13048 int F77_DUMMY_MAIN() { return 1; }
13049#endif
13050int
13051main ()
13052{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013053
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013054getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013055
Martin v. Löwis11437992002-04-12 09:54:03 +000013056 ;
13057 return 0;
13058}
13059_ACEOF
13060rm -f conftest.$ac_objext conftest$ac_exeext
13061if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13062 (eval $ac_link) 2>&5
13063 ac_status=$?
13064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13065 (exit $ac_status); } &&
13066 { ac_try='test -s conftest$ac_exeext'
13067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13068 (eval $ac_try) 2>&5
13069 ac_status=$?
13070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13071 (exit $ac_status); }; }; then
13072
13073echo "$as_me:$LINENO: result: yes" >&5
13074echo "${ECHO_T}yes" >&6
13075echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13076echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013077if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013078 echo "$as_me:$LINENO: result: buggy" >&5
13079echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013080buggygetaddrinfo=yes
13081else
Martin v. Löwis11437992002-04-12 09:54:03 +000013082 cat >conftest.$ac_ext <<_ACEOF
13083#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013084#include "confdefs.h"
13085
13086#include <sys/types.h>
13087#include <netdb.h>
13088#include <string.h>
13089#include <sys/socket.h>
13090#include <netinet/in.h>
13091
13092main()
13093{
13094 int passive, gaierr, inet4 = 0, inet6 = 0;
13095 struct addrinfo hints, *ai, *aitop;
13096 char straddr[INET6_ADDRSTRLEN], strport[16];
13097
13098 for (passive = 0; passive <= 1; passive++) {
13099 memset(&hints, 0, sizeof(hints));
13100 hints.ai_family = AF_UNSPEC;
13101 hints.ai_flags = passive ? AI_PASSIVE : 0;
13102 hints.ai_socktype = SOCK_STREAM;
13103 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13104 (void)gai_strerror(gaierr);
13105 goto bad;
13106 }
13107 for (ai = aitop; ai; ai = ai->ai_next) {
13108 if (ai->ai_addr == NULL ||
13109 ai->ai_addrlen == 0 ||
13110 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13111 straddr, sizeof(straddr), strport, sizeof(strport),
13112 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13113 goto bad;
13114 }
13115 switch (ai->ai_family) {
13116 case AF_INET:
13117 if (strcmp(strport, "54321") != 0) {
13118 goto bad;
13119 }
13120 if (passive) {
13121 if (strcmp(straddr, "0.0.0.0") != 0) {
13122 goto bad;
13123 }
13124 } else {
13125 if (strcmp(straddr, "127.0.0.1") != 0) {
13126 goto bad;
13127 }
13128 }
13129 inet4++;
13130 break;
13131 case AF_INET6:
13132 if (strcmp(strport, "54321") != 0) {
13133 goto bad;
13134 }
13135 if (passive) {
13136 if (strcmp(straddr, "::") != 0) {
13137 goto bad;
13138 }
13139 } else {
13140 if (strcmp(straddr, "::1") != 0) {
13141 goto bad;
13142 }
13143 }
13144 inet6++;
13145 break;
13146 case AF_UNSPEC:
13147 goto bad;
13148 break;
13149 default:
13150 /* another family support? */
13151 break;
13152 }
13153 }
13154 }
13155
13156 if (!(inet4 == 0 || inet4 == 2))
13157 goto bad;
13158 if (!(inet6 == 0 || inet6 == 2))
13159 goto bad;
13160
13161 if (aitop)
13162 freeaddrinfo(aitop);
13163 exit(0);
13164
13165 bad:
13166 if (aitop)
13167 freeaddrinfo(aitop);
13168 exit(1);
13169}
13170
Martin v. Löwis11437992002-04-12 09:54:03 +000013171_ACEOF
13172rm -f conftest$ac_exeext
13173if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13174 (eval $ac_link) 2>&5
13175 ac_status=$?
13176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13177 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13179 (eval $ac_try) 2>&5
13180 ac_status=$?
13181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13182 (exit $ac_status); }; }; then
13183 echo "$as_me:$LINENO: result: good" >&5
13184echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013185buggygetaddrinfo=no
13186else
Martin v. Löwis11437992002-04-12 09:54:03 +000013187 echo "$as_me: program exited with status $ac_status" >&5
13188echo "$as_me: failed program was:" >&5
13189cat conftest.$ac_ext >&5
13190( exit $ac_status )
13191echo "$as_me:$LINENO: result: buggy" >&5
13192echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013193buggygetaddrinfo=yes
13194fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013195rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013196fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013197else
Martin v. Löwis11437992002-04-12 09:54:03 +000013198 echo "$as_me: failed program was:" >&5
13199cat conftest.$ac_ext >&5
13200
13201echo "$as_me:$LINENO: result: no" >&5
13202echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013203buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013204
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013205fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013206rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013207
13208if test "$buggygetaddrinfo" = "yes"; then
13209 if test "$ipv6" = "yes"; then
13210 echo 'Fatal: You must get working getaddrinfo() function.'
13211 echo ' or you can specify "--disable-ipv6"'.
13212 exit 1
13213 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013214else
Martin v. Löwis11437992002-04-12 09:54:03 +000013215
13216cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013217#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013218_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013219
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013220fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013221
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013222for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013223do
Martin v. Löwis11437992002-04-12 09:54:03 +000013224as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13225echo "$as_me:$LINENO: checking for $ac_func" >&5
13226echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13227if eval "test \"\${$as_ac_var+set}\" = set"; then
13228 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013229else
Martin v. Löwis11437992002-04-12 09:54:03 +000013230 cat >conftest.$ac_ext <<_ACEOF
13231#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013232#include "confdefs.h"
13233/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013234 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013235#include <assert.h>
13236/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013237#ifdef __cplusplus
13238extern "C"
13239#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013240/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013241 builtin and then its argument prototype would still apply. */
13242char $ac_func ();
13243char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013244
Martin v. Löwis11437992002-04-12 09:54:03 +000013245#ifdef F77_DUMMY_MAIN
13246# ifdef __cplusplus
13247 extern "C"
13248# endif
13249 int F77_DUMMY_MAIN() { return 1; }
13250#endif
13251int
13252main ()
13253{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013254/* The GNU C library defines this for functions which it implements
13255 to always fail with ENOSYS. Some functions are actually named
13256 something starting with __ and the normal name is an alias. */
13257#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13258choke me
13259#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013260f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013261#endif
13262
Martin v. Löwis11437992002-04-12 09:54:03 +000013263 ;
13264 return 0;
13265}
13266_ACEOF
13267rm -f conftest.$ac_objext conftest$ac_exeext
13268if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13269 (eval $ac_link) 2>&5
13270 ac_status=$?
13271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13272 (exit $ac_status); } &&
13273 { ac_try='test -s conftest$ac_exeext'
13274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13275 (eval $ac_try) 2>&5
13276 ac_status=$?
13277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13278 (exit $ac_status); }; }; then
13279 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013280else
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 echo "$as_me: failed program was:" >&5
13282cat conftest.$ac_ext >&5
13283eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013284fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013285rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013286fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013287echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13288echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13289if test `eval echo '${'$as_ac_var'}'` = yes; then
13290 cat >>confdefs.h <<_ACEOF
13291#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13292_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013293
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013294fi
13295done
13296
Michael W. Hudson54241132001-12-07 15:38:26 +000013297
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013298# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013299echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13300echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13301if test "${ac_cv_header_time+set}" = set; then
13302 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013303else
Martin v. Löwis11437992002-04-12 09:54:03 +000013304 cat >conftest.$ac_ext <<_ACEOF
13305#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013306#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013307#include <sys/types.h>
13308#include <sys/time.h>
13309#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013310
13311#ifdef F77_DUMMY_MAIN
13312# ifdef __cplusplus
13313 extern "C"
13314# endif
13315 int F77_DUMMY_MAIN() { return 1; }
13316#endif
13317int
13318main ()
13319{
13320if ((struct tm *) 0)
13321return 0;
13322 ;
13323 return 0;
13324}
13325_ACEOF
13326rm -f conftest.$ac_objext
13327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13328 (eval $ac_compile) 2>&5
13329 ac_status=$?
13330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13331 (exit $ac_status); } &&
13332 { ac_try='test -s conftest.$ac_objext'
13333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13334 (eval $ac_try) 2>&5
13335 ac_status=$?
13336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13337 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013338 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013339else
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 echo "$as_me: failed program was:" >&5
13341cat conftest.$ac_ext >&5
13342ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013344rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013345fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013346echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13347echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013348if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013349
13350cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013351#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013352_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013353
13354fi
13355
Martin v. Löwis11437992002-04-12 09:54:03 +000013356echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13357echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13358if test "${ac_cv_struct_tm+set}" = set; then
13359 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013360else
Martin v. Löwis11437992002-04-12 09:54:03 +000013361 cat >conftest.$ac_ext <<_ACEOF
13362#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013363#include "confdefs.h"
13364#include <sys/types.h>
13365#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013366
13367#ifdef F77_DUMMY_MAIN
13368# ifdef __cplusplus
13369 extern "C"
13370# endif
13371 int F77_DUMMY_MAIN() { return 1; }
13372#endif
13373int
13374main ()
13375{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013376struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000013377 ;
13378 return 0;
13379}
13380_ACEOF
13381rm -f conftest.$ac_objext
13382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13383 (eval $ac_compile) 2>&5
13384 ac_status=$?
13385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13386 (exit $ac_status); } &&
13387 { ac_try='test -s conftest.$ac_objext'
13388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13389 (eval $ac_try) 2>&5
13390 ac_status=$?
13391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13392 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013393 ac_cv_struct_tm=time.h
13394else
Martin v. Löwis11437992002-04-12 09:54:03 +000013395 echo "$as_me: failed program was:" >&5
13396cat conftest.$ac_ext >&5
13397ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013398fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013399rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013400fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013401echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13402echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013403if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013404
13405cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013406#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013407_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013408
13409fi
13410
Martin v. Löwis11437992002-04-12 09:54:03 +000013411echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13412echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13413if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13414 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013415else
Martin v. Löwis11437992002-04-12 09:54:03 +000013416 cat >conftest.$ac_ext <<_ACEOF
13417#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013418#include "confdefs.h"
13419#include <sys/types.h>
13420#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013421
13422
13423#ifdef F77_DUMMY_MAIN
13424# ifdef __cplusplus
13425 extern "C"
13426# endif
13427 int F77_DUMMY_MAIN() { return 1; }
13428#endif
13429int
13430main ()
13431{
13432static struct tm ac_aggr;
13433if (ac_aggr.tm_zone)
13434return 0;
13435 ;
13436 return 0;
13437}
13438_ACEOF
13439rm -f conftest.$ac_objext
13440if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13441 (eval $ac_compile) 2>&5
13442 ac_status=$?
13443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13444 (exit $ac_status); } &&
13445 { ac_try='test -s conftest.$ac_objext'
13446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13447 (eval $ac_try) 2>&5
13448 ac_status=$?
13449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13450 (exit $ac_status); }; }; then
13451 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013452else
Martin v. Löwis11437992002-04-12 09:54:03 +000013453 echo "$as_me: failed program was:" >&5
13454cat conftest.$ac_ext >&5
13455ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013456fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013457rm -f conftest.$ac_objext conftest.$ac_ext
13458fi
13459echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13460echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13461if test $ac_cv_member_struct_tm_tm_zone = yes; then
13462
13463cat >>confdefs.h <<_ACEOF
13464#define HAVE_STRUCT_TM_TM_ZONE 1
13465_ACEOF
13466
13467
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013468fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13471
13472cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013473#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013474_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013475
13476else
Martin v. Löwis11437992002-04-12 09:54:03 +000013477 echo "$as_me:$LINENO: checking for tzname" >&5
13478echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13479if test "${ac_cv_var_tzname+set}" = set; then
13480 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013481else
Martin v. Löwis11437992002-04-12 09:54:03 +000013482 cat >conftest.$ac_ext <<_ACEOF
13483#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013484#include "confdefs.h"
13485#include <time.h>
13486#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013487extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013488#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013489
13490#ifdef F77_DUMMY_MAIN
13491# ifdef __cplusplus
13492 extern "C"
13493# endif
13494 int F77_DUMMY_MAIN() { return 1; }
13495#endif
13496int
13497main ()
13498{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013499atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013500 ;
13501 return 0;
13502}
13503_ACEOF
13504rm -f conftest.$ac_objext conftest$ac_exeext
13505if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13506 (eval $ac_link) 2>&5
13507 ac_status=$?
13508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13509 (exit $ac_status); } &&
13510 { ac_try='test -s conftest$ac_exeext'
13511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13512 (eval $ac_try) 2>&5
13513 ac_status=$?
13514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13515 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013516 ac_cv_var_tzname=yes
13517else
Martin v. Löwis11437992002-04-12 09:54:03 +000013518 echo "$as_me: failed program was:" >&5
13519cat conftest.$ac_ext >&5
13520ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013522rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013523fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013524echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13525echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013526 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013527
13528cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013529#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013530_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013531
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013532 fi
13533fi
13534
Martin v. Löwis11437992002-04-12 09:54:03 +000013535echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13536echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13537if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13538 echo $ECHO_N "(cached) $ECHO_C" >&6
13539else
13540 cat >conftest.$ac_ext <<_ACEOF
13541#line $LINENO "configure"
13542#include "confdefs.h"
13543$ac_includes_default
13544#ifdef F77_DUMMY_MAIN
13545# ifdef __cplusplus
13546 extern "C"
13547# endif
13548 int F77_DUMMY_MAIN() { return 1; }
13549#endif
13550int
13551main ()
13552{
13553static struct stat ac_aggr;
13554if (ac_aggr.st_rdev)
13555return 0;
13556 ;
13557 return 0;
13558}
13559_ACEOF
13560rm -f conftest.$ac_objext
13561if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13562 (eval $ac_compile) 2>&5
13563 ac_status=$?
13564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13565 (exit $ac_status); } &&
13566 { ac_try='test -s conftest.$ac_objext'
13567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13568 (eval $ac_try) 2>&5
13569 ac_status=$?
13570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13571 (exit $ac_status); }; }; then
13572 ac_cv_member_struct_stat_st_rdev=yes
13573else
13574 echo "$as_me: failed program was:" >&5
13575cat conftest.$ac_ext >&5
13576ac_cv_member_struct_stat_st_rdev=no
13577fi
13578rm -f conftest.$ac_objext conftest.$ac_ext
13579fi
13580echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13581echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13582if test $ac_cv_member_struct_stat_st_rdev = yes; then
13583
13584cat >>confdefs.h <<_ACEOF
13585#define HAVE_STRUCT_STAT_ST_RDEV 1
13586_ACEOF
13587
13588
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013589fi
13590
Martin v. Löwis11437992002-04-12 09:54:03 +000013591echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13592echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13593if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13594 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013595else
Martin v. Löwis11437992002-04-12 09:54:03 +000013596 cat >conftest.$ac_ext <<_ACEOF
13597#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013598#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013599$ac_includes_default
13600#ifdef F77_DUMMY_MAIN
13601# ifdef __cplusplus
13602 extern "C"
13603# endif
13604 int F77_DUMMY_MAIN() { return 1; }
13605#endif
13606int
13607main ()
13608{
13609static struct stat ac_aggr;
13610if (ac_aggr.st_blksize)
13611return 0;
13612 ;
13613 return 0;
13614}
13615_ACEOF
13616rm -f conftest.$ac_objext
13617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13618 (eval $ac_compile) 2>&5
13619 ac_status=$?
13620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13621 (exit $ac_status); } &&
13622 { ac_try='test -s conftest.$ac_objext'
13623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13624 (eval $ac_try) 2>&5
13625 ac_status=$?
13626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13627 (exit $ac_status); }; }; then
13628 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013629else
Martin v. Löwis11437992002-04-12 09:54:03 +000013630 echo "$as_me: failed program was:" >&5
13631cat conftest.$ac_ext >&5
13632ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013633fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013634rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013636echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13637echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13638if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013639
Martin v. Löwis11437992002-04-12 09:54:03 +000013640cat >>confdefs.h <<_ACEOF
13641#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13642_ACEOF
13643
13644
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013645fi
13646
Martin v. Löwis11437992002-04-12 09:54:03 +000013647echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13648echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13649if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13650 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013651else
Martin v. Löwis11437992002-04-12 09:54:03 +000013652 cat >conftest.$ac_ext <<_ACEOF
13653#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013654#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013655$ac_includes_default
13656#ifdef F77_DUMMY_MAIN
13657# ifdef __cplusplus
13658 extern "C"
13659# endif
13660 int F77_DUMMY_MAIN() { return 1; }
13661#endif
13662int
13663main ()
13664{
13665static struct stat ac_aggr;
13666if (ac_aggr.st_blocks)
13667return 0;
13668 ;
13669 return 0;
13670}
13671_ACEOF
13672rm -f conftest.$ac_objext
13673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13674 (eval $ac_compile) 2>&5
13675 ac_status=$?
13676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13677 (exit $ac_status); } &&
13678 { ac_try='test -s conftest.$ac_objext'
13679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13680 (eval $ac_try) 2>&5
13681 ac_status=$?
13682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13683 (exit $ac_status); }; }; then
13684 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013685else
Martin v. Löwis11437992002-04-12 09:54:03 +000013686 echo "$as_me: failed program was:" >&5
13687cat conftest.$ac_ext >&5
13688ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013689fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013690rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013691fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013692echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13693echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13694if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013695
Martin v. Löwis11437992002-04-12 09:54:03 +000013696cat >>confdefs.h <<_ACEOF
13697#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13698_ACEOF
13699
13700
13701cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013702#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013703_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013704
13705else
Martin v. Löwis11437992002-04-12 09:54:03 +000013706 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013707fi
13708
Michael W. Hudson54241132001-12-07 15:38:26 +000013709
Martin v. Löwis11437992002-04-12 09:54:03 +000013710
13711echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13712echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13713if test "${ac_cv_header_time_altzone+set}" = set; then
13714 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013715else
Martin v. Löwis11437992002-04-12 09:54:03 +000013716 cat >conftest.$ac_ext <<_ACEOF
13717#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013718#include "confdefs.h"
13719#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013720#ifdef F77_DUMMY_MAIN
13721# ifdef __cplusplus
13722 extern "C"
13723# endif
13724 int F77_DUMMY_MAIN() { return 1; }
13725#endif
13726int
13727main ()
13728{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013729return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013730 ;
13731 return 0;
13732}
13733_ACEOF
13734rm -f conftest.$ac_objext
13735if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13736 (eval $ac_compile) 2>&5
13737 ac_status=$?
13738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13739 (exit $ac_status); } &&
13740 { ac_try='test -s conftest.$ac_objext'
13741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13742 (eval $ac_try) 2>&5
13743 ac_status=$?
13744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13745 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013746 ac_cv_header_time_altzone=yes
13747else
Martin v. Löwis11437992002-04-12 09:54:03 +000013748 echo "$as_me: failed program was:" >&5
13749cat conftest.$ac_ext >&5
13750ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013751fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013752rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013753fi
13754
Martin v. Löwis11437992002-04-12 09:54:03 +000013755echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13756echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013757if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013758
13759cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013760#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013761_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013762
13763fi
13764
Guido van Rossumda88dad1995-01-26 00:46:29 +000013765was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013766echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13767echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13768cat >conftest.$ac_ext <<_ACEOF
13769#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013770#include "confdefs.h"
13771
13772#include <sys/types.h>
13773#include <sys/select.h>
13774#include <sys/time.h>
13775
Martin v. Löwis11437992002-04-12 09:54:03 +000013776#ifdef F77_DUMMY_MAIN
13777# ifdef __cplusplus
13778 extern "C"
13779# endif
13780 int F77_DUMMY_MAIN() { return 1; }
13781#endif
13782int
13783main ()
13784{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013785;
Martin v. Löwis11437992002-04-12 09:54:03 +000013786 ;
13787 return 0;
13788}
13789_ACEOF
13790rm -f conftest.$ac_objext
13791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13792 (eval $ac_compile) 2>&5
13793 ac_status=$?
13794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13795 (exit $ac_status); } &&
13796 { ac_try='test -s conftest.$ac_objext'
13797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13798 (eval $ac_try) 2>&5
13799 ac_status=$?
13800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13801 (exit $ac_status); }; }; then
13802
13803
13804cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013805#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013806_ACEOF
13807
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013808 was_it_defined=yes
13809
Guido van Rossumf78abae1997-01-21 22:02:36 +000013810else
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 echo "$as_me: failed program was:" >&5
13812cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013813fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013814rm -f conftest.$ac_objext conftest.$ac_ext
13815echo "$as_me:$LINENO: result: $was_it_defined" >&5
13816echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013817
Martin v. Löwis11437992002-04-12 09:54:03 +000013818echo "$as_me:$LINENO: checking for addrinfo" >&5
13819echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13820if test "${ac_cv_struct_addrinfo+set}" = set; then
13821 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013822else
Martin v. Löwis11437992002-04-12 09:54:03 +000013823 cat >conftest.$ac_ext <<_ACEOF
13824#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013825#include "confdefs.h"
13826
13827# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013828#ifdef F77_DUMMY_MAIN
13829# ifdef __cplusplus
13830 extern "C"
13831# endif
13832 int F77_DUMMY_MAIN() { return 1; }
13833#endif
13834int
13835main ()
13836{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013837struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 ;
13839 return 0;
13840}
13841_ACEOF
13842rm -f conftest.$ac_objext
13843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13844 (eval $ac_compile) 2>&5
13845 ac_status=$?
13846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13847 (exit $ac_status); } &&
13848 { ac_try='test -s conftest.$ac_objext'
13849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13850 (eval $ac_try) 2>&5
13851 ac_status=$?
13852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13853 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013854 ac_cv_struct_addrinfo=yes
13855else
Martin v. Löwis11437992002-04-12 09:54:03 +000013856 echo "$as_me: failed program was:" >&5
13857cat conftest.$ac_ext >&5
13858ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013859fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013860rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013861fi
13862
Martin v. Löwis11437992002-04-12 09:54:03 +000013863echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13864echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013865if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013866
13867cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013868#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013869_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013870
13871fi
13872
Martin v. Löwis11437992002-04-12 09:54:03 +000013873echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13874echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13875if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13876 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013877else
Martin v. Löwis11437992002-04-12 09:54:03 +000013878 cat >conftest.$ac_ext <<_ACEOF
13879#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013880#include "confdefs.h"
13881
13882# include <sys/types.h>
13883# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013884#ifdef F77_DUMMY_MAIN
13885# ifdef __cplusplus
13886 extern "C"
13887# endif
13888 int F77_DUMMY_MAIN() { return 1; }
13889#endif
13890int
13891main ()
13892{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013893struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013894 ;
13895 return 0;
13896}
13897_ACEOF
13898rm -f conftest.$ac_objext
13899if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13900 (eval $ac_compile) 2>&5
13901 ac_status=$?
13902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13903 (exit $ac_status); } &&
13904 { ac_try='test -s conftest.$ac_objext'
13905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13906 (eval $ac_try) 2>&5
13907 ac_status=$?
13908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13909 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013910 ac_cv_struct_sockaddr_storage=yes
13911else
Martin v. Löwis11437992002-04-12 09:54:03 +000013912 echo "$as_me: failed program was:" >&5
13913cat conftest.$ac_ext >&5
13914ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013915fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013916rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013917fi
13918
Martin v. Löwis11437992002-04-12 09:54:03 +000013919echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13920echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013921if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013922
13923cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013924#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013925_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013926
13927fi
13928
Guido van Rossum627b2d71993-12-24 10:39:16 +000013929# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013930
Michael W. Hudson54241132001-12-07 15:38:26 +000013931
Martin v. Löwis11437992002-04-12 09:54:03 +000013932echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13933echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13934if test "${ac_cv_c_char_unsigned+set}" = set; then
13935 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013936else
Martin v. Löwis11437992002-04-12 09:54:03 +000013937 cat >conftest.$ac_ext <<_ACEOF
13938#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013939#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013940$ac_includes_default
13941#ifdef F77_DUMMY_MAIN
13942# ifdef __cplusplus
13943 extern "C"
13944# endif
13945 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013947int
13948main ()
13949{
13950static int test_array [1 - 2 * !(((char) -1) < 0)];
13951test_array [0] = 0
13952
13953 ;
13954 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013955}
Martin v. Löwis11437992002-04-12 09:54:03 +000013956_ACEOF
13957rm -f conftest.$ac_objext
13958if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13959 (eval $ac_compile) 2>&5
13960 ac_status=$?
13961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13962 (exit $ac_status); } &&
13963 { ac_try='test -s conftest.$ac_objext'
13964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13965 (eval $ac_try) 2>&5
13966 ac_status=$?
13967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13968 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013969 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013970else
13971 echo "$as_me: failed program was:" >&5
13972cat conftest.$ac_ext >&5
13973ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013974fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013975rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013976fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013977echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13978echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013979if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013981#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013982_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013983
13984fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013985
Martin v. Löwis11437992002-04-12 09:54:03 +000013986echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13987echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13988if test "${ac_cv_prog_cc_stdc+set}" = set; then
13989 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013990else
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 ac_cv_prog_cc_stdc=no
13992ac_save_CC=$CC
13993cat >conftest.$ac_ext <<_ACEOF
13994#line $LINENO "configure"
13995#include "confdefs.h"
13996#include <stdarg.h>
13997#include <stdio.h>
13998#include <sys/types.h>
13999#include <sys/stat.h>
14000/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14001struct buf { int x; };
14002FILE * (*rcsopen) (struct buf *, struct stat *, int);
14003static char *e (p, i)
14004 char **p;
14005 int i;
14006{
14007 return p[i];
14008}
14009static char *f (char * (*g) (char **, int), char **p, ...)
14010{
14011 char *s;
14012 va_list v;
14013 va_start (v,p);
14014 s = g (p, va_arg (v,int));
14015 va_end (v);
14016 return s;
14017}
14018int test (int i, double x);
14019struct s1 {int (*f) (int a);};
14020struct s2 {int (*f) (double a);};
14021int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14022int argc;
14023char **argv;
14024#ifdef F77_DUMMY_MAIN
14025# ifdef __cplusplus
14026 extern "C"
14027# endif
14028 int F77_DUMMY_MAIN() { return 1; }
14029#endif
14030int
14031main ()
14032{
14033return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14034 ;
14035 return 0;
14036}
14037_ACEOF
14038# Don't try gcc -ansi; that turns off useful extensions and
14039# breaks some systems' header files.
14040# AIX -qlanglvl=ansi
14041# Ultrix and OSF/1 -std1
14042# HP-UX 10.20 and later -Ae
14043# HP-UX older versions -Aa -D_HPUX_SOURCE
14044# SVR4 -Xc -D__EXTENSIONS__
14045for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14046do
14047 CC="$ac_save_CC $ac_arg"
14048 rm -f conftest.$ac_objext
14049if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14050 (eval $ac_compile) 2>&5
14051 ac_status=$?
14052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14053 (exit $ac_status); } &&
14054 { ac_try='test -s conftest.$ac_objext'
14055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14056 (eval $ac_try) 2>&5
14057 ac_status=$?
14058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14059 (exit $ac_status); }; }; then
14060 ac_cv_prog_cc_stdc=$ac_arg
14061break
14062else
14063 echo "$as_me: failed program was:" >&5
14064cat conftest.$ac_ext >&5
14065fi
14066rm -f conftest.$ac_objext
14067done
14068rm -f conftest.$ac_ext conftest.$ac_objext
14069CC=$ac_save_CC
14070
14071fi
14072
14073case "x$ac_cv_prog_cc_stdc" in
14074 x|xno)
14075 echo "$as_me:$LINENO: result: none needed" >&5
14076echo "${ECHO_T}none needed" >&6 ;;
14077 *)
14078 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14079echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14080 CC="$CC $ac_cv_prog_cc_stdc" ;;
14081esac
14082
14083echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14084echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14085if test "${ac_cv_c_const+set}" = set; then
14086 echo $ECHO_N "(cached) $ECHO_C" >&6
14087else
14088 cat >conftest.$ac_ext <<_ACEOF
14089#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014090#include "confdefs.h"
14091
Martin v. Löwis11437992002-04-12 09:54:03 +000014092#ifdef F77_DUMMY_MAIN
14093# ifdef __cplusplus
14094 extern "C"
14095# endif
14096 int F77_DUMMY_MAIN() { return 1; }
14097#endif
14098int
14099main ()
14100{
14101/* FIXME: Include the comments suggested by Paul. */
14102#ifndef __cplusplus
14103 /* Ultrix mips cc rejects this. */
14104 typedef int charset[2];
14105 const charset x;
14106 /* SunOS 4.1.1 cc rejects this. */
14107 char const *const *ccp;
14108 char **p;
14109 /* NEC SVR4.0.2 mips cc rejects this. */
14110 struct point {int x, y;};
14111 static struct point const zero = {0,0};
14112 /* AIX XL C 1.02.0.0 rejects this.
14113 It does not let you subtract one const X* pointer from another in
14114 an arm of an if-expression whose if-part is not a constant
14115 expression */
14116 const char *g = "string";
14117 ccp = &g + (g ? g-g : 0);
14118 /* HPUX 7.0 cc rejects these. */
14119 ++ccp;
14120 p = (char**) ccp;
14121 ccp = (char const *const *) p;
14122 { /* SCO 3.2v4 cc rejects this. */
14123 char *t;
14124 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014125
Martin v. Löwis11437992002-04-12 09:54:03 +000014126 *t++ = 0;
14127 }
14128 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14129 int x[] = {25, 17};
14130 const int *foo = &x[0];
14131 ++foo;
14132 }
14133 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14134 typedef const int *iptr;
14135 iptr p = 0;
14136 ++p;
14137 }
14138 { /* AIX XL C 1.02.0.0 rejects this saying
14139 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14140 struct s { int j; const int *ap[3]; };
14141 struct s *b; b->j = 5;
14142 }
14143 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14144 const int foo = 10;
14145 }
14146#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014147
Martin v. Löwis11437992002-04-12 09:54:03 +000014148 ;
14149 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014150}
Martin v. Löwis11437992002-04-12 09:54:03 +000014151_ACEOF
14152rm -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
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014164 ac_cv_c_const=yes
14165else
Martin v. Löwis11437992002-04-12 09:54:03 +000014166 echo "$as_me: failed program was:" >&5
14167cat conftest.$ac_ext >&5
14168ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014169fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014170rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014171fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014172echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14173echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014174if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014175
14176cat >>confdefs.h <<\_ACEOF
14177#define const
14178_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014179
14180fi
14181
Michael W. Hudson54241132001-12-07 15:38:26 +000014182
Guido van Rossumda88dad1995-01-26 00:46:29 +000014183works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014184echo "$as_me:$LINENO: checking for working volatile" >&5
14185echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14186cat >conftest.$ac_ext <<_ACEOF
14187#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014188#include "confdefs.h"
14189
Martin v. Löwis11437992002-04-12 09:54:03 +000014190#ifdef F77_DUMMY_MAIN
14191# ifdef __cplusplus
14192 extern "C"
14193# endif
14194 int F77_DUMMY_MAIN() { return 1; }
14195#endif
14196int
14197main ()
14198{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014199volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014200 ;
14201 return 0;
14202}
14203_ACEOF
14204rm -f conftest.$ac_objext
14205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14206 (eval $ac_compile) 2>&5
14207 ac_status=$?
14208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14209 (exit $ac_status); } &&
14210 { ac_try='test -s conftest.$ac_objext'
14211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14212 (eval $ac_try) 2>&5
14213 ac_status=$?
14214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14215 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014216 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014217else
Martin v. Löwis11437992002-04-12 09:54:03 +000014218 echo "$as_me: failed program was:" >&5
14219cat conftest.$ac_ext >&5
14220
14221cat >>confdefs.h <<\_ACEOF
14222#define volatile
14223_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014224
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014225
Guido van Rossum627b2d71993-12-24 10:39:16 +000014226fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014227rm -f conftest.$ac_objext conftest.$ac_ext
14228echo "$as_me:$LINENO: result: $works" >&5
14229echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014230
Guido van Rossumda88dad1995-01-26 00:46:29 +000014231works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014232echo "$as_me:$LINENO: checking for working signed char" >&5
14233echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14234cat >conftest.$ac_ext <<_ACEOF
14235#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014236#include "confdefs.h"
14237
Martin v. Löwis11437992002-04-12 09:54:03 +000014238#ifdef F77_DUMMY_MAIN
14239# ifdef __cplusplus
14240 extern "C"
14241# endif
14242 int F77_DUMMY_MAIN() { return 1; }
14243#endif
14244int
14245main ()
14246{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014247signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014248 ;
14249 return 0;
14250}
14251_ACEOF
14252rm -f conftest.$ac_objext
14253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14254 (eval $ac_compile) 2>&5
14255 ac_status=$?
14256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14257 (exit $ac_status); } &&
14258 { ac_try='test -s conftest.$ac_objext'
14259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14260 (eval $ac_try) 2>&5
14261 ac_status=$?
14262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14263 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014264 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014265else
Martin v. Löwis11437992002-04-12 09:54:03 +000014266 echo "$as_me: failed program was:" >&5
14267cat conftest.$ac_ext >&5
14268
14269cat >>confdefs.h <<\_ACEOF
14270#define signed
14271_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014272
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014273
Guido van Rossum7f43da71994-08-01 12:15:30 +000014274fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014275rm -f conftest.$ac_objext conftest.$ac_ext
14276echo "$as_me:$LINENO: result: $works" >&5
14277echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014278
Guido van Rossumda88dad1995-01-26 00:46:29 +000014279have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014280echo "$as_me:$LINENO: checking for prototypes" >&5
14281echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14282cat >conftest.$ac_ext <<_ACEOF
14283#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014284#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014285int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014286#ifdef F77_DUMMY_MAIN
14287# ifdef __cplusplus
14288 extern "C"
14289# endif
14290 int F77_DUMMY_MAIN() { return 1; }
14291#endif
14292int
14293main ()
14294{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014295return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014296 ;
14297 return 0;
14298}
14299_ACEOF
14300rm -f conftest.$ac_objext
14301if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14302 (eval $ac_compile) 2>&5
14303 ac_status=$?
14304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14305 (exit $ac_status); } &&
14306 { ac_try='test -s conftest.$ac_objext'
14307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14308 (eval $ac_try) 2>&5
14309 ac_status=$?
14310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14311 (exit $ac_status); }; }; then
14312
14313
14314cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014315#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014316_ACEOF
14317
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014318 have_prototypes=yes
14319
Guido van Rossumf78abae1997-01-21 22:02:36 +000014320else
Martin v. Löwis11437992002-04-12 09:54:03 +000014321 echo "$as_me: failed program was:" >&5
14322cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014324rm -f conftest.$ac_objext conftest.$ac_ext
14325echo "$as_me:$LINENO: result: $have_prototypes" >&5
14326echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014327
Guido van Rossumda88dad1995-01-26 00:46:29 +000014328works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014329echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
14330echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
14331cat >conftest.$ac_ext <<_ACEOF
14332#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014333#include "confdefs.h"
14334
14335#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014336int foo(int x, ...) {
14337 va_list va;
14338 va_start(va, x);
14339 va_arg(va, int);
14340 va_arg(va, char *);
14341 va_arg(va, double);
14342 return 0;
14343}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014344
Martin v. Löwis11437992002-04-12 09:54:03 +000014345#ifdef F77_DUMMY_MAIN
14346# ifdef __cplusplus
14347 extern "C"
14348# endif
14349 int F77_DUMMY_MAIN() { return 1; }
14350#endif
14351int
14352main ()
14353{
Guido van Rossum90eea071996-08-30 20:58:57 +000014354return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014355 ;
14356 return 0;
14357}
14358_ACEOF
14359rm -f conftest.$ac_objext
14360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14361 (eval $ac_compile) 2>&5
14362 ac_status=$?
14363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14364 (exit $ac_status); } &&
14365 { ac_try='test -s conftest.$ac_objext'
14366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14367 (eval $ac_try) 2>&5
14368 ac_status=$?
14369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14370 (exit $ac_status); }; }; then
14371
14372
14373cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014374#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014375_ACEOF
14376
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014377 works=yes
14378
Guido van Rossumf78abae1997-01-21 22:02:36 +000014379else
Martin v. Löwis11437992002-04-12 09:54:03 +000014380 echo "$as_me: failed program was:" >&5
14381cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000014382fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014383rm -f conftest.$ac_objext conftest.$ac_ext
14384echo "$as_me:$LINENO: result: $works" >&5
14385echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014386
Guido van Rossumda88dad1995-01-26 00:46:29 +000014387if test "$have_prototypes" = yes; then
14388bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014389echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
14390echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
14391cat >conftest.$ac_ext <<_ACEOF
14392#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014393#include "confdefs.h"
14394#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014395#ifdef F77_DUMMY_MAIN
14396# ifdef __cplusplus
14397 extern "C"
14398# endif
14399 int F77_DUMMY_MAIN() { return 1; }
14400#endif
14401int
14402main ()
14403{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014404char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 ;
14406 return 0;
14407}
14408_ACEOF
14409rm -f conftest.$ac_objext
14410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14411 (eval $ac_compile) 2>&5
14412 ac_status=$?
14413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14414 (exit $ac_status); } &&
14415 { ac_try='test -s conftest.$ac_objext'
14416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14417 (eval $ac_try) 2>&5
14418 ac_status=$?
14419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14420 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014421 :
14422else
Martin v. Löwis11437992002-04-12 09:54:03 +000014423 echo "$as_me: failed program was:" >&5
14424cat conftest.$ac_ext >&5
14425
14426cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014427#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014428_ACEOF
14429
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014430 bad_prototypes=yes
14431
Guido van Rossum627b2d71993-12-24 10:39:16 +000014432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014433rm -f conftest.$ac_objext conftest.$ac_ext
14434echo "$as_me:$LINENO: result: $bad_prototypes" >&5
14435echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014436fi
14437
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014438# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000014439echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
14440echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
14441cat >conftest.$ac_ext <<_ACEOF
14442#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014443#include "confdefs.h"
14444#include <sys/types.h>
14445#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014446#ifdef F77_DUMMY_MAIN
14447# ifdef __cplusplus
14448 extern "C"
14449# endif
14450 int F77_DUMMY_MAIN() { return 1; }
14451#endif
14452int
14453main ()
14454{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014455struct sockaddr x;
14456x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 ;
14458 return 0;
14459}
14460_ACEOF
14461rm -f conftest.$ac_objext
14462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14463 (eval $ac_compile) 2>&5
14464 ac_status=$?
14465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14466 (exit $ac_status); } &&
14467 { ac_try='test -s conftest.$ac_objext'
14468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14469 (eval $ac_try) 2>&5
14470 ac_status=$?
14471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14472 (exit $ac_status); }; }; then
14473 echo "$as_me:$LINENO: result: yes" >&5
14474echo "${ECHO_T}yes" >&6
14475
14476cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014477#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014478_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014479
14480else
Martin v. Löwis11437992002-04-12 09:54:03 +000014481 echo "$as_me: failed program was:" >&5
14482cat conftest.$ac_ext >&5
14483echo "$as_me:$LINENO: result: no" >&5
14484echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014486rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014487
Guido van Rossumda88dad1995-01-26 00:46:29 +000014488va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014489echo "$as_me:$LINENO: checking whether va_list is an array" >&5
14490echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
14491cat >conftest.$ac_ext <<_ACEOF
14492#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014493#include "confdefs.h"
14494
14495#ifdef HAVE_STDARG_PROTOTYPES
14496#include <stdarg.h>
14497#else
14498#include <varargs.h>
14499#endif
14500
Martin v. Löwis11437992002-04-12 09:54:03 +000014501#ifdef F77_DUMMY_MAIN
14502# ifdef __cplusplus
14503 extern "C"
14504# endif
14505 int F77_DUMMY_MAIN() { return 1; }
14506#endif
14507int
14508main ()
14509{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014510va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 ;
14512 return 0;
14513}
14514_ACEOF
14515rm -f conftest.$ac_objext
14516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14517 (eval $ac_compile) 2>&5
14518 ac_status=$?
14519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14520 (exit $ac_status); } &&
14521 { ac_try='test -s conftest.$ac_objext'
14522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14523 (eval $ac_try) 2>&5
14524 ac_status=$?
14525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14526 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014527 :
14528else
Martin v. Löwis11437992002-04-12 09:54:03 +000014529 echo "$as_me: failed program was:" >&5
14530cat conftest.$ac_ext >&5
14531
14532
14533cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014534#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014535_ACEOF
14536
Guido van Rossumda88dad1995-01-26 00:46:29 +000014537 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014538
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014539fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014540rm -f conftest.$ac_objext conftest.$ac_ext
14541echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14542echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014543
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014544# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014545
14546
14547
14548echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14549echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14550if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14551 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014552else
Martin v. Löwis11437992002-04-12 09:54:03 +000014553 cat >conftest.$ac_ext <<_ACEOF
14554#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014555#include "confdefs.h"
14556/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014557 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014558#include <assert.h>
14559/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014560#ifdef __cplusplus
14561extern "C"
14562#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014563/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014564 builtin and then its argument prototype would still apply. */
14565char gethostbyname_r ();
14566char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014567
Martin v. Löwis11437992002-04-12 09:54:03 +000014568#ifdef F77_DUMMY_MAIN
14569# ifdef __cplusplus
14570 extern "C"
14571# endif
14572 int F77_DUMMY_MAIN() { return 1; }
14573#endif
14574int
14575main ()
14576{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014577/* The GNU C library defines this for functions which it implements
14578 to always fail with ENOSYS. Some functions are actually named
14579 something starting with __ and the normal name is an alias. */
14580#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14581choke me
14582#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014583f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014584#endif
14585
Martin v. Löwis11437992002-04-12 09:54:03 +000014586 ;
14587 return 0;
14588}
14589_ACEOF
14590rm -f conftest.$ac_objext conftest$ac_exeext
14591if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14592 (eval $ac_link) 2>&5
14593 ac_status=$?
14594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14595 (exit $ac_status); } &&
14596 { ac_try='test -s conftest$ac_exeext'
14597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14598 (eval $ac_try) 2>&5
14599 ac_status=$?
14600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14601 (exit $ac_status); }; }; then
14602 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014603else
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 echo "$as_me: failed program was:" >&5
14605cat conftest.$ac_ext >&5
14606ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014607fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014608rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014609fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014610echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14611echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14612if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014613
Martin v. Löwis11437992002-04-12 09:54:03 +000014614 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014615#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014616_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014617
Martin v. Löwis11437992002-04-12 09:54:03 +000014618 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14619echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014620 OLD_CFLAGS=$CFLAGS
14621 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014622 cat >conftest.$ac_ext <<_ACEOF
14623#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014624#include "confdefs.h"
14625
14626# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014627
14628#ifdef F77_DUMMY_MAIN
14629# ifdef __cplusplus
14630 extern "C"
14631# endif
14632 int F77_DUMMY_MAIN() { return 1; }
14633#endif
14634int
14635main ()
14636{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014637
14638 char *name;
14639 struct hostent *he, *res;
14640 char buffer[2048];
14641 int buflen = 2048;
14642 int h_errnop;
14643
14644 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014645
14646 ;
14647 return 0;
14648}
14649_ACEOF
14650rm -f conftest.$ac_objext
14651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14652 (eval $ac_compile) 2>&5
14653 ac_status=$?
14654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14655 (exit $ac_status); } &&
14656 { ac_try='test -s conftest.$ac_objext'
14657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14658 (eval $ac_try) 2>&5
14659 ac_status=$?
14660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14661 (exit $ac_status); }; }; then
14662
14663 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014664#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014665_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014666
Martin v. Löwis11437992002-04-12 09:54:03 +000014667
14668cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014669#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014670_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014671
Martin v. Löwis11437992002-04-12 09:54:03 +000014672 echo "$as_me:$LINENO: result: yes" >&5
14673echo "${ECHO_T}yes" >&6
14674
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014675else
Martin v. Löwis11437992002-04-12 09:54:03 +000014676 echo "$as_me: failed program was:" >&5
14677cat conftest.$ac_ext >&5
14678
14679 echo "$as_me:$LINENO: result: no" >&5
14680echo "${ECHO_T}no" >&6
14681 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14682echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14683 cat >conftest.$ac_ext <<_ACEOF
14684#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014685#include "confdefs.h"
14686
14687# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014688
14689#ifdef F77_DUMMY_MAIN
14690# ifdef __cplusplus
14691 extern "C"
14692# endif
14693 int F77_DUMMY_MAIN() { return 1; }
14694#endif
14695int
14696main ()
14697{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014698
14699 char *name;
14700 struct hostent *he;
14701 char buffer[2048];
14702 int buflen = 2048;
14703 int h_errnop;
14704
14705 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014706
14707 ;
14708 return 0;
14709}
14710_ACEOF
14711rm -f conftest.$ac_objext
14712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14713 (eval $ac_compile) 2>&5
14714 ac_status=$?
14715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14716 (exit $ac_status); } &&
14717 { ac_try='test -s conftest.$ac_objext'
14718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14719 (eval $ac_try) 2>&5
14720 ac_status=$?
14721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14722 (exit $ac_status); }; }; then
14723
14724 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014725#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014726_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014727
Martin v. Löwis11437992002-04-12 09:54:03 +000014728
14729cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014730#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014731_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014732
Martin v. Löwis11437992002-04-12 09:54:03 +000014733 echo "$as_me:$LINENO: result: yes" >&5
14734echo "${ECHO_T}yes" >&6
14735
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014736else
Martin v. Löwis11437992002-04-12 09:54:03 +000014737 echo "$as_me: failed program was:" >&5
14738cat conftest.$ac_ext >&5
14739
14740 echo "$as_me:$LINENO: result: no" >&5
14741echo "${ECHO_T}no" >&6
14742 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14743echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14744 cat >conftest.$ac_ext <<_ACEOF
14745#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014746#include "confdefs.h"
14747
14748# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014749
14750#ifdef F77_DUMMY_MAIN
14751# ifdef __cplusplus
14752 extern "C"
14753# endif
14754 int F77_DUMMY_MAIN() { return 1; }
14755#endif
14756int
14757main ()
14758{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014759
14760 char *name;
14761 struct hostent *he;
14762 struct hostent_data data;
14763
14764 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014765
14766 ;
14767 return 0;
14768}
14769_ACEOF
14770rm -f conftest.$ac_objext
14771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14772 (eval $ac_compile) 2>&5
14773 ac_status=$?
14774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14775 (exit $ac_status); } &&
14776 { ac_try='test -s conftest.$ac_objext'
14777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14778 (eval $ac_try) 2>&5
14779 ac_status=$?
14780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14781 (exit $ac_status); }; }; then
14782
14783 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014784#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014785_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014786
Martin v. Löwis11437992002-04-12 09:54:03 +000014787
14788cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014789#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014790_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014791
Martin v. Löwis11437992002-04-12 09:54:03 +000014792 echo "$as_me:$LINENO: result: yes" >&5
14793echo "${ECHO_T}yes" >&6
14794
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014795else
Martin v. Löwis11437992002-04-12 09:54:03 +000014796 echo "$as_me: failed program was:" >&5
14797cat conftest.$ac_ext >&5
14798
14799 echo "$as_me:$LINENO: result: no" >&5
14800echo "${ECHO_T}no" >&6
14801
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014802fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014803rm -f conftest.$ac_objext conftest.$ac_ext
14804
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014805fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014806rm -f conftest.$ac_objext conftest.$ac_ext
14807
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014808fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014809rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014810 CFLAGS=$OLD_CFLAGS
14811
14812else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014813
Martin v. Löwis11437992002-04-12 09:54:03 +000014814
14815for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014816do
Martin v. Löwis11437992002-04-12 09:54:03 +000014817as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14818echo "$as_me:$LINENO: checking for $ac_func" >&5
14819echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14820if eval "test \"\${$as_ac_var+set}\" = set"; then
14821 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014822else
Martin v. Löwis11437992002-04-12 09:54:03 +000014823 cat >conftest.$ac_ext <<_ACEOF
14824#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014825#include "confdefs.h"
14826/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014827 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014828#include <assert.h>
14829/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014830#ifdef __cplusplus
14831extern "C"
14832#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014833/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014834 builtin and then its argument prototype would still apply. */
14835char $ac_func ();
14836char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014837
Martin v. Löwis11437992002-04-12 09:54:03 +000014838#ifdef F77_DUMMY_MAIN
14839# ifdef __cplusplus
14840 extern "C"
14841# endif
14842 int F77_DUMMY_MAIN() { return 1; }
14843#endif
14844int
14845main ()
14846{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014847/* The GNU C library defines this for functions which it implements
14848 to always fail with ENOSYS. Some functions are actually named
14849 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014850#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014851choke me
14852#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014853f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014854#endif
14855
Martin v. Löwis11437992002-04-12 09:54:03 +000014856 ;
14857 return 0;
14858}
14859_ACEOF
14860rm -f conftest.$ac_objext conftest$ac_exeext
14861if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14862 (eval $ac_link) 2>&5
14863 ac_status=$?
14864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14865 (exit $ac_status); } &&
14866 { ac_try='test -s conftest$ac_exeext'
14867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14868 (eval $ac_try) 2>&5
14869 ac_status=$?
14870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14871 (exit $ac_status); }; }; then
14872 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014873else
Martin v. Löwis11437992002-04-12 09:54:03 +000014874 echo "$as_me: failed program was:" >&5
14875cat conftest.$ac_ext >&5
14876eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014877fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014878rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014879fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014880echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14881echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14882if test `eval echo '${'$as_ac_var'}'` = yes; then
14883 cat >>confdefs.h <<_ACEOF
14884#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14885_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014886
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014887fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014888done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014889
Michael W. Hudson54241132001-12-07 15:38:26 +000014890
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014891fi
14892
Michael W. Hudson54241132001-12-07 15:38:26 +000014893
14894
14895
14896
14897
14898
Guido van Rossum627b2d71993-12-24 10:39:16 +000014899# checks for system services
14900# (none yet)
14901
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014902# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014903echo "$as_me:$LINENO: checking for __fpu_control" >&5
14904echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14905if test "${ac_cv_func___fpu_control+set}" = set; then
14906 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014907else
Martin v. Löwis11437992002-04-12 09:54:03 +000014908 cat >conftest.$ac_ext <<_ACEOF
14909#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014910#include "confdefs.h"
14911/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014912 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014913#include <assert.h>
14914/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014915#ifdef __cplusplus
14916extern "C"
14917#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014918/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 builtin and then its argument prototype would still apply. */
14920char __fpu_control ();
14921char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014922
Martin v. Löwis11437992002-04-12 09:54:03 +000014923#ifdef F77_DUMMY_MAIN
14924# ifdef __cplusplus
14925 extern "C"
14926# endif
14927 int F77_DUMMY_MAIN() { return 1; }
14928#endif
14929int
14930main ()
14931{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014932/* The GNU C library defines this for functions which it implements
14933 to always fail with ENOSYS. Some functions are actually named
14934 something starting with __ and the normal name is an alias. */
14935#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14936choke me
14937#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014938f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014939#endif
14940
Martin v. Löwis11437992002-04-12 09:54:03 +000014941 ;
14942 return 0;
14943}
14944_ACEOF
14945rm -f conftest.$ac_objext conftest$ac_exeext
14946if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14947 (eval $ac_link) 2>&5
14948 ac_status=$?
14949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14950 (exit $ac_status); } &&
14951 { ac_try='test -s conftest$ac_exeext'
14952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14953 (eval $ac_try) 2>&5
14954 ac_status=$?
14955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14956 (exit $ac_status); }; }; then
14957 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014958else
Martin v. Löwis11437992002-04-12 09:54:03 +000014959 echo "$as_me: failed program was:" >&5
14960cat conftest.$ac_ext >&5
14961ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014962fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014963rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014964fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014965echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14966echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14967if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014968 :
14969else
Martin v. Löwis11437992002-04-12 09:54:03 +000014970
14971echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14972echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14973if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14974 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014975else
Martin v. Löwis11437992002-04-12 09:54:03 +000014976 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014977LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014978cat >conftest.$ac_ext <<_ACEOF
14979#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014980#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014981
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014982/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014983#ifdef __cplusplus
14984extern "C"
14985#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014986/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 builtin and then its argument prototype would still apply. */
14988char __fpu_control ();
14989#ifdef F77_DUMMY_MAIN
14990# ifdef __cplusplus
14991 extern "C"
14992# endif
14993 int F77_DUMMY_MAIN() { return 1; }
14994#endif
14995int
14996main ()
14997{
14998__fpu_control ();
14999 ;
15000 return 0;
15001}
15002_ACEOF
15003rm -f conftest.$ac_objext conftest$ac_exeext
15004if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15005 (eval $ac_link) 2>&5
15006 ac_status=$?
15007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15008 (exit $ac_status); } &&
15009 { ac_try='test -s conftest$ac_exeext'
15010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15011 (eval $ac_try) 2>&5
15012 ac_status=$?
15013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15014 (exit $ac_status); }; }; then
15015 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015016else
Martin v. Löwis11437992002-04-12 09:54:03 +000015017 echo "$as_me: failed program was:" >&5
15018cat conftest.$ac_ext >&5
15019ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015020fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015021rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15022LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015023fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015024echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15025echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15026if test $ac_cv_lib_ieee___fpu_control = yes; then
15027 cat >>confdefs.h <<_ACEOF
15028#define HAVE_LIBIEEE 1
15029_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015030
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015031 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015032
Guido van Rossum627b2d71993-12-24 10:39:16 +000015033fi
15034
Michael W. Hudson54241132001-12-07 15:38:26 +000015035
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015036fi
15037
Michael W. Hudson54241132001-12-07 15:38:26 +000015038
Guido van Rossum7f253911997-05-09 02:42:48 +000015039# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015040echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15041echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15042
Guido van Rossum7f253911997-05-09 02:42:48 +000015043# Check whether --with-fpectl or --without-fpectl was given.
15044if test "${with_fpectl+set}" = set; then
15045 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015046
Guido van Rossum7f253911997-05-09 02:42:48 +000015047if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015048then
15049
15050cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015051#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015052_ACEOF
15053
15054 echo "$as_me:$LINENO: result: yes" >&5
15055echo "${ECHO_T}yes" >&6
15056else echo "$as_me:$LINENO: result: no" >&5
15057echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015058fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015059else
Martin v. Löwis11437992002-04-12 09:54:03 +000015060 echo "$as_me:$LINENO: result: no" >&5
15061echo "${ECHO_T}no" >&6
15062fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015063
Guido van Rossum7f43da71994-08-01 12:15:30 +000015064# check for --with-libm=...
15065
Guido van Rossum563e7081996-09-10 18:20:48 +000015066case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015067Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015068BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015069*) LIBM=-lm
15070esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015071echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15072echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15073
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015074# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015075if test "${with_libm+set}" = set; then
15076 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015077
Guido van Rossum7f253911997-05-09 02:42:48 +000015078if test "$withval" = no
15079then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15081echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015082elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015083then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015084 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15085echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15086else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15087echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15088 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015089fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015090else
Martin v. Löwis11437992002-04-12 09:54:03 +000015091 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15092echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15093fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015094
15095# check for --with-libc=...
15096
Martin v. Löwis11437992002-04-12 09:54:03 +000015097echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15098echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15099
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015100# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015101if test "${with_libc+set}" = set; then
15102 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015103
Guido van Rossum7f253911997-05-09 02:42:48 +000015104if test "$withval" = no
15105then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15107echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015108elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015109then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15111echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15112else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15113echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15114 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015115fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015116else
Martin v. Löwis11437992002-04-12 09:54:03 +000015117 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15118echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15119fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015120
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015121# check for hypot() in math library
15122LIBS_SAVE=$LIBS
15123LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015124
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015125for ac_func in hypot
15126do
Martin v. Löwis11437992002-04-12 09:54:03 +000015127as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15128echo "$as_me:$LINENO: checking for $ac_func" >&5
15129echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15130if eval "test \"\${$as_ac_var+set}\" = set"; then
15131 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015132else
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 cat >conftest.$ac_ext <<_ACEOF
15134#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015135#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015136/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015138#include <assert.h>
15139/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015140#ifdef __cplusplus
15141extern "C"
15142#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015143/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015144 builtin and then its argument prototype would still apply. */
15145char $ac_func ();
15146char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015147
Martin v. Löwis11437992002-04-12 09:54:03 +000015148#ifdef F77_DUMMY_MAIN
15149# ifdef __cplusplus
15150 extern "C"
15151# endif
15152 int F77_DUMMY_MAIN() { return 1; }
15153#endif
15154int
15155main ()
15156{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015157/* The GNU C library defines this for functions which it implements
15158 to always fail with ENOSYS. Some functions are actually named
15159 something starting with __ and the normal name is an alias. */
15160#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15161choke me
15162#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015163f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015164#endif
15165
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 ;
15167 return 0;
15168}
15169_ACEOF
15170rm -f conftest.$ac_objext conftest$ac_exeext
15171if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15172 (eval $ac_link) 2>&5
15173 ac_status=$?
15174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15175 (exit $ac_status); } &&
15176 { ac_try='test -s conftest$ac_exeext'
15177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15178 (eval $ac_try) 2>&5
15179 ac_status=$?
15180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15181 (exit $ac_status); }; }; then
15182 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015183else
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 echo "$as_me: failed program was:" >&5
15185cat conftest.$ac_ext >&5
15186eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015187fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015188rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015189fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015190echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15191echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15192if test `eval echo '${'$as_ac_var'}'` = yes; then
15193 cat >>confdefs.h <<_ACEOF
15194#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15195_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015196
Michael W. Hudson54241132001-12-07 15:38:26 +000015197else
Martin v. Löwis11437992002-04-12 09:54:03 +000015198 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015199fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015200done
15201
Michael W. Hudson54241132001-12-07 15:38:26 +000015202
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015203LIBS=$LIBS_SAVE
15204
Guido van Rossumad713701997-07-10 22:42:38 +000015205# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000015206echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
15207echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
15208if test "${ac_cv_malloc_zero+set}" = set; then
15209 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015210else
15211 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015212 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000015213else
Martin v. Löwis11437992002-04-12 09:54:03 +000015214 cat >conftest.$ac_ext <<_ACEOF
15215#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000015216#include "confdefs.h"
15217#include <stdio.h>
15218#ifdef HAVE_STDLIB
15219#include <stdlib.h>
15220#else
15221char *malloc(), *realloc();
15222int *free();
15223#endif
15224main() {
15225 char *p;
15226 p = malloc(0);
15227 if (p == NULL) exit(1);
15228 p = realloc(p, 0);
15229 if (p == NULL) exit(1);
15230 free(p);
15231 exit(0);
15232}
Martin v. Löwis11437992002-04-12 09:54:03 +000015233_ACEOF
15234rm -f conftest$ac_exeext
15235if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15236 (eval $ac_link) 2>&5
15237 ac_status=$?
15238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15239 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15241 (eval $ac_try) 2>&5
15242 ac_status=$?
15243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15244 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000015245 ac_cv_malloc_zero=nonnull
15246else
Martin v. Löwis11437992002-04-12 09:54:03 +000015247 echo "$as_me: program exited with status $ac_status" >&5
15248echo "$as_me: failed program was:" >&5
15249cat conftest.$ac_ext >&5
15250( exit $ac_status )
15251ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000015252fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015253rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000015254fi
Guido van Rossumad713701997-07-10 22:42:38 +000015255fi
Guido van Rossum3065c942001-09-17 04:03:14 +000015256 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000015257echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
15258echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015259if test "$ac_cv_malloc_zero" = null
15260then
Martin v. Löwis11437992002-04-12 09:54:03 +000015261
15262cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015263#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015264_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015265
15266fi
15267
Guido van Rossumef2255b2000-03-10 22:30:29 +000015268# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015269if test "${ac_cv_header_wchar_h+set}" = set; then
15270 echo "$as_me:$LINENO: checking for wchar.h" >&5
15271echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15272if test "${ac_cv_header_wchar_h+set}" = set; then
15273 echo $ECHO_N "(cached) $ECHO_C" >&6
15274fi
15275echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15276echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015277else
Martin v. Löwis11437992002-04-12 09:54:03 +000015278 # Is the header compilable?
15279echo "$as_me:$LINENO: checking wchar.h usability" >&5
15280echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15281cat >conftest.$ac_ext <<_ACEOF
15282#line $LINENO "configure"
15283#include "confdefs.h"
15284$ac_includes_default
15285#include <wchar.h>
15286_ACEOF
15287rm -f conftest.$ac_objext
15288if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15289 (eval $ac_compile) 2>&5
15290 ac_status=$?
15291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15292 (exit $ac_status); } &&
15293 { ac_try='test -s conftest.$ac_objext'
15294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15295 (eval $ac_try) 2>&5
15296 ac_status=$?
15297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15298 (exit $ac_status); }; }; then
15299 ac_header_compiler=yes
15300else
15301 echo "$as_me: failed program was:" >&5
15302cat conftest.$ac_ext >&5
15303ac_header_compiler=no
15304fi
15305rm -f conftest.$ac_objext conftest.$ac_ext
15306echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15307echo "${ECHO_T}$ac_header_compiler" >&6
15308
15309# Is the header present?
15310echo "$as_me:$LINENO: checking wchar.h presence" >&5
15311echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15312cat >conftest.$ac_ext <<_ACEOF
15313#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015314#include "confdefs.h"
15315#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015316_ACEOF
15317if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15318 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15319 ac_status=$?
15320 egrep -v '^ *\+' conftest.er1 >conftest.err
15321 rm -f conftest.er1
15322 cat conftest.err >&5
15323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15324 (exit $ac_status); } >/dev/null; then
15325 if test -s conftest.err; then
15326 ac_cpp_err=$ac_c_preproc_warn_flag
15327 else
15328 ac_cpp_err=
15329 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015330else
Martin v. Löwis11437992002-04-12 09:54:03 +000015331 ac_cpp_err=yes
15332fi
15333if test -z "$ac_cpp_err"; then
15334 ac_header_preproc=yes
15335else
15336 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015337 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015338 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015339fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015340rm -f conftest.err conftest.$ac_ext
15341echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15342echo "${ECHO_T}$ac_header_preproc" >&6
15343
15344# So? What about this header?
15345case $ac_header_compiler:$ac_header_preproc in
15346 yes:no )
15347 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15348echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15349 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15350echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15351 no:yes )
15352 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15353echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15354 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15355echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15356 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15357echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15358esac
15359echo "$as_me:$LINENO: checking for wchar.h" >&5
15360echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15361if test "${ac_cv_header_wchar_h+set}" = set; then
15362 echo $ECHO_N "(cached) $ECHO_C" >&6
15363else
15364 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015365fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015366echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15367echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15368
15369fi
15370if test $ac_cv_header_wchar_h = yes; then
15371
15372
15373cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015374#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015375_ACEOF
15376
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015377 wchar_h="yes"
15378
Guido van Rossumef2255b2000-03-10 22:30:29 +000015379else
Martin v. Löwis11437992002-04-12 09:54:03 +000015380 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015381
15382fi
15383
Michael W. Hudson54241132001-12-07 15:38:26 +000015384
Martin v. Löwis11437992002-04-12 09:54:03 +000015385
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015386# determine wchar_t size
15387if test "$wchar_h" = yes
15388then
Martin v. Löwis11437992002-04-12 09:54:03 +000015389 echo "$as_me:$LINENO: checking for wchar_t" >&5
15390echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
15391if test "${ac_cv_type_wchar_t+set}" = set; then
15392 echo $ECHO_N "(cached) $ECHO_C" >&6
15393else
15394 cat >conftest.$ac_ext <<_ACEOF
15395#line $LINENO "configure"
15396#include "confdefs.h"
15397#include <wchar.h>
15398
15399#ifdef F77_DUMMY_MAIN
15400# ifdef __cplusplus
15401 extern "C"
15402# endif
15403 int F77_DUMMY_MAIN() { return 1; }
15404#endif
15405int
15406main ()
15407{
15408if ((wchar_t *) 0)
15409 return 0;
15410if (sizeof (wchar_t))
15411 return 0;
15412 ;
15413 return 0;
15414}
15415_ACEOF
15416rm -f conftest.$ac_objext
15417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15418 (eval $ac_compile) 2>&5
15419 ac_status=$?
15420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15421 (exit $ac_status); } &&
15422 { ac_try='test -s conftest.$ac_objext'
15423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15424 (eval $ac_try) 2>&5
15425 ac_status=$?
15426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15427 (exit $ac_status); }; }; then
15428 ac_cv_type_wchar_t=yes
15429else
15430 echo "$as_me: failed program was:" >&5
15431cat conftest.$ac_ext >&5
15432ac_cv_type_wchar_t=no
15433fi
15434rm -f conftest.$ac_objext conftest.$ac_ext
15435fi
15436echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
15437echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
15438
15439echo "$as_me:$LINENO: checking size of wchar_t" >&5
15440echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
15441if test "${ac_cv_sizeof_wchar_t+set}" = set; then
15442 echo $ECHO_N "(cached) $ECHO_C" >&6
15443else
15444 if test "$ac_cv_type_wchar_t" = yes; then
15445 # The cast to unsigned long works around a bug in the HP C Compiler
15446 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15447 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15448 # This bug is HP SR number 8606223364.
15449 if test "$cross_compiling" = yes; then
15450 # Depending upon the size, compute the lo and hi bounds.
15451cat >conftest.$ac_ext <<_ACEOF
15452#line $LINENO "configure"
15453#include "confdefs.h"
15454#include <wchar.h>
15455
15456#ifdef F77_DUMMY_MAIN
15457# ifdef __cplusplus
15458 extern "C"
15459# endif
15460 int F77_DUMMY_MAIN() { return 1; }
15461#endif
15462int
15463main ()
15464{
15465static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
15466test_array [0] = 0
15467
15468 ;
15469 return 0;
15470}
15471_ACEOF
15472rm -f conftest.$ac_objext
15473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15474 (eval $ac_compile) 2>&5
15475 ac_status=$?
15476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15477 (exit $ac_status); } &&
15478 { ac_try='test -s conftest.$ac_objext'
15479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15480 (eval $ac_try) 2>&5
15481 ac_status=$?
15482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15483 (exit $ac_status); }; }; then
15484 ac_lo=0 ac_mid=0
15485 while :; do
15486 cat >conftest.$ac_ext <<_ACEOF
15487#line $LINENO "configure"
15488#include "confdefs.h"
15489#include <wchar.h>
15490
15491#ifdef F77_DUMMY_MAIN
15492# ifdef __cplusplus
15493 extern "C"
15494# endif
15495 int F77_DUMMY_MAIN() { return 1; }
15496#endif
15497int
15498main ()
15499{
15500static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15501test_array [0] = 0
15502
15503 ;
15504 return 0;
15505}
15506_ACEOF
15507rm -f conftest.$ac_objext
15508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15509 (eval $ac_compile) 2>&5
15510 ac_status=$?
15511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15512 (exit $ac_status); } &&
15513 { ac_try='test -s conftest.$ac_objext'
15514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15515 (eval $ac_try) 2>&5
15516 ac_status=$?
15517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15518 (exit $ac_status); }; }; then
15519 ac_hi=$ac_mid; break
15520else
15521 echo "$as_me: failed program was:" >&5
15522cat conftest.$ac_ext >&5
15523ac_lo=`expr $ac_mid + 1`
15524 if test $ac_lo -le $ac_mid; then
15525 ac_lo= ac_hi=
15526 break
15527 fi
15528 ac_mid=`expr 2 '*' $ac_mid + 1`
15529fi
15530rm -f conftest.$ac_objext conftest.$ac_ext
15531 done
15532else
15533 echo "$as_me: failed program was:" >&5
15534cat conftest.$ac_ext >&5
15535cat >conftest.$ac_ext <<_ACEOF
15536#line $LINENO "configure"
15537#include "confdefs.h"
15538#include <wchar.h>
15539
15540#ifdef F77_DUMMY_MAIN
15541# ifdef __cplusplus
15542 extern "C"
15543# endif
15544 int F77_DUMMY_MAIN() { return 1; }
15545#endif
15546int
15547main ()
15548{
15549static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
15550test_array [0] = 0
15551
15552 ;
15553 return 0;
15554}
15555_ACEOF
15556rm -f conftest.$ac_objext
15557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15558 (eval $ac_compile) 2>&5
15559 ac_status=$?
15560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15561 (exit $ac_status); } &&
15562 { ac_try='test -s conftest.$ac_objext'
15563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15564 (eval $ac_try) 2>&5
15565 ac_status=$?
15566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15567 (exit $ac_status); }; }; then
15568 ac_hi=-1 ac_mid=-1
15569 while :; do
15570 cat >conftest.$ac_ext <<_ACEOF
15571#line $LINENO "configure"
15572#include "confdefs.h"
15573#include <wchar.h>
15574
15575#ifdef F77_DUMMY_MAIN
15576# ifdef __cplusplus
15577 extern "C"
15578# endif
15579 int F77_DUMMY_MAIN() { return 1; }
15580#endif
15581int
15582main ()
15583{
15584static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15585test_array [0] = 0
15586
15587 ;
15588 return 0;
15589}
15590_ACEOF
15591rm -f conftest.$ac_objext
15592if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15593 (eval $ac_compile) 2>&5
15594 ac_status=$?
15595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15596 (exit $ac_status); } &&
15597 { ac_try='test -s conftest.$ac_objext'
15598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15599 (eval $ac_try) 2>&5
15600 ac_status=$?
15601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15602 (exit $ac_status); }; }; then
15603 ac_lo=$ac_mid; break
15604else
15605 echo "$as_me: failed program was:" >&5
15606cat conftest.$ac_ext >&5
15607ac_hi=`expr '(' $ac_mid ')' - 1`
15608 if test $ac_mid -le $ac_hi; then
15609 ac_lo= ac_hi=
15610 break
15611 fi
15612 ac_mid=`expr 2 '*' $ac_mid`
15613fi
15614rm -f conftest.$ac_objext conftest.$ac_ext
15615 done
15616else
15617 echo "$as_me: failed program was:" >&5
15618cat conftest.$ac_ext >&5
15619ac_lo= ac_hi=
15620fi
15621rm -f conftest.$ac_objext conftest.$ac_ext
15622fi
15623rm -f conftest.$ac_objext conftest.$ac_ext
15624# Binary search between lo and hi bounds.
15625while test "x$ac_lo" != "x$ac_hi"; do
15626 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15627 cat >conftest.$ac_ext <<_ACEOF
15628#line $LINENO "configure"
15629#include "confdefs.h"
15630#include <wchar.h>
15631
15632#ifdef F77_DUMMY_MAIN
15633# ifdef __cplusplus
15634 extern "C"
15635# endif
15636 int F77_DUMMY_MAIN() { return 1; }
15637#endif
15638int
15639main ()
15640{
15641static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15642test_array [0] = 0
15643
15644 ;
15645 return 0;
15646}
15647_ACEOF
15648rm -f conftest.$ac_objext
15649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15650 (eval $ac_compile) 2>&5
15651 ac_status=$?
15652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15653 (exit $ac_status); } &&
15654 { ac_try='test -s conftest.$ac_objext'
15655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15656 (eval $ac_try) 2>&5
15657 ac_status=$?
15658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15659 (exit $ac_status); }; }; then
15660 ac_hi=$ac_mid
15661else
15662 echo "$as_me: failed program was:" >&5
15663cat conftest.$ac_ext >&5
15664ac_lo=`expr '(' $ac_mid ')' + 1`
15665fi
15666rm -f conftest.$ac_objext conftest.$ac_ext
15667done
15668case $ac_lo in
15669?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15670'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15671echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15672 { (exit 1); exit 1; }; } ;;
15673esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015674else
15675 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15677echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15678 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015679else
Martin v. Löwis11437992002-04-12 09:54:03 +000015680 cat >conftest.$ac_ext <<_ACEOF
15681#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015682#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015683#include <wchar.h>
15684
15685long longval () { return (long) (sizeof (wchar_t)); }
15686unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015687#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015688#include <stdlib.h>
15689#ifdef F77_DUMMY_MAIN
15690# ifdef __cplusplus
15691 extern "C"
15692# endif
15693 int F77_DUMMY_MAIN() { return 1; }
15694#endif
15695int
15696main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015697{
Martin v. Löwis11437992002-04-12 09:54:03 +000015698
15699 FILE *f = fopen ("conftest.val", "w");
15700 if (! f)
15701 exit (1);
15702 if (((long) (sizeof (wchar_t))) < 0)
15703 {
15704 long i = longval ();
15705 if (i != ((long) (sizeof (wchar_t))))
15706 exit (1);
15707 fprintf (f, "%ld\n", i);
15708 }
15709 else
15710 {
15711 unsigned long i = ulongval ();
15712 if (i != ((long) (sizeof (wchar_t))))
15713 exit (1);
15714 fprintf (f, "%lu\n", i);
15715 }
15716 exit (ferror (f) || fclose (f) != 0);
15717
15718 ;
15719 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015720}
Martin v. Löwis11437992002-04-12 09:54:03 +000015721_ACEOF
15722rm -f conftest$ac_exeext
15723if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15724 (eval $ac_link) 2>&5
15725 ac_status=$?
15726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15727 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15729 (eval $ac_try) 2>&5
15730 ac_status=$?
15731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15732 (exit $ac_status); }; }; then
15733 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015734else
Martin v. Löwis11437992002-04-12 09:54:03 +000015735 echo "$as_me: program exited with status $ac_status" >&5
15736echo "$as_me: failed program was:" >&5
15737cat conftest.$ac_ext >&5
15738( exit $ac_status )
15739{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15740echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15741 { (exit 1); exit 1; }; }
15742fi
15743rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15744fi
15745fi
15746rm -f conftest.val
15747else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015748 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015749fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015750fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015751echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15752echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15753cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015754#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015755_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015756
Michael W. Hudson54241132001-12-07 15:38:26 +000015757
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015758fi
15759
Martin v. Löwis11437992002-04-12 09:54:03 +000015760echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15761echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015762# Check whether --enable-unicode or --disable-unicode was given.
15763if test "${enable_unicode+set}" = set; then
15764 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015765
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015766else
15767 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015768fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015769
15770if test $enable_unicode = yes
15771then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015772 # Without any arguments, Py_UNICODE defaults to two-byte mode
15773 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015774fi
15775
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015776
15777
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015778case "$enable_unicode" in
15779ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015780 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015781#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015782_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015783
15784 ;;
15785ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015786 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015787#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015788_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015789
15790 ;;
15791esac
15792
Michael W. Hudson54241132001-12-07 15:38:26 +000015793
Martin v. Löwis11437992002-04-12 09:54:03 +000015794
15795
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015796
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015797if test "$enable_unicode" = "no"
15798then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015799 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015800 echo "$as_me:$LINENO: result: not used" >&5
15801echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015802else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015803 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015804
15805cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015806#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015807_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015808
15809 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15810 then
15811 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015812
Martin v. Löwis11437992002-04-12 09:54:03 +000015813cat >>confdefs.h <<\_ACEOF
15814#define HAVE_USABLE_WCHAR_T 1
15815_ACEOF
15816
15817 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015818#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015819_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015820
15821 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15822 then
15823 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015824 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015825#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015826_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015827
15828 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15829 then
15830 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015831 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015832#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015833_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015834
15835 else
15836 PY_UNICODE_TYPE="no type found"
15837 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015838 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15839echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015840fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015841
15842# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015843echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15844echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15845if test "${ac_cv_c_bigendian+set}" = set; then
15846 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015847else
Martin v. Löwis11437992002-04-12 09:54:03 +000015848 # See if sys/param.h defines the BYTE_ORDER macro.
15849cat >conftest.$ac_ext <<_ACEOF
15850#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015851#include "confdefs.h"
15852#include <sys/types.h>
15853#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015854
Martin v. Löwis11437992002-04-12 09:54:03 +000015855#ifdef F77_DUMMY_MAIN
15856# ifdef __cplusplus
15857 extern "C"
15858# endif
15859 int F77_DUMMY_MAIN() { return 1; }
15860#endif
15861int
15862main ()
15863{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015864#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15865 bogus endian macros
15866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015867
15868 ;
15869 return 0;
15870}
15871_ACEOF
15872rm -f conftest.$ac_objext
15873if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15874 (eval $ac_compile) 2>&5
15875 ac_status=$?
15876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15877 (exit $ac_status); } &&
15878 { ac_try='test -s conftest.$ac_objext'
15879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15880 (eval $ac_try) 2>&5
15881 ac_status=$?
15882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15883 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015884 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015885cat >conftest.$ac_ext <<_ACEOF
15886#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015887#include "confdefs.h"
15888#include <sys/types.h>
15889#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015890
Martin v. Löwis11437992002-04-12 09:54:03 +000015891#ifdef F77_DUMMY_MAIN
15892# ifdef __cplusplus
15893 extern "C"
15894# endif
15895 int F77_DUMMY_MAIN() { return 1; }
15896#endif
15897int
15898main ()
15899{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015900#if BYTE_ORDER != BIG_ENDIAN
15901 not big endian
15902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015903
15904 ;
15905 return 0;
15906}
15907_ACEOF
15908rm -f conftest.$ac_objext
15909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15910 (eval $ac_compile) 2>&5
15911 ac_status=$?
15912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15913 (exit $ac_status); } &&
15914 { ac_try='test -s conftest.$ac_objext'
15915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15916 (eval $ac_try) 2>&5
15917 ac_status=$?
15918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15919 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015920 ac_cv_c_bigendian=yes
15921else
Martin v. Löwis11437992002-04-12 09:54:03 +000015922 echo "$as_me: failed program was:" >&5
15923cat conftest.$ac_ext >&5
15924ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015925fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015926rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015927else
Martin v. Löwis11437992002-04-12 09:54:03 +000015928 echo "$as_me: failed program was:" >&5
15929cat conftest.$ac_ext >&5
15930# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015931if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015932 # try to guess the endianess by grep'ing values into an object file
15933 ac_cv_c_bigendian=unknown
15934 cat >conftest.$ac_ext <<_ACEOF
15935#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015936#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015937short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15938short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15939void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15940short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15941short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15942void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15943#ifdef F77_DUMMY_MAIN
15944# ifdef __cplusplus
15945 extern "C"
15946# endif
15947 int F77_DUMMY_MAIN() { return 1; }
15948#endif
15949int
15950main ()
15951{
15952 _ascii (); _ebcdic ();
15953 ;
15954 return 0;
15955}
15956_ACEOF
15957rm -f conftest.$ac_objext
15958if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15959 (eval $ac_compile) 2>&5
15960 ac_status=$?
15961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15962 (exit $ac_status); } &&
15963 { ac_try='test -s conftest.$ac_objext'
15964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15965 (eval $ac_try) 2>&5
15966 ac_status=$?
15967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15968 (exit $ac_status); }; }; then
15969 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15970 ac_cv_c_bigendian=yes
15971fi
15972if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15973 if test "$ac_cv_c_bigendian" = unknown; then
15974 ac_cv_c_bigendian=no
15975 else
15976 # finding both strings is unlikely to happen, but who knows?
15977 ac_cv_c_bigendian=unknown
15978 fi
15979fi
15980else
15981 echo "$as_me: failed program was:" >&5
15982cat conftest.$ac_ext >&5
15983fi
15984rm -f conftest.$ac_objext conftest.$ac_ext
15985else
15986 cat >conftest.$ac_ext <<_ACEOF
15987#line $LINENO "configure"
15988#include "confdefs.h"
15989int
15990main ()
15991{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015992 /* Are we little or big endian? From Harbison&Steele. */
15993 union
15994 {
15995 long l;
15996 char c[sizeof (long)];
15997 } u;
15998 u.l = 1;
15999 exit (u.c[sizeof (long) - 1] == 1);
16000}
Martin v. Löwis11437992002-04-12 09:54:03 +000016001_ACEOF
16002rm -f conftest$ac_exeext
16003if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16004 (eval $ac_link) 2>&5
16005 ac_status=$?
16006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16007 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16009 (eval $ac_try) 2>&5
16010 ac_status=$?
16011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16012 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016013 ac_cv_c_bigendian=no
16014else
Martin v. Löwis11437992002-04-12 09:54:03 +000016015 echo "$as_me: program exited with status $ac_status" >&5
16016echo "$as_me: failed program was:" >&5
16017cat conftest.$ac_ext >&5
16018( exit $ac_status )
16019ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016020fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016021rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016022fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016023fi
16024rm -f conftest.$ac_objext conftest.$ac_ext
16025fi
16026echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16027echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16028case $ac_cv_c_bigendian in
16029 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016030
Martin v. Löwis11437992002-04-12 09:54:03 +000016031cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016032#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016033_ACEOF
16034 ;;
16035 no)
16036 ;;
16037 *)
16038 { { echo "$as_me:$LINENO: error: unknown endianess
16039presetting ac_cv_c_bigendian=no (or yes) will help" >&5
16040echo "$as_me: error: unknown endianess
16041presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16042 { (exit 1); exit 1; }; } ;;
16043esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016044
Michael W. Hudson54241132001-12-07 15:38:26 +000016045
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016046# Check whether right shifting a negative integer extends the sign bit
16047# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016048echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16049echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16050if test "${ac_cv_rshift_extends_sign+set}" = set; then
16051 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016052else
Martin v. Löwis11437992002-04-12 09:54:03 +000016053
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016054if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016055 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016056else
Martin v. Löwis11437992002-04-12 09:54:03 +000016057 cat >conftest.$ac_ext <<_ACEOF
16058#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016059#include "confdefs.h"
16060
16061int main()
16062{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016063 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016064}
16065
Martin v. Löwis11437992002-04-12 09:54:03 +000016066_ACEOF
16067rm -f conftest$ac_exeext
16068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16069 (eval $ac_link) 2>&5
16070 ac_status=$?
16071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16074 (eval $ac_try) 2>&5
16075 ac_status=$?
16076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16077 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016078 ac_cv_rshift_extends_sign=yes
16079else
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 echo "$as_me: program exited with status $ac_status" >&5
16081echo "$as_me: failed program was:" >&5
16082cat conftest.$ac_ext >&5
16083( exit $ac_status )
16084ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016085fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016086rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16087fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016088fi
16089
Martin v. Löwis11437992002-04-12 09:54:03 +000016090echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16091echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016092if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016093then
Martin v. Löwis11437992002-04-12 09:54:03 +000016094
16095cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016096#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016097_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016098
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016099fi
16100
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016101# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016102echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16103echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16104if test "${ac_cv_have_getc_unlocked+set}" = set; then
16105 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016106else
Martin v. Löwis11437992002-04-12 09:54:03 +000016107
16108cat >conftest.$ac_ext <<_ACEOF
16109#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016110#include "confdefs.h"
16111#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016112#ifdef F77_DUMMY_MAIN
16113# ifdef __cplusplus
16114 extern "C"
16115# endif
16116 int F77_DUMMY_MAIN() { return 1; }
16117#endif
16118int
16119main ()
16120{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016121
16122 FILE *f = fopen("/dev/null", "r");
16123 flockfile(f);
16124 getc_unlocked(f);
16125 funlockfile(f);
16126
Martin v. Löwis11437992002-04-12 09:54:03 +000016127 ;
16128 return 0;
16129}
16130_ACEOF
16131rm -f conftest.$ac_objext conftest$ac_exeext
16132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16133 (eval $ac_link) 2>&5
16134 ac_status=$?
16135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16136 (exit $ac_status); } &&
16137 { ac_try='test -s conftest$ac_exeext'
16138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16139 (eval $ac_try) 2>&5
16140 ac_status=$?
16141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16142 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016143 ac_cv_have_getc_unlocked=yes
16144else
Martin v. Löwis11437992002-04-12 09:54:03 +000016145 echo "$as_me: failed program was:" >&5
16146cat conftest.$ac_ext >&5
16147ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016148fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016149rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016150fi
16151
Martin v. Löwis11437992002-04-12 09:54:03 +000016152echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16153echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016154if test "$ac_cv_have_getc_unlocked" = yes
16155then
Martin v. Löwis11437992002-04-12 09:54:03 +000016156
16157cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016158#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016159_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016160
16161fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016162
Martin v. Löwis0daad592001-09-30 21:09:59 +000016163# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016164echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16165echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16166if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16167 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016168else
Martin v. Löwis11437992002-04-12 09:54:03 +000016169 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016170LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016171cat >conftest.$ac_ext <<_ACEOF
16172#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016173#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016174
Guido van Rossum353ae582001-07-10 16:45:32 +000016175/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016176#ifdef __cplusplus
16177extern "C"
16178#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016179/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016180 builtin and then its argument prototype would still apply. */
16181char rl_pre_input_hook ();
16182#ifdef F77_DUMMY_MAIN
16183# ifdef __cplusplus
16184 extern "C"
16185# endif
16186 int F77_DUMMY_MAIN() { return 1; }
16187#endif
16188int
16189main ()
16190{
16191rl_pre_input_hook ();
16192 ;
16193 return 0;
16194}
16195_ACEOF
16196rm -f conftest.$ac_objext conftest$ac_exeext
16197if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16198 (eval $ac_link) 2>&5
16199 ac_status=$?
16200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16201 (exit $ac_status); } &&
16202 { ac_try='test -s conftest$ac_exeext'
16203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16204 (eval $ac_try) 2>&5
16205 ac_status=$?
16206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16207 (exit $ac_status); }; }; then
16208 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016209else
Martin v. Löwis11437992002-04-12 09:54:03 +000016210 echo "$as_me: failed program was:" >&5
16211cat conftest.$ac_ext >&5
16212ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016213fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016214rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16215LIBS=$ac_check_lib_save_LIBS
16216fi
16217echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16218echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16219if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016220
Martin v. Löwis11437992002-04-12 09:54:03 +000016221cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016222#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016223_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016224
Martin v. Löwis0daad592001-09-30 21:09:59 +000016225fi
16226
Michael W. Hudson54241132001-12-07 15:38:26 +000016227
Martin v. Löwis0daad592001-09-30 21:09:59 +000016228# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016229echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16230echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16231if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16232 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016233else
Martin v. Löwis11437992002-04-12 09:54:03 +000016234 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016235LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016236cat >conftest.$ac_ext <<_ACEOF
16237#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016238#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016239
Martin v. Löwis0daad592001-09-30 21:09:59 +000016240/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016241#ifdef __cplusplus
16242extern "C"
16243#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016244/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016245 builtin and then its argument prototype would still apply. */
16246char rl_completion_matches ();
16247#ifdef F77_DUMMY_MAIN
16248# ifdef __cplusplus
16249 extern "C"
16250# endif
16251 int F77_DUMMY_MAIN() { return 1; }
16252#endif
16253int
16254main ()
16255{
16256rl_completion_matches ();
16257 ;
16258 return 0;
16259}
16260_ACEOF
16261rm -f conftest.$ac_objext conftest$ac_exeext
16262if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16263 (eval $ac_link) 2>&5
16264 ac_status=$?
16265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16266 (exit $ac_status); } &&
16267 { ac_try='test -s conftest$ac_exeext'
16268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16269 (eval $ac_try) 2>&5
16270 ac_status=$?
16271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16272 (exit $ac_status); }; }; then
16273 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016274else
Martin v. Löwis11437992002-04-12 09:54:03 +000016275 echo "$as_me: failed program was:" >&5
16276cat conftest.$ac_ext >&5
16277ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016279rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16280LIBS=$ac_check_lib_save_LIBS
16281fi
16282echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16283echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16284if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016285
Martin v. Löwis11437992002-04-12 09:54:03 +000016286cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016287#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016288_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016289
Guido van Rossum353ae582001-07-10 16:45:32 +000016290fi
16291
Jack Jansendd19cf82001-12-06 22:36:17 +000016292
Martin v. Löwis11437992002-04-12 09:54:03 +000016293echo "$as_me:$LINENO: checking for broken nice()" >&5
16294echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16295if test "${ac_cv_broken_nice+set}" = set; then
16296 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016297else
Martin v. Löwis11437992002-04-12 09:54:03 +000016298
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016299if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016300 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016301else
Martin v. Löwis11437992002-04-12 09:54:03 +000016302 cat >conftest.$ac_ext <<_ACEOF
16303#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016304#include "confdefs.h"
16305
16306int main()
16307{
16308 int val1 = nice(1);
16309 if (val1 != -1 && val1 == nice(2))
16310 exit(0);
16311 exit(1);
16312}
16313
Martin v. Löwis11437992002-04-12 09:54:03 +000016314_ACEOF
16315rm -f conftest$ac_exeext
16316if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16317 (eval $ac_link) 2>&5
16318 ac_status=$?
16319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16320 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16322 (eval $ac_try) 2>&5
16323 ac_status=$?
16324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16325 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016326 ac_cv_broken_nice=yes
16327else
Martin v. Löwis11437992002-04-12 09:54:03 +000016328 echo "$as_me: program exited with status $ac_status" >&5
16329echo "$as_me: failed program was:" >&5
16330cat conftest.$ac_ext >&5
16331( exit $ac_status )
16332ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016333fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016334rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16335fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016336fi
16337
Martin v. Löwis11437992002-04-12 09:54:03 +000016338echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
16339echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016340if test "$ac_cv_broken_nice" = yes
16341then
Martin v. Löwis11437992002-04-12 09:54:03 +000016342
16343cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016344#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016345_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016346
16347fi
16348
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016349# Look for subsecond timestamps in struct stat
16350echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
16351echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
16352if test "${ac_cv_stat_tv_nsec+set}" = set; then
16353 echo $ECHO_N "(cached) $ECHO_C" >&6
16354else
16355 cat >conftest.$ac_ext <<_ACEOF
16356#line $LINENO "configure"
16357#include "confdefs.h"
16358#include <sys/stat.h>
16359#ifdef F77_DUMMY_MAIN
16360# ifdef __cplusplus
16361 extern "C"
16362# endif
16363 int F77_DUMMY_MAIN() { return 1; }
16364#endif
16365int
16366main ()
16367{
16368
16369struct stat st;
16370st.st_mtim.tv_nsec = 1;
16371
16372 ;
16373 return 0;
16374}
16375_ACEOF
16376rm -f conftest.$ac_objext
16377if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16378 (eval $ac_compile) 2>&5
16379 ac_status=$?
16380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16381 (exit $ac_status); } &&
16382 { ac_try='test -s conftest.$ac_objext'
16383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16384 (eval $ac_try) 2>&5
16385 ac_status=$?
16386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16387 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016388 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016389else
16390 echo "$as_me: failed program was:" >&5
16391cat conftest.$ac_ext >&5
16392ac_cv_stat_tv_nsec=no
16393fi
16394rm -f conftest.$ac_objext conftest.$ac_ext
16395fi
16396
16397echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
16398echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
16399if test "$ac_cv_stat_tv_nsec" = yes
16400then
16401
16402cat >>confdefs.h <<\_ACEOF
16403#define HAVE_STAT_TV_NSEC 1
16404_ACEOF
16405
16406fi
16407
Jack Jansen666b1e72001-10-31 12:11:48 +000016408# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000016409echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
16410echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
16411if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
16412 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016413else
Martin v. Löwis11437992002-04-12 09:54:03 +000016414 cat >conftest.$ac_ext <<_ACEOF
16415#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016416#include "confdefs.h"
16417#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016418#ifdef F77_DUMMY_MAIN
16419# ifdef __cplusplus
16420 extern "C"
16421# endif
16422 int F77_DUMMY_MAIN() { return 1; }
16423#endif
16424int
16425main ()
16426{
Jack Jansen666b1e72001-10-31 12:11:48 +000016427
16428 int rtn;
16429 rtn = mvwdelch(0,0,0);
16430
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 ;
16432 return 0;
16433}
16434_ACEOF
16435rm -f conftest.$ac_objext
16436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16437 (eval $ac_compile) 2>&5
16438 ac_status=$?
16439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16440 (exit $ac_status); } &&
16441 { ac_try='test -s conftest.$ac_objext'
16442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16443 (eval $ac_try) 2>&5
16444 ac_status=$?
16445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16446 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016447 ac_cv_mvwdelch_is_expression=yes
16448else
Martin v. Löwis11437992002-04-12 09:54:03 +000016449 echo "$as_me: failed program was:" >&5
16450cat conftest.$ac_ext >&5
16451ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016452fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016453rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016454fi
16455
Martin v. Löwis11437992002-04-12 09:54:03 +000016456echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
16457echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016458
16459if test "$ac_cv_mvwdelch_is_expression" = yes
16460then
Martin v. Löwis11437992002-04-12 09:54:03 +000016461
16462cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016463#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016464_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016465
16466fi
16467
Martin v. Löwis11437992002-04-12 09:54:03 +000016468echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
16469echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
16470if test "${ac_cv_window_has_flags+set}" = set; then
16471 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016472else
Martin v. Löwis11437992002-04-12 09:54:03 +000016473 cat >conftest.$ac_ext <<_ACEOF
16474#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016475#include "confdefs.h"
16476#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016477#ifdef F77_DUMMY_MAIN
16478# ifdef __cplusplus
16479 extern "C"
16480# endif
16481 int F77_DUMMY_MAIN() { return 1; }
16482#endif
16483int
16484main ()
16485{
Jack Jansen666b1e72001-10-31 12:11:48 +000016486
16487 WINDOW *w;
16488 w->_flags = 0;
16489
Martin v. Löwis11437992002-04-12 09:54:03 +000016490 ;
16491 return 0;
16492}
16493_ACEOF
16494rm -f conftest.$ac_objext
16495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16496 (eval $ac_compile) 2>&5
16497 ac_status=$?
16498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16499 (exit $ac_status); } &&
16500 { ac_try='test -s conftest.$ac_objext'
16501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16502 (eval $ac_try) 2>&5
16503 ac_status=$?
16504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16505 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016506 ac_cv_window_has_flags=yes
16507else
Martin v. Löwis11437992002-04-12 09:54:03 +000016508 echo "$as_me: failed program was:" >&5
16509cat conftest.$ac_ext >&5
16510ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016511fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016512rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016513fi
16514
Martin v. Löwis11437992002-04-12 09:54:03 +000016515echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
16516echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016517
Jack Jansen666b1e72001-10-31 12:11:48 +000016518
16519if test "$ac_cv_window_has_flags" = yes
16520then
Martin v. Löwis11437992002-04-12 09:54:03 +000016521
16522cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016523#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016524_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016525
16526fi
16527
Guido van Rossum95713eb2000-05-18 20:53:31 +000016528# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
16529# Add sys/socket.h to confdefs.h
16530cat >> confdefs.h <<\EOF
16531#ifdef HAVE_SYS_SOCKET_H
16532#include <sys/socket.h>
16533#endif
16534EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016535echo "$as_me:$LINENO: checking for socklen_t" >&5
16536echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
16537if test "${ac_cv_type_socklen_t+set}" = set; then
16538 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000016539else
Martin v. Löwis11437992002-04-12 09:54:03 +000016540 cat >conftest.$ac_ext <<_ACEOF
16541#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000016542#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016543$ac_includes_default
16544#ifdef F77_DUMMY_MAIN
16545# ifdef __cplusplus
16546 extern "C"
16547# endif
16548 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016549#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016550int
16551main ()
16552{
16553if ((socklen_t *) 0)
16554 return 0;
16555if (sizeof (socklen_t))
16556 return 0;
16557 ;
16558 return 0;
16559}
16560_ACEOF
16561rm -f conftest.$ac_objext
16562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16563 (eval $ac_compile) 2>&5
16564 ac_status=$?
16565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16566 (exit $ac_status); } &&
16567 { ac_try='test -s conftest.$ac_objext'
16568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16569 (eval $ac_try) 2>&5
16570 ac_status=$?
16571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16572 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016573 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000016574else
Martin v. Löwis11437992002-04-12 09:54:03 +000016575 echo "$as_me: failed program was:" >&5
16576cat conftest.$ac_ext >&5
16577ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000016578fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016579rm -f conftest.$ac_objext conftest.$ac_ext
16580fi
16581echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
16582echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
16583if test $ac_cv_type_socklen_t = yes; then
16584 :
16585else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016586
Martin v. Löwis11437992002-04-12 09:54:03 +000016587cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016588#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000016589_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016590
16591fi
16592
Michael W. Hudson54241132001-12-07 15:38:26 +000016593
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016594#AC_MSG_CHECKING(for Modules/Setup)
16595#if test ! -f Modules/Setup ; then
16596# if test ! -d Modules ; then
16597# mkdir Modules
16598# fi
16599# cp "$srcdir/Modules/Setup.dist" Modules/Setup
16600# AC_MSG_RESULT(creating)
16601#else
16602# AC_MSG_RESULT(already exists)
16603#fi
16604
Michael W. Hudson54241132001-12-07 15:38:26 +000016605
16606
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016607for h in `(cd $srcdir;echo Python/thread_*.h)`
16608do
16609 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16610done
16611
Michael W. Hudson54241132001-12-07 15:38:26 +000016612
Jack Jansen0b06be72002-06-21 14:48:38 +000016613SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000016614echo "$as_me:$LINENO: checking for build directories" >&5
16615echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016616for dir in $SRCDIRS; do
16617 if test ! -d $dir; then
16618 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016619 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016620done
Martin v. Löwis11437992002-04-12 09:54:03 +000016621echo "$as_me:$LINENO: result: done" >&5
16622echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016623
Guido van Rossum627b2d71993-12-24 10:39:16 +000016624# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016625ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016626
Martin v. Löwis11437992002-04-12 09:54:03 +000016627cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016628# This file is a shell script that caches the results of configure
16629# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016630# scripts and configure runs, see configure's option --config-cache.
16631# It is not useful on other systems. If it contains results you don't
16632# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016633#
Martin v. Löwis11437992002-04-12 09:54:03 +000016634# config.status only pays attention to the cache file if you give it
16635# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016636#
Martin v. Löwis11437992002-04-12 09:54:03 +000016637# `ac_cv_env_foo' variables (set or unset) will be overriden when
16638# loading this file, other *unset* `ac_cv_foo' will be assigned the
16639# following values.
16640
16641_ACEOF
16642
Guido van Rossumf78abae1997-01-21 22:02:36 +000016643# The following way of writing the cache mishandles newlines in values,
16644# but we know of no workaround that is simple, portable, and efficient.
16645# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016646# Ultrix sh set writes to stderr and can't be redirected directly,
16647# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016648{
16649 (set) 2>&1 |
16650 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16651 *ac_space=\ *)
16652 # `set' does not quote correctly, so add quotes (double-quote
16653 # substitution turns \\\\ into \\, and sed turns \\ into \).
16654 sed -n \
16655 "s/'/'\\\\''/g;
16656 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16657 ;;
16658 *)
16659 # `set' quotes correctly as required by POSIX, so do not add quotes.
16660 sed -n \
16661 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16662 ;;
16663 esac;
16664} |
16665 sed '
16666 t clear
16667 : clear
16668 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16669 t end
16670 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16671 : end' >>confcache
16672if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016673 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016674 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16675 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016676 else
16677 echo "not updating unwritable cache $cache_file"
16678 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016679fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016680rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016681
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016682test "x$prefix" = xNONE && prefix=$ac_default_prefix
16683# Let make expand exec_prefix.
16684test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016685
Martin v. Löwis11437992002-04-12 09:54:03 +000016686# VPATH may cause trouble with some makes, so we remove $(srcdir),
16687# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16688# trailing colons and then remove the whole line if VPATH becomes empty
16689# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016690if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016691 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16692s/:*\$(srcdir):*/:/;
16693s/:*\${srcdir}:*/:/;
16694s/:*@srcdir@:*/:/;
16695s/^\([^=]*=[ ]*\):*/\1/;
16696s/:*$//;
16697s/^[^=]*=[ ]*$//;
16698}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016699fi
16700
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016701DEFS=-DHAVE_CONFIG_H
16702
Martin v. Löwis11437992002-04-12 09:54:03 +000016703
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016704: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016705ac_clean_files_save=$ac_clean_files
16706ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16707{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16708echo "$as_me: creating $CONFIG_STATUS" >&6;}
16709cat >$CONFIG_STATUS <<_ACEOF
16710#! $SHELL
16711# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016712# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016713# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016714# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016715
Martin v. Löwis11437992002-04-12 09:54:03 +000016716debug=false
16717SHELL=\${CONFIG_SHELL-$SHELL}
16718_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016719
Martin v. Löwis11437992002-04-12 09:54:03 +000016720cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016721
Martin v. Löwis11437992002-04-12 09:54:03 +000016722## --------------------- ##
16723## M4sh Initialization. ##
16724## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016725
Martin v. Löwis11437992002-04-12 09:54:03 +000016726# Be Bourne compatible
16727if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16728 emulate sh
16729 NULLCMD=:
16730elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16731 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016732fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016733
Martin v. Löwis11437992002-04-12 09:54:03 +000016734# NLS nuisances.
16735# Support unset when possible.
16736if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16737 as_unset=unset
16738else
16739 as_unset=false
16740fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016741
Martin v. Löwis11437992002-04-12 09:54:03 +000016742(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16743 { $as_unset LANG || test "${LANG+set}" != set; } ||
16744 { LANG=C; export LANG; }
16745(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16746 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16747 { LC_ALL=C; export LC_ALL; }
16748(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16749 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16750 { LC_TIME=C; export LC_TIME; }
16751(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16752 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16753 { LC_CTYPE=C; export LC_CTYPE; }
16754(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16755 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16756 { LANGUAGE=C; export LANGUAGE; }
16757(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16758 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16759 { LC_COLLATE=C; export LC_COLLATE; }
16760(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16761 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16762 { LC_NUMERIC=C; export LC_NUMERIC; }
16763(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16764 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16765 { LC_MESSAGES=C; export LC_MESSAGES; }
16766
16767
16768# Name of the executable.
16769as_me=`(basename "$0") 2>/dev/null ||
16770$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16771 X"$0" : 'X\(//\)$' \| \
16772 X"$0" : 'X\(/\)$' \| \
16773 . : '\(.\)' 2>/dev/null ||
16774echo X/"$0" |
16775 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16776 /^X\/\(\/\/\)$/{ s//\1/; q; }
16777 /^X\/\(\/\).*/{ s//\1/; q; }
16778 s/.*/./; q'`
16779
16780# PATH needs CR, and LINENO needs CR and PATH.
16781# Avoid depending upon Character Ranges.
16782as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16783as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16784as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16785as_cr_digits='0123456789'
16786as_cr_alnum=$as_cr_Letters$as_cr_digits
16787
16788# The user is always right.
16789if test "${PATH_SEPARATOR+set}" != set; then
16790 echo "#! /bin/sh" >conftest.sh
16791 echo "exit 0" >>conftest.sh
16792 chmod +x conftest.sh
16793 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16794 PATH_SEPARATOR=';'
16795 else
16796 PATH_SEPARATOR=:
16797 fi
16798 rm -f conftest.sh
16799fi
16800
16801
16802 as_lineno_1=$LINENO
16803 as_lineno_2=$LINENO
16804 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16805 test "x$as_lineno_1" != "x$as_lineno_2" &&
16806 test "x$as_lineno_3" = "x$as_lineno_2" || {
16807 # Find who we are. Look in the path if we contain no path at all
16808 # relative or not.
16809 case $0 in
16810 *[\\/]* ) as_myself=$0 ;;
16811 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16812for as_dir in $PATH
16813do
16814 IFS=$as_save_IFS
16815 test -z "$as_dir" && as_dir=.
16816 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16817done
16818
16819 ;;
16820 esac
16821 # We did not find ourselves, most probably we were run as `sh COMMAND'
16822 # in which case we are not to be found in the path.
16823 if test "x$as_myself" = x; then
16824 as_myself=$0
16825 fi
16826 if test ! -f "$as_myself"; then
16827 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16828echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16829 { (exit 1); exit 1; }; }
16830 fi
16831 case $CONFIG_SHELL in
16832 '')
16833 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16834for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16835do
16836 IFS=$as_save_IFS
16837 test -z "$as_dir" && as_dir=.
16838 for as_base in sh bash ksh sh5; do
16839 case $as_dir in
16840 /*)
16841 if ("$as_dir/$as_base" -c '
16842 as_lineno_1=$LINENO
16843 as_lineno_2=$LINENO
16844 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16845 test "x$as_lineno_1" != "x$as_lineno_2" &&
16846 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16847 CONFIG_SHELL=$as_dir/$as_base
16848 export CONFIG_SHELL
16849 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16850 fi;;
16851 esac
16852 done
16853done
16854;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016855 esac
16856
Martin v. Löwis11437992002-04-12 09:54:03 +000016857 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16858 # uniformly replaced by the line number. The first 'sed' inserts a
16859 # line-number line before each line; the second 'sed' does the real
16860 # work. The second script uses 'N' to pair each line-number line
16861 # with the numbered line, and appends trailing '-' during
16862 # substitution so that $LINENO is not a special case at line end.
16863 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16864 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16865 sed '=' <$as_myself |
16866 sed '
16867 N
16868 s,$,-,
16869 : loop
16870 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16871 t loop
16872 s,-$,,
16873 s,^['$as_cr_digits']*\n,,
16874 ' >$as_me.lineno &&
16875 chmod +x $as_me.lineno ||
16876 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16877echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16878 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016879
Martin v. Löwis11437992002-04-12 09:54:03 +000016880 # Don't try to exec as it changes $[0], causing all sort of problems
16881 # (the dirname of $[0] is not the place where we might find the
16882 # original and so on. Autoconf is especially sensible to this).
16883 . ./$as_me.lineno
16884 # Exit status is that of the last command.
16885 exit
16886}
16887
16888
16889case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16890 *c*,-n*) ECHO_N= ECHO_C='
16891' ECHO_T=' ' ;;
16892 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16893 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16894esac
16895
16896if expr a : '\(a\)' >/dev/null 2>&1; then
16897 as_expr=expr
16898else
16899 as_expr=false
16900fi
16901
16902rm -f conf$$ conf$$.exe conf$$.file
16903echo >conf$$.file
16904if ln -s conf$$.file conf$$ 2>/dev/null; then
16905 # We could just check for DJGPP; but this test a) works b) is more generic
16906 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16907 if test -f conf$$.exe; then
16908 # Don't use ln at all; we don't have any links
16909 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016910 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016911 as_ln_s='ln -s'
16912 fi
16913elif ln conf$$.file conf$$ 2>/dev/null; then
16914 as_ln_s=ln
16915else
16916 as_ln_s='cp -p'
16917fi
16918rm -f conf$$ conf$$.exe conf$$.file
16919
16920as_executable_p="test -f"
16921
16922# Sed expression to map a string onto a valid CPP name.
16923as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16924
16925# Sed expression to map a string onto a valid variable name.
16926as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16927
16928
16929# IFS
16930# We need space, tab and new line, in precisely that order.
16931as_nl='
16932'
16933IFS=" $as_nl"
16934
16935# CDPATH.
16936$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16937
16938exec 6>&1
16939
16940# Open the log real soon, to keep \$[0] and so on meaningful, and to
16941# report actual input values of CONFIG_FILES etc. instead of their
16942# values after options handling. Logging --version etc. is OK.
16943exec 5>>config.log
16944{
16945 echo
16946 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16947## Running $as_me. ##
16948_ASBOX
16949} >&5
16950cat >&5 <<_CSEOF
16951
Martin v. Löwis88afe662002-10-26 13:47:44 +000016952This file was extended by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +000016953generated by GNU Autoconf 2.53. Invocation command line was
16954
16955 CONFIG_FILES = $CONFIG_FILES
16956 CONFIG_HEADERS = $CONFIG_HEADERS
16957 CONFIG_LINKS = $CONFIG_LINKS
16958 CONFIG_COMMANDS = $CONFIG_COMMANDS
16959 $ $0 $@
16960
16961_CSEOF
16962echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16963echo >&5
16964_ACEOF
16965
16966# Files that config.status was made for.
16967if test -n "$ac_config_files"; then
16968 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16969fi
16970
16971if test -n "$ac_config_headers"; then
16972 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16973fi
16974
16975if test -n "$ac_config_links"; then
16976 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16977fi
16978
16979if test -n "$ac_config_commands"; then
16980 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16981fi
16982
16983cat >>$CONFIG_STATUS <<\_ACEOF
16984
16985ac_cs_usage="\
16986\`$as_me' instantiates files from templates according to the
16987current configuration.
16988
16989Usage: $0 [OPTIONS] [FILE]...
16990
16991 -h, --help print this help, then exit
16992 -V, --version print version number, then exit
16993 -d, --debug don't remove temporary files
16994 --recheck update $as_me by reconfiguring in the same conditions
16995 --file=FILE[:TEMPLATE]
16996 instantiate the configuration file FILE
16997 --header=FILE[:TEMPLATE]
16998 instantiate the configuration header FILE
16999
17000Configuration files:
17001$config_files
17002
17003Configuration headers:
17004$config_headers
17005
17006Report bugs to <bug-autoconf@gnu.org>."
17007_ACEOF
17008
17009cat >>$CONFIG_STATUS <<_ACEOF
17010ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017011python config.status 2.3
Martin v. Löwis11437992002-04-12 09:54:03 +000017012configured by $0, generated by GNU Autoconf 2.53,
17013 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17014
17015Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17016Free Software Foundation, Inc.
17017This config.status script is free software; the Free Software Foundation
17018gives unlimited permission to copy, distribute and modify it."
17019srcdir=$srcdir
17020INSTALL="$INSTALL"
17021_ACEOF
17022
17023cat >>$CONFIG_STATUS <<\_ACEOF
17024# If no file are specified by the user, then we need to provide default
17025# value. By we need to know if files were specified by the user.
17026ac_need_defaults=:
17027while test $# != 0
17028do
17029 case $1 in
17030 --*=*)
17031 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17032 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17033 shift
17034 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17035 shift
17036 ;;
17037 -*);;
17038 *) # This is not an option, so the user has probably given explicit
17039 # arguments.
17040 ac_need_defaults=false;;
17041 esac
17042
17043 case $1 in
17044 # Handling of the options.
17045_ACEOF
17046cat >>$CONFIG_STATUS <<_ACEOF
17047 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17048 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17049 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17050_ACEOF
17051cat >>$CONFIG_STATUS <<\_ACEOF
17052 --version | --vers* | -V )
17053 echo "$ac_cs_version"; exit 0 ;;
17054 --he | --h)
17055 # Conflict between --help and --header
17056 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17057Try \`$0 --help' for more information." >&5
17058echo "$as_me: error: ambiguous option: $1
17059Try \`$0 --help' for more information." >&2;}
17060 { (exit 1); exit 1; }; };;
17061 --help | --hel | -h )
17062 echo "$ac_cs_usage"; exit 0 ;;
17063 --debug | --d* | -d )
17064 debug=: ;;
17065 --file | --fil | --fi | --f )
17066 shift
17067 CONFIG_FILES="$CONFIG_FILES $1"
17068 ac_need_defaults=false;;
17069 --header | --heade | --head | --hea )
17070 shift
17071 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17072 ac_need_defaults=false;;
17073
17074 # This is an error.
17075 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17076Try \`$0 --help' for more information." >&5
17077echo "$as_me: error: unrecognized option: $1
17078Try \`$0 --help' for more information." >&2;}
17079 { (exit 1); exit 1; }; } ;;
17080
17081 *) ac_config_targets="$ac_config_targets $1" ;;
17082
17083 esac
17084 shift
17085done
17086
17087_ACEOF
17088
17089
17090
17091
17092
17093cat >>$CONFIG_STATUS <<\_ACEOF
17094for ac_config_target in $ac_config_targets
17095do
17096 case "$ac_config_target" in
17097 # Handling of arguments.
17098 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17099 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17100 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17101 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17102echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17103 { (exit 1); exit 1; }; };;
17104 esac
17105done
17106
17107# If the user did not use the arguments to specify the items to instantiate,
17108# then the envvar interface is used. Set only those that are not.
17109# We use the long form for the default assignment because of an extremely
17110# bizarre bug on SunOS 4.1.3.
17111if $ac_need_defaults; then
17112 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17113 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17114fi
17115
17116# Create a temporary directory, and hook for its removal unless debugging.
17117$debug ||
17118{
17119 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17120 trap '{ (exit 1); exit 1; }' 1 2 13 15
17121}
17122
17123# Create a (secure) tmp directory for tmp files.
17124: ${TMPDIR=/tmp}
17125{
17126 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17127 test -n "$tmp" && test -d "$tmp"
17128} ||
17129{
17130 tmp=$TMPDIR/cs$$-$RANDOM
17131 (umask 077 && mkdir $tmp)
17132} ||
17133{
17134 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17135 { (exit 1); exit 1; }
17136}
17137
17138_ACEOF
17139
17140cat >>$CONFIG_STATUS <<_ACEOF
17141
17142#
17143# CONFIG_FILES section.
17144#
17145
17146# No need to generate the scripts if there are no CONFIG_FILES.
17147# This happens for instance when ./config.status config.h
17148if test -n "\$CONFIG_FILES"; then
17149 # Protect against being on the right side of a sed subst in config.status.
17150 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17151 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17152s,@SHELL@,$SHELL,;t t
17153s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17154s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17155s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17156s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17157s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17158s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17159s,@exec_prefix@,$exec_prefix,;t t
17160s,@prefix@,$prefix,;t t
17161s,@program_transform_name@,$program_transform_name,;t t
17162s,@bindir@,$bindir,;t t
17163s,@sbindir@,$sbindir,;t t
17164s,@libexecdir@,$libexecdir,;t t
17165s,@datadir@,$datadir,;t t
17166s,@sysconfdir@,$sysconfdir,;t t
17167s,@sharedstatedir@,$sharedstatedir,;t t
17168s,@localstatedir@,$localstatedir,;t t
17169s,@libdir@,$libdir,;t t
17170s,@includedir@,$includedir,;t t
17171s,@oldincludedir@,$oldincludedir,;t t
17172s,@infodir@,$infodir,;t t
17173s,@mandir@,$mandir,;t t
17174s,@build_alias@,$build_alias,;t t
17175s,@host_alias@,$host_alias,;t t
17176s,@target_alias@,$target_alias,;t t
17177s,@DEFS@,$DEFS,;t t
17178s,@ECHO_C@,$ECHO_C,;t t
17179s,@ECHO_N@,$ECHO_N,;t t
17180s,@ECHO_T@,$ECHO_T,;t t
17181s,@LIBS@,$LIBS,;t t
17182s,@VERSION@,$VERSION,;t t
17183s,@SOVERSION@,$SOVERSION,;t t
17184s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
17185s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
17186s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
17187s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17188s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17189s,@MACHDEP@,$MACHDEP,;t t
17190s,@SGI_ABI@,$SGI_ABI,;t t
17191s,@CXX@,$CXX,;t t
17192s,@MAINOBJ@,$MAINOBJ,;t t
17193s,@EXEEXT@,$EXEEXT,;t t
17194s,@CC@,$CC,;t t
17195s,@CFLAGS@,$CFLAGS,;t t
17196s,@LDFLAGS@,$LDFLAGS,;t t
17197s,@CPPFLAGS@,$CPPFLAGS,;t t
17198s,@ac_ct_CC@,$ac_ct_CC,;t t
17199s,@OBJEXT@,$OBJEXT,;t t
17200s,@CPP@,$CPP,;t t
17201s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17202s,@LIBRARY@,$LIBRARY,;t t
17203s,@LDLIBRARY@,$LDLIBRARY,;t t
17204s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17205s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17206s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17207s,@INSTSONAME@,$INSTSONAME,;t t
17208s,@RUNSHARED@,$RUNSHARED,;t t
17209s,@LINKCC@,$LINKCC,;t t
17210s,@RANLIB@,$RANLIB,;t t
17211s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17212s,@AR@,$AR,;t t
17213s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17214s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17215s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17216s,@LN@,$LN,;t t
17217s,@OPT@,$OPT,;t t
17218s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17219s,@SO@,$SO,;t t
17220s,@LDSHARED@,$LDSHARED,;t t
17221s,@BLDSHARED@,$BLDSHARED,;t t
17222s,@CCSHARED@,$CCSHARED,;t t
17223s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17224s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017225s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017226s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17227s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17228s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17229s,@LDLAST@,$LDLAST,;t t
17230s,@THREADOBJ@,$THREADOBJ,;t t
17231s,@DLINCLDIR@,$DLINCLDIR,;t t
17232s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17233s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17234s,@LIBOBJS@,$LIBOBJS,;t t
17235s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17236s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17237s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17238s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17239s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17240s,@LIBM@,$LIBM,;t t
17241s,@LIBC@,$LIBC,;t t
17242s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
17243s,@THREADHEADERS@,$THREADHEADERS,;t t
17244s,@SRCDIRS@,$SRCDIRS,;t t
17245CEOF
17246
17247_ACEOF
17248
17249 cat >>$CONFIG_STATUS <<\_ACEOF
17250 # Split the substitutions into bite-sized pieces for seds with
17251 # small command number limits, like on Digital OSF/1 and HP-UX.
17252 ac_max_sed_lines=48
17253 ac_sed_frag=1 # Number of current file.
17254 ac_beg=1 # First line for current file.
17255 ac_end=$ac_max_sed_lines # Line after last line for current file.
17256 ac_more_lines=:
17257 ac_sed_cmds=
17258 while $ac_more_lines; do
17259 if test $ac_beg -gt 1; then
17260 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17261 else
17262 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17263 fi
17264 if test ! -s $tmp/subs.frag; then
17265 ac_more_lines=false
17266 else
17267 # The purpose of the label and of the branching condition is to
17268 # speed up the sed processing (if there are no `@' at all, there
17269 # is no need to browse any of the substitutions).
17270 # These are the two extra sed commands mentioned above.
17271 (echo ':t
17272 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17273 if test -z "$ac_sed_cmds"; then
17274 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17275 else
17276 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17277 fi
17278 ac_sed_frag=`expr $ac_sed_frag + 1`
17279 ac_beg=$ac_end
17280 ac_end=`expr $ac_end + $ac_max_sed_lines`
17281 fi
17282 done
17283 if test -z "$ac_sed_cmds"; then
17284 ac_sed_cmds=cat
17285 fi
17286fi # test -n "$CONFIG_FILES"
17287
17288_ACEOF
17289cat >>$CONFIG_STATUS <<\_ACEOF
17290for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17291 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17292 case $ac_file in
17293 - | *:- | *:-:* ) # input from stdin
17294 cat >$tmp/stdin
17295 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17296 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17297 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17298 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17299 * ) ac_file_in=$ac_file.in ;;
17300 esac
17301
17302 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17303 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17304$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17305 X"$ac_file" : 'X\(//\)[^/]' \| \
17306 X"$ac_file" : 'X\(//\)$' \| \
17307 X"$ac_file" : 'X\(/\)' \| \
17308 . : '\(.\)' 2>/dev/null ||
17309echo X"$ac_file" |
17310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17311 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17312 /^X\(\/\/\)$/{ s//\1/; q; }
17313 /^X\(\/\).*/{ s//\1/; q; }
17314 s/.*/./; q'`
17315 { case "$ac_dir" in
17316 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17317 *) as_incr_dir=.;;
17318esac
17319as_dummy="$ac_dir"
17320for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17321 case $as_mkdir_dir in
17322 # Skip DOS drivespec
17323 ?:) as_incr_dir=$as_mkdir_dir ;;
17324 *)
17325 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17326 test -d "$as_incr_dir" ||
17327 mkdir "$as_incr_dir" ||
17328 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17329echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17330 { (exit 1); exit 1; }; }
17331 ;;
17332 esac
17333done; }
17334
17335 ac_builddir=.
17336
17337if test "$ac_dir" != .; then
17338 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17339 # A "../" for each directory in $ac_dir_suffix.
17340 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17341else
17342 ac_dir_suffix= ac_top_builddir=
17343fi
17344
17345case $srcdir in
17346 .) # No --srcdir option. We are building in place.
17347 ac_srcdir=.
17348 if test -z "$ac_top_builddir"; then
17349 ac_top_srcdir=.
17350 else
17351 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17352 fi ;;
17353 [\\/]* | ?:[\\/]* ) # Absolute path.
17354 ac_srcdir=$srcdir$ac_dir_suffix;
17355 ac_top_srcdir=$srcdir ;;
17356 *) # Relative path.
17357 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17358 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17359esac
17360# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17361# absolute.
17362ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise3271202002-11-07 07:42:30 +000017363ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000017364ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17365ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17366
17367
17368 case $INSTALL in
17369 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17370 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17371 esac
17372
17373 if test x"$ac_file" != x-; then
17374 { echo "$as_me:$LINENO: creating $ac_file" >&5
17375echo "$as_me: creating $ac_file" >&6;}
17376 rm -f "$ac_file"
17377 fi
17378 # Let's still pretend it is `configure' which instantiates (i.e., don't
17379 # use $as_me), people would be surprised to read:
17380 # /* config.h. Generated by config.status. */
17381 if test x"$ac_file" = x-; then
17382 configure_input=
17383 else
17384 configure_input="$ac_file. "
17385 fi
17386 configure_input=$configure_input"Generated from `echo $ac_file_in |
17387 sed 's,.*/,,'` by configure."
17388
17389 # First look for the input files in the build tree, otherwise in the
17390 # src tree.
17391 ac_file_inputs=`IFS=:
17392 for f in $ac_file_in; do
17393 case $f in
17394 -) echo $tmp/stdin ;;
17395 [\\/$]*)
17396 # Absolute (can't be DOS-style, as IFS=:)
17397 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17398echo "$as_me: error: cannot find input file: $f" >&2;}
17399 { (exit 1); exit 1; }; }
17400 echo $f;;
17401 *) # Relative
17402 if test -f "$f"; then
17403 # Build tree
17404 echo $f
17405 elif test -f "$srcdir/$f"; then
17406 # Source tree
17407 echo $srcdir/$f
17408 else
17409 # /dev/null tree
17410 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17411echo "$as_me: error: cannot find input file: $f" >&2;}
17412 { (exit 1); exit 1; }; }
17413 fi;;
17414 esac
17415 done` || { (exit 1); exit 1; }
17416_ACEOF
17417cat >>$CONFIG_STATUS <<_ACEOF
17418 sed "$ac_vpsub
17419$extrasub
17420_ACEOF
17421cat >>$CONFIG_STATUS <<\_ACEOF
17422:t
17423/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17424s,@configure_input@,$configure_input,;t t
17425s,@srcdir@,$ac_srcdir,;t t
17426s,@abs_srcdir@,$ac_abs_srcdir,;t t
17427s,@top_srcdir@,$ac_top_srcdir,;t t
17428s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17429s,@builddir@,$ac_builddir,;t t
17430s,@abs_builddir@,$ac_abs_builddir,;t t
17431s,@top_builddir@,$ac_top_builddir,;t t
17432s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17433s,@INSTALL@,$ac_INSTALL,;t t
17434" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17435 rm -f $tmp/stdin
17436 if test x"$ac_file" != x-; then
17437 mv $tmp/out $ac_file
17438 else
17439 cat $tmp/out
17440 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017441 fi
17442
Martin v. Löwis11437992002-04-12 09:54:03 +000017443done
17444_ACEOF
17445cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017446
Martin v. Löwis11437992002-04-12 09:54:03 +000017447#
17448# CONFIG_HEADER section.
17449#
Guido van Rossum627b2d71993-12-24 10:39:16 +000017450
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017451# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17452# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017453#
17454# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000017455ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17456ac_dB='[ ].*$,\1#\2'
17457ac_dC=' '
17458ac_dD=',;t'
17459# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17460ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17461ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017462ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000017463ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017464
Martin v. Löwis11437992002-04-12 09:54:03 +000017465for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000017466 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000017467 case $ac_file in
17468 - | *:- | *:-:* ) # input from stdin
17469 cat >$tmp/stdin
17470 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17471 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17472 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17473 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17474 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017475 esac
17476
Martin v. Löwis11437992002-04-12 09:54:03 +000017477 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17478echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017479
Martin v. Löwis11437992002-04-12 09:54:03 +000017480 # First look for the input files in the build tree, otherwise in the
17481 # src tree.
17482 ac_file_inputs=`IFS=:
17483 for f in $ac_file_in; do
17484 case $f in
17485 -) echo $tmp/stdin ;;
17486 [\\/$]*)
17487 # Absolute (can't be DOS-style, as IFS=:)
17488 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17489echo "$as_me: error: cannot find input file: $f" >&2;}
17490 { (exit 1); exit 1; }; }
17491 echo $f;;
17492 *) # Relative
17493 if test -f "$f"; then
17494 # Build tree
17495 echo $f
17496 elif test -f "$srcdir/$f"; then
17497 # Source tree
17498 echo $srcdir/$f
17499 else
17500 # /dev/null tree
17501 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17502echo "$as_me: error: cannot find input file: $f" >&2;}
17503 { (exit 1); exit 1; }; }
17504 fi;;
17505 esac
17506 done` || { (exit 1); exit 1; }
17507 # Remove the trailing spaces.
17508 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017509
Martin v. Löwis11437992002-04-12 09:54:03 +000017510_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017511
Martin v. Löwis11437992002-04-12 09:54:03 +000017512# Transform confdefs.h into two sed scripts, `conftest.defines' and
17513# `conftest.undefs', that substitutes the proper values into
17514# config.h.in to produce config.h. The first handles `#define'
17515# templates, and the second `#undef' templates.
17516# And first: Protect against being on the right side of a sed subst in
17517# config.status. Protect against being in an unquoted here document
17518# in config.status.
17519rm -f conftest.defines conftest.undefs
17520# Using a here document instead of a string reduces the quoting nightmare.
17521# Putting comments in sed scripts is not portable.
17522#
17523# `end' is used to avoid that the second main sed command (meant for
17524# 0-ary CPP macros) applies to n-ary macro definitions.
17525# See the Autoconf documentation for `clear'.
17526cat >confdef2sed.sed <<\_ACEOF
17527s/[\\&,]/\\&/g
17528s,[\\$`],\\&,g
17529t clear
17530: clear
17531s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17532t end
17533s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17534: end
17535_ACEOF
17536# If some macros were called several times there might be several times
17537# the same #defines, which is useless. Nevertheless, we may not want to
17538# sort them, since we want the *last* AC-DEFINE to be honored.
17539uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17540sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17541rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017542
17543# This sed command replaces #undef with comments. This is necessary, for
17544# example, in the case of _POSIX_SOURCE, which is predefined and required
17545# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017546cat >>conftest.undefs <<\_ACEOF
17547s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17548_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017549
Martin v. Löwis11437992002-04-12 09:54:03 +000017550# Break up conftest.defines because some shells have a limit on the size
17551# of here documents, and old seds have small limits too (100 cmds).
17552echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17553echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17554echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17555echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017556rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000017557while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000017558do
Martin v. Löwis11437992002-04-12 09:54:03 +000017559 # Write a limited-size here document to $tmp/defines.sed.
17560 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17561 # Speed up: don't consider the non `#define' lines.
17562 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
17563 # Work around the forget-to-reset-the-flag bug.
17564 echo 't clr' >>$CONFIG_STATUS
17565 echo ': clr' >>$CONFIG_STATUS
17566 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017567 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017568 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17569 rm -f $tmp/in
17570 mv $tmp/out $tmp/in
17571' >>$CONFIG_STATUS
17572 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17573 rm -f conftest.defines
17574 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000017575done
Martin v. Löwis11437992002-04-12 09:54:03 +000017576rm -f conftest.defines
17577echo ' fi # egrep' >>$CONFIG_STATUS
17578echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017579
Martin v. Löwis11437992002-04-12 09:54:03 +000017580# Break up conftest.undefs because some shells have a limit on the size
17581# of here documents, and old seds have small limits too (100 cmds).
17582echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17583rm -f conftest.tail
17584while grep . conftest.undefs >/dev/null
17585do
17586 # Write a limited-size here document to $tmp/undefs.sed.
17587 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17588 # Speed up: don't consider the non `#undef'
17589 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17590 # Work around the forget-to-reset-the-flag bug.
17591 echo 't clr' >>$CONFIG_STATUS
17592 echo ': clr' >>$CONFIG_STATUS
17593 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17594 echo 'CEOF
17595 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17596 rm -f $tmp/in
17597 mv $tmp/out $tmp/in
17598' >>$CONFIG_STATUS
17599 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17600 rm -f conftest.undefs
17601 mv conftest.tail conftest.undefs
17602done
17603rm -f conftest.undefs
17604
17605cat >>$CONFIG_STATUS <<\_ACEOF
17606 # Let's still pretend it is `configure' which instantiates (i.e., don't
17607 # use $as_me), people would be surprised to read:
17608 # /* config.h. Generated by config.status. */
17609 if test x"$ac_file" = x-; then
17610 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000017611 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017612 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000017613 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017614 cat $tmp/in >>$tmp/config.h
17615 rm -f $tmp/in
17616 if test x"$ac_file" != x-; then
17617 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17618 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17619echo "$as_me: $ac_file is unchanged" >&6;}
17620 else
17621 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17622$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17623 X"$ac_file" : 'X\(//\)[^/]' \| \
17624 X"$ac_file" : 'X\(//\)$' \| \
17625 X"$ac_file" : 'X\(/\)' \| \
17626 . : '\(.\)' 2>/dev/null ||
17627echo X"$ac_file" |
17628 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17629 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17630 /^X\(\/\/\)$/{ s//\1/; q; }
17631 /^X\(\/\).*/{ s//\1/; q; }
17632 s/.*/./; q'`
17633 { case "$ac_dir" in
17634 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17635 *) as_incr_dir=.;;
17636esac
17637as_dummy="$ac_dir"
17638for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17639 case $as_mkdir_dir in
17640 # Skip DOS drivespec
17641 ?:) as_incr_dir=$as_mkdir_dir ;;
17642 *)
17643 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17644 test -d "$as_incr_dir" ||
17645 mkdir "$as_incr_dir" ||
17646 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17647echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17648 { (exit 1); exit 1; }; }
17649 ;;
17650 esac
17651done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017652
Martin v. Löwis11437992002-04-12 09:54:03 +000017653 rm -f $ac_file
17654 mv $tmp/config.h $ac_file
17655 fi
17656 else
17657 cat $tmp/config.h
17658 rm -f $tmp/config.h
17659 fi
17660done
17661_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017662
Martin v. Löwis11437992002-04-12 09:54:03 +000017663cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017664
Martin v. Löwis11437992002-04-12 09:54:03 +000017665{ (exit 0); exit 0; }
17666_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017667chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017668ac_clean_files=$ac_clean_files_save
17669
17670
17671# configure is writing to config.log, and then calls config.status.
17672# config.status does its own redirection, appending to config.log.
17673# Unfortunately, on DOS this fails, as config.log is still kept open
17674# by configure, so config.status won't be able to write to it; its
17675# output is simply discarded. So we exec the FD to /dev/null,
17676# effectively closing config.log, so it can be properly (re)opened and
17677# appended to by config.status. When coming back to configure, we
17678# need to make the FD available again.
17679if test "$no_create" != yes; then
17680 ac_cs_success=:
17681 exec 5>/dev/null
17682 $SHELL $CONFIG_STATUS || ac_cs_success=false
17683 exec 5>>config.log
17684 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17685 # would make configure fail if this is the last instruction.
17686 $ac_cs_success || { (exit 1); exit 1; }
17687fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017688
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017689
17690echo "creating Setup"
17691if test ! -f Modules/Setup
17692then
17693 cp $srcdir/Modules/Setup.dist Modules/Setup
17694fi
17695
17696echo "creating Setup.local"
17697if test ! -f Modules/Setup.local
17698then
17699 echo "# Edit this file for local setup changes" >Modules/Setup.local
17700fi
17701
17702echo "creating Makefile"
17703$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17704 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017705 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017706mv config.c Modules