blob: 32b00b2ebb8b22aafcee1db6121e15e179296393 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002# From configure.in Revision: 1.365 .
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
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001240VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001241
Martin v. Löwis1142de32002-03-29 16:28:31 +00001242
1243SOVERSION=1.0
1244
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001245# The later defininition of _XOPEN_SOURCE disables certain features
1246# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1247
1248cat >>confdefs.h <<\_ACEOF
1249#define _GNU_SOURCE 1
1250_ACEOF
1251
1252
1253# The definition of _GNU_SOURCE potentially causes a change of the value
1254# of _XOPEN_SOURCE. So define it only conditionally.
1255
1256
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001257
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001258define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001259
Martin v. Löwise4826582002-10-26 13:33:00 +00001260# On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition
1261# of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else several APIs
1262# are not declared. Since this is also needed in some cases for HP-UX,
1263# we define it globally.
1264
1265cat >>confdefs.h <<\_ACEOF
1266#define _XOPEN_SOURCE_EXTENDED 1
1267_ACEOF
1268
1269
1270cat >>confdefs.h <<\_ACEOF
1271#define _POSIX_C_SOURCE 199506L
1272_ACEOF
1273
1274
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001275# Arguments passed to configure.
1276
1277CONFIG_ARGS="$ac_configure_args"
1278
Jack Jansene578a632001-08-15 01:27:14 +00001279# Check whether --enable-framework or --disable-framework was given.
1280if test "${enable_framework+set}" = set; then
1281 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001282
Jack Jansene578a632001-08-15 01:27:14 +00001283 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001285 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001286 esac
1287 case $enableval in
1288 no)
1289 PYTHONFRAMEWORK=
1290 PYTHONFRAMEWORKDIR=no-framework
1291 PYTHONFRAMEWORKPREFIX=
1292 PYTHONFRAMEWORKINSTALLDIR=
1293 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001294 ;;
1295 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001296 PYTHONFRAMEWORK=Python
1297 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001298 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001299 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1300 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001301 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001302
Guido van Rossum563e7081996-09-10 18:20:48 +00001303else
Martin v. Löwis11437992002-04-12 09:54:03 +00001304
Jack Jansene578a632001-08-15 01:27:14 +00001305 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001306 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001307 PYTHONFRAMEWORKPREFIX=
1308 PYTHONFRAMEWORKINSTALLDIR=
1309 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001310
Martin v. Löwis11437992002-04-12 09:54:03 +00001311fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001312
1313
1314
1315
Jack Jansene578a632001-08-15 01:27:14 +00001316
1317##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001318## AC_HELP_STRING(--with-dyld,
1319## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001320##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001321# Set name for machine-dependent library files
1322
Martin v. Löwis11437992002-04-12 09:54:03 +00001323echo "$as_me:$LINENO: checking MACHDEP" >&5
1324echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001325if test -z "$MACHDEP"
1326then
Guido van Rossum563e7081996-09-10 18:20:48 +00001327 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001328 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1329 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001330 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001331 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001332 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001333 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001334 ac_md_system=`echo $ac_sys_system |
1335 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1336 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001337 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001338 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001339
Guido van Rossum07397971997-04-29 21:49:50 +00001340 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001341 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001342 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001343 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001344 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001345 esac
1346fi
Guido van Rossum91922671997-10-09 20:24:13 +00001347
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001348# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1349# disable features if it is defined, without any means to access these
1350# features as extensions. For these systems, we skip the definition of
1351# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1352# some feature, make sure there is no alternative way to access this
1353# feature. Also, when using wildcards, make sure you have verified the
1354# need for not defining _XOPEN_SOURCE on all systems matching the
1355# wildcard, and that the wildcard does not include future systems
1356# (which may remove their limitations).
1357case $ac_sys_system/$ac_sys_release in
1358 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1359 # even though select is a POSIX function. Reported by J. Ribbens.
1360 OpenBSD/2.* | OpenBSD/3.[012])
1361 define_xopen_source=no;;
1362esac
1363
1364if test $define_xopen_source = yes
1365then
1366 cat >>confdefs.h <<\_ACEOF
1367#define _XOPEN_SOURCE 500
1368_ACEOF
1369
1370fi
1371
Guido van Rossum91922671997-10-09 20:24:13 +00001372#
1373# SGI compilers allow the specification of the both the ABI and the
1374# ISA on the command line. Depending on the values of these switches,
1375# different and often incompatable code will be generated.
1376#
1377# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1378# thus supply support for various ABI/ISA combinations. The MACHDEP
1379# variable is also adjusted.
1380#
1381
1382if test ! -z "$SGI_ABI"
1383then
1384 CC="cc $SGI_ABI"
1385 LDFLAGS="$SGI_ABI $LDFLAGS"
1386 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1387fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001388echo "$as_me:$LINENO: result: $MACHDEP" >&5
1389echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001390
Guido van Rossum627b2d71993-12-24 10:39:16 +00001391# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001392echo "$as_me:$LINENO: checking for --without-gcc" >&5
1393echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1394
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001395# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001396if test "${with_gcc+set}" = set; then
1397 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001398
Guido van Rossum7f43da71994-08-01 12:15:30 +00001399 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001400 no) CC=cc
1401 without_gcc=yes;;
1402 yes) CC=gcc
1403 without_gcc=no;;
1404 *) CC=$withval
1405 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001406 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001407else
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001409 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001410 AIX*) CC=cc_r
1411 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001412 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001413 case $BE_HOST_CPU in
1414 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001415 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001416 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001417 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001418 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001419 ;;
1420 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001421 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001422 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001423 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001424 ;;
1425 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1427echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1428 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001429 ;;
1430 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001431 AR="\$(srcdir)/Modules/ar_beos"
1432 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001433 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001434 Monterey*)
1435 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001436 without_gcc=;;
1437 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001438 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001439fi;
1440echo "$as_me:$LINENO: result: $without_gcc" >&5
1441echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001442
1443
Guido van Rossum95012191999-12-16 17:50:52 +00001444
Fred Drakea1a84e72001-03-06 05:52:16 +00001445MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001446echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1447echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1448
Guido van Rossum95012191999-12-16 17:50:52 +00001449# Check whether --with-cxx or --without-cxx was given.
1450if test "${with_cxx+set}" = set; then
1451 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
Martin v. Löwis22352952000-12-13 17:37:02 +00001453 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001454 case $withval in
1455 no) CXX=
1456 with_cxx=no;;
1457 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001458 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001459 with_cxx=$withval;;
1460 esac
1461else
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
Guido van Rossum95012191999-12-16 17:50:52 +00001463 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001464 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001465
Martin v. Löwis11437992002-04-12 09:54:03 +00001466fi;
1467echo "$as_me:$LINENO: result: $with_cxx" >&5
1468echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001469
1470if test "$with_cxx" = "yes"
1471then
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1473echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1474 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001475fi
1476
1477
1478
1479
Martin v. Löwis11437992002-04-12 09:54:03 +00001480if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001481then
1482 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1483do
Martin v. Löwis11437992002-04-12 09:54:03 +00001484 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001485set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001486echo "$as_me:$LINENO: checking for $ac_word" >&5
1487echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1488if test "${ac_cv_prog_CXX+set}" = set; then
1489 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001490else
1491 if test -n "$CXX"; then
1492 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1493else
Martin v. Löwis11437992002-04-12 09:54:03 +00001494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1495for as_dir in $PATH
1496do
1497 IFS=$as_save_IFS
1498 test -z "$as_dir" && as_dir=.
1499 for ac_exec_ext in '' $ac_executable_extensions; do
1500 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1501 ac_cv_prog_CXX="$ac_prog"
1502 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1503 break 2
1504 fi
1505done
1506done
1507
Martin v. Löwis22352952000-12-13 17:37:02 +00001508fi
1509fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001510CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001511if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 echo "$as_me:$LINENO: result: $CXX" >&5
1513echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001514else
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 echo "$as_me:$LINENO: result: no" >&5
1516echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001517fi
1518
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001520done
1521test -n "$CXX" || CXX="notfound"
1522
1523 if test "$CXX" = "notfound"
1524 then
1525 CXX=
1526 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001527 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001528ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1532 cat >conftest.$ac_ext <<_ACEOF
1533#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001534#include "confdefs.h"
1535
Martin v. Löwis11437992002-04-12 09:54:03 +00001536#ifdef F77_DUMMY_MAIN
1537# ifdef __cplusplus
1538 extern "C"
1539# endif
1540 int F77_DUMMY_MAIN() { return 1; }
1541#endif
1542int
1543main ()
1544{
Michael W. Hudson54241132001-12-07 15:38:26 +00001545
Martin v. Löwis11437992002-04-12 09:54:03 +00001546 ;
1547 return 0;
1548}
1549_ACEOF
1550ac_clean_files_save=$ac_clean_files
1551ac_clean_files="$ac_clean_files a.out a.exe"
1552# Try to create an executable without -o first, disregard a.out.
1553# It will help us diagnose broken compilers, and finding out an intuition
1554# of exeext.
1555echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1556echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1557ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1558if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1559 (eval $ac_link_default) 2>&5
1560 ac_status=$?
1561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1562 (exit $ac_status); }; then
1563 # Find the output, starting from the most likely. This scheme is
1564# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1565# resort.
1566
1567# Be careful to initialize this variable, since it used to be cached.
1568# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1569ac_cv_exeext=
1570for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1571 ls a.out conftest 2>/dev/null;
1572 ls a.* conftest.* 2>/dev/null`; do
1573 case $ac_file in
1574 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1575 a.out ) # We found the default executable, but exeext='' is most
1576 # certainly right.
1577 break;;
1578 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1579 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1580 export ac_cv_exeext
1581 break;;
1582 * ) break;;
1583 esac
1584done
1585else
1586 echo "$as_me: failed program was:" >&5
1587cat conftest.$ac_ext >&5
1588{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1589echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1590 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001592
1593ac_exeext=$ac_cv_exeext
1594echo "$as_me:$LINENO: result: $ac_file" >&5
1595echo "${ECHO_T}$ac_file" >&6
1596
1597# Check the compiler produces executables we can run. If not, either
1598# the compiler is broken, or we cross compile.
1599echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1600echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1601# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1602# If not cross compiling, check that we can run a simple program.
1603if test "$cross_compiling" != yes; then
1604 if { ac_try='./$ac_file'
1605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1606 (eval $ac_try) 2>&5
1607 ac_status=$?
1608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1609 (exit $ac_status); }; }; then
1610 cross_compiling=no
1611 else
1612 if test "$cross_compiling" = maybe; then
1613 cross_compiling=yes
1614 else
1615 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1616If you meant to cross compile, use \`--host'." >&5
1617echo "$as_me: error: cannot run C++ compiled programs.
1618If you meant to cross compile, use \`--host'." >&2;}
1619 { (exit 1); exit 1; }; }
1620 fi
1621 fi
1622fi
1623echo "$as_me:$LINENO: result: yes" >&5
1624echo "${ECHO_T}yes" >&6
1625
1626rm -f a.out a.exe conftest$ac_cv_exeext
1627ac_clean_files=$ac_clean_files_save
1628# Check the compiler produces executables we can run. If not, either
1629# the compiler is broken, or we cross compile.
1630echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1631echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1632echo "$as_me:$LINENO: result: $cross_compiling" >&5
1633echo "${ECHO_T}$cross_compiling" >&6
1634
1635echo "$as_me:$LINENO: checking for suffix of executables" >&5
1636echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1638 (eval $ac_link) 2>&5
1639 ac_status=$?
1640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1641 (exit $ac_status); }; then
1642 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1643# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1644# work properly (i.e., refer to `conftest.exe'), while it won't with
1645# `rm'.
1646for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1647 case $ac_file in
1648 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1649 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1650 export ac_cv_exeext
1651 break;;
1652 * ) break;;
1653 esac
1654done
1655else
1656 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1657echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1658 { (exit 1); exit 1; }; }
1659fi
1660
1661rm -f conftest$ac_cv_exeext
1662echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1663echo "${ECHO_T}$ac_cv_exeext" >&6
1664
1665rm -f conftest.$ac_ext
1666EXEEXT=$ac_cv_exeext
1667ac_exeext=$EXEEXT
1668
1669 ac_ext=c
1670ac_cpp='$CPP $CPPFLAGS'
1671ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1672ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1673ac_compiler_gnu=$ac_cv_c_compiler_gnu
1674
1675
Martin v. Löwis22352952000-12-13 17:37:02 +00001676
1677 fi
1678fi
1679
Guido van Rossum8b131c51995-03-09 14:10:13 +00001680# If the user switches compilers, we can't believe the cache
1681if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1682then
Martin v. Löwis11437992002-04-12 09:54:03 +00001683 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1684(it is also a good idea to do 'make clean' before compiling)" >&5
1685echo "$as_me: error: cached CC is different -- throw away $cache_file
1686(it is also a good idea to do 'make clean' before compiling)" >&2;}
1687 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001688fi
1689
Martin v. Löwis11437992002-04-12 09:54:03 +00001690ac_ext=c
1691ac_cpp='$CPP $CPPFLAGS'
1692ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1693ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1694ac_compiler_gnu=$ac_cv_c_compiler_gnu
1695if test -n "$ac_tool_prefix"; then
1696 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1697set dummy ${ac_tool_prefix}gcc; ac_word=$2
1698echo "$as_me:$LINENO: checking for $ac_word" >&5
1699echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1700if test "${ac_cv_prog_CC+set}" = set; then
1701 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001702else
1703 if test -n "$CC"; then
1704 ac_cv_prog_CC="$CC" # Let the user override the test.
1705else
Martin v. Löwis11437992002-04-12 09:54:03 +00001706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1707for as_dir in $PATH
1708do
1709 IFS=$as_save_IFS
1710 test -z "$as_dir" && as_dir=.
1711 for ac_exec_ext in '' $ac_executable_extensions; do
1712 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1713 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1714 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1715 break 2
1716 fi
1717done
1718done
1719
Jack Jansendd19cf82001-12-06 22:36:17 +00001720fi
1721fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001722CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001723if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001724 echo "$as_me:$LINENO: result: $CC" >&5
1725echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001726else
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 echo "$as_me:$LINENO: result: no" >&5
1728echo "${ECHO_T}no" >&6
1729fi
1730
1731fi
1732if test -z "$ac_cv_prog_CC"; then
1733 ac_ct_CC=$CC
1734 # Extract the first word of "gcc", so it can be a program name with args.
1735set dummy gcc; ac_word=$2
1736echo "$as_me:$LINENO: checking for $ac_word" >&5
1737echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1738if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1739 echo $ECHO_N "(cached) $ECHO_C" >&6
1740else
1741 if test -n "$ac_ct_CC"; then
1742 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1743else
1744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1745for as_dir in $PATH
1746do
1747 IFS=$as_save_IFS
1748 test -z "$as_dir" && as_dir=.
1749 for ac_exec_ext in '' $ac_executable_extensions; do
1750 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1751 ac_cv_prog_ac_ct_CC="gcc"
1752 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1753 break 2
1754 fi
1755done
1756done
1757
1758fi
1759fi
1760ac_ct_CC=$ac_cv_prog_ac_ct_CC
1761if test -n "$ac_ct_CC"; then
1762 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1763echo "${ECHO_T}$ac_ct_CC" >&6
1764else
1765 echo "$as_me:$LINENO: result: no" >&5
1766echo "${ECHO_T}no" >&6
1767fi
1768
1769 CC=$ac_ct_CC
1770else
1771 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001772fi
1773
Jack Jansendd19cf82001-12-06 22:36:17 +00001774if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001775 if test -n "$ac_tool_prefix"; then
1776 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1777set dummy ${ac_tool_prefix}cc; ac_word=$2
1778echo "$as_me:$LINENO: checking for $ac_word" >&5
1779echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1780if test "${ac_cv_prog_CC+set}" = set; then
1781 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001782else
1783 if test -n "$CC"; then
1784 ac_cv_prog_CC="$CC" # Let the user override the test.
1785else
Martin v. Löwis11437992002-04-12 09:54:03 +00001786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1787for as_dir in $PATH
1788do
1789 IFS=$as_save_IFS
1790 test -z "$as_dir" && as_dir=.
1791 for ac_exec_ext in '' $ac_executable_extensions; do
1792 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1793 ac_cv_prog_CC="${ac_tool_prefix}cc"
1794 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1795 break 2
1796 fi
1797done
1798done
1799
1800fi
1801fi
1802CC=$ac_cv_prog_CC
1803if test -n "$CC"; then
1804 echo "$as_me:$LINENO: result: $CC" >&5
1805echo "${ECHO_T}$CC" >&6
1806else
1807 echo "$as_me:$LINENO: result: no" >&5
1808echo "${ECHO_T}no" >&6
1809fi
1810
1811fi
1812if test -z "$ac_cv_prog_CC"; then
1813 ac_ct_CC=$CC
1814 # Extract the first word of "cc", so it can be a program name with args.
1815set dummy cc; ac_word=$2
1816echo "$as_me:$LINENO: checking for $ac_word" >&5
1817echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1818if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1819 echo $ECHO_N "(cached) $ECHO_C" >&6
1820else
1821 if test -n "$ac_ct_CC"; then
1822 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1823else
1824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1825for as_dir in $PATH
1826do
1827 IFS=$as_save_IFS
1828 test -z "$as_dir" && as_dir=.
1829 for ac_exec_ext in '' $ac_executable_extensions; do
1830 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1831 ac_cv_prog_ac_ct_CC="cc"
1832 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1833 break 2
1834 fi
1835done
1836done
1837
1838fi
1839fi
1840ac_ct_CC=$ac_cv_prog_ac_ct_CC
1841if test -n "$ac_ct_CC"; then
1842 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1843echo "${ECHO_T}$ac_ct_CC" >&6
1844else
1845 echo "$as_me:$LINENO: result: no" >&5
1846echo "${ECHO_T}no" >&6
1847fi
1848
1849 CC=$ac_ct_CC
1850else
1851 CC="$ac_cv_prog_CC"
1852fi
1853
1854fi
1855if test -z "$CC"; then
1856 # Extract the first word of "cc", so it can be a program name with args.
1857set dummy cc; ac_word=$2
1858echo "$as_me:$LINENO: checking for $ac_word" >&5
1859echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1860if test "${ac_cv_prog_CC+set}" = set; then
1861 echo $ECHO_N "(cached) $ECHO_C" >&6
1862else
1863 if test -n "$CC"; then
1864 ac_cv_prog_CC="$CC" # Let the user override the test.
1865else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001866 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1868for as_dir in $PATH
1869do
1870 IFS=$as_save_IFS
1871 test -z "$as_dir" && as_dir=.
1872 for ac_exec_ext in '' $ac_executable_extensions; do
1873 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1874 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1875 ac_prog_rejected=yes
1876 continue
1877 fi
1878 ac_cv_prog_CC="cc"
1879 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1880 break 2
1881 fi
1882done
1883done
1884
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001885if test $ac_prog_rejected = yes; then
1886 # We found a bogon in the path, so make sure we never use it.
1887 set dummy $ac_cv_prog_CC
1888 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001889 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001890 # We chose a different compiler from the bogus one.
1891 # However, it has the same basename, so the bogon will be chosen
1892 # first if we set CC to just the basename; use the full file name.
1893 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001894 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001895 shift
1896 ac_cv_prog_CC="$@"
1897 fi
1898fi
1899fi
1900fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001901CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001902if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001903 echo "$as_me:$LINENO: result: $CC" >&5
1904echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001905else
Martin v. Löwis11437992002-04-12 09:54:03 +00001906 echo "$as_me:$LINENO: result: no" >&5
1907echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001908fi
1909
Martin v. Löwis11437992002-04-12 09:54:03 +00001910fi
1911if test -z "$CC"; then
1912 if test -n "$ac_tool_prefix"; then
1913 for ac_prog in cl
1914 do
1915 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1916set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1917echo "$as_me:$LINENO: checking for $ac_word" >&5
1918echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1919if test "${ac_cv_prog_CC+set}" = set; then
1920 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001921else
1922 if test -n "$CC"; then
1923 ac_cv_prog_CC="$CC" # Let the user override the test.
1924else
Martin v. Löwis11437992002-04-12 09:54:03 +00001925as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1926for as_dir in $PATH
1927do
1928 IFS=$as_save_IFS
1929 test -z "$as_dir" && as_dir=.
1930 for ac_exec_ext in '' $ac_executable_extensions; do
1931 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1932 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1933 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1934 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001935 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001936done
1937done
1938
1939fi
1940fi
1941CC=$ac_cv_prog_CC
1942if test -n "$CC"; then
1943 echo "$as_me:$LINENO: result: $CC" >&5
1944echo "${ECHO_T}$CC" >&6
1945else
1946 echo "$as_me:$LINENO: result: no" >&5
1947echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001948fi
1949
Martin v. Löwis11437992002-04-12 09:54:03 +00001950 test -n "$CC" && break
1951 done
1952fi
1953if test -z "$CC"; then
1954 ac_ct_CC=$CC
1955 for ac_prog in cl
1956do
1957 # Extract the first word of "$ac_prog", so it can be a program name with args.
1958set dummy $ac_prog; ac_word=$2
1959echo "$as_me:$LINENO: checking for $ac_word" >&5
1960echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1961if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1962 echo $ECHO_N "(cached) $ECHO_C" >&6
1963else
1964 if test -n "$ac_ct_CC"; then
1965 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1966else
1967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1968for as_dir in $PATH
1969do
1970 IFS=$as_save_IFS
1971 test -z "$as_dir" && as_dir=.
1972 for ac_exec_ext in '' $ac_executable_extensions; do
1973 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1974 ac_cv_prog_ac_ct_CC="$ac_prog"
1975 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1976 break 2
1977 fi
1978done
1979done
Jack Jansendd19cf82001-12-06 22:36:17 +00001980
Martin v. Löwis11437992002-04-12 09:54:03 +00001981fi
1982fi
1983ac_ct_CC=$ac_cv_prog_ac_ct_CC
1984if test -n "$ac_ct_CC"; then
1985 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1986echo "${ECHO_T}$ac_ct_CC" >&6
1987else
1988 echo "$as_me:$LINENO: result: no" >&5
1989echo "${ECHO_T}no" >&6
1990fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001991
Martin v. Löwis11437992002-04-12 09:54:03 +00001992 test -n "$ac_ct_CC" && break
1993done
Michael W. Hudson54241132001-12-07 15:38:26 +00001994
Martin v. Löwis11437992002-04-12 09:54:03 +00001995 CC=$ac_ct_CC
1996fi
1997
1998fi
1999
2000
2001test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2002echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2003 { (exit 1); exit 1; }; }
2004
2005# Provide some information about the compiler.
2006echo "$as_me:$LINENO:" \
2007 "checking for C compiler version" >&5
2008ac_compiler=`set X $ac_compile; echo $2`
2009{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2010 (eval $ac_compiler --version </dev/null >&5) 2>&5
2011 ac_status=$?
2012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2013 (exit $ac_status); }
2014{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2015 (eval $ac_compiler -v </dev/null >&5) 2>&5
2016 ac_status=$?
2017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2018 (exit $ac_status); }
2019{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2020 (eval $ac_compiler -V </dev/null >&5) 2>&5
2021 ac_status=$?
2022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2023 (exit $ac_status); }
2024
2025cat >conftest.$ac_ext <<_ACEOF
2026#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002027#include "confdefs.h"
2028
Martin v. Löwis11437992002-04-12 09:54:03 +00002029#ifdef F77_DUMMY_MAIN
2030# ifdef __cplusplus
2031 extern "C"
2032# endif
2033 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002035int
2036main ()
2037{
2038
2039 ;
2040 return 0;
2041}
2042_ACEOF
2043ac_clean_files_save=$ac_clean_files
2044ac_clean_files="$ac_clean_files a.out a.exe"
2045# Try to create an executable without -o first, disregard a.out.
2046# It will help us diagnose broken compilers, and finding out an intuition
2047# of exeext.
2048echo "$as_me:$LINENO: checking for C compiler default output" >&5
2049echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2050ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2051if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2052 (eval $ac_link_default) 2>&5
2053 ac_status=$?
2054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2055 (exit $ac_status); }; then
2056 # Find the output, starting from the most likely. This scheme is
2057# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2058# resort.
2059
2060# Be careful to initialize this variable, since it used to be cached.
2061# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2062ac_cv_exeext=
2063for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2064 ls a.out conftest 2>/dev/null;
2065 ls a.* conftest.* 2>/dev/null`; do
2066 case $ac_file in
2067 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2068 a.out ) # We found the default executable, but exeext='' is most
2069 # certainly right.
2070 break;;
2071 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2072 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2073 export ac_cv_exeext
2074 break;;
2075 * ) break;;
2076 esac
2077done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002078else
Martin v. Löwis11437992002-04-12 09:54:03 +00002079 echo "$as_me: failed program was:" >&5
2080cat conftest.$ac_ext >&5
2081{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2082echo "$as_me: error: C compiler cannot create executables" >&2;}
2083 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002084fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002085
Martin v. Löwis11437992002-04-12 09:54:03 +00002086ac_exeext=$ac_cv_exeext
2087echo "$as_me:$LINENO: result: $ac_file" >&5
2088echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002089
Martin v. Löwis11437992002-04-12 09:54:03 +00002090# Check the compiler produces executables we can run. If not, either
2091# the compiler is broken, or we cross compile.
2092echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2093echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2094# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2095# If not cross compiling, check that we can run a simple program.
2096if test "$cross_compiling" != yes; then
2097 if { ac_try='./$ac_file'
2098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2099 (eval $ac_try) 2>&5
2100 ac_status=$?
2101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2102 (exit $ac_status); }; }; then
2103 cross_compiling=no
2104 else
2105 if test "$cross_compiling" = maybe; then
2106 cross_compiling=yes
2107 else
2108 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2109If you meant to cross compile, use \`--host'." >&5
2110echo "$as_me: error: cannot run C compiled programs.
2111If you meant to cross compile, use \`--host'." >&2;}
2112 { (exit 1); exit 1; }; }
2113 fi
2114 fi
2115fi
2116echo "$as_me:$LINENO: result: yes" >&5
2117echo "${ECHO_T}yes" >&6
2118
2119rm -f a.out a.exe conftest$ac_cv_exeext
2120ac_clean_files=$ac_clean_files_save
2121# Check the compiler produces executables we can run. If not, either
2122# the compiler is broken, or we cross compile.
2123echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2124echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2125echo "$as_me:$LINENO: result: $cross_compiling" >&5
2126echo "${ECHO_T}$cross_compiling" >&6
2127
2128echo "$as_me:$LINENO: checking for suffix of executables" >&5
2129echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2131 (eval $ac_link) 2>&5
2132 ac_status=$?
2133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2134 (exit $ac_status); }; then
2135 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2136# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2137# work properly (i.e., refer to `conftest.exe'), while it won't with
2138# `rm'.
2139for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2140 case $ac_file in
2141 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2142 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2143 export ac_cv_exeext
2144 break;;
2145 * ) break;;
2146 esac
2147done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002148else
Martin v. Löwis11437992002-04-12 09:54:03 +00002149 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2150echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2151 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002152fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002153
Martin v. Löwis11437992002-04-12 09:54:03 +00002154rm -f conftest$ac_cv_exeext
2155echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2156echo "${ECHO_T}$ac_cv_exeext" >&6
2157
2158rm -f conftest.$ac_ext
2159EXEEXT=$ac_cv_exeext
2160ac_exeext=$EXEEXT
2161echo "$as_me:$LINENO: checking for suffix of object files" >&5
2162echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2163if test "${ac_cv_objext+set}" = set; then
2164 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002165else
Martin v. Löwis11437992002-04-12 09:54:03 +00002166 cat >conftest.$ac_ext <<_ACEOF
2167#line $LINENO "configure"
2168#include "confdefs.h"
2169
2170#ifdef F77_DUMMY_MAIN
2171# ifdef __cplusplus
2172 extern "C"
2173# endif
2174 int F77_DUMMY_MAIN() { return 1; }
2175#endif
2176int
2177main ()
2178{
2179
2180 ;
2181 return 0;
2182}
2183_ACEOF
2184rm -f conftest.o conftest.obj
2185if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2186 (eval $ac_compile) 2>&5
2187 ac_status=$?
2188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2189 (exit $ac_status); }; then
2190 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2191 case $ac_file in
2192 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2193 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2194 break;;
2195 esac
2196done
2197else
2198 echo "$as_me: failed program was:" >&5
2199cat conftest.$ac_ext >&5
2200{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2201echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2202 { (exit 1); exit 1; }; }
2203fi
2204
2205rm -f conftest.$ac_cv_objext conftest.$ac_ext
2206fi
2207echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2208echo "${ECHO_T}$ac_cv_objext" >&6
2209OBJEXT=$ac_cv_objext
2210ac_objext=$OBJEXT
2211echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2212echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2213if test "${ac_cv_c_compiler_gnu+set}" = set; then
2214 echo $ECHO_N "(cached) $ECHO_C" >&6
2215else
2216 cat >conftest.$ac_ext <<_ACEOF
2217#line $LINENO "configure"
2218#include "confdefs.h"
2219
2220#ifdef F77_DUMMY_MAIN
2221# ifdef __cplusplus
2222 extern "C"
2223# endif
2224 int F77_DUMMY_MAIN() { return 1; }
2225#endif
2226int
2227main ()
2228{
2229#ifndef __GNUC__
2230 choke me
2231#endif
2232
2233 ;
2234 return 0;
2235}
2236_ACEOF
2237rm -f conftest.$ac_objext
2238if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2239 (eval $ac_compile) 2>&5
2240 ac_status=$?
2241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2242 (exit $ac_status); } &&
2243 { ac_try='test -s conftest.$ac_objext'
2244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2245 (eval $ac_try) 2>&5
2246 ac_status=$?
2247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2248 (exit $ac_status); }; }; then
2249 ac_compiler_gnu=yes
2250else
2251 echo "$as_me: failed program was:" >&5
2252cat conftest.$ac_ext >&5
2253ac_compiler_gnu=no
2254fi
2255rm -f conftest.$ac_objext conftest.$ac_ext
2256ac_cv_c_compiler_gnu=$ac_compiler_gnu
2257
2258fi
2259echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2260echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2261GCC=`test $ac_compiler_gnu = yes && echo yes`
2262ac_test_CFLAGS=${CFLAGS+set}
2263ac_save_CFLAGS=$CFLAGS
2264CFLAGS="-g"
2265echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2266echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2267if test "${ac_cv_prog_cc_g+set}" = set; then
2268 echo $ECHO_N "(cached) $ECHO_C" >&6
2269else
2270 cat >conftest.$ac_ext <<_ACEOF
2271#line $LINENO "configure"
2272#include "confdefs.h"
2273
2274#ifdef F77_DUMMY_MAIN
2275# ifdef __cplusplus
2276 extern "C"
2277# endif
2278 int F77_DUMMY_MAIN() { return 1; }
2279#endif
2280int
2281main ()
2282{
2283
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288rm -f conftest.$ac_objext
2289if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2290 (eval $ac_compile) 2>&5
2291 ac_status=$?
2292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2293 (exit $ac_status); } &&
2294 { ac_try='test -s conftest.$ac_objext'
2295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2296 (eval $ac_try) 2>&5
2297 ac_status=$?
2298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2299 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002300 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002301else
Martin v. Löwis11437992002-04-12 09:54:03 +00002302 echo "$as_me: failed program was:" >&5
2303cat conftest.$ac_ext >&5
2304ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002305fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002306rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002307fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002308echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2309echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002310if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002311 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002312elif test $ac_cv_prog_cc_g = yes; then
2313 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002314 CFLAGS="-g -O2"
2315 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002316 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002317 fi
2318else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002319 if test "$GCC" = yes; then
2320 CFLAGS="-O2"
2321 else
2322 CFLAGS=
2323 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002324fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002325# Some people use a C++ compiler to compile C. Since we use `exit',
2326# in C++ we need to declare it. In case someone uses the same compiler
2327# for both compiling C and C++ we need to have the C++ compiler decide
2328# the declaration of exit, since it's the most demanding environment.
2329cat >conftest.$ac_ext <<_ACEOF
2330#ifndef __cplusplus
2331 choke me
2332#endif
2333_ACEOF
2334rm -f conftest.$ac_objext
2335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2336 (eval $ac_compile) 2>&5
2337 ac_status=$?
2338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2339 (exit $ac_status); } &&
2340 { ac_try='test -s conftest.$ac_objext'
2341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2342 (eval $ac_try) 2>&5
2343 ac_status=$?
2344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2345 (exit $ac_status); }; }; then
2346 for ac_declaration in \
2347 ''\
2348 '#include <stdlib.h>' \
2349 'extern "C" void std::exit (int) throw (); using std::exit;' \
2350 'extern "C" void std::exit (int); using std::exit;' \
2351 'extern "C" void exit (int) throw ();' \
2352 'extern "C" void exit (int);' \
2353 'void exit (int);'
2354do
2355 cat >conftest.$ac_ext <<_ACEOF
2356#line $LINENO "configure"
2357#include "confdefs.h"
2358#include <stdlib.h>
2359$ac_declaration
2360#ifdef F77_DUMMY_MAIN
2361# ifdef __cplusplus
2362 extern "C"
2363# endif
2364 int F77_DUMMY_MAIN() { return 1; }
2365#endif
2366int
2367main ()
2368{
2369exit (42);
2370 ;
2371 return 0;
2372}
2373_ACEOF
2374rm -f conftest.$ac_objext
2375if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2376 (eval $ac_compile) 2>&5
2377 ac_status=$?
2378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2379 (exit $ac_status); } &&
2380 { ac_try='test -s conftest.$ac_objext'
2381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2382 (eval $ac_try) 2>&5
2383 ac_status=$?
2384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2385 (exit $ac_status); }; }; then
2386 :
2387else
2388 echo "$as_me: failed program was:" >&5
2389cat conftest.$ac_ext >&5
2390continue
2391fi
2392rm -f conftest.$ac_objext conftest.$ac_ext
2393 cat >conftest.$ac_ext <<_ACEOF
2394#line $LINENO "configure"
2395#include "confdefs.h"
2396$ac_declaration
2397#ifdef F77_DUMMY_MAIN
2398# ifdef __cplusplus
2399 extern "C"
2400# endif
2401 int F77_DUMMY_MAIN() { return 1; }
2402#endif
2403int
2404main ()
2405{
2406exit (42);
2407 ;
2408 return 0;
2409}
2410_ACEOF
2411rm -f conftest.$ac_objext
2412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2413 (eval $ac_compile) 2>&5
2414 ac_status=$?
2415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2416 (exit $ac_status); } &&
2417 { ac_try='test -s conftest.$ac_objext'
2418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2419 (eval $ac_try) 2>&5
2420 ac_status=$?
2421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2422 (exit $ac_status); }; }; then
2423 break
2424else
2425 echo "$as_me: failed program was:" >&5
2426cat conftest.$ac_ext >&5
2427fi
2428rm -f conftest.$ac_objext conftest.$ac_ext
2429done
2430rm -f conftest*
2431if test -n "$ac_declaration"; then
2432 echo '#ifdef __cplusplus' >>confdefs.h
2433 echo $ac_declaration >>confdefs.h
2434 echo '#endif' >>confdefs.h
2435fi
2436
2437else
2438 echo "$as_me: failed program was:" >&5
2439cat conftest.$ac_ext >&5
2440fi
2441rm -f conftest.$ac_objext conftest.$ac_ext
2442ac_ext=c
2443ac_cpp='$CPP $CPPFLAGS'
2444ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2445ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2446ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002447
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002448
2449# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002450
2451ac_ext=c
2452ac_cpp='$CPP $CPPFLAGS'
2453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2455ac_compiler_gnu=$ac_cv_c_compiler_gnu
2456echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2457echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002458# On Suns, sometimes $CPP names a directory.
2459if test -n "$CPP" && test -d "$CPP"; then
2460 CPP=
2461fi
2462if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002463 if test "${ac_cv_prog_CPP+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002465else
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 # Double quotes because CPP needs to be expanded
2467 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2468 do
2469 ac_preproc_ok=false
2470for ac_c_preproc_warn_flag in '' yes
2471do
2472 # Use a header file that comes with gcc, so configuring glibc
2473 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002474 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 # not just through cpp. "Syntax error" is here to catch this case.
2476 cat >conftest.$ac_ext <<_ACEOF
2477#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002478#include "confdefs.h"
2479#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 Syntax error
2481_ACEOF
2482if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2483 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2484 ac_status=$?
2485 egrep -v '^ *\+' conftest.er1 >conftest.err
2486 rm -f conftest.er1
2487 cat conftest.err >&5
2488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2489 (exit $ac_status); } >/dev/null; then
2490 if test -s conftest.err; then
2491 ac_cpp_err=$ac_c_preproc_warn_flag
2492 else
2493 ac_cpp_err=
2494 fi
2495else
2496 ac_cpp_err=yes
2497fi
2498if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002499 :
2500else
Martin v. Löwis11437992002-04-12 09:54:03 +00002501 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002502 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 # Broken: fails on valid input.
2504continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002505fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002506rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002507
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 # OK, works on sane cases. Now check whether non-existent headers
2509 # can be detected and how.
2510 cat >conftest.$ac_ext <<_ACEOF
2511#line $LINENO "configure"
2512#include "confdefs.h"
2513#include <ac_nonexistent.h>
2514_ACEOF
2515if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2516 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2517 ac_status=$?
2518 egrep -v '^ *\+' conftest.er1 >conftest.err
2519 rm -f conftest.er1
2520 cat conftest.err >&5
2521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2522 (exit $ac_status); } >/dev/null; then
2523 if test -s conftest.err; then
2524 ac_cpp_err=$ac_c_preproc_warn_flag
2525 else
2526 ac_cpp_err=
2527 fi
2528else
2529 ac_cpp_err=yes
2530fi
2531if test -z "$ac_cpp_err"; then
2532 # Broken: success on invalid input.
2533continue
2534else
2535 echo "$as_me: failed program was:" >&5
2536 cat conftest.$ac_ext >&5
2537 # Passes both tests.
2538ac_preproc_ok=:
2539break
2540fi
2541rm -f conftest.err conftest.$ac_ext
2542
2543done
2544# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2545rm -f conftest.err conftest.$ac_ext
2546if $ac_preproc_ok; then
2547 break
2548fi
2549
2550 done
2551 ac_cv_prog_CPP=$CPP
2552
2553fi
2554 CPP=$ac_cv_prog_CPP
2555else
2556 ac_cv_prog_CPP=$CPP
2557fi
2558echo "$as_me:$LINENO: result: $CPP" >&5
2559echo "${ECHO_T}$CPP" >&6
2560ac_preproc_ok=false
2561for ac_c_preproc_warn_flag in '' yes
2562do
2563 # Use a header file that comes with gcc, so configuring glibc
2564 # with a fresh cross-compiler works.
2565 # On the NeXT, cc -E runs the code through the compiler's parser,
2566 # not just through cpp. "Syntax error" is here to catch this case.
2567 cat >conftest.$ac_ext <<_ACEOF
2568#line $LINENO "configure"
2569#include "confdefs.h"
2570#include <assert.h>
2571 Syntax error
2572_ACEOF
2573if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2574 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2575 ac_status=$?
2576 egrep -v '^ *\+' conftest.er1 >conftest.err
2577 rm -f conftest.er1
2578 cat conftest.err >&5
2579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2580 (exit $ac_status); } >/dev/null; then
2581 if test -s conftest.err; then
2582 ac_cpp_err=$ac_c_preproc_warn_flag
2583 else
2584 ac_cpp_err=
2585 fi
2586else
2587 ac_cpp_err=yes
2588fi
2589if test -z "$ac_cpp_err"; then
2590 :
2591else
2592 echo "$as_me: failed program was:" >&5
2593 cat conftest.$ac_ext >&5
2594 # Broken: fails on valid input.
2595continue
2596fi
2597rm -f conftest.err conftest.$ac_ext
2598
2599 # OK, works on sane cases. Now check whether non-existent headers
2600 # can be detected and how.
2601 cat >conftest.$ac_ext <<_ACEOF
2602#line $LINENO "configure"
2603#include "confdefs.h"
2604#include <ac_nonexistent.h>
2605_ACEOF
2606if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2607 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2608 ac_status=$?
2609 egrep -v '^ *\+' conftest.er1 >conftest.err
2610 rm -f conftest.er1
2611 cat conftest.err >&5
2612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2613 (exit $ac_status); } >/dev/null; then
2614 if test -s conftest.err; then
2615 ac_cpp_err=$ac_c_preproc_warn_flag
2616 else
2617 ac_cpp_err=
2618 fi
2619else
2620 ac_cpp_err=yes
2621fi
2622if test -z "$ac_cpp_err"; then
2623 # Broken: success on invalid input.
2624continue
2625else
2626 echo "$as_me: failed program was:" >&5
2627 cat conftest.$ac_ext >&5
2628 # Passes both tests.
2629ac_preproc_ok=:
2630break
2631fi
2632rm -f conftest.err conftest.$ac_ext
2633
2634done
2635# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2636rm -f conftest.err conftest.$ac_ext
2637if $ac_preproc_ok; then
2638 :
2639else
2640 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2641echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2642 { (exit 1); exit 1; }; }
2643fi
2644
2645ac_ext=c
2646ac_cpp='$CPP $CPPFLAGS'
2647ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2648ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2649ac_compiler_gnu=$ac_cv_c_compiler_gnu
2650
2651
2652
2653echo "$as_me:$LINENO: checking for AIX" >&5
2654echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2655cat >conftest.$ac_ext <<_ACEOF
2656#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002657#include "confdefs.h"
2658#ifdef _AIX
2659 yes
2660#endif
2661
Martin v. Löwis11437992002-04-12 09:54:03 +00002662_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002663if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2664 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 echo "$as_me:$LINENO: result: yes" >&5
2666echo "${ECHO_T}yes" >&6
2667cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002668#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002669_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002670
2671else
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 echo "$as_me:$LINENO: result: no" >&5
2673echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002674fi
2675rm -f conftest*
2676
Michael W. Hudson54241132001-12-07 15:38:26 +00002677
Martin v. Löwis11437992002-04-12 09:54:03 +00002678echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2679echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2680if test "${ac_cv_header_stdc+set}" = set; then
2681 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002682else
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 cat >conftest.$ac_ext <<_ACEOF
2684#line $LINENO "configure"
2685#include "confdefs.h"
2686#include <stdlib.h>
2687#include <stdarg.h>
2688#include <string.h>
2689#include <float.h>
2690
2691_ACEOF
2692if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2693 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2694 ac_status=$?
2695 egrep -v '^ *\+' conftest.er1 >conftest.err
2696 rm -f conftest.er1
2697 cat conftest.err >&5
2698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2699 (exit $ac_status); } >/dev/null; then
2700 if test -s conftest.err; then
2701 ac_cpp_err=$ac_c_preproc_warn_flag
2702 else
2703 ac_cpp_err=
2704 fi
2705else
2706 ac_cpp_err=yes
2707fi
2708if test -z "$ac_cpp_err"; then
2709 ac_cv_header_stdc=yes
2710else
2711 echo "$as_me: failed program was:" >&5
2712 cat conftest.$ac_ext >&5
2713 ac_cv_header_stdc=no
2714fi
2715rm -f conftest.err conftest.$ac_ext
2716
2717if test $ac_cv_header_stdc = yes; then
2718 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2719 cat >conftest.$ac_ext <<_ACEOF
2720#line $LINENO "configure"
2721#include "confdefs.h"
2722#include <string.h>
2723
2724_ACEOF
2725if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2726 egrep "memchr" >/dev/null 2>&1; then
2727 :
2728else
2729 ac_cv_header_stdc=no
2730fi
2731rm -f conftest*
2732
2733fi
2734
2735if test $ac_cv_header_stdc = yes; then
2736 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2737 cat >conftest.$ac_ext <<_ACEOF
2738#line $LINENO "configure"
2739#include "confdefs.h"
2740#include <stdlib.h>
2741
2742_ACEOF
2743if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2744 egrep "free" >/dev/null 2>&1; then
2745 :
2746else
2747 ac_cv_header_stdc=no
2748fi
2749rm -f conftest*
2750
2751fi
2752
2753if test $ac_cv_header_stdc = yes; then
2754 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2755 if test "$cross_compiling" = yes; then
2756 :
2757else
2758 cat >conftest.$ac_ext <<_ACEOF
2759#line $LINENO "configure"
2760#include "confdefs.h"
2761#include <ctype.h>
2762#if ((' ' & 0x0FF) == 0x020)
2763# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2764# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2765#else
2766# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2767 || ('j' <= (c) && (c) <= 'r') \
2768 || ('s' <= (c) && (c) <= 'z'))
2769# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2770#endif
2771
2772#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2773int
2774main ()
2775{
2776 int i;
2777 for (i = 0; i < 256; i++)
2778 if (XOR (islower (i), ISLOWER (i))
2779 || toupper (i) != TOUPPER (i))
2780 exit(2);
2781 exit (0);
2782}
2783_ACEOF
2784rm -f conftest$ac_exeext
2785if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2786 (eval $ac_link) 2>&5
2787 ac_status=$?
2788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2789 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2791 (eval $ac_try) 2>&5
2792 ac_status=$?
2793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2794 (exit $ac_status); }; }; then
2795 :
2796else
2797 echo "$as_me: program exited with status $ac_status" >&5
2798echo "$as_me: failed program was:" >&5
2799cat conftest.$ac_ext >&5
2800( exit $ac_status )
2801ac_cv_header_stdc=no
2802fi
2803rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2804fi
2805fi
2806fi
2807echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2808echo "${ECHO_T}$ac_cv_header_stdc" >&6
2809if test $ac_cv_header_stdc = yes; then
2810
2811cat >>confdefs.h <<\_ACEOF
2812#define STDC_HEADERS 1
2813_ACEOF
2814
2815fi
2816
2817# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2828 inttypes.h stdint.h unistd.h
2829do
2830as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2831echo "$as_me:$LINENO: checking for $ac_header" >&5
2832echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2833if eval "test \"\${$as_ac_Header+set}\" = set"; then
2834 echo $ECHO_N "(cached) $ECHO_C" >&6
2835else
2836 cat >conftest.$ac_ext <<_ACEOF
2837#line $LINENO "configure"
2838#include "confdefs.h"
2839$ac_includes_default
2840
2841#include <$ac_header>
2842_ACEOF
2843rm -f conftest.$ac_objext
2844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2845 (eval $ac_compile) 2>&5
2846 ac_status=$?
2847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2848 (exit $ac_status); } &&
2849 { ac_try='test -s conftest.$ac_objext'
2850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2851 (eval $ac_try) 2>&5
2852 ac_status=$?
2853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2854 (exit $ac_status); }; }; then
2855 eval "$as_ac_Header=yes"
2856else
2857 echo "$as_me: failed program was:" >&5
2858cat conftest.$ac_ext >&5
2859eval "$as_ac_Header=no"
2860fi
2861rm -f conftest.$ac_objext conftest.$ac_ext
2862fi
2863echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2864echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2865if test `eval echo '${'$as_ac_Header'}'` = yes; then
2866 cat >>confdefs.h <<_ACEOF
2867#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2868_ACEOF
2869
2870fi
2871
2872done
2873
2874
2875if test "${ac_cv_header_minix_config_h+set}" = set; then
2876 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2877echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2878if test "${ac_cv_header_minix_config_h+set}" = set; then
2879 echo $ECHO_N "(cached) $ECHO_C" >&6
2880fi
2881echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2882echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2883else
2884 # Is the header compilable?
2885echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2886echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2887cat >conftest.$ac_ext <<_ACEOF
2888#line $LINENO "configure"
2889#include "confdefs.h"
2890$ac_includes_default
2891#include <minix/config.h>
2892_ACEOF
2893rm -f conftest.$ac_objext
2894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2895 (eval $ac_compile) 2>&5
2896 ac_status=$?
2897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2898 (exit $ac_status); } &&
2899 { ac_try='test -s conftest.$ac_objext'
2900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2901 (eval $ac_try) 2>&5
2902 ac_status=$?
2903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2904 (exit $ac_status); }; }; then
2905 ac_header_compiler=yes
2906else
2907 echo "$as_me: failed program was:" >&5
2908cat conftest.$ac_ext >&5
2909ac_header_compiler=no
2910fi
2911rm -f conftest.$ac_objext conftest.$ac_ext
2912echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2913echo "${ECHO_T}$ac_header_compiler" >&6
2914
2915# Is the header present?
2916echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2917echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2918cat >conftest.$ac_ext <<_ACEOF
2919#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002920#include "confdefs.h"
2921#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002922_ACEOF
2923if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2924 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2925 ac_status=$?
2926 egrep -v '^ *\+' conftest.er1 >conftest.err
2927 rm -f conftest.er1
2928 cat conftest.err >&5
2929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2930 (exit $ac_status); } >/dev/null; then
2931 if test -s conftest.err; then
2932 ac_cpp_err=$ac_c_preproc_warn_flag
2933 else
2934 ac_cpp_err=
2935 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002936else
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 ac_cpp_err=yes
2938fi
2939if test -z "$ac_cpp_err"; then
2940 ac_header_preproc=yes
2941else
2942 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002943 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002944 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002945fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002946rm -f conftest.err conftest.$ac_ext
2947echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2948echo "${ECHO_T}$ac_header_preproc" >&6
2949
2950# So? What about this header?
2951case $ac_header_compiler:$ac_header_preproc in
2952 yes:no )
2953 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2954echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2955 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2956echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2957 no:yes )
2958 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2959echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2960 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2961echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2962 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2963echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2964esac
2965echo "$as_me:$LINENO: checking for minix/config.h" >&5
2966echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2967if test "${ac_cv_header_minix_config_h+set}" = set; then
2968 echo $ECHO_N "(cached) $ECHO_C" >&6
2969else
2970 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002971fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002972echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2973echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2974
2975fi
2976if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002977 MINIX=yes
2978else
Martin v. Löwis11437992002-04-12 09:54:03 +00002979 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002980fi
2981
Martin v. Löwis11437992002-04-12 09:54:03 +00002982
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002983if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002984
2985cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002986#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002987_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002988
Martin v. Löwis11437992002-04-12 09:54:03 +00002989
2990cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002991#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002992_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002993
Martin v. Löwis11437992002-04-12 09:54:03 +00002994
2995cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002996#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002997_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002998
2999fi
3000
3001
Michael W. Hudson54241132001-12-07 15:38:26 +00003002
Martin v. Löwis11437992002-04-12 09:54:03 +00003003echo "$as_me:$LINENO: checking for --with-suffix" >&5
3004echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003005
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003006# Check whether --with-suffix or --without-suffix was given.
3007if test "${with_suffix+set}" = set; then
3008 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003009
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003010 case $withval in
3011 no) EXEEXT=;;
3012 yes) EXEEXT=.exe;;
3013 *) EXEEXT=$withval;;
3014 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003015fi;
3016echo "$as_me:$LINENO: result: $EXEEXT" >&5
3017echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003018
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003019# Test whether we're running on a non-case-sensitive system, in which
3020# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003021
Martin v. Löwis11437992002-04-12 09:54:03 +00003022echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3023echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003024if test ! -d CaseSensitiveTestDir; then
3025mkdir CaseSensitiveTestDir
3026fi
3027
3028if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003029then
Martin v. Löwis11437992002-04-12 09:54:03 +00003030 echo "$as_me:$LINENO: result: yes" >&5
3031echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003032 BUILDEXEEXT=.exe
3033else
Martin v. Löwis11437992002-04-12 09:54:03 +00003034 echo "$as_me:$LINENO: result: no" >&5
3035echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003036 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003037fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003038rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003039
Guido van Rossumdd997f71998-10-07 19:58:26 +00003040case $MACHDEP in
3041bsdos*)
3042 case $CC in
3043 gcc) CC="$CC -D_HAVE_BSDI";;
3044 esac;;
3045esac
3046
Guido van Rossum24b1e751997-08-21 02:29:16 +00003047case $ac_sys_system in
3048hp*|HP*)
3049 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003050 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003051 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003052Monterey*)
3053 case $CC in
3054 cc) CC="$CC -Wl,-Bexport";;
3055 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003056SunOS*)
3057 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003058
3059cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003060#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003061_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003062
3063 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003064esac
3065
Michael W. Hudson54241132001-12-07 15:38:26 +00003066
3067
Martin v. Löwis11437992002-04-12 09:54:03 +00003068echo "$as_me:$LINENO: checking LIBRARY" >&5
3069echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003070if test -z "$LIBRARY"
3071then
3072 LIBRARY='libpython$(VERSION).a'
3073fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003074echo "$as_me:$LINENO: result: $LIBRARY" >&5
3075echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003076
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003077# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003078# name of the library into which to insert object files). BLDLIBRARY is also
3079# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3080# is blank as the main program is not linked directly against LDLIBRARY.
3081# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3082# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3083# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3084# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003085#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003086# RUNSHARED is used to run shared python without installed libraries
3087#
3088# INSTSONAME is the name of the shared library that will be use to install
3089# on the system - some systems like version suffix, others don't
3090
3091
Michael W. Hudson54241132001-12-07 15:38:26 +00003092
3093
3094
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003095
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003096LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003097BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003098INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003099DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003100LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003101RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003102
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003103# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003104# If CXX is set, and if it is needed to link a main function that was
3105# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3106# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003107# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003108# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003109
Martin v. Löwis11437992002-04-12 09:54:03 +00003110echo "$as_me:$LINENO: checking LINKCC" >&5
3111echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003112if test -z "$LINKCC"
3113then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003114 if test -z "$CXX"; then
3115 LINKCC="\$(PURIFY) \$(CC)"
3116 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003117 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003118 $CXX -c conftest.$ac_ext 2>&5
3119 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3120 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3121 then
3122 LINKCC="\$(PURIFY) \$(CC)"
3123 else
3124 LINKCC="\$(PURIFY) \$(CXX)"
3125 fi
3126 rm -fr conftest*
3127 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003128 case $ac_sys_system in
3129 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003130 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003131 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003132 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003133 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003134 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003135 esac
3136fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003137echo "$as_me:$LINENO: result: $LINKCC" >&5
3138echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003139
Martin v. Löwis11437992002-04-12 09:54:03 +00003140echo "$as_me:$LINENO: checking for --enable-shared" >&5
3141echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003142# Check whether --enable-shared or --disable-shared was given.
3143if test "${enable_shared+set}" = set; then
3144 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003145
Martin v. Löwis11437992002-04-12 09:54:03 +00003146fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003147
3148if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003149then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003150 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003151 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003152 enable_shared="yes";;
3153 *)
3154 enable_shared="no";;
3155 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003156fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003157echo "$as_me:$LINENO: result: $enable_shared" >&5
3158echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003159
3160
Martin v. Löwis11437992002-04-12 09:54:03 +00003161echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3162echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003163
Guido van Rossumb8552162001-09-05 14:58:11 +00003164# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3165# library that we build, but we do not want to link against it (we
3166# will find it with a -framework option). For this reason there is an
3167# extra variable BLDLIBRARY against which Python and the extension
3168# modules are linked, BLDLIBRARY. This is normally the same as
3169# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003170if test "$enable_framework"
3171then
3172 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3173 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3174 BLDLIBRARY=''
3175else
3176 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003177fi
Jack Jansene578a632001-08-15 01:27:14 +00003178
Martin v. Löwis1142de32002-03-29 16:28:31 +00003179# Other platforms follow
3180if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003181
3182cat >>confdefs.h <<\_ACEOF
3183#define Py_ENABLE_SHARED 1
3184_ACEOF
3185
Martin v. Löwis1142de32002-03-29 16:28:31 +00003186 case $ac_sys_system in
3187 BeOS*)
3188 LDLIBRARY='libpython$(VERSION).so'
3189 ;;
3190 CYGWIN*)
3191 LDLIBRARY='libpython$(VERSION).dll.a'
3192 DLLLIBRARY='libpython$(VERSION).dll'
3193 ;;
3194 SunOS*)
3195 LDLIBRARY='libpython$(VERSION).so'
3196 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3197 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3198 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003199 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003200 LDLIBRARY='libpython$(VERSION).so'
3201 BLDLIBRARY='-L. -lpython$(VERSION)'
3202 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3203 INSTSONAME="$LDLIBRARY".$SOVERSION
3204 ;;
3205 hp*|HP*)
3206 LDLIBRARY='libpython$(VERSION).sl'
3207 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3208 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3209 ;;
3210 OSF*)
3211 LDLIBRARY='libpython$(VERSION).so'
3212 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3213 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3214 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003215 atheos*)
3216 LDLIBRARY='libpython$(VERSION).so'
3217 BLDLIBRARY='-L. -lpython$(VERSION)'
3218 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3219 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003220 esac
3221 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3222 case $MACHDEP in
3223 dguxR4)
3224 LDLIBRARY='libpython$(VERSION).so'
3225 OPT="$OPT -pic"
3226 ;;
3227 esac
3228fi
3229
Martin v. Löwis11437992002-04-12 09:54:03 +00003230echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3231echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003232
Martin v. Löwis11437992002-04-12 09:54:03 +00003233if test -n "$ac_tool_prefix"; then
3234 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3235set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3236echo "$as_me:$LINENO: checking for $ac_word" >&5
3237echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3238if test "${ac_cv_prog_RANLIB+set}" = set; then
3239 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003240else
3241 if test -n "$RANLIB"; then
3242 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3243else
Martin v. Löwis11437992002-04-12 09:54:03 +00003244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3245for as_dir in $PATH
3246do
3247 IFS=$as_save_IFS
3248 test -z "$as_dir" && as_dir=.
3249 for ac_exec_ext in '' $ac_executable_extensions; do
3250 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3251 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3252 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3253 break 2
3254 fi
3255done
3256done
3257
Guido van Rossum627b2d71993-12-24 10:39:16 +00003258fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003259fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003260RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003261if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003262 echo "$as_me:$LINENO: result: $RANLIB" >&5
3263echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003264else
Martin v. Löwis11437992002-04-12 09:54:03 +00003265 echo "$as_me:$LINENO: result: no" >&5
3266echo "${ECHO_T}no" >&6
3267fi
3268
3269fi
3270if test -z "$ac_cv_prog_RANLIB"; then
3271 ac_ct_RANLIB=$RANLIB
3272 # Extract the first word of "ranlib", so it can be a program name with args.
3273set dummy ranlib; ac_word=$2
3274echo "$as_me:$LINENO: checking for $ac_word" >&5
3275echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3276if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3277 echo $ECHO_N "(cached) $ECHO_C" >&6
3278else
3279 if test -n "$ac_ct_RANLIB"; then
3280 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3281else
3282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3283for as_dir in $PATH
3284do
3285 IFS=$as_save_IFS
3286 test -z "$as_dir" && as_dir=.
3287 for ac_exec_ext in '' $ac_executable_extensions; do
3288 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3289 ac_cv_prog_ac_ct_RANLIB="ranlib"
3290 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3291 break 2
3292 fi
3293done
3294done
3295
3296 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3297fi
3298fi
3299ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3300if test -n "$ac_ct_RANLIB"; then
3301 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3302echo "${ECHO_T}$ac_ct_RANLIB" >&6
3303else
3304 echo "$as_me:$LINENO: result: no" >&5
3305echo "${ECHO_T}no" >&6
3306fi
3307
3308 RANLIB=$ac_ct_RANLIB
3309else
3310 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003311fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003312
3313
Guido van Rossum7f43da71994-08-01 12:15:30 +00003314for ac_prog in ar aal
3315do
Martin v. Löwis11437992002-04-12 09:54:03 +00003316 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003317set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003318echo "$as_me:$LINENO: checking for $ac_word" >&5
3319echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3320if test "${ac_cv_prog_AR+set}" = set; then
3321 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003322else
3323 if test -n "$AR"; then
3324 ac_cv_prog_AR="$AR" # Let the user override the test.
3325else
Martin v. Löwis11437992002-04-12 09:54:03 +00003326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3327for as_dir in $PATH
3328do
3329 IFS=$as_save_IFS
3330 test -z "$as_dir" && as_dir=.
3331 for ac_exec_ext in '' $ac_executable_extensions; do
3332 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3333 ac_cv_prog_AR="$ac_prog"
3334 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3335 break 2
3336 fi
3337done
3338done
3339
Guido van Rossum7f43da71994-08-01 12:15:30 +00003340fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003341fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003342AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003343if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003344 echo "$as_me:$LINENO: result: $AR" >&5
3345echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003346else
Martin v. Löwis11437992002-04-12 09:54:03 +00003347 echo "$as_me:$LINENO: result: no" >&5
3348echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003349fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003350
Martin v. Löwis11437992002-04-12 09:54:03 +00003351 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003352done
3353test -n "$AR" || AR="ar"
3354
Michael W. Hudson54241132001-12-07 15:38:26 +00003355
Neil Schemenauera42c8272001-03-31 00:01:55 +00003356case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003357bsdos*|hp*|HP*)
3358 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003359 if test -z "$INSTALL"
3360 then
3361 INSTALL="${srcdir}/install-sh -c"
3362 fi
3363esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003364ac_aux_dir=
3365for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3366 if test -f $ac_dir/install-sh; then
3367 ac_aux_dir=$ac_dir
3368 ac_install_sh="$ac_aux_dir/install-sh -c"
3369 break
3370 elif test -f $ac_dir/install.sh; then
3371 ac_aux_dir=$ac_dir
3372 ac_install_sh="$ac_aux_dir/install.sh -c"
3373 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003374 elif test -f $ac_dir/shtool; then
3375 ac_aux_dir=$ac_dir
3376 ac_install_sh="$ac_aux_dir/shtool install -c"
3377 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003378 fi
3379done
3380if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003381 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3382echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3383 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003384fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003385ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3386ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3387ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003388
3389# Find a good install program. We prefer a C program (faster),
3390# so one script is as good as another. But avoid the broken or
3391# incompatible versions:
3392# SysV /etc/install, /usr/sbin/install
3393# SunOS /usr/etc/install
3394# IRIX /sbin/install
3395# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003396# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003397# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3398# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3399# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3400# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003401echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3402echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003403if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003404if test "${ac_cv_path_install+set}" = set; then
3405 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003406else
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3408for as_dir in $PATH
3409do
3410 IFS=$as_save_IFS
3411 test -z "$as_dir" && as_dir=.
3412 # Account for people who put trailing slashes in PATH elements.
3413case $as_dir/ in
3414 ./ | .// | /cC/* | \
3415 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3416 /usr/ucb/* ) ;;
3417 *)
3418 # OSF1 and SCO ODT 3.0 have their own names for install.
3419 # Don't use installbsd from OSF since it installs stuff as root
3420 # by default.
3421 for ac_prog in ginstall scoinst install; do
3422 for ac_exec_ext in '' $ac_executable_extensions; do
3423 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3424 if test $ac_prog = install &&
3425 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3426 # AIX install. It has an incompatible calling convention.
3427 :
3428 elif test $ac_prog = install &&
3429 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3430 # program-specific install script used by HP pwplus--don't use.
3431 :
3432 else
3433 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3434 break 3
3435 fi
3436 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003437 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003438 done
3439 ;;
3440esac
3441done
3442
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003443
3444fi
3445 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003446 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003447 else
3448 # As a last resort, use the slow shell script. We don't cache a
3449 # path for INSTALL within a source directory, because that will
3450 # break other packages using the cache if that directory is
3451 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003452 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003453 fi
3454fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003455echo "$as_me:$LINENO: result: $INSTALL" >&5
3456echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003457
3458# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3459# It thinks the first close brace ends the variable substitution.
3460test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3461
Martin v. Löwis11437992002-04-12 09:54:03 +00003462test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003463
3464test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3465
Michael W. Hudson54241132001-12-07 15:38:26 +00003466
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003467# Not every filesystem supports hard links
3468
3469if test -z "$LN" ; then
3470 case $ac_sys_system in
3471 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003472 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003473 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003474 *) LN=ln;;
3475 esac
3476fi
3477
Fred Drake109d9862001-07-11 06:27:56 +00003478# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003479echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3480echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3481
Fred Drake109d9862001-07-11 06:27:56 +00003482# Check whether --with-pydebug or --without-pydebug was given.
3483if test "${with_pydebug+set}" = set; then
3484 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003485
Fred Drake109d9862001-07-11 06:27:56 +00003486if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003487then
3488
3489cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003490#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003491_ACEOF
3492
3493 echo "$as_me:$LINENO: result: yes" >&5
3494echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003495 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003496else echo "$as_me:$LINENO: result: no" >&5
3497echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003498fi
3499else
Martin v. Löwis11437992002-04-12 09:54:03 +00003500 echo "$as_me:$LINENO: result: no" >&5
3501echo "${ECHO_T}no" >&6
3502fi;
Fred Drake109d9862001-07-11 06:27:56 +00003503
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003504# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003505
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003506if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003507then
Neal Norwitzd957f392002-09-25 21:26:19 +00003508 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003509 yes)
3510 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003511 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003512 if test "$Py_DEBUG" = 'true' ; then
3513 # Optimization messes up debuggers, so turn it off for
3514 # debug builds.
3515 OPT="-g -Wall -Wstrict-prototypes"
3516 else
3517 OPT="-g -O3 -Wall -Wstrict-prototypes"
3518 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003519 *)
Fred Drake109d9862001-07-11 06:27:56 +00003520 OPT="-O3 -Wall -Wstrict-prototypes";;
3521 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003522 case $ac_sys_system in
3523 SCO_SV*) OPT="$OPT -m486 -DSCO5";;
3524 esac
Fred Drake109d9862001-07-11 06:27:56 +00003525 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003526 *)
3527 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003528 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003529 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003530 SCO_SV*)
3531 CFLAGS="$CFLAGS -belf"
3532 OPT="-belf -O -Ki486 -DSCO5";;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003533 *)
3534 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003535 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003536 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003537 case $ac_sys_system in
3538 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003539 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003540 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003541fi
3542
Fred Drakee1ceaa02001-12-04 20:55:47 +00003543if test "$Py_DEBUG" = 'true'; then
3544 :
3545else
3546 OPT="-DNDEBUG $OPT"
3547fi
3548
Trent Mick635f6fb2000-08-23 21:33:05 +00003549# The current (beta) Monterey compiler dies with optimizations
3550case $ac_sys_system in
3551Monterey*) OPT="";;
3552esac
3553
Guido van Rossum563e7081996-09-10 18:20:48 +00003554if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003555then
3556 OPT="$OPT $ac_arch_flags"
3557fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003558
Martin v. Löwis11437992002-04-12 09:54:03 +00003559echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3560echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3561if test "${ac_cv_opt_olimit_ok+set}" = set; then
3562 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003563else
3564 ac_save_cc="$CC"
3565CC="$CC -OPT:Olimit=0"
3566if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003567 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003568else
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 cat >conftest.$ac_ext <<_ACEOF
3570#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003571#include "confdefs.h"
3572int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003573_ACEOF
3574rm -f conftest$ac_exeext
3575if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3576 (eval $ac_link) 2>&5
3577 ac_status=$?
3578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3579 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3581 (eval $ac_try) 2>&5
3582 ac_status=$?
3583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3584 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003585 ac_cv_opt_olimit_ok=yes
3586else
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 echo "$as_me: program exited with status $ac_status" >&5
3588echo "$as_me: failed program was:" >&5
3589cat conftest.$ac_ext >&5
3590( exit $ac_status )
3591ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003592fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003593rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003594fi
Guido van Rossum91922671997-10-09 20:24:13 +00003595CC="$ac_save_cc"
3596fi
3597
Martin v. Löwis11437992002-04-12 09:54:03 +00003598echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3599echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003600if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003601 case $ac_sys_system in
3602 Darwin*) OPT="$OPT" ;;
3603 *) OPT="$OPT -OPT:Olimit=0";;
3604 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003605else
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3607echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3608 if test "${ac_cv_olimit_ok+set}" = set; then
3609 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003610else
3611 ac_save_cc="$CC"
3612 CC="$CC -Olimit 1500"
3613 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003614 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003615else
Martin v. Löwis11437992002-04-12 09:54:03 +00003616 cat >conftest.$ac_ext <<_ACEOF
3617#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003618#include "confdefs.h"
3619int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003620_ACEOF
3621rm -f conftest$ac_exeext
3622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3623 (eval $ac_link) 2>&5
3624 ac_status=$?
3625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3626 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3628 (eval $ac_try) 2>&5
3629 ac_status=$?
3630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3631 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003632 ac_cv_olimit_ok=yes
3633else
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 echo "$as_me: program exited with status $ac_status" >&5
3635echo "$as_me: failed program was:" >&5
3636cat conftest.$ac_ext >&5
3637( exit $ac_status )
3638ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003639fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003640rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003641fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003642 CC="$ac_save_cc"
3643fi
3644
Martin v. Löwis11437992002-04-12 09:54:03 +00003645 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3646echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003647 if test $ac_cv_olimit_ok = yes; then
3648 OPT="$OPT -Olimit 1500"
3649 fi
3650fi
3651
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003652# On some compilers, pthreads are available without further options
3653# (e.g. MacOS X). On some of these systems, the compiler will not
3654# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3655# So we have to see first whether pthreads are available without
3656# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003657echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3658echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3659if test "${ac_cv_pthread_is_default+set}" = set; then
3660 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003661else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003662 if test "$cross_compiling" = yes; then
3663 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003664else
Martin v. Löwis11437992002-04-12 09:54:03 +00003665 cat >conftest.$ac_ext <<_ACEOF
3666#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003667#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003668
Martin v. Löwis130fb172001-07-19 11:00:41 +00003669#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003670
3671void* routine(void* p){return NULL;}
3672
3673int main(){
3674 pthread_t p;
3675 if(pthread_create(&p,NULL,routine,NULL)!=0)
3676 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003677 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003678 return 0;
3679}
3680
Martin v. Löwis11437992002-04-12 09:54:03 +00003681_ACEOF
3682rm -f conftest$ac_exeext
3683if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3684 (eval $ac_link) 2>&5
3685 ac_status=$?
3686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3687 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3689 (eval $ac_try) 2>&5
3690 ac_status=$?
3691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3692 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003693 ac_cv_pthread_is_default=yes
3694else
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 echo "$as_me: program exited with status $ac_status" >&5
3696echo "$as_me: failed program was:" >&5
3697cat conftest.$ac_ext >&5
3698( exit $ac_status )
3699ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003700fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003701rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003702fi
3703
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003704fi
3705
Martin v. Löwis11437992002-04-12 09:54:03 +00003706echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3707echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003708
Michael W. Hudson54241132001-12-07 15:38:26 +00003709
Martin v. Löwis11437992002-04-12 09:54:03 +00003710if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003711then
3712 ac_cv_kpthread=no
3713else
3714# -Kpthread, if available, provides the right #defines
3715# and linker options to make pthread_create available
3716# Some compilers won't report that they do not support -Kpthread,
3717# so we need to run a program to see whether it really made the
3718# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003719echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3720echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3721if test "${ac_cv_kpthread+set}" = set; then
3722 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003723else
3724 ac_save_cc="$CC"
3725CC="$CC -Kpthread"
3726if test "$cross_compiling" = yes; then
3727 ac_cv_kpthread=no
3728else
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 cat >conftest.$ac_ext <<_ACEOF
3730#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003731#include "confdefs.h"
3732
3733#include <pthread.h>
3734
3735void* routine(void* p){return NULL;}
3736
3737int main(){
3738 pthread_t p;
3739 if(pthread_create(&p,NULL,routine,NULL)!=0)
3740 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003741 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003742 return 0;
3743}
3744
Martin v. Löwis11437992002-04-12 09:54:03 +00003745_ACEOF
3746rm -f conftest$ac_exeext
3747if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3748 (eval $ac_link) 2>&5
3749 ac_status=$?
3750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3751 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3753 (eval $ac_try) 2>&5
3754 ac_status=$?
3755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3756 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003757 ac_cv_kpthread=yes
3758else
Martin v. Löwis11437992002-04-12 09:54:03 +00003759 echo "$as_me: program exited with status $ac_status" >&5
3760echo "$as_me: failed program was:" >&5
3761cat conftest.$ac_ext >&5
3762( exit $ac_status )
3763ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003764fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003765rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003766fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003767CC="$ac_save_cc"
3768fi
3769
Martin v. Löwis11437992002-04-12 09:54:03 +00003770echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3771echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003772fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003773
Michael W. Hudson54241132001-12-07 15:38:26 +00003774
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003775# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003776echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3777echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3778if test "${ac_cv_header_stdc+set}" = set; then
3779 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003780else
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 cat >conftest.$ac_ext <<_ACEOF
3782#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003783#include "confdefs.h"
3784#include <stdlib.h>
3785#include <stdarg.h>
3786#include <string.h>
3787#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003788
3789_ACEOF
3790if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3791 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3792 ac_status=$?
3793 egrep -v '^ *\+' conftest.er1 >conftest.err
3794 rm -f conftest.er1
3795 cat conftest.err >&5
3796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3797 (exit $ac_status); } >/dev/null; then
3798 if test -s conftest.err; then
3799 ac_cpp_err=$ac_c_preproc_warn_flag
3800 else
3801 ac_cpp_err=
3802 fi
3803else
3804 ac_cpp_err=yes
3805fi
3806if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003807 ac_cv_header_stdc=yes
3808else
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003810 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003811 ac_cv_header_stdc=no
3812fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003813rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003814
3815if test $ac_cv_header_stdc = yes; then
3816 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003817 cat >conftest.$ac_ext <<_ACEOF
3818#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003819#include "confdefs.h"
3820#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003821
3822_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3824 egrep "memchr" >/dev/null 2>&1; then
3825 :
3826else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003827 ac_cv_header_stdc=no
3828fi
3829rm -f conftest*
3830
3831fi
3832
3833if test $ac_cv_header_stdc = yes; then
3834 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 cat >conftest.$ac_ext <<_ACEOF
3836#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003837#include "confdefs.h"
3838#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003839
3840_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3842 egrep "free" >/dev/null 2>&1; then
3843 :
3844else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003845 ac_cv_header_stdc=no
3846fi
3847rm -f conftest*
3848
3849fi
3850
3851if test $ac_cv_header_stdc = yes; then
3852 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003853 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003854 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003855else
Martin v. Löwis11437992002-04-12 09:54:03 +00003856 cat >conftest.$ac_ext <<_ACEOF
3857#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003858#include "confdefs.h"
3859#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003860#if ((' ' & 0x0FF) == 0x020)
3861# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3862# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3863#else
3864# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3865 || ('j' <= (c) && (c) <= 'r') \
3866 || ('s' <= (c) && (c) <= 'z'))
3867# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3868#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3871int
3872main ()
3873{
3874 int i;
3875 for (i = 0; i < 256; i++)
3876 if (XOR (islower (i), ISLOWER (i))
3877 || toupper (i) != TOUPPER (i))
3878 exit(2);
3879 exit (0);
3880}
3881_ACEOF
3882rm -f conftest$ac_exeext
3883if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3884 (eval $ac_link) 2>&5
3885 ac_status=$?
3886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3887 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3889 (eval $ac_try) 2>&5
3890 ac_status=$?
3891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3892 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003893 :
3894else
Martin v. Löwis11437992002-04-12 09:54:03 +00003895 echo "$as_me: program exited with status $ac_status" >&5
3896echo "$as_me: failed program was:" >&5
3897cat conftest.$ac_ext >&5
3898( exit $ac_status )
3899ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003900fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003901rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003902fi
3903fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003904fi
3905echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3906echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003907if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003908
3909cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003910#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003911_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003912
3913fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003914
Martin v. Löwis11437992002-04-12 09:54:03 +00003915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
Martin v. Löwis11437992002-04-12 09:54:03 +00003952for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003953libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003954signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003955sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003956sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00003957sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003958sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003959do
Martin v. Löwis11437992002-04-12 09:54:03 +00003960as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3961if eval "test \"\${$as_ac_Header+set}\" = set"; then
3962 echo "$as_me:$LINENO: checking for $ac_header" >&5
3963echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3964if eval "test \"\${$as_ac_Header+set}\" = set"; then
3965 echo $ECHO_N "(cached) $ECHO_C" >&6
3966fi
3967echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3968echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003969else
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 # Is the header compilable?
3971echo "$as_me:$LINENO: checking $ac_header usability" >&5
3972echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3973cat >conftest.$ac_ext <<_ACEOF
3974#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003975#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003976$ac_includes_default
3977#include <$ac_header>
3978_ACEOF
3979rm -f conftest.$ac_objext
3980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3981 (eval $ac_compile) 2>&5
3982 ac_status=$?
3983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3984 (exit $ac_status); } &&
3985 { ac_try='test -s conftest.$ac_objext'
3986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3987 (eval $ac_try) 2>&5
3988 ac_status=$?
3989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3990 (exit $ac_status); }; }; then
3991 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003992else
Martin v. Löwis11437992002-04-12 09:54:03 +00003993 echo "$as_me: failed program was:" >&5
3994cat conftest.$ac_ext >&5
3995ac_header_compiler=no
3996fi
3997rm -f conftest.$ac_objext conftest.$ac_ext
3998echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3999echo "${ECHO_T}$ac_header_compiler" >&6
4000
4001# Is the header present?
4002echo "$as_me:$LINENO: checking $ac_header presence" >&5
4003echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4004cat >conftest.$ac_ext <<_ACEOF
4005#line $LINENO "configure"
4006#include "confdefs.h"
4007#include <$ac_header>
4008_ACEOF
4009if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4010 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4011 ac_status=$?
4012 egrep -v '^ *\+' conftest.er1 >conftest.err
4013 rm -f conftest.er1
4014 cat conftest.err >&5
4015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4016 (exit $ac_status); } >/dev/null; then
4017 if test -s conftest.err; then
4018 ac_cpp_err=$ac_c_preproc_warn_flag
4019 else
4020 ac_cpp_err=
4021 fi
4022else
4023 ac_cpp_err=yes
4024fi
4025if test -z "$ac_cpp_err"; then
4026 ac_header_preproc=yes
4027else
4028 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004029 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004030 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004031fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004032rm -f conftest.err conftest.$ac_ext
4033echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4034echo "${ECHO_T}$ac_header_preproc" >&6
4035
4036# So? What about this header?
4037case $ac_header_compiler:$ac_header_preproc in
4038 yes:no )
4039 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4040echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4041 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4042echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4043 no:yes )
4044 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4045echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4046 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4047echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4048 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4049echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4050esac
4051echo "$as_me:$LINENO: checking for $ac_header" >&5
4052echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4053if eval "test \"\${$as_ac_Header+set}\" = set"; then
4054 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004055else
Martin v. Löwis11437992002-04-12 09:54:03 +00004056 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004057fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004058echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4059echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4060
4061fi
4062if test `eval echo '${'$as_ac_Header'}'` = yes; then
4063 cat >>confdefs.h <<_ACEOF
4064#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4065_ACEOF
4066
4067fi
4068
Guido van Rossum627b2d71993-12-24 10:39:16 +00004069done
4070
Martin v. Löwis11437992002-04-12 09:54:03 +00004071
4072
4073
4074
4075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004076ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004077for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4078 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4079echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4080echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4081if eval "test \"\${$as_ac_Header+set}\" = set"; then
4082 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004083else
Martin v. Löwis11437992002-04-12 09:54:03 +00004084 cat >conftest.$ac_ext <<_ACEOF
4085#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004086#include "confdefs.h"
4087#include <sys/types.h>
4088#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004089
4090#ifdef F77_DUMMY_MAIN
4091# ifdef __cplusplus
4092 extern "C"
4093# endif
4094 int F77_DUMMY_MAIN() { return 1; }
4095#endif
4096int
4097main ()
4098{
4099if ((DIR *) 0)
4100return 0;
4101 ;
4102 return 0;
4103}
4104_ACEOF
4105rm -f conftest.$ac_objext
4106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4107 (eval $ac_compile) 2>&5
4108 ac_status=$?
4109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4110 (exit $ac_status); } &&
4111 { ac_try='test -s conftest.$ac_objext'
4112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4113 (eval $ac_try) 2>&5
4114 ac_status=$?
4115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4116 (exit $ac_status); }; }; then
4117 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004118else
Martin v. Löwis11437992002-04-12 09:54:03 +00004119 echo "$as_me: failed program was:" >&5
4120cat conftest.$ac_ext >&5
4121eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004122fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004123rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004124fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004125echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4126echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4127if test `eval echo '${'$as_ac_Header'}'` = yes; then
4128 cat >>confdefs.h <<_ACEOF
4129#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4130_ACEOF
4131
4132ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004133fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004134
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004135done
4136# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4137if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004138 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4139echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4140if test "${ac_cv_search_opendir+set}" = set; then
4141 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004142else
Martin v. Löwis11437992002-04-12 09:54:03 +00004143 ac_func_search_save_LIBS=$LIBS
4144ac_cv_search_opendir=no
4145cat >conftest.$ac_ext <<_ACEOF
4146#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004147#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004148
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004149/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004150#ifdef __cplusplus
4151extern "C"
4152#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004153/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004154 builtin and then its argument prototype would still apply. */
4155char opendir ();
4156#ifdef F77_DUMMY_MAIN
4157# ifdef __cplusplus
4158 extern "C"
4159# endif
4160 int F77_DUMMY_MAIN() { return 1; }
4161#endif
4162int
4163main ()
4164{
4165opendir ();
4166 ;
4167 return 0;
4168}
4169_ACEOF
4170rm -f conftest.$ac_objext conftest$ac_exeext
4171if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4172 (eval $ac_link) 2>&5
4173 ac_status=$?
4174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4175 (exit $ac_status); } &&
4176 { ac_try='test -s conftest$ac_exeext'
4177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4178 (eval $ac_try) 2>&5
4179 ac_status=$?
4180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4181 (exit $ac_status); }; }; then
4182 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183else
Martin v. Löwis11437992002-04-12 09:54:03 +00004184 echo "$as_me: failed program was:" >&5
4185cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004186fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004187rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4188if test "$ac_cv_search_opendir" = no; then
4189 for ac_lib in dir; do
4190 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4191 cat >conftest.$ac_ext <<_ACEOF
4192#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004193#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004194
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004195/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004196#ifdef __cplusplus
4197extern "C"
4198#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004199/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004200 builtin and then its argument prototype would still apply. */
4201char opendir ();
4202#ifdef F77_DUMMY_MAIN
4203# ifdef __cplusplus
4204 extern "C"
4205# endif
4206 int F77_DUMMY_MAIN() { return 1; }
4207#endif
4208int
4209main ()
4210{
4211opendir ();
4212 ;
4213 return 0;
4214}
4215_ACEOF
4216rm -f conftest.$ac_objext conftest$ac_exeext
4217if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4218 (eval $ac_link) 2>&5
4219 ac_status=$?
4220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4221 (exit $ac_status); } &&
4222 { ac_try='test -s conftest$ac_exeext'
4223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4224 (eval $ac_try) 2>&5
4225 ac_status=$?
4226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4227 (exit $ac_status); }; }; then
4228 ac_cv_search_opendir="-l$ac_lib"
4229break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004230else
Martin v. Löwis11437992002-04-12 09:54:03 +00004231 echo "$as_me: failed program was:" >&5
4232cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004233fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004234rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4235 done
4236fi
4237LIBS=$ac_func_search_save_LIBS
4238fi
4239echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4240echo "${ECHO_T}$ac_cv_search_opendir" >&6
4241if test "$ac_cv_search_opendir" != no; then
4242 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004243
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004245
Michael W. Hudson54241132001-12-07 15:38:26 +00004246else
Martin v. Löwis11437992002-04-12 09:54:03 +00004247 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4248echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4249if test "${ac_cv_search_opendir+set}" = set; then
4250 echo $ECHO_N "(cached) $ECHO_C" >&6
4251else
4252 ac_func_search_save_LIBS=$LIBS
4253ac_cv_search_opendir=no
4254cat >conftest.$ac_ext <<_ACEOF
4255#line $LINENO "configure"
4256#include "confdefs.h"
4257
4258/* Override any gcc2 internal prototype to avoid an error. */
4259#ifdef __cplusplus
4260extern "C"
4261#endif
4262/* We use char because int might match the return type of a gcc2
4263 builtin and then its argument prototype would still apply. */
4264char opendir ();
4265#ifdef F77_DUMMY_MAIN
4266# ifdef __cplusplus
4267 extern "C"
4268# endif
4269 int F77_DUMMY_MAIN() { return 1; }
4270#endif
4271int
4272main ()
4273{
4274opendir ();
4275 ;
4276 return 0;
4277}
4278_ACEOF
4279rm -f conftest.$ac_objext conftest$ac_exeext
4280if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4281 (eval $ac_link) 2>&5
4282 ac_status=$?
4283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4284 (exit $ac_status); } &&
4285 { ac_try='test -s conftest$ac_exeext'
4286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4287 (eval $ac_try) 2>&5
4288 ac_status=$?
4289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4290 (exit $ac_status); }; }; then
4291 ac_cv_search_opendir="none required"
4292else
4293 echo "$as_me: failed program was:" >&5
4294cat conftest.$ac_ext >&5
4295fi
4296rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4297if test "$ac_cv_search_opendir" = no; then
4298 for ac_lib in x; do
4299 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4300 cat >conftest.$ac_ext <<_ACEOF
4301#line $LINENO "configure"
4302#include "confdefs.h"
4303
4304/* Override any gcc2 internal prototype to avoid an error. */
4305#ifdef __cplusplus
4306extern "C"
4307#endif
4308/* We use char because int might match the return type of a gcc2
4309 builtin and then its argument prototype would still apply. */
4310char opendir ();
4311#ifdef F77_DUMMY_MAIN
4312# ifdef __cplusplus
4313 extern "C"
4314# endif
4315 int F77_DUMMY_MAIN() { return 1; }
4316#endif
4317int
4318main ()
4319{
4320opendir ();
4321 ;
4322 return 0;
4323}
4324_ACEOF
4325rm -f conftest.$ac_objext conftest$ac_exeext
4326if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4327 (eval $ac_link) 2>&5
4328 ac_status=$?
4329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4330 (exit $ac_status); } &&
4331 { ac_try='test -s conftest$ac_exeext'
4332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4333 (eval $ac_try) 2>&5
4334 ac_status=$?
4335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4336 (exit $ac_status); }; }; then
4337 ac_cv_search_opendir="-l$ac_lib"
4338break
4339else
4340 echo "$as_me: failed program was:" >&5
4341cat conftest.$ac_ext >&5
4342fi
4343rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4344 done
4345fi
4346LIBS=$ac_func_search_save_LIBS
4347fi
4348echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4349echo "${ECHO_T}$ac_cv_search_opendir" >&6
4350if test "$ac_cv_search_opendir" != no; then
4351 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4352
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004353fi
4354
4355fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004356
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004357echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4358echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4359if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4360 echo $ECHO_N "(cached) $ECHO_C" >&6
4361else
4362 cat >conftest.$ac_ext <<_ACEOF
4363#line $LINENO "configure"
4364#include "confdefs.h"
4365#include <sys/types.h>
4366#ifdef F77_DUMMY_MAIN
4367# ifdef __cplusplus
4368 extern "C"
4369# endif
4370 int F77_DUMMY_MAIN() { return 1; }
4371#endif
4372int
4373main ()
4374{
4375return makedev(0, 0);
4376 ;
4377 return 0;
4378}
4379_ACEOF
4380rm -f conftest.$ac_objext conftest$ac_exeext
4381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4382 (eval $ac_link) 2>&5
4383 ac_status=$?
4384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4385 (exit $ac_status); } &&
4386 { ac_try='test -s conftest$ac_exeext'
4387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4388 (eval $ac_try) 2>&5
4389 ac_status=$?
4390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4391 (exit $ac_status); }; }; then
4392 ac_cv_header_sys_types_h_makedev=yes
4393else
4394 echo "$as_me: failed program was:" >&5
4395cat conftest.$ac_ext >&5
4396ac_cv_header_sys_types_h_makedev=no
4397fi
4398rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4399
4400fi
4401echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4402echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4403
4404if test $ac_cv_header_sys_types_h_makedev = no; then
4405if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4406 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4407echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4408if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4409 echo $ECHO_N "(cached) $ECHO_C" >&6
4410fi
4411echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4412echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4413else
4414 # Is the header compilable?
4415echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4416echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4417cat >conftest.$ac_ext <<_ACEOF
4418#line $LINENO "configure"
4419#include "confdefs.h"
4420$ac_includes_default
4421#include <sys/mkdev.h>
4422_ACEOF
4423rm -f conftest.$ac_objext
4424if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4425 (eval $ac_compile) 2>&5
4426 ac_status=$?
4427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4428 (exit $ac_status); } &&
4429 { ac_try='test -s conftest.$ac_objext'
4430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4431 (eval $ac_try) 2>&5
4432 ac_status=$?
4433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4434 (exit $ac_status); }; }; then
4435 ac_header_compiler=yes
4436else
4437 echo "$as_me: failed program was:" >&5
4438cat conftest.$ac_ext >&5
4439ac_header_compiler=no
4440fi
4441rm -f conftest.$ac_objext conftest.$ac_ext
4442echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4443echo "${ECHO_T}$ac_header_compiler" >&6
4444
4445# Is the header present?
4446echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4447echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4448cat >conftest.$ac_ext <<_ACEOF
4449#line $LINENO "configure"
4450#include "confdefs.h"
4451#include <sys/mkdev.h>
4452_ACEOF
4453if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4454 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4455 ac_status=$?
4456 egrep -v '^ *\+' conftest.er1 >conftest.err
4457 rm -f conftest.er1
4458 cat conftest.err >&5
4459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4460 (exit $ac_status); } >/dev/null; then
4461 if test -s conftest.err; then
4462 ac_cpp_err=$ac_c_preproc_warn_flag
4463 else
4464 ac_cpp_err=
4465 fi
4466else
4467 ac_cpp_err=yes
4468fi
4469if test -z "$ac_cpp_err"; then
4470 ac_header_preproc=yes
4471else
4472 echo "$as_me: failed program was:" >&5
4473 cat conftest.$ac_ext >&5
4474 ac_header_preproc=no
4475fi
4476rm -f conftest.err conftest.$ac_ext
4477echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4478echo "${ECHO_T}$ac_header_preproc" >&6
4479
4480# So? What about this header?
4481case $ac_header_compiler:$ac_header_preproc in
4482 yes:no )
4483 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4484echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4485 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4486echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4487 no:yes )
4488 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4489echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4490 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4491echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4492 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4493echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4494esac
4495echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4496echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4497if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4498 echo $ECHO_N "(cached) $ECHO_C" >&6
4499else
4500 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4501fi
4502echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4503echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4504
4505fi
4506if test $ac_cv_header_sys_mkdev_h = yes; then
4507
4508cat >>confdefs.h <<\_ACEOF
4509#define MAJOR_IN_MKDEV 1
4510_ACEOF
4511
4512fi
4513
4514
4515
4516 if test $ac_cv_header_sys_mkdev_h = no; then
4517 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4518 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4519echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4520if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4521 echo $ECHO_N "(cached) $ECHO_C" >&6
4522fi
4523echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4524echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4525else
4526 # Is the header compilable?
4527echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4528echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4529cat >conftest.$ac_ext <<_ACEOF
4530#line $LINENO "configure"
4531#include "confdefs.h"
4532$ac_includes_default
4533#include <sys/sysmacros.h>
4534_ACEOF
4535rm -f conftest.$ac_objext
4536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4537 (eval $ac_compile) 2>&5
4538 ac_status=$?
4539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4540 (exit $ac_status); } &&
4541 { ac_try='test -s conftest.$ac_objext'
4542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4543 (eval $ac_try) 2>&5
4544 ac_status=$?
4545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4546 (exit $ac_status); }; }; then
4547 ac_header_compiler=yes
4548else
4549 echo "$as_me: failed program was:" >&5
4550cat conftest.$ac_ext >&5
4551ac_header_compiler=no
4552fi
4553rm -f conftest.$ac_objext conftest.$ac_ext
4554echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4555echo "${ECHO_T}$ac_header_compiler" >&6
4556
4557# Is the header present?
4558echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4559echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4560cat >conftest.$ac_ext <<_ACEOF
4561#line $LINENO "configure"
4562#include "confdefs.h"
4563#include <sys/sysmacros.h>
4564_ACEOF
4565if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4566 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4567 ac_status=$?
4568 egrep -v '^ *\+' conftest.er1 >conftest.err
4569 rm -f conftest.er1
4570 cat conftest.err >&5
4571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4572 (exit $ac_status); } >/dev/null; then
4573 if test -s conftest.err; then
4574 ac_cpp_err=$ac_c_preproc_warn_flag
4575 else
4576 ac_cpp_err=
4577 fi
4578else
4579 ac_cpp_err=yes
4580fi
4581if test -z "$ac_cpp_err"; then
4582 ac_header_preproc=yes
4583else
4584 echo "$as_me: failed program was:" >&5
4585 cat conftest.$ac_ext >&5
4586 ac_header_preproc=no
4587fi
4588rm -f conftest.err conftest.$ac_ext
4589echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4590echo "${ECHO_T}$ac_header_preproc" >&6
4591
4592# So? What about this header?
4593case $ac_header_compiler:$ac_header_preproc in
4594 yes:no )
4595 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4596echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4597 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4598echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4599 no:yes )
4600 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4601echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4602 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4603echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4604 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4605echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4606esac
4607echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4608echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4609if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4610 echo $ECHO_N "(cached) $ECHO_C" >&6
4611else
4612 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4613fi
4614echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4615echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4616
4617fi
4618if test $ac_cv_header_sys_sysmacros_h = yes; then
4619
4620cat >>confdefs.h <<\_ACEOF
4621#define MAJOR_IN_SYSMACROS 1
4622_ACEOF
4623
4624fi
4625
4626
4627 fi
4628fi
4629
Michael W. Hudson54241132001-12-07 15:38:26 +00004630
Guido van Rossum627b2d71993-12-24 10:39:16 +00004631# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004632was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004633echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4634echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4635cat >conftest.$ac_ext <<_ACEOF
4636#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004637#include "confdefs.h"
4638#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004639
4640_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4642 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004643 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004644else
Martin v. Löwis11437992002-04-12 09:54:03 +00004645
4646
4647cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004648#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004649_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004650
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004651
Guido van Rossum627b2d71993-12-24 10:39:16 +00004652fi
4653rm -f conftest*
4654
Martin v. Löwis11437992002-04-12 09:54:03 +00004655echo "$as_me:$LINENO: result: $was_it_defined" >&5
4656echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004657
Neal Norwitz11690112002-07-30 01:08:28 +00004658# Check whether using makedev requires defining _OSF_SOURCE
4659echo "$as_me:$LINENO: checking for makedev" >&5
4660echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4661cat >conftest.$ac_ext <<_ACEOF
4662#line $LINENO "configure"
4663#include "confdefs.h"
4664 #include <sys/types.h>
4665#ifdef F77_DUMMY_MAIN
4666# ifdef __cplusplus
4667 extern "C"
4668# endif
4669 int F77_DUMMY_MAIN() { return 1; }
4670#endif
4671int
4672main ()
4673{
4674 makedev(0, 0)
4675 ;
4676 return 0;
4677}
4678_ACEOF
4679rm -f conftest.$ac_objext conftest$ac_exeext
4680if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4681 (eval $ac_link) 2>&5
4682 ac_status=$?
4683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4684 (exit $ac_status); } &&
4685 { ac_try='test -s conftest$ac_exeext'
4686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4687 (eval $ac_try) 2>&5
4688 ac_status=$?
4689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4690 (exit $ac_status); }; }; then
4691 ac_cv_has_makedev=yes
4692else
4693 echo "$as_me: failed program was:" >&5
4694cat conftest.$ac_ext >&5
4695ac_cv_has_makedev=no
4696fi
4697rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4698if test "$ac_cv_has_makedev" = "no"; then
4699 # we didn't link, try if _OSF_SOURCE will allow us to link
4700 cat >conftest.$ac_ext <<_ACEOF
4701#line $LINENO "configure"
4702#include "confdefs.h"
4703
4704 #define _OSF_SOURCE 1
4705 #include <sys/types.h>
4706
4707#ifdef F77_DUMMY_MAIN
4708# ifdef __cplusplus
4709 extern "C"
4710# endif
4711 int F77_DUMMY_MAIN() { return 1; }
4712#endif
4713int
4714main ()
4715{
4716 makedev(0, 0)
4717 ;
4718 return 0;
4719}
4720_ACEOF
4721rm -f conftest.$ac_objext conftest$ac_exeext
4722if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4723 (eval $ac_link) 2>&5
4724 ac_status=$?
4725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4726 (exit $ac_status); } &&
4727 { ac_try='test -s conftest$ac_exeext'
4728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4729 (eval $ac_try) 2>&5
4730 ac_status=$?
4731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4732 (exit $ac_status); }; }; then
4733 ac_cv_has_makedev=yes
4734else
4735 echo "$as_me: failed program was:" >&5
4736cat conftest.$ac_ext >&5
4737ac_cv_has_makedev=no
4738fi
4739rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4740 if test "$ac_cv_has_makedev" = "yes"; then
4741
4742cat >>confdefs.h <<\_ACEOF
4743#define _OSF_SOURCE 1
4744_ACEOF
4745
4746 fi
4747fi
4748echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4749echo "${ECHO_T}$ac_cv_has_makedev" >&6
4750if test "$ac_cv_has_makedev" = "yes"; then
4751
4752cat >>confdefs.h <<\_ACEOF
4753#define HAVE_MAKEDEV 1
4754_ACEOF
4755
4756fi
4757
Martin v. Löwis399a6892002-10-04 10:22:02 +00004758# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4759# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4760# defined, but the compiler does not support pragma redefine_extname,
4761# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4762# structures (such as rlimit64) without declaring them. As a
4763# work-around, disable LFS on such configurations
4764
4765use_lfs=yes
4766echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4767echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4768cat >conftest.$ac_ext <<_ACEOF
4769#line $LINENO "configure"
4770#include "confdefs.h"
4771
4772#define _LARGEFILE_SOURCE 1
4773#define _FILE_OFFSET_BITS 64
4774#include <sys/resource.h>
4775
4776#ifdef F77_DUMMY_MAIN
4777# ifdef __cplusplus
4778 extern "C"
4779# endif
4780 int F77_DUMMY_MAIN() { return 1; }
4781#endif
4782int
4783main ()
4784{
4785struct rlimit foo;
4786 ;
4787 return 0;
4788}
4789_ACEOF
4790rm -f conftest.$ac_objext
4791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4792 (eval $ac_compile) 2>&5
4793 ac_status=$?
4794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4795 (exit $ac_status); } &&
4796 { ac_try='test -s conftest.$ac_objext'
4797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4798 (eval $ac_try) 2>&5
4799 ac_status=$?
4800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4801 (exit $ac_status); }; }; then
4802 sol_lfs_bug=no
4803else
4804 echo "$as_me: failed program was:" >&5
4805cat conftest.$ac_ext >&5
4806sol_lfs_bug=yes
4807fi
4808rm -f conftest.$ac_objext conftest.$ac_ext
4809echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4810echo "${ECHO_T}$sol_lfs_bug" >&6
4811if test "$sol_lfs_bug" = "yes"; then
4812 use_lfs=no
4813fi
4814
4815if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004816# Two defines needed to enable largefile support on various platforms
4817# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004818
Martin v. Löwis11437992002-04-12 09:54:03 +00004819cat >>confdefs.h <<\_ACEOF
4820#define _LARGEFILE_SOURCE 1
4821_ACEOF
4822
4823
4824cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004825#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004826_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004827
Martin v. Löwis399a6892002-10-04 10:22:02 +00004828fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004829
Guido van Rossum84e7b241996-08-19 21:59:00 +00004830# Add some code to confdefs.h so that the test for off_t works on SCO
4831cat >> confdefs.h <<\EOF
4832#if defined(SCO_DS)
4833#undef _OFF_T
4834#endif
4835EOF
4836
Guido van Rossumef2255b2000-03-10 22:30:29 +00004837# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004838echo "$as_me:$LINENO: checking for mode_t" >&5
4839echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4840if test "${ac_cv_type_mode_t+set}" = set; then
4841 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004842else
Martin v. Löwis11437992002-04-12 09:54:03 +00004843 cat >conftest.$ac_ext <<_ACEOF
4844#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004845#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004846$ac_includes_default
4847#ifdef F77_DUMMY_MAIN
4848# ifdef __cplusplus
4849 extern "C"
4850# endif
4851 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004853int
4854main ()
4855{
4856if ((mode_t *) 0)
4857 return 0;
4858if (sizeof (mode_t))
4859 return 0;
4860 ;
4861 return 0;
4862}
4863_ACEOF
4864rm -f conftest.$ac_objext
4865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4866 (eval $ac_compile) 2>&5
4867 ac_status=$?
4868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4869 (exit $ac_status); } &&
4870 { ac_try='test -s conftest.$ac_objext'
4871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4872 (eval $ac_try) 2>&5
4873 ac_status=$?
4874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4875 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004876 ac_cv_type_mode_t=yes
4877else
Martin v. Löwis11437992002-04-12 09:54:03 +00004878 echo "$as_me: failed program was:" >&5
4879cat conftest.$ac_ext >&5
4880ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004881fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004882rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004883fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004884echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4885echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4886if test $ac_cv_type_mode_t = yes; then
4887 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004888else
Martin v. Löwis11437992002-04-12 09:54:03 +00004889
4890cat >>confdefs.h <<_ACEOF
4891#define mode_t int
4892_ACEOF
4893
4894fi
4895
4896echo "$as_me:$LINENO: checking for off_t" >&5
4897echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4898if test "${ac_cv_type_off_t+set}" = set; then
4899 echo $ECHO_N "(cached) $ECHO_C" >&6
4900else
4901 cat >conftest.$ac_ext <<_ACEOF
4902#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004903#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004904$ac_includes_default
4905#ifdef F77_DUMMY_MAIN
4906# ifdef __cplusplus
4907 extern "C"
4908# endif
4909 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004911int
4912main ()
4913{
4914if ((off_t *) 0)
4915 return 0;
4916if (sizeof (off_t))
4917 return 0;
4918 ;
4919 return 0;
4920}
4921_ACEOF
4922rm -f conftest.$ac_objext
4923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4924 (eval $ac_compile) 2>&5
4925 ac_status=$?
4926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4927 (exit $ac_status); } &&
4928 { ac_try='test -s conftest.$ac_objext'
4929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4930 (eval $ac_try) 2>&5
4931 ac_status=$?
4932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4933 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004934 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004935else
Martin v. Löwis11437992002-04-12 09:54:03 +00004936 echo "$as_me: failed program was:" >&5
4937cat conftest.$ac_ext >&5
4938ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004939fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004940rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004941fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004942echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4943echo "${ECHO_T}$ac_cv_type_off_t" >&6
4944if test $ac_cv_type_off_t = yes; then
4945 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004946else
Martin v. Löwis11437992002-04-12 09:54:03 +00004947
4948cat >>confdefs.h <<_ACEOF
4949#define off_t long
4950_ACEOF
4951
4952fi
4953
4954echo "$as_me:$LINENO: checking for pid_t" >&5
4955echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4956if test "${ac_cv_type_pid_t+set}" = set; then
4957 echo $ECHO_N "(cached) $ECHO_C" >&6
4958else
4959 cat >conftest.$ac_ext <<_ACEOF
4960#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004961#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004962$ac_includes_default
4963#ifdef F77_DUMMY_MAIN
4964# ifdef __cplusplus
4965 extern "C"
4966# endif
4967 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004968#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004969int
4970main ()
4971{
4972if ((pid_t *) 0)
4973 return 0;
4974if (sizeof (pid_t))
4975 return 0;
4976 ;
4977 return 0;
4978}
4979_ACEOF
4980rm -f conftest.$ac_objext
4981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4982 (eval $ac_compile) 2>&5
4983 ac_status=$?
4984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985 (exit $ac_status); } &&
4986 { ac_try='test -s conftest.$ac_objext'
4987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4988 (eval $ac_try) 2>&5
4989 ac_status=$?
4990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4991 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004992 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004993else
Martin v. Löwis11437992002-04-12 09:54:03 +00004994 echo "$as_me: failed program was:" >&5
4995cat conftest.$ac_ext >&5
4996ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004997fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004998rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004999fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005000echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5001echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5002if test $ac_cv_type_pid_t = yes; then
5003 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005004else
Martin v. Löwis11437992002-04-12 09:54:03 +00005005
5006cat >>confdefs.h <<_ACEOF
5007#define pid_t int
5008_ACEOF
5009
5010fi
5011
5012echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5013echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5014if test "${ac_cv_type_signal+set}" = set; then
5015 echo $ECHO_N "(cached) $ECHO_C" >&6
5016else
5017 cat >conftest.$ac_ext <<_ACEOF
5018#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005019#include "confdefs.h"
5020#include <sys/types.h>
5021#include <signal.h>
5022#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005023# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005024#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005025#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005026extern "C" void (*signal (int, void (*)(int)))(int);
5027#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005028void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005029#endif
5030
Martin v. Löwis11437992002-04-12 09:54:03 +00005031#ifdef F77_DUMMY_MAIN
5032# ifdef __cplusplus
5033 extern "C"
5034# endif
5035 int F77_DUMMY_MAIN() { return 1; }
5036#endif
5037int
5038main ()
5039{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005040int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005041 ;
5042 return 0;
5043}
5044_ACEOF
5045rm -f conftest.$ac_objext
5046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5047 (eval $ac_compile) 2>&5
5048 ac_status=$?
5049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5050 (exit $ac_status); } &&
5051 { ac_try='test -s conftest.$ac_objext'
5052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5053 (eval $ac_try) 2>&5
5054 ac_status=$?
5055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5056 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005057 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005058else
Martin v. Löwis11437992002-04-12 09:54:03 +00005059 echo "$as_me: failed program was:" >&5
5060cat conftest.$ac_ext >&5
5061ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005062fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005063rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005064fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005065echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5066echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005067
Martin v. Löwis11437992002-04-12 09:54:03 +00005068cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005069#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005070_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005071
Michael W. Hudson54241132001-12-07 15:38:26 +00005072
Martin v. Löwis11437992002-04-12 09:54:03 +00005073echo "$as_me:$LINENO: checking for size_t" >&5
5074echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5075if test "${ac_cv_type_size_t+set}" = set; then
5076 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005077else
Martin v. Löwis11437992002-04-12 09:54:03 +00005078 cat >conftest.$ac_ext <<_ACEOF
5079#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005080#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005081$ac_includes_default
5082#ifdef F77_DUMMY_MAIN
5083# ifdef __cplusplus
5084 extern "C"
5085# endif
5086 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005088int
5089main ()
5090{
5091if ((size_t *) 0)
5092 return 0;
5093if (sizeof (size_t))
5094 return 0;
5095 ;
5096 return 0;
5097}
5098_ACEOF
5099rm -f conftest.$ac_objext
5100if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5101 (eval $ac_compile) 2>&5
5102 ac_status=$?
5103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5104 (exit $ac_status); } &&
5105 { ac_try='test -s conftest.$ac_objext'
5106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5107 (eval $ac_try) 2>&5
5108 ac_status=$?
5109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5110 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005111 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005112else
Martin v. Löwis11437992002-04-12 09:54:03 +00005113 echo "$as_me: failed program was:" >&5
5114cat conftest.$ac_ext >&5
5115ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005116fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005117rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005118fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005119echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5120echo "${ECHO_T}$ac_cv_type_size_t" >&6
5121if test $ac_cv_type_size_t = yes; then
5122 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005123else
Martin v. Löwis11437992002-04-12 09:54:03 +00005124
5125cat >>confdefs.h <<_ACEOF
5126#define size_t unsigned
5127_ACEOF
5128
5129fi
5130
5131echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5132echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5133if test "${ac_cv_type_uid_t+set}" = set; then
5134 echo $ECHO_N "(cached) $ECHO_C" >&6
5135else
5136 cat >conftest.$ac_ext <<_ACEOF
5137#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005138#include "confdefs.h"
5139#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005140
5141_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5143 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005144 ac_cv_type_uid_t=yes
5145else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005146 ac_cv_type_uid_t=no
5147fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005148rm -f conftest*
5149
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005150fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005151echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5152echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005153if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005154
Martin v. Löwis11437992002-04-12 09:54:03 +00005155cat >>confdefs.h <<\_ACEOF
5156#define uid_t int
5157_ACEOF
5158
5159
5160cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005161#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005162_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005163
5164fi
5165
Jack Jansendd19cf82001-12-06 22:36:17 +00005166
Michael W. Hudson54241132001-12-07 15:38:26 +00005167# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005168echo "$as_me:$LINENO: checking for int" >&5
5169echo $ECHO_N "checking for int... $ECHO_C" >&6
5170if test "${ac_cv_type_int+set}" = set; then
5171 echo $ECHO_N "(cached) $ECHO_C" >&6
5172else
5173 cat >conftest.$ac_ext <<_ACEOF
5174#line $LINENO "configure"
5175#include "confdefs.h"
5176$ac_includes_default
5177#ifdef F77_DUMMY_MAIN
5178# ifdef __cplusplus
5179 extern "C"
5180# endif
5181 int F77_DUMMY_MAIN() { return 1; }
5182#endif
5183int
5184main ()
5185{
5186if ((int *) 0)
5187 return 0;
5188if (sizeof (int))
5189 return 0;
5190 ;
5191 return 0;
5192}
5193_ACEOF
5194rm -f conftest.$ac_objext
5195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5196 (eval $ac_compile) 2>&5
5197 ac_status=$?
5198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5199 (exit $ac_status); } &&
5200 { ac_try='test -s conftest.$ac_objext'
5201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5202 (eval $ac_try) 2>&5
5203 ac_status=$?
5204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5205 (exit $ac_status); }; }; then
5206 ac_cv_type_int=yes
5207else
5208 echo "$as_me: failed program was:" >&5
5209cat conftest.$ac_ext >&5
5210ac_cv_type_int=no
5211fi
5212rm -f conftest.$ac_objext conftest.$ac_ext
5213fi
5214echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5215echo "${ECHO_T}$ac_cv_type_int" >&6
5216
5217echo "$as_me:$LINENO: checking size of int" >&5
5218echo $ECHO_N "checking size of int... $ECHO_C" >&6
5219if test "${ac_cv_sizeof_int+set}" = set; then
5220 echo $ECHO_N "(cached) $ECHO_C" >&6
5221else
5222 if test "$ac_cv_type_int" = yes; then
5223 # The cast to unsigned long works around a bug in the HP C Compiler
5224 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5225 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5226 # This bug is HP SR number 8606223364.
5227 if test "$cross_compiling" = yes; then
5228 # Depending upon the size, compute the lo and hi bounds.
5229cat >conftest.$ac_ext <<_ACEOF
5230#line $LINENO "configure"
5231#include "confdefs.h"
5232$ac_includes_default
5233#ifdef F77_DUMMY_MAIN
5234# ifdef __cplusplus
5235 extern "C"
5236# endif
5237 int F77_DUMMY_MAIN() { return 1; }
5238#endif
5239int
5240main ()
5241{
5242static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5243test_array [0] = 0
5244
5245 ;
5246 return 0;
5247}
5248_ACEOF
5249rm -f conftest.$ac_objext
5250if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5251 (eval $ac_compile) 2>&5
5252 ac_status=$?
5253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5254 (exit $ac_status); } &&
5255 { ac_try='test -s conftest.$ac_objext'
5256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5257 (eval $ac_try) 2>&5
5258 ac_status=$?
5259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5260 (exit $ac_status); }; }; then
5261 ac_lo=0 ac_mid=0
5262 while :; do
5263 cat >conftest.$ac_ext <<_ACEOF
5264#line $LINENO "configure"
5265#include "confdefs.h"
5266$ac_includes_default
5267#ifdef F77_DUMMY_MAIN
5268# ifdef __cplusplus
5269 extern "C"
5270# endif
5271 int F77_DUMMY_MAIN() { return 1; }
5272#endif
5273int
5274main ()
5275{
5276static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5277test_array [0] = 0
5278
5279 ;
5280 return 0;
5281}
5282_ACEOF
5283rm -f conftest.$ac_objext
5284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5285 (eval $ac_compile) 2>&5
5286 ac_status=$?
5287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5288 (exit $ac_status); } &&
5289 { ac_try='test -s conftest.$ac_objext'
5290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5291 (eval $ac_try) 2>&5
5292 ac_status=$?
5293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5294 (exit $ac_status); }; }; then
5295 ac_hi=$ac_mid; break
5296else
5297 echo "$as_me: failed program was:" >&5
5298cat conftest.$ac_ext >&5
5299ac_lo=`expr $ac_mid + 1`
5300 if test $ac_lo -le $ac_mid; then
5301 ac_lo= ac_hi=
5302 break
5303 fi
5304 ac_mid=`expr 2 '*' $ac_mid + 1`
5305fi
5306rm -f conftest.$ac_objext conftest.$ac_ext
5307 done
5308else
5309 echo "$as_me: failed program was:" >&5
5310cat conftest.$ac_ext >&5
5311cat >conftest.$ac_ext <<_ACEOF
5312#line $LINENO "configure"
5313#include "confdefs.h"
5314$ac_includes_default
5315#ifdef F77_DUMMY_MAIN
5316# ifdef __cplusplus
5317 extern "C"
5318# endif
5319 int F77_DUMMY_MAIN() { return 1; }
5320#endif
5321int
5322main ()
5323{
5324static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5325test_array [0] = 0
5326
5327 ;
5328 return 0;
5329}
5330_ACEOF
5331rm -f conftest.$ac_objext
5332if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5333 (eval $ac_compile) 2>&5
5334 ac_status=$?
5335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5336 (exit $ac_status); } &&
5337 { ac_try='test -s conftest.$ac_objext'
5338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5339 (eval $ac_try) 2>&5
5340 ac_status=$?
5341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5342 (exit $ac_status); }; }; then
5343 ac_hi=-1 ac_mid=-1
5344 while :; do
5345 cat >conftest.$ac_ext <<_ACEOF
5346#line $LINENO "configure"
5347#include "confdefs.h"
5348$ac_includes_default
5349#ifdef F77_DUMMY_MAIN
5350# ifdef __cplusplus
5351 extern "C"
5352# endif
5353 int F77_DUMMY_MAIN() { return 1; }
5354#endif
5355int
5356main ()
5357{
5358static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5359test_array [0] = 0
5360
5361 ;
5362 return 0;
5363}
5364_ACEOF
5365rm -f conftest.$ac_objext
5366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5367 (eval $ac_compile) 2>&5
5368 ac_status=$?
5369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5370 (exit $ac_status); } &&
5371 { ac_try='test -s conftest.$ac_objext'
5372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5373 (eval $ac_try) 2>&5
5374 ac_status=$?
5375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5376 (exit $ac_status); }; }; then
5377 ac_lo=$ac_mid; break
5378else
5379 echo "$as_me: failed program was:" >&5
5380cat conftest.$ac_ext >&5
5381ac_hi=`expr '(' $ac_mid ')' - 1`
5382 if test $ac_mid -le $ac_hi; then
5383 ac_lo= ac_hi=
5384 break
5385 fi
5386 ac_mid=`expr 2 '*' $ac_mid`
5387fi
5388rm -f conftest.$ac_objext conftest.$ac_ext
5389 done
5390else
5391 echo "$as_me: failed program was:" >&5
5392cat conftest.$ac_ext >&5
5393ac_lo= ac_hi=
5394fi
5395rm -f conftest.$ac_objext conftest.$ac_ext
5396fi
5397rm -f conftest.$ac_objext conftest.$ac_ext
5398# Binary search between lo and hi bounds.
5399while test "x$ac_lo" != "x$ac_hi"; do
5400 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5401 cat >conftest.$ac_ext <<_ACEOF
5402#line $LINENO "configure"
5403#include "confdefs.h"
5404$ac_includes_default
5405#ifdef F77_DUMMY_MAIN
5406# ifdef __cplusplus
5407 extern "C"
5408# endif
5409 int F77_DUMMY_MAIN() { return 1; }
5410#endif
5411int
5412main ()
5413{
5414static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5415test_array [0] = 0
5416
5417 ;
5418 return 0;
5419}
5420_ACEOF
5421rm -f conftest.$ac_objext
5422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5423 (eval $ac_compile) 2>&5
5424 ac_status=$?
5425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5426 (exit $ac_status); } &&
5427 { ac_try='test -s conftest.$ac_objext'
5428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5429 (eval $ac_try) 2>&5
5430 ac_status=$?
5431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5432 (exit $ac_status); }; }; then
5433 ac_hi=$ac_mid
5434else
5435 echo "$as_me: failed program was:" >&5
5436cat conftest.$ac_ext >&5
5437ac_lo=`expr '(' $ac_mid ')' + 1`
5438fi
5439rm -f conftest.$ac_objext conftest.$ac_ext
5440done
5441case $ac_lo in
5442?*) ac_cv_sizeof_int=$ac_lo;;
5443'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5444echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5445 { (exit 1); exit 1; }; } ;;
5446esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005447else
5448 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005449 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5450echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5451 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005452else
Martin v. Löwis11437992002-04-12 09:54:03 +00005453 cat >conftest.$ac_ext <<_ACEOF
5454#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005455#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005456$ac_includes_default
5457long longval () { return (long) (sizeof (int)); }
5458unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005459#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005460#include <stdlib.h>
5461#ifdef F77_DUMMY_MAIN
5462# ifdef __cplusplus
5463 extern "C"
5464# endif
5465 int F77_DUMMY_MAIN() { return 1; }
5466#endif
5467int
5468main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005469{
Martin v. Löwis11437992002-04-12 09:54:03 +00005470
5471 FILE *f = fopen ("conftest.val", "w");
5472 if (! f)
5473 exit (1);
5474 if (((long) (sizeof (int))) < 0)
5475 {
5476 long i = longval ();
5477 if (i != ((long) (sizeof (int))))
5478 exit (1);
5479 fprintf (f, "%ld\n", i);
5480 }
5481 else
5482 {
5483 unsigned long i = ulongval ();
5484 if (i != ((long) (sizeof (int))))
5485 exit (1);
5486 fprintf (f, "%lu\n", i);
5487 }
5488 exit (ferror (f) || fclose (f) != 0);
5489
5490 ;
5491 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005492}
Martin v. Löwis11437992002-04-12 09:54:03 +00005493_ACEOF
5494rm -f conftest$ac_exeext
5495if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5496 (eval $ac_link) 2>&5
5497 ac_status=$?
5498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5499 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5501 (eval $ac_try) 2>&5
5502 ac_status=$?
5503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5504 (exit $ac_status); }; }; then
5505 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005506else
Martin v. Löwis11437992002-04-12 09:54:03 +00005507 echo "$as_me: program exited with status $ac_status" >&5
5508echo "$as_me: failed program was:" >&5
5509cat conftest.$ac_ext >&5
5510( exit $ac_status )
5511{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5512echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5513 { (exit 1); exit 1; }; }
5514fi
5515rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5516fi
5517fi
5518rm -f conftest.val
5519else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005520 ac_cv_sizeof_int=0
5521fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005522fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005523echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5524echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5525cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005526#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005527_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005528
5529
Martin v. Löwis11437992002-04-12 09:54:03 +00005530echo "$as_me:$LINENO: checking for long" >&5
5531echo $ECHO_N "checking for long... $ECHO_C" >&6
5532if test "${ac_cv_type_long+set}" = set; then
5533 echo $ECHO_N "(cached) $ECHO_C" >&6
5534else
5535 cat >conftest.$ac_ext <<_ACEOF
5536#line $LINENO "configure"
5537#include "confdefs.h"
5538$ac_includes_default
5539#ifdef F77_DUMMY_MAIN
5540# ifdef __cplusplus
5541 extern "C"
5542# endif
5543 int F77_DUMMY_MAIN() { return 1; }
5544#endif
5545int
5546main ()
5547{
5548if ((long *) 0)
5549 return 0;
5550if (sizeof (long))
5551 return 0;
5552 ;
5553 return 0;
5554}
5555_ACEOF
5556rm -f conftest.$ac_objext
5557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5558 (eval $ac_compile) 2>&5
5559 ac_status=$?
5560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5561 (exit $ac_status); } &&
5562 { ac_try='test -s conftest.$ac_objext'
5563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5564 (eval $ac_try) 2>&5
5565 ac_status=$?
5566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5567 (exit $ac_status); }; }; then
5568 ac_cv_type_long=yes
5569else
5570 echo "$as_me: failed program was:" >&5
5571cat conftest.$ac_ext >&5
5572ac_cv_type_long=no
5573fi
5574rm -f conftest.$ac_objext conftest.$ac_ext
5575fi
5576echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5577echo "${ECHO_T}$ac_cv_type_long" >&6
5578
5579echo "$as_me:$LINENO: checking size of long" >&5
5580echo $ECHO_N "checking size of long... $ECHO_C" >&6
5581if test "${ac_cv_sizeof_long+set}" = set; then
5582 echo $ECHO_N "(cached) $ECHO_C" >&6
5583else
5584 if test "$ac_cv_type_long" = yes; then
5585 # The cast to unsigned long works around a bug in the HP C Compiler
5586 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5587 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5588 # This bug is HP SR number 8606223364.
5589 if test "$cross_compiling" = yes; then
5590 # Depending upon the size, compute the lo and hi bounds.
5591cat >conftest.$ac_ext <<_ACEOF
5592#line $LINENO "configure"
5593#include "confdefs.h"
5594$ac_includes_default
5595#ifdef F77_DUMMY_MAIN
5596# ifdef __cplusplus
5597 extern "C"
5598# endif
5599 int F77_DUMMY_MAIN() { return 1; }
5600#endif
5601int
5602main ()
5603{
5604static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5605test_array [0] = 0
5606
5607 ;
5608 return 0;
5609}
5610_ACEOF
5611rm -f conftest.$ac_objext
5612if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5613 (eval $ac_compile) 2>&5
5614 ac_status=$?
5615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5616 (exit $ac_status); } &&
5617 { ac_try='test -s conftest.$ac_objext'
5618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5619 (eval $ac_try) 2>&5
5620 ac_status=$?
5621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5622 (exit $ac_status); }; }; then
5623 ac_lo=0 ac_mid=0
5624 while :; do
5625 cat >conftest.$ac_ext <<_ACEOF
5626#line $LINENO "configure"
5627#include "confdefs.h"
5628$ac_includes_default
5629#ifdef F77_DUMMY_MAIN
5630# ifdef __cplusplus
5631 extern "C"
5632# endif
5633 int F77_DUMMY_MAIN() { return 1; }
5634#endif
5635int
5636main ()
5637{
5638static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5639test_array [0] = 0
5640
5641 ;
5642 return 0;
5643}
5644_ACEOF
5645rm -f conftest.$ac_objext
5646if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5647 (eval $ac_compile) 2>&5
5648 ac_status=$?
5649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5650 (exit $ac_status); } &&
5651 { ac_try='test -s conftest.$ac_objext'
5652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5653 (eval $ac_try) 2>&5
5654 ac_status=$?
5655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5656 (exit $ac_status); }; }; then
5657 ac_hi=$ac_mid; break
5658else
5659 echo "$as_me: failed program was:" >&5
5660cat conftest.$ac_ext >&5
5661ac_lo=`expr $ac_mid + 1`
5662 if test $ac_lo -le $ac_mid; then
5663 ac_lo= ac_hi=
5664 break
5665 fi
5666 ac_mid=`expr 2 '*' $ac_mid + 1`
5667fi
5668rm -f conftest.$ac_objext conftest.$ac_ext
5669 done
5670else
5671 echo "$as_me: failed program was:" >&5
5672cat conftest.$ac_ext >&5
5673cat >conftest.$ac_ext <<_ACEOF
5674#line $LINENO "configure"
5675#include "confdefs.h"
5676$ac_includes_default
5677#ifdef F77_DUMMY_MAIN
5678# ifdef __cplusplus
5679 extern "C"
5680# endif
5681 int F77_DUMMY_MAIN() { return 1; }
5682#endif
5683int
5684main ()
5685{
5686static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5687test_array [0] = 0
5688
5689 ;
5690 return 0;
5691}
5692_ACEOF
5693rm -f conftest.$ac_objext
5694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5695 (eval $ac_compile) 2>&5
5696 ac_status=$?
5697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5698 (exit $ac_status); } &&
5699 { ac_try='test -s conftest.$ac_objext'
5700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5701 (eval $ac_try) 2>&5
5702 ac_status=$?
5703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5704 (exit $ac_status); }; }; then
5705 ac_hi=-1 ac_mid=-1
5706 while :; do
5707 cat >conftest.$ac_ext <<_ACEOF
5708#line $LINENO "configure"
5709#include "confdefs.h"
5710$ac_includes_default
5711#ifdef F77_DUMMY_MAIN
5712# ifdef __cplusplus
5713 extern "C"
5714# endif
5715 int F77_DUMMY_MAIN() { return 1; }
5716#endif
5717int
5718main ()
5719{
5720static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5721test_array [0] = 0
5722
5723 ;
5724 return 0;
5725}
5726_ACEOF
5727rm -f conftest.$ac_objext
5728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5729 (eval $ac_compile) 2>&5
5730 ac_status=$?
5731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732 (exit $ac_status); } &&
5733 { ac_try='test -s conftest.$ac_objext'
5734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5735 (eval $ac_try) 2>&5
5736 ac_status=$?
5737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5738 (exit $ac_status); }; }; then
5739 ac_lo=$ac_mid; break
5740else
5741 echo "$as_me: failed program was:" >&5
5742cat conftest.$ac_ext >&5
5743ac_hi=`expr '(' $ac_mid ')' - 1`
5744 if test $ac_mid -le $ac_hi; then
5745 ac_lo= ac_hi=
5746 break
5747 fi
5748 ac_mid=`expr 2 '*' $ac_mid`
5749fi
5750rm -f conftest.$ac_objext conftest.$ac_ext
5751 done
5752else
5753 echo "$as_me: failed program was:" >&5
5754cat conftest.$ac_ext >&5
5755ac_lo= ac_hi=
5756fi
5757rm -f conftest.$ac_objext conftest.$ac_ext
5758fi
5759rm -f conftest.$ac_objext conftest.$ac_ext
5760# Binary search between lo and hi bounds.
5761while test "x$ac_lo" != "x$ac_hi"; do
5762 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5763 cat >conftest.$ac_ext <<_ACEOF
5764#line $LINENO "configure"
5765#include "confdefs.h"
5766$ac_includes_default
5767#ifdef F77_DUMMY_MAIN
5768# ifdef __cplusplus
5769 extern "C"
5770# endif
5771 int F77_DUMMY_MAIN() { return 1; }
5772#endif
5773int
5774main ()
5775{
5776static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5777test_array [0] = 0
5778
5779 ;
5780 return 0;
5781}
5782_ACEOF
5783rm -f conftest.$ac_objext
5784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5785 (eval $ac_compile) 2>&5
5786 ac_status=$?
5787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5788 (exit $ac_status); } &&
5789 { ac_try='test -s conftest.$ac_objext'
5790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5791 (eval $ac_try) 2>&5
5792 ac_status=$?
5793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5794 (exit $ac_status); }; }; then
5795 ac_hi=$ac_mid
5796else
5797 echo "$as_me: failed program was:" >&5
5798cat conftest.$ac_ext >&5
5799ac_lo=`expr '(' $ac_mid ')' + 1`
5800fi
5801rm -f conftest.$ac_objext conftest.$ac_ext
5802done
5803case $ac_lo in
5804?*) ac_cv_sizeof_long=$ac_lo;;
5805'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5806echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5807 { (exit 1); exit 1; }; } ;;
5808esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005809else
5810 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005811 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5812echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5813 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005814else
Martin v. Löwis11437992002-04-12 09:54:03 +00005815 cat >conftest.$ac_ext <<_ACEOF
5816#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005817#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005818$ac_includes_default
5819long longval () { return (long) (sizeof (long)); }
5820unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005821#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005822#include <stdlib.h>
5823#ifdef F77_DUMMY_MAIN
5824# ifdef __cplusplus
5825 extern "C"
5826# endif
5827 int F77_DUMMY_MAIN() { return 1; }
5828#endif
5829int
5830main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005831{
Martin v. Löwis11437992002-04-12 09:54:03 +00005832
5833 FILE *f = fopen ("conftest.val", "w");
5834 if (! f)
5835 exit (1);
5836 if (((long) (sizeof (long))) < 0)
5837 {
5838 long i = longval ();
5839 if (i != ((long) (sizeof (long))))
5840 exit (1);
5841 fprintf (f, "%ld\n", i);
5842 }
5843 else
5844 {
5845 unsigned long i = ulongval ();
5846 if (i != ((long) (sizeof (long))))
5847 exit (1);
5848 fprintf (f, "%lu\n", i);
5849 }
5850 exit (ferror (f) || fclose (f) != 0);
5851
5852 ;
5853 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005854}
Martin v. Löwis11437992002-04-12 09:54:03 +00005855_ACEOF
5856rm -f conftest$ac_exeext
5857if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5858 (eval $ac_link) 2>&5
5859 ac_status=$?
5860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5861 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5863 (eval $ac_try) 2>&5
5864 ac_status=$?
5865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5866 (exit $ac_status); }; }; then
5867 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005868else
Martin v. Löwis11437992002-04-12 09:54:03 +00005869 echo "$as_me: program exited with status $ac_status" >&5
5870echo "$as_me: failed program was:" >&5
5871cat conftest.$ac_ext >&5
5872( exit $ac_status )
5873{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5874echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5875 { (exit 1); exit 1; }; }
5876fi
5877rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5878fi
5879fi
5880rm -f conftest.val
5881else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005882 ac_cv_sizeof_long=0
5883fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005884fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005885echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5886echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5887cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005888#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005889_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005890
5891
Martin v. Löwis11437992002-04-12 09:54:03 +00005892echo "$as_me:$LINENO: checking for void *" >&5
5893echo $ECHO_N "checking for void *... $ECHO_C" >&6
5894if test "${ac_cv_type_void_p+set}" = set; then
5895 echo $ECHO_N "(cached) $ECHO_C" >&6
5896else
5897 cat >conftest.$ac_ext <<_ACEOF
5898#line $LINENO "configure"
5899#include "confdefs.h"
5900$ac_includes_default
5901#ifdef F77_DUMMY_MAIN
5902# ifdef __cplusplus
5903 extern "C"
5904# endif
5905 int F77_DUMMY_MAIN() { return 1; }
5906#endif
5907int
5908main ()
5909{
5910if ((void * *) 0)
5911 return 0;
5912if (sizeof (void *))
5913 return 0;
5914 ;
5915 return 0;
5916}
5917_ACEOF
5918rm -f conftest.$ac_objext
5919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5920 (eval $ac_compile) 2>&5
5921 ac_status=$?
5922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5923 (exit $ac_status); } &&
5924 { ac_try='test -s conftest.$ac_objext'
5925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5926 (eval $ac_try) 2>&5
5927 ac_status=$?
5928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5929 (exit $ac_status); }; }; then
5930 ac_cv_type_void_p=yes
5931else
5932 echo "$as_me: failed program was:" >&5
5933cat conftest.$ac_ext >&5
5934ac_cv_type_void_p=no
5935fi
5936rm -f conftest.$ac_objext conftest.$ac_ext
5937fi
5938echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5939echo "${ECHO_T}$ac_cv_type_void_p" >&6
5940
5941echo "$as_me:$LINENO: checking size of void *" >&5
5942echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5943if test "${ac_cv_sizeof_void_p+set}" = set; then
5944 echo $ECHO_N "(cached) $ECHO_C" >&6
5945else
5946 if test "$ac_cv_type_void_p" = yes; then
5947 # The cast to unsigned long works around a bug in the HP C Compiler
5948 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5949 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5950 # This bug is HP SR number 8606223364.
5951 if test "$cross_compiling" = yes; then
5952 # Depending upon the size, compute the lo and hi bounds.
5953cat >conftest.$ac_ext <<_ACEOF
5954#line $LINENO "configure"
5955#include "confdefs.h"
5956$ac_includes_default
5957#ifdef F77_DUMMY_MAIN
5958# ifdef __cplusplus
5959 extern "C"
5960# endif
5961 int F77_DUMMY_MAIN() { return 1; }
5962#endif
5963int
5964main ()
5965{
5966static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5967test_array [0] = 0
5968
5969 ;
5970 return 0;
5971}
5972_ACEOF
5973rm -f conftest.$ac_objext
5974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5975 (eval $ac_compile) 2>&5
5976 ac_status=$?
5977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5978 (exit $ac_status); } &&
5979 { ac_try='test -s conftest.$ac_objext'
5980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5981 (eval $ac_try) 2>&5
5982 ac_status=$?
5983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5984 (exit $ac_status); }; }; then
5985 ac_lo=0 ac_mid=0
5986 while :; do
5987 cat >conftest.$ac_ext <<_ACEOF
5988#line $LINENO "configure"
5989#include "confdefs.h"
5990$ac_includes_default
5991#ifdef F77_DUMMY_MAIN
5992# ifdef __cplusplus
5993 extern "C"
5994# endif
5995 int F77_DUMMY_MAIN() { return 1; }
5996#endif
5997int
5998main ()
5999{
6000static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6001test_array [0] = 0
6002
6003 ;
6004 return 0;
6005}
6006_ACEOF
6007rm -f conftest.$ac_objext
6008if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6009 (eval $ac_compile) 2>&5
6010 ac_status=$?
6011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6012 (exit $ac_status); } &&
6013 { ac_try='test -s conftest.$ac_objext'
6014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6015 (eval $ac_try) 2>&5
6016 ac_status=$?
6017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6018 (exit $ac_status); }; }; then
6019 ac_hi=$ac_mid; break
6020else
6021 echo "$as_me: failed program was:" >&5
6022cat conftest.$ac_ext >&5
6023ac_lo=`expr $ac_mid + 1`
6024 if test $ac_lo -le $ac_mid; then
6025 ac_lo= ac_hi=
6026 break
6027 fi
6028 ac_mid=`expr 2 '*' $ac_mid + 1`
6029fi
6030rm -f conftest.$ac_objext conftest.$ac_ext
6031 done
6032else
6033 echo "$as_me: failed program was:" >&5
6034cat conftest.$ac_ext >&5
6035cat >conftest.$ac_ext <<_ACEOF
6036#line $LINENO "configure"
6037#include "confdefs.h"
6038$ac_includes_default
6039#ifdef F77_DUMMY_MAIN
6040# ifdef __cplusplus
6041 extern "C"
6042# endif
6043 int F77_DUMMY_MAIN() { return 1; }
6044#endif
6045int
6046main ()
6047{
6048static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6049test_array [0] = 0
6050
6051 ;
6052 return 0;
6053}
6054_ACEOF
6055rm -f conftest.$ac_objext
6056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6057 (eval $ac_compile) 2>&5
6058 ac_status=$?
6059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6060 (exit $ac_status); } &&
6061 { ac_try='test -s conftest.$ac_objext'
6062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6063 (eval $ac_try) 2>&5
6064 ac_status=$?
6065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6066 (exit $ac_status); }; }; then
6067 ac_hi=-1 ac_mid=-1
6068 while :; do
6069 cat >conftest.$ac_ext <<_ACEOF
6070#line $LINENO "configure"
6071#include "confdefs.h"
6072$ac_includes_default
6073#ifdef F77_DUMMY_MAIN
6074# ifdef __cplusplus
6075 extern "C"
6076# endif
6077 int F77_DUMMY_MAIN() { return 1; }
6078#endif
6079int
6080main ()
6081{
6082static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6083test_array [0] = 0
6084
6085 ;
6086 return 0;
6087}
6088_ACEOF
6089rm -f conftest.$ac_objext
6090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6091 (eval $ac_compile) 2>&5
6092 ac_status=$?
6093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094 (exit $ac_status); } &&
6095 { ac_try='test -s conftest.$ac_objext'
6096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6097 (eval $ac_try) 2>&5
6098 ac_status=$?
6099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6100 (exit $ac_status); }; }; then
6101 ac_lo=$ac_mid; break
6102else
6103 echo "$as_me: failed program was:" >&5
6104cat conftest.$ac_ext >&5
6105ac_hi=`expr '(' $ac_mid ')' - 1`
6106 if test $ac_mid -le $ac_hi; then
6107 ac_lo= ac_hi=
6108 break
6109 fi
6110 ac_mid=`expr 2 '*' $ac_mid`
6111fi
6112rm -f conftest.$ac_objext conftest.$ac_ext
6113 done
6114else
6115 echo "$as_me: failed program was:" >&5
6116cat conftest.$ac_ext >&5
6117ac_lo= ac_hi=
6118fi
6119rm -f conftest.$ac_objext conftest.$ac_ext
6120fi
6121rm -f conftest.$ac_objext conftest.$ac_ext
6122# Binary search between lo and hi bounds.
6123while test "x$ac_lo" != "x$ac_hi"; do
6124 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6125 cat >conftest.$ac_ext <<_ACEOF
6126#line $LINENO "configure"
6127#include "confdefs.h"
6128$ac_includes_default
6129#ifdef F77_DUMMY_MAIN
6130# ifdef __cplusplus
6131 extern "C"
6132# endif
6133 int F77_DUMMY_MAIN() { return 1; }
6134#endif
6135int
6136main ()
6137{
6138static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6139test_array [0] = 0
6140
6141 ;
6142 return 0;
6143}
6144_ACEOF
6145rm -f conftest.$ac_objext
6146if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6147 (eval $ac_compile) 2>&5
6148 ac_status=$?
6149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6150 (exit $ac_status); } &&
6151 { ac_try='test -s conftest.$ac_objext'
6152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6153 (eval $ac_try) 2>&5
6154 ac_status=$?
6155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6156 (exit $ac_status); }; }; then
6157 ac_hi=$ac_mid
6158else
6159 echo "$as_me: failed program was:" >&5
6160cat conftest.$ac_ext >&5
6161ac_lo=`expr '(' $ac_mid ')' + 1`
6162fi
6163rm -f conftest.$ac_objext conftest.$ac_ext
6164done
6165case $ac_lo in
6166?*) ac_cv_sizeof_void_p=$ac_lo;;
6167'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6168echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6169 { (exit 1); exit 1; }; } ;;
6170esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006171else
6172 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006173 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6174echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6175 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006176else
Martin v. Löwis11437992002-04-12 09:54:03 +00006177 cat >conftest.$ac_ext <<_ACEOF
6178#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006179#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006180$ac_includes_default
6181long longval () { return (long) (sizeof (void *)); }
6182unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006183#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006184#include <stdlib.h>
6185#ifdef F77_DUMMY_MAIN
6186# ifdef __cplusplus
6187 extern "C"
6188# endif
6189 int F77_DUMMY_MAIN() { return 1; }
6190#endif
6191int
6192main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006193{
Martin v. Löwis11437992002-04-12 09:54:03 +00006194
6195 FILE *f = fopen ("conftest.val", "w");
6196 if (! f)
6197 exit (1);
6198 if (((long) (sizeof (void *))) < 0)
6199 {
6200 long i = longval ();
6201 if (i != ((long) (sizeof (void *))))
6202 exit (1);
6203 fprintf (f, "%ld\n", i);
6204 }
6205 else
6206 {
6207 unsigned long i = ulongval ();
6208 if (i != ((long) (sizeof (void *))))
6209 exit (1);
6210 fprintf (f, "%lu\n", i);
6211 }
6212 exit (ferror (f) || fclose (f) != 0);
6213
6214 ;
6215 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006216}
Martin v. Löwis11437992002-04-12 09:54:03 +00006217_ACEOF
6218rm -f conftest$ac_exeext
6219if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6220 (eval $ac_link) 2>&5
6221 ac_status=$?
6222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6223 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6225 (eval $ac_try) 2>&5
6226 ac_status=$?
6227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6228 (exit $ac_status); }; }; then
6229 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006230else
Martin v. Löwis11437992002-04-12 09:54:03 +00006231 echo "$as_me: program exited with status $ac_status" >&5
6232echo "$as_me: failed program was:" >&5
6233cat conftest.$ac_ext >&5
6234( exit $ac_status )
6235{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6236echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6237 { (exit 1); exit 1; }; }
6238fi
6239rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6240fi
6241fi
6242rm -f conftest.val
6243else
Guido van Rossumad678af1998-10-02 14:42:15 +00006244 ac_cv_sizeof_void_p=0
6245fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006246fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006247echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6248echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6249cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006250#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006251_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006252
6253
Martin v. Löwis11437992002-04-12 09:54:03 +00006254echo "$as_me:$LINENO: checking for char" >&5
6255echo $ECHO_N "checking for char... $ECHO_C" >&6
6256if test "${ac_cv_type_char+set}" = set; then
6257 echo $ECHO_N "(cached) $ECHO_C" >&6
6258else
6259 cat >conftest.$ac_ext <<_ACEOF
6260#line $LINENO "configure"
6261#include "confdefs.h"
6262$ac_includes_default
6263#ifdef F77_DUMMY_MAIN
6264# ifdef __cplusplus
6265 extern "C"
6266# endif
6267 int F77_DUMMY_MAIN() { return 1; }
6268#endif
6269int
6270main ()
6271{
6272if ((char *) 0)
6273 return 0;
6274if (sizeof (char))
6275 return 0;
6276 ;
6277 return 0;
6278}
6279_ACEOF
6280rm -f conftest.$ac_objext
6281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6282 (eval $ac_compile) 2>&5
6283 ac_status=$?
6284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6285 (exit $ac_status); } &&
6286 { ac_try='test -s conftest.$ac_objext'
6287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6288 (eval $ac_try) 2>&5
6289 ac_status=$?
6290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6291 (exit $ac_status); }; }; then
6292 ac_cv_type_char=yes
6293else
6294 echo "$as_me: failed program was:" >&5
6295cat conftest.$ac_ext >&5
6296ac_cv_type_char=no
6297fi
6298rm -f conftest.$ac_objext conftest.$ac_ext
6299fi
6300echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6301echo "${ECHO_T}$ac_cv_type_char" >&6
6302
6303echo "$as_me:$LINENO: checking size of char" >&5
6304echo $ECHO_N "checking size of char... $ECHO_C" >&6
6305if test "${ac_cv_sizeof_char+set}" = set; then
6306 echo $ECHO_N "(cached) $ECHO_C" >&6
6307else
6308 if test "$ac_cv_type_char" = yes; then
6309 # The cast to unsigned long works around a bug in the HP C Compiler
6310 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6311 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6312 # This bug is HP SR number 8606223364.
6313 if test "$cross_compiling" = yes; then
6314 # Depending upon the size, compute the lo and hi bounds.
6315cat >conftest.$ac_ext <<_ACEOF
6316#line $LINENO "configure"
6317#include "confdefs.h"
6318$ac_includes_default
6319#ifdef F77_DUMMY_MAIN
6320# ifdef __cplusplus
6321 extern "C"
6322# endif
6323 int F77_DUMMY_MAIN() { return 1; }
6324#endif
6325int
6326main ()
6327{
6328static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6329test_array [0] = 0
6330
6331 ;
6332 return 0;
6333}
6334_ACEOF
6335rm -f conftest.$ac_objext
6336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6337 (eval $ac_compile) 2>&5
6338 ac_status=$?
6339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6340 (exit $ac_status); } &&
6341 { ac_try='test -s conftest.$ac_objext'
6342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6343 (eval $ac_try) 2>&5
6344 ac_status=$?
6345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6346 (exit $ac_status); }; }; then
6347 ac_lo=0 ac_mid=0
6348 while :; do
6349 cat >conftest.$ac_ext <<_ACEOF
6350#line $LINENO "configure"
6351#include "confdefs.h"
6352$ac_includes_default
6353#ifdef F77_DUMMY_MAIN
6354# ifdef __cplusplus
6355 extern "C"
6356# endif
6357 int F77_DUMMY_MAIN() { return 1; }
6358#endif
6359int
6360main ()
6361{
6362static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6363test_array [0] = 0
6364
6365 ;
6366 return 0;
6367}
6368_ACEOF
6369rm -f conftest.$ac_objext
6370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6371 (eval $ac_compile) 2>&5
6372 ac_status=$?
6373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6374 (exit $ac_status); } &&
6375 { ac_try='test -s conftest.$ac_objext'
6376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6377 (eval $ac_try) 2>&5
6378 ac_status=$?
6379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6380 (exit $ac_status); }; }; then
6381 ac_hi=$ac_mid; break
6382else
6383 echo "$as_me: failed program was:" >&5
6384cat conftest.$ac_ext >&5
6385ac_lo=`expr $ac_mid + 1`
6386 if test $ac_lo -le $ac_mid; then
6387 ac_lo= ac_hi=
6388 break
6389 fi
6390 ac_mid=`expr 2 '*' $ac_mid + 1`
6391fi
6392rm -f conftest.$ac_objext conftest.$ac_ext
6393 done
6394else
6395 echo "$as_me: failed program was:" >&5
6396cat conftest.$ac_ext >&5
6397cat >conftest.$ac_ext <<_ACEOF
6398#line $LINENO "configure"
6399#include "confdefs.h"
6400$ac_includes_default
6401#ifdef F77_DUMMY_MAIN
6402# ifdef __cplusplus
6403 extern "C"
6404# endif
6405 int F77_DUMMY_MAIN() { return 1; }
6406#endif
6407int
6408main ()
6409{
6410static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6411test_array [0] = 0
6412
6413 ;
6414 return 0;
6415}
6416_ACEOF
6417rm -f conftest.$ac_objext
6418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6419 (eval $ac_compile) 2>&5
6420 ac_status=$?
6421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6422 (exit $ac_status); } &&
6423 { ac_try='test -s conftest.$ac_objext'
6424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6425 (eval $ac_try) 2>&5
6426 ac_status=$?
6427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6428 (exit $ac_status); }; }; then
6429 ac_hi=-1 ac_mid=-1
6430 while :; do
6431 cat >conftest.$ac_ext <<_ACEOF
6432#line $LINENO "configure"
6433#include "confdefs.h"
6434$ac_includes_default
6435#ifdef F77_DUMMY_MAIN
6436# ifdef __cplusplus
6437 extern "C"
6438# endif
6439 int F77_DUMMY_MAIN() { return 1; }
6440#endif
6441int
6442main ()
6443{
6444static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6445test_array [0] = 0
6446
6447 ;
6448 return 0;
6449}
6450_ACEOF
6451rm -f conftest.$ac_objext
6452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6453 (eval $ac_compile) 2>&5
6454 ac_status=$?
6455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6456 (exit $ac_status); } &&
6457 { ac_try='test -s conftest.$ac_objext'
6458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6459 (eval $ac_try) 2>&5
6460 ac_status=$?
6461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6462 (exit $ac_status); }; }; then
6463 ac_lo=$ac_mid; break
6464else
6465 echo "$as_me: failed program was:" >&5
6466cat conftest.$ac_ext >&5
6467ac_hi=`expr '(' $ac_mid ')' - 1`
6468 if test $ac_mid -le $ac_hi; then
6469 ac_lo= ac_hi=
6470 break
6471 fi
6472 ac_mid=`expr 2 '*' $ac_mid`
6473fi
6474rm -f conftest.$ac_objext conftest.$ac_ext
6475 done
6476else
6477 echo "$as_me: failed program was:" >&5
6478cat conftest.$ac_ext >&5
6479ac_lo= ac_hi=
6480fi
6481rm -f conftest.$ac_objext conftest.$ac_ext
6482fi
6483rm -f conftest.$ac_objext conftest.$ac_ext
6484# Binary search between lo and hi bounds.
6485while test "x$ac_lo" != "x$ac_hi"; do
6486 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6487 cat >conftest.$ac_ext <<_ACEOF
6488#line $LINENO "configure"
6489#include "confdefs.h"
6490$ac_includes_default
6491#ifdef F77_DUMMY_MAIN
6492# ifdef __cplusplus
6493 extern "C"
6494# endif
6495 int F77_DUMMY_MAIN() { return 1; }
6496#endif
6497int
6498main ()
6499{
6500static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6501test_array [0] = 0
6502
6503 ;
6504 return 0;
6505}
6506_ACEOF
6507rm -f conftest.$ac_objext
6508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6509 (eval $ac_compile) 2>&5
6510 ac_status=$?
6511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6512 (exit $ac_status); } &&
6513 { ac_try='test -s conftest.$ac_objext'
6514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6515 (eval $ac_try) 2>&5
6516 ac_status=$?
6517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6518 (exit $ac_status); }; }; then
6519 ac_hi=$ac_mid
6520else
6521 echo "$as_me: failed program was:" >&5
6522cat conftest.$ac_ext >&5
6523ac_lo=`expr '(' $ac_mid ')' + 1`
6524fi
6525rm -f conftest.$ac_objext conftest.$ac_ext
6526done
6527case $ac_lo in
6528?*) ac_cv_sizeof_char=$ac_lo;;
6529'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6530echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6531 { (exit 1); exit 1; }; } ;;
6532esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006533else
6534 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006535 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6536echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6537 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006538else
Martin v. Löwis11437992002-04-12 09:54:03 +00006539 cat >conftest.$ac_ext <<_ACEOF
6540#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006541#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006542$ac_includes_default
6543long longval () { return (long) (sizeof (char)); }
6544unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006545#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006546#include <stdlib.h>
6547#ifdef F77_DUMMY_MAIN
6548# ifdef __cplusplus
6549 extern "C"
6550# endif
6551 int F77_DUMMY_MAIN() { return 1; }
6552#endif
6553int
6554main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006555{
Martin v. Löwis11437992002-04-12 09:54:03 +00006556
6557 FILE *f = fopen ("conftest.val", "w");
6558 if (! f)
6559 exit (1);
6560 if (((long) (sizeof (char))) < 0)
6561 {
6562 long i = longval ();
6563 if (i != ((long) (sizeof (char))))
6564 exit (1);
6565 fprintf (f, "%ld\n", i);
6566 }
6567 else
6568 {
6569 unsigned long i = ulongval ();
6570 if (i != ((long) (sizeof (char))))
6571 exit (1);
6572 fprintf (f, "%lu\n", i);
6573 }
6574 exit (ferror (f) || fclose (f) != 0);
6575
6576 ;
6577 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006578}
Martin v. Löwis11437992002-04-12 09:54:03 +00006579_ACEOF
6580rm -f conftest$ac_exeext
6581if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6582 (eval $ac_link) 2>&5
6583 ac_status=$?
6584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6585 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6587 (eval $ac_try) 2>&5
6588 ac_status=$?
6589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6590 (exit $ac_status); }; }; then
6591 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006592else
Martin v. Löwis11437992002-04-12 09:54:03 +00006593 echo "$as_me: program exited with status $ac_status" >&5
6594echo "$as_me: failed program was:" >&5
6595cat conftest.$ac_ext >&5
6596( exit $ac_status )
6597{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6598echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6599 { (exit 1); exit 1; }; }
6600fi
6601rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6602fi
6603fi
6604rm -f conftest.val
6605else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006606 ac_cv_sizeof_char=0
6607fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006608fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006609echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6610echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6611cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006612#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006613_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006614
6615
Martin v. Löwis11437992002-04-12 09:54:03 +00006616echo "$as_me:$LINENO: checking for short" >&5
6617echo $ECHO_N "checking for short... $ECHO_C" >&6
6618if test "${ac_cv_type_short+set}" = set; then
6619 echo $ECHO_N "(cached) $ECHO_C" >&6
6620else
6621 cat >conftest.$ac_ext <<_ACEOF
6622#line $LINENO "configure"
6623#include "confdefs.h"
6624$ac_includes_default
6625#ifdef F77_DUMMY_MAIN
6626# ifdef __cplusplus
6627 extern "C"
6628# endif
6629 int F77_DUMMY_MAIN() { return 1; }
6630#endif
6631int
6632main ()
6633{
6634if ((short *) 0)
6635 return 0;
6636if (sizeof (short))
6637 return 0;
6638 ;
6639 return 0;
6640}
6641_ACEOF
6642rm -f conftest.$ac_objext
6643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6644 (eval $ac_compile) 2>&5
6645 ac_status=$?
6646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6647 (exit $ac_status); } &&
6648 { ac_try='test -s conftest.$ac_objext'
6649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6650 (eval $ac_try) 2>&5
6651 ac_status=$?
6652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6653 (exit $ac_status); }; }; then
6654 ac_cv_type_short=yes
6655else
6656 echo "$as_me: failed program was:" >&5
6657cat conftest.$ac_ext >&5
6658ac_cv_type_short=no
6659fi
6660rm -f conftest.$ac_objext conftest.$ac_ext
6661fi
6662echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6663echo "${ECHO_T}$ac_cv_type_short" >&6
6664
6665echo "$as_me:$LINENO: checking size of short" >&5
6666echo $ECHO_N "checking size of short... $ECHO_C" >&6
6667if test "${ac_cv_sizeof_short+set}" = set; then
6668 echo $ECHO_N "(cached) $ECHO_C" >&6
6669else
6670 if test "$ac_cv_type_short" = yes; then
6671 # The cast to unsigned long works around a bug in the HP C Compiler
6672 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6673 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6674 # This bug is HP SR number 8606223364.
6675 if test "$cross_compiling" = yes; then
6676 # Depending upon the size, compute the lo and hi bounds.
6677cat >conftest.$ac_ext <<_ACEOF
6678#line $LINENO "configure"
6679#include "confdefs.h"
6680$ac_includes_default
6681#ifdef F77_DUMMY_MAIN
6682# ifdef __cplusplus
6683 extern "C"
6684# endif
6685 int F77_DUMMY_MAIN() { return 1; }
6686#endif
6687int
6688main ()
6689{
6690static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6691test_array [0] = 0
6692
6693 ;
6694 return 0;
6695}
6696_ACEOF
6697rm -f conftest.$ac_objext
6698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6699 (eval $ac_compile) 2>&5
6700 ac_status=$?
6701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6702 (exit $ac_status); } &&
6703 { ac_try='test -s conftest.$ac_objext'
6704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6705 (eval $ac_try) 2>&5
6706 ac_status=$?
6707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6708 (exit $ac_status); }; }; then
6709 ac_lo=0 ac_mid=0
6710 while :; do
6711 cat >conftest.$ac_ext <<_ACEOF
6712#line $LINENO "configure"
6713#include "confdefs.h"
6714$ac_includes_default
6715#ifdef F77_DUMMY_MAIN
6716# ifdef __cplusplus
6717 extern "C"
6718# endif
6719 int F77_DUMMY_MAIN() { return 1; }
6720#endif
6721int
6722main ()
6723{
6724static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6725test_array [0] = 0
6726
6727 ;
6728 return 0;
6729}
6730_ACEOF
6731rm -f conftest.$ac_objext
6732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6733 (eval $ac_compile) 2>&5
6734 ac_status=$?
6735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6736 (exit $ac_status); } &&
6737 { ac_try='test -s conftest.$ac_objext'
6738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6739 (eval $ac_try) 2>&5
6740 ac_status=$?
6741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6742 (exit $ac_status); }; }; then
6743 ac_hi=$ac_mid; break
6744else
6745 echo "$as_me: failed program was:" >&5
6746cat conftest.$ac_ext >&5
6747ac_lo=`expr $ac_mid + 1`
6748 if test $ac_lo -le $ac_mid; then
6749 ac_lo= ac_hi=
6750 break
6751 fi
6752 ac_mid=`expr 2 '*' $ac_mid + 1`
6753fi
6754rm -f conftest.$ac_objext conftest.$ac_ext
6755 done
6756else
6757 echo "$as_me: failed program was:" >&5
6758cat conftest.$ac_ext >&5
6759cat >conftest.$ac_ext <<_ACEOF
6760#line $LINENO "configure"
6761#include "confdefs.h"
6762$ac_includes_default
6763#ifdef F77_DUMMY_MAIN
6764# ifdef __cplusplus
6765 extern "C"
6766# endif
6767 int F77_DUMMY_MAIN() { return 1; }
6768#endif
6769int
6770main ()
6771{
6772static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6773test_array [0] = 0
6774
6775 ;
6776 return 0;
6777}
6778_ACEOF
6779rm -f conftest.$ac_objext
6780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6781 (eval $ac_compile) 2>&5
6782 ac_status=$?
6783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6784 (exit $ac_status); } &&
6785 { ac_try='test -s conftest.$ac_objext'
6786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6787 (eval $ac_try) 2>&5
6788 ac_status=$?
6789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6790 (exit $ac_status); }; }; then
6791 ac_hi=-1 ac_mid=-1
6792 while :; do
6793 cat >conftest.$ac_ext <<_ACEOF
6794#line $LINENO "configure"
6795#include "confdefs.h"
6796$ac_includes_default
6797#ifdef F77_DUMMY_MAIN
6798# ifdef __cplusplus
6799 extern "C"
6800# endif
6801 int F77_DUMMY_MAIN() { return 1; }
6802#endif
6803int
6804main ()
6805{
6806static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6807test_array [0] = 0
6808
6809 ;
6810 return 0;
6811}
6812_ACEOF
6813rm -f conftest.$ac_objext
6814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6815 (eval $ac_compile) 2>&5
6816 ac_status=$?
6817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6818 (exit $ac_status); } &&
6819 { ac_try='test -s conftest.$ac_objext'
6820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6821 (eval $ac_try) 2>&5
6822 ac_status=$?
6823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6824 (exit $ac_status); }; }; then
6825 ac_lo=$ac_mid; break
6826else
6827 echo "$as_me: failed program was:" >&5
6828cat conftest.$ac_ext >&5
6829ac_hi=`expr '(' $ac_mid ')' - 1`
6830 if test $ac_mid -le $ac_hi; then
6831 ac_lo= ac_hi=
6832 break
6833 fi
6834 ac_mid=`expr 2 '*' $ac_mid`
6835fi
6836rm -f conftest.$ac_objext conftest.$ac_ext
6837 done
6838else
6839 echo "$as_me: failed program was:" >&5
6840cat conftest.$ac_ext >&5
6841ac_lo= ac_hi=
6842fi
6843rm -f conftest.$ac_objext conftest.$ac_ext
6844fi
6845rm -f conftest.$ac_objext conftest.$ac_ext
6846# Binary search between lo and hi bounds.
6847while test "x$ac_lo" != "x$ac_hi"; do
6848 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6849 cat >conftest.$ac_ext <<_ACEOF
6850#line $LINENO "configure"
6851#include "confdefs.h"
6852$ac_includes_default
6853#ifdef F77_DUMMY_MAIN
6854# ifdef __cplusplus
6855 extern "C"
6856# endif
6857 int F77_DUMMY_MAIN() { return 1; }
6858#endif
6859int
6860main ()
6861{
6862static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6863test_array [0] = 0
6864
6865 ;
6866 return 0;
6867}
6868_ACEOF
6869rm -f conftest.$ac_objext
6870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6871 (eval $ac_compile) 2>&5
6872 ac_status=$?
6873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6874 (exit $ac_status); } &&
6875 { ac_try='test -s conftest.$ac_objext'
6876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6877 (eval $ac_try) 2>&5
6878 ac_status=$?
6879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6880 (exit $ac_status); }; }; then
6881 ac_hi=$ac_mid
6882else
6883 echo "$as_me: failed program was:" >&5
6884cat conftest.$ac_ext >&5
6885ac_lo=`expr '(' $ac_mid ')' + 1`
6886fi
6887rm -f conftest.$ac_objext conftest.$ac_ext
6888done
6889case $ac_lo in
6890?*) ac_cv_sizeof_short=$ac_lo;;
6891'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6892echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6893 { (exit 1); exit 1; }; } ;;
6894esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006895else
6896 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006897 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6898echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6899 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006900else
Martin v. Löwis11437992002-04-12 09:54:03 +00006901 cat >conftest.$ac_ext <<_ACEOF
6902#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006903#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006904$ac_includes_default
6905long longval () { return (long) (sizeof (short)); }
6906unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006907#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006908#include <stdlib.h>
6909#ifdef F77_DUMMY_MAIN
6910# ifdef __cplusplus
6911 extern "C"
6912# endif
6913 int F77_DUMMY_MAIN() { return 1; }
6914#endif
6915int
6916main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006917{
Martin v. Löwis11437992002-04-12 09:54:03 +00006918
6919 FILE *f = fopen ("conftest.val", "w");
6920 if (! f)
6921 exit (1);
6922 if (((long) (sizeof (short))) < 0)
6923 {
6924 long i = longval ();
6925 if (i != ((long) (sizeof (short))))
6926 exit (1);
6927 fprintf (f, "%ld\n", i);
6928 }
6929 else
6930 {
6931 unsigned long i = ulongval ();
6932 if (i != ((long) (sizeof (short))))
6933 exit (1);
6934 fprintf (f, "%lu\n", i);
6935 }
6936 exit (ferror (f) || fclose (f) != 0);
6937
6938 ;
6939 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006940}
Martin v. Löwis11437992002-04-12 09:54:03 +00006941_ACEOF
6942rm -f conftest$ac_exeext
6943if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6944 (eval $ac_link) 2>&5
6945 ac_status=$?
6946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6947 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6949 (eval $ac_try) 2>&5
6950 ac_status=$?
6951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6952 (exit $ac_status); }; }; then
6953 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006954else
Martin v. Löwis11437992002-04-12 09:54:03 +00006955 echo "$as_me: program exited with status $ac_status" >&5
6956echo "$as_me: failed program was:" >&5
6957cat conftest.$ac_ext >&5
6958( exit $ac_status )
6959{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6960echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6961 { (exit 1); exit 1; }; }
6962fi
6963rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6964fi
6965fi
6966rm -f conftest.val
6967else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006968 ac_cv_sizeof_short=0
6969fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006970fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006971echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6972echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6973cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006974#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006975_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006976
6977
Martin v. Löwis11437992002-04-12 09:54:03 +00006978echo "$as_me:$LINENO: checking for float" >&5
6979echo $ECHO_N "checking for float... $ECHO_C" >&6
6980if test "${ac_cv_type_float+set}" = set; then
6981 echo $ECHO_N "(cached) $ECHO_C" >&6
6982else
6983 cat >conftest.$ac_ext <<_ACEOF
6984#line $LINENO "configure"
6985#include "confdefs.h"
6986$ac_includes_default
6987#ifdef F77_DUMMY_MAIN
6988# ifdef __cplusplus
6989 extern "C"
6990# endif
6991 int F77_DUMMY_MAIN() { return 1; }
6992#endif
6993int
6994main ()
6995{
6996if ((float *) 0)
6997 return 0;
6998if (sizeof (float))
6999 return 0;
7000 ;
7001 return 0;
7002}
7003_ACEOF
7004rm -f conftest.$ac_objext
7005if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7006 (eval $ac_compile) 2>&5
7007 ac_status=$?
7008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7009 (exit $ac_status); } &&
7010 { ac_try='test -s conftest.$ac_objext'
7011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7012 (eval $ac_try) 2>&5
7013 ac_status=$?
7014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7015 (exit $ac_status); }; }; then
7016 ac_cv_type_float=yes
7017else
7018 echo "$as_me: failed program was:" >&5
7019cat conftest.$ac_ext >&5
7020ac_cv_type_float=no
7021fi
7022rm -f conftest.$ac_objext conftest.$ac_ext
7023fi
7024echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7025echo "${ECHO_T}$ac_cv_type_float" >&6
7026
7027echo "$as_me:$LINENO: checking size of float" >&5
7028echo $ECHO_N "checking size of float... $ECHO_C" >&6
7029if test "${ac_cv_sizeof_float+set}" = set; then
7030 echo $ECHO_N "(cached) $ECHO_C" >&6
7031else
7032 if test "$ac_cv_type_float" = yes; then
7033 # The cast to unsigned long works around a bug in the HP C Compiler
7034 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7035 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7036 # This bug is HP SR number 8606223364.
7037 if test "$cross_compiling" = yes; then
7038 # Depending upon the size, compute the lo and hi bounds.
7039cat >conftest.$ac_ext <<_ACEOF
7040#line $LINENO "configure"
7041#include "confdefs.h"
7042$ac_includes_default
7043#ifdef F77_DUMMY_MAIN
7044# ifdef __cplusplus
7045 extern "C"
7046# endif
7047 int F77_DUMMY_MAIN() { return 1; }
7048#endif
7049int
7050main ()
7051{
7052static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7053test_array [0] = 0
7054
7055 ;
7056 return 0;
7057}
7058_ACEOF
7059rm -f conftest.$ac_objext
7060if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7061 (eval $ac_compile) 2>&5
7062 ac_status=$?
7063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7064 (exit $ac_status); } &&
7065 { ac_try='test -s conftest.$ac_objext'
7066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7067 (eval $ac_try) 2>&5
7068 ac_status=$?
7069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7070 (exit $ac_status); }; }; then
7071 ac_lo=0 ac_mid=0
7072 while :; do
7073 cat >conftest.$ac_ext <<_ACEOF
7074#line $LINENO "configure"
7075#include "confdefs.h"
7076$ac_includes_default
7077#ifdef F77_DUMMY_MAIN
7078# ifdef __cplusplus
7079 extern "C"
7080# endif
7081 int F77_DUMMY_MAIN() { return 1; }
7082#endif
7083int
7084main ()
7085{
7086static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7087test_array [0] = 0
7088
7089 ;
7090 return 0;
7091}
7092_ACEOF
7093rm -f conftest.$ac_objext
7094if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7095 (eval $ac_compile) 2>&5
7096 ac_status=$?
7097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7098 (exit $ac_status); } &&
7099 { ac_try='test -s conftest.$ac_objext'
7100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7101 (eval $ac_try) 2>&5
7102 ac_status=$?
7103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7104 (exit $ac_status); }; }; then
7105 ac_hi=$ac_mid; break
7106else
7107 echo "$as_me: failed program was:" >&5
7108cat conftest.$ac_ext >&5
7109ac_lo=`expr $ac_mid + 1`
7110 if test $ac_lo -le $ac_mid; then
7111 ac_lo= ac_hi=
7112 break
7113 fi
7114 ac_mid=`expr 2 '*' $ac_mid + 1`
7115fi
7116rm -f conftest.$ac_objext conftest.$ac_ext
7117 done
7118else
7119 echo "$as_me: failed program was:" >&5
7120cat conftest.$ac_ext >&5
7121cat >conftest.$ac_ext <<_ACEOF
7122#line $LINENO "configure"
7123#include "confdefs.h"
7124$ac_includes_default
7125#ifdef F77_DUMMY_MAIN
7126# ifdef __cplusplus
7127 extern "C"
7128# endif
7129 int F77_DUMMY_MAIN() { return 1; }
7130#endif
7131int
7132main ()
7133{
7134static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7135test_array [0] = 0
7136
7137 ;
7138 return 0;
7139}
7140_ACEOF
7141rm -f conftest.$ac_objext
7142if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7143 (eval $ac_compile) 2>&5
7144 ac_status=$?
7145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7146 (exit $ac_status); } &&
7147 { ac_try='test -s conftest.$ac_objext'
7148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7149 (eval $ac_try) 2>&5
7150 ac_status=$?
7151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7152 (exit $ac_status); }; }; then
7153 ac_hi=-1 ac_mid=-1
7154 while :; do
7155 cat >conftest.$ac_ext <<_ACEOF
7156#line $LINENO "configure"
7157#include "confdefs.h"
7158$ac_includes_default
7159#ifdef F77_DUMMY_MAIN
7160# ifdef __cplusplus
7161 extern "C"
7162# endif
7163 int F77_DUMMY_MAIN() { return 1; }
7164#endif
7165int
7166main ()
7167{
7168static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7169test_array [0] = 0
7170
7171 ;
7172 return 0;
7173}
7174_ACEOF
7175rm -f conftest.$ac_objext
7176if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7177 (eval $ac_compile) 2>&5
7178 ac_status=$?
7179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7180 (exit $ac_status); } &&
7181 { ac_try='test -s conftest.$ac_objext'
7182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7183 (eval $ac_try) 2>&5
7184 ac_status=$?
7185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7186 (exit $ac_status); }; }; then
7187 ac_lo=$ac_mid; break
7188else
7189 echo "$as_me: failed program was:" >&5
7190cat conftest.$ac_ext >&5
7191ac_hi=`expr '(' $ac_mid ')' - 1`
7192 if test $ac_mid -le $ac_hi; then
7193 ac_lo= ac_hi=
7194 break
7195 fi
7196 ac_mid=`expr 2 '*' $ac_mid`
7197fi
7198rm -f conftest.$ac_objext conftest.$ac_ext
7199 done
7200else
7201 echo "$as_me: failed program was:" >&5
7202cat conftest.$ac_ext >&5
7203ac_lo= ac_hi=
7204fi
7205rm -f conftest.$ac_objext conftest.$ac_ext
7206fi
7207rm -f conftest.$ac_objext conftest.$ac_ext
7208# Binary search between lo and hi bounds.
7209while test "x$ac_lo" != "x$ac_hi"; do
7210 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7211 cat >conftest.$ac_ext <<_ACEOF
7212#line $LINENO "configure"
7213#include "confdefs.h"
7214$ac_includes_default
7215#ifdef F77_DUMMY_MAIN
7216# ifdef __cplusplus
7217 extern "C"
7218# endif
7219 int F77_DUMMY_MAIN() { return 1; }
7220#endif
7221int
7222main ()
7223{
7224static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7225test_array [0] = 0
7226
7227 ;
7228 return 0;
7229}
7230_ACEOF
7231rm -f conftest.$ac_objext
7232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7233 (eval $ac_compile) 2>&5
7234 ac_status=$?
7235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7236 (exit $ac_status); } &&
7237 { ac_try='test -s conftest.$ac_objext'
7238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7239 (eval $ac_try) 2>&5
7240 ac_status=$?
7241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7242 (exit $ac_status); }; }; then
7243 ac_hi=$ac_mid
7244else
7245 echo "$as_me: failed program was:" >&5
7246cat conftest.$ac_ext >&5
7247ac_lo=`expr '(' $ac_mid ')' + 1`
7248fi
7249rm -f conftest.$ac_objext conftest.$ac_ext
7250done
7251case $ac_lo in
7252?*) ac_cv_sizeof_float=$ac_lo;;
7253'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7254echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7255 { (exit 1); exit 1; }; } ;;
7256esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007257else
7258 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007259 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7260echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7261 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007262else
Martin v. Löwis11437992002-04-12 09:54:03 +00007263 cat >conftest.$ac_ext <<_ACEOF
7264#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007265#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007266$ac_includes_default
7267long longval () { return (long) (sizeof (float)); }
7268unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007269#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007270#include <stdlib.h>
7271#ifdef F77_DUMMY_MAIN
7272# ifdef __cplusplus
7273 extern "C"
7274# endif
7275 int F77_DUMMY_MAIN() { return 1; }
7276#endif
7277int
7278main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007279{
Martin v. Löwis11437992002-04-12 09:54:03 +00007280
7281 FILE *f = fopen ("conftest.val", "w");
7282 if (! f)
7283 exit (1);
7284 if (((long) (sizeof (float))) < 0)
7285 {
7286 long i = longval ();
7287 if (i != ((long) (sizeof (float))))
7288 exit (1);
7289 fprintf (f, "%ld\n", i);
7290 }
7291 else
7292 {
7293 unsigned long i = ulongval ();
7294 if (i != ((long) (sizeof (float))))
7295 exit (1);
7296 fprintf (f, "%lu\n", i);
7297 }
7298 exit (ferror (f) || fclose (f) != 0);
7299
7300 ;
7301 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007302}
Martin v. Löwis11437992002-04-12 09:54:03 +00007303_ACEOF
7304rm -f conftest$ac_exeext
7305if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7306 (eval $ac_link) 2>&5
7307 ac_status=$?
7308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7309 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7311 (eval $ac_try) 2>&5
7312 ac_status=$?
7313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7314 (exit $ac_status); }; }; then
7315 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007316else
Martin v. Löwis11437992002-04-12 09:54:03 +00007317 echo "$as_me: program exited with status $ac_status" >&5
7318echo "$as_me: failed program was:" >&5
7319cat conftest.$ac_ext >&5
7320( exit $ac_status )
7321{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7322echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7323 { (exit 1); exit 1; }; }
7324fi
7325rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7326fi
7327fi
7328rm -f conftest.val
7329else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007330 ac_cv_sizeof_float=0
7331fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007332fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007333echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7334echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7335cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007336#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007337_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007338
7339
Martin v. Löwis11437992002-04-12 09:54:03 +00007340echo "$as_me:$LINENO: checking for double" >&5
7341echo $ECHO_N "checking for double... $ECHO_C" >&6
7342if test "${ac_cv_type_double+set}" = set; then
7343 echo $ECHO_N "(cached) $ECHO_C" >&6
7344else
7345 cat >conftest.$ac_ext <<_ACEOF
7346#line $LINENO "configure"
7347#include "confdefs.h"
7348$ac_includes_default
7349#ifdef F77_DUMMY_MAIN
7350# ifdef __cplusplus
7351 extern "C"
7352# endif
7353 int F77_DUMMY_MAIN() { return 1; }
7354#endif
7355int
7356main ()
7357{
7358if ((double *) 0)
7359 return 0;
7360if (sizeof (double))
7361 return 0;
7362 ;
7363 return 0;
7364}
7365_ACEOF
7366rm -f conftest.$ac_objext
7367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7368 (eval $ac_compile) 2>&5
7369 ac_status=$?
7370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7371 (exit $ac_status); } &&
7372 { ac_try='test -s conftest.$ac_objext'
7373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7374 (eval $ac_try) 2>&5
7375 ac_status=$?
7376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7377 (exit $ac_status); }; }; then
7378 ac_cv_type_double=yes
7379else
7380 echo "$as_me: failed program was:" >&5
7381cat conftest.$ac_ext >&5
7382ac_cv_type_double=no
7383fi
7384rm -f conftest.$ac_objext conftest.$ac_ext
7385fi
7386echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7387echo "${ECHO_T}$ac_cv_type_double" >&6
7388
7389echo "$as_me:$LINENO: checking size of double" >&5
7390echo $ECHO_N "checking size of double... $ECHO_C" >&6
7391if test "${ac_cv_sizeof_double+set}" = set; then
7392 echo $ECHO_N "(cached) $ECHO_C" >&6
7393else
7394 if test "$ac_cv_type_double" = yes; then
7395 # The cast to unsigned long works around a bug in the HP C Compiler
7396 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7397 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7398 # This bug is HP SR number 8606223364.
7399 if test "$cross_compiling" = yes; then
7400 # Depending upon the size, compute the lo and hi bounds.
7401cat >conftest.$ac_ext <<_ACEOF
7402#line $LINENO "configure"
7403#include "confdefs.h"
7404$ac_includes_default
7405#ifdef F77_DUMMY_MAIN
7406# ifdef __cplusplus
7407 extern "C"
7408# endif
7409 int F77_DUMMY_MAIN() { return 1; }
7410#endif
7411int
7412main ()
7413{
7414static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7415test_array [0] = 0
7416
7417 ;
7418 return 0;
7419}
7420_ACEOF
7421rm -f conftest.$ac_objext
7422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7423 (eval $ac_compile) 2>&5
7424 ac_status=$?
7425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7426 (exit $ac_status); } &&
7427 { ac_try='test -s conftest.$ac_objext'
7428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7429 (eval $ac_try) 2>&5
7430 ac_status=$?
7431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7432 (exit $ac_status); }; }; then
7433 ac_lo=0 ac_mid=0
7434 while :; do
7435 cat >conftest.$ac_ext <<_ACEOF
7436#line $LINENO "configure"
7437#include "confdefs.h"
7438$ac_includes_default
7439#ifdef F77_DUMMY_MAIN
7440# ifdef __cplusplus
7441 extern "C"
7442# endif
7443 int F77_DUMMY_MAIN() { return 1; }
7444#endif
7445int
7446main ()
7447{
7448static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7449test_array [0] = 0
7450
7451 ;
7452 return 0;
7453}
7454_ACEOF
7455rm -f conftest.$ac_objext
7456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7457 (eval $ac_compile) 2>&5
7458 ac_status=$?
7459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7460 (exit $ac_status); } &&
7461 { ac_try='test -s conftest.$ac_objext'
7462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7463 (eval $ac_try) 2>&5
7464 ac_status=$?
7465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7466 (exit $ac_status); }; }; then
7467 ac_hi=$ac_mid; break
7468else
7469 echo "$as_me: failed program was:" >&5
7470cat conftest.$ac_ext >&5
7471ac_lo=`expr $ac_mid + 1`
7472 if test $ac_lo -le $ac_mid; then
7473 ac_lo= ac_hi=
7474 break
7475 fi
7476 ac_mid=`expr 2 '*' $ac_mid + 1`
7477fi
7478rm -f conftest.$ac_objext conftest.$ac_ext
7479 done
7480else
7481 echo "$as_me: failed program was:" >&5
7482cat conftest.$ac_ext >&5
7483cat >conftest.$ac_ext <<_ACEOF
7484#line $LINENO "configure"
7485#include "confdefs.h"
7486$ac_includes_default
7487#ifdef F77_DUMMY_MAIN
7488# ifdef __cplusplus
7489 extern "C"
7490# endif
7491 int F77_DUMMY_MAIN() { return 1; }
7492#endif
7493int
7494main ()
7495{
7496static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7497test_array [0] = 0
7498
7499 ;
7500 return 0;
7501}
7502_ACEOF
7503rm -f conftest.$ac_objext
7504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7505 (eval $ac_compile) 2>&5
7506 ac_status=$?
7507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7508 (exit $ac_status); } &&
7509 { ac_try='test -s conftest.$ac_objext'
7510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7511 (eval $ac_try) 2>&5
7512 ac_status=$?
7513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7514 (exit $ac_status); }; }; then
7515 ac_hi=-1 ac_mid=-1
7516 while :; do
7517 cat >conftest.$ac_ext <<_ACEOF
7518#line $LINENO "configure"
7519#include "confdefs.h"
7520$ac_includes_default
7521#ifdef F77_DUMMY_MAIN
7522# ifdef __cplusplus
7523 extern "C"
7524# endif
7525 int F77_DUMMY_MAIN() { return 1; }
7526#endif
7527int
7528main ()
7529{
7530static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7531test_array [0] = 0
7532
7533 ;
7534 return 0;
7535}
7536_ACEOF
7537rm -f conftest.$ac_objext
7538if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7539 (eval $ac_compile) 2>&5
7540 ac_status=$?
7541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7542 (exit $ac_status); } &&
7543 { ac_try='test -s conftest.$ac_objext'
7544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7545 (eval $ac_try) 2>&5
7546 ac_status=$?
7547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7548 (exit $ac_status); }; }; then
7549 ac_lo=$ac_mid; break
7550else
7551 echo "$as_me: failed program was:" >&5
7552cat conftest.$ac_ext >&5
7553ac_hi=`expr '(' $ac_mid ')' - 1`
7554 if test $ac_mid -le $ac_hi; then
7555 ac_lo= ac_hi=
7556 break
7557 fi
7558 ac_mid=`expr 2 '*' $ac_mid`
7559fi
7560rm -f conftest.$ac_objext conftest.$ac_ext
7561 done
7562else
7563 echo "$as_me: failed program was:" >&5
7564cat conftest.$ac_ext >&5
7565ac_lo= ac_hi=
7566fi
7567rm -f conftest.$ac_objext conftest.$ac_ext
7568fi
7569rm -f conftest.$ac_objext conftest.$ac_ext
7570# Binary search between lo and hi bounds.
7571while test "x$ac_lo" != "x$ac_hi"; do
7572 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7573 cat >conftest.$ac_ext <<_ACEOF
7574#line $LINENO "configure"
7575#include "confdefs.h"
7576$ac_includes_default
7577#ifdef F77_DUMMY_MAIN
7578# ifdef __cplusplus
7579 extern "C"
7580# endif
7581 int F77_DUMMY_MAIN() { return 1; }
7582#endif
7583int
7584main ()
7585{
7586static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7587test_array [0] = 0
7588
7589 ;
7590 return 0;
7591}
7592_ACEOF
7593rm -f conftest.$ac_objext
7594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7595 (eval $ac_compile) 2>&5
7596 ac_status=$?
7597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7598 (exit $ac_status); } &&
7599 { ac_try='test -s conftest.$ac_objext'
7600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7601 (eval $ac_try) 2>&5
7602 ac_status=$?
7603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7604 (exit $ac_status); }; }; then
7605 ac_hi=$ac_mid
7606else
7607 echo "$as_me: failed program was:" >&5
7608cat conftest.$ac_ext >&5
7609ac_lo=`expr '(' $ac_mid ')' + 1`
7610fi
7611rm -f conftest.$ac_objext conftest.$ac_ext
7612done
7613case $ac_lo in
7614?*) ac_cv_sizeof_double=$ac_lo;;
7615'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7616echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7617 { (exit 1); exit 1; }; } ;;
7618esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007619else
7620 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007621 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7622echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7623 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007624else
Martin v. Löwis11437992002-04-12 09:54:03 +00007625 cat >conftest.$ac_ext <<_ACEOF
7626#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007627#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007628$ac_includes_default
7629long longval () { return (long) (sizeof (double)); }
7630unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007631#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007632#include <stdlib.h>
7633#ifdef F77_DUMMY_MAIN
7634# ifdef __cplusplus
7635 extern "C"
7636# endif
7637 int F77_DUMMY_MAIN() { return 1; }
7638#endif
7639int
7640main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007641{
Martin v. Löwis11437992002-04-12 09:54:03 +00007642
7643 FILE *f = fopen ("conftest.val", "w");
7644 if (! f)
7645 exit (1);
7646 if (((long) (sizeof (double))) < 0)
7647 {
7648 long i = longval ();
7649 if (i != ((long) (sizeof (double))))
7650 exit (1);
7651 fprintf (f, "%ld\n", i);
7652 }
7653 else
7654 {
7655 unsigned long i = ulongval ();
7656 if (i != ((long) (sizeof (double))))
7657 exit (1);
7658 fprintf (f, "%lu\n", i);
7659 }
7660 exit (ferror (f) || fclose (f) != 0);
7661
7662 ;
7663 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007664}
Martin v. Löwis11437992002-04-12 09:54:03 +00007665_ACEOF
7666rm -f conftest$ac_exeext
7667if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7668 (eval $ac_link) 2>&5
7669 ac_status=$?
7670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7671 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7673 (eval $ac_try) 2>&5
7674 ac_status=$?
7675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7676 (exit $ac_status); }; }; then
7677 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007678else
Martin v. Löwis11437992002-04-12 09:54:03 +00007679 echo "$as_me: program exited with status $ac_status" >&5
7680echo "$as_me: failed program was:" >&5
7681cat conftest.$ac_ext >&5
7682( exit $ac_status )
7683{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7684echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7685 { (exit 1); exit 1; }; }
7686fi
7687rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7688fi
7689fi
7690rm -f conftest.val
7691else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007692 ac_cv_sizeof_double=0
7693fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007694fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007695echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7696echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7697cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007698#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007699_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007700
7701
Martin v. Löwis11437992002-04-12 09:54:03 +00007702echo "$as_me:$LINENO: checking for fpos_t" >&5
7703echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7704if test "${ac_cv_type_fpos_t+set}" = set; then
7705 echo $ECHO_N "(cached) $ECHO_C" >&6
7706else
7707 cat >conftest.$ac_ext <<_ACEOF
7708#line $LINENO "configure"
7709#include "confdefs.h"
7710$ac_includes_default
7711#ifdef F77_DUMMY_MAIN
7712# ifdef __cplusplus
7713 extern "C"
7714# endif
7715 int F77_DUMMY_MAIN() { return 1; }
7716#endif
7717int
7718main ()
7719{
7720if ((fpos_t *) 0)
7721 return 0;
7722if (sizeof (fpos_t))
7723 return 0;
7724 ;
7725 return 0;
7726}
7727_ACEOF
7728rm -f conftest.$ac_objext
7729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7730 (eval $ac_compile) 2>&5
7731 ac_status=$?
7732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7733 (exit $ac_status); } &&
7734 { ac_try='test -s conftest.$ac_objext'
7735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7736 (eval $ac_try) 2>&5
7737 ac_status=$?
7738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7739 (exit $ac_status); }; }; then
7740 ac_cv_type_fpos_t=yes
7741else
7742 echo "$as_me: failed program was:" >&5
7743cat conftest.$ac_ext >&5
7744ac_cv_type_fpos_t=no
7745fi
7746rm -f conftest.$ac_objext conftest.$ac_ext
7747fi
7748echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7749echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7750
7751echo "$as_me:$LINENO: checking size of fpos_t" >&5
7752echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7753if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7754 echo $ECHO_N "(cached) $ECHO_C" >&6
7755else
7756 if test "$ac_cv_type_fpos_t" = yes; then
7757 # The cast to unsigned long works around a bug in the HP C Compiler
7758 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7759 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7760 # This bug is HP SR number 8606223364.
7761 if test "$cross_compiling" = yes; then
7762 # Depending upon the size, compute the lo and hi bounds.
7763cat >conftest.$ac_ext <<_ACEOF
7764#line $LINENO "configure"
7765#include "confdefs.h"
7766$ac_includes_default
7767#ifdef F77_DUMMY_MAIN
7768# ifdef __cplusplus
7769 extern "C"
7770# endif
7771 int F77_DUMMY_MAIN() { return 1; }
7772#endif
7773int
7774main ()
7775{
7776static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7777test_array [0] = 0
7778
7779 ;
7780 return 0;
7781}
7782_ACEOF
7783rm -f conftest.$ac_objext
7784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7785 (eval $ac_compile) 2>&5
7786 ac_status=$?
7787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7788 (exit $ac_status); } &&
7789 { ac_try='test -s conftest.$ac_objext'
7790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7791 (eval $ac_try) 2>&5
7792 ac_status=$?
7793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7794 (exit $ac_status); }; }; then
7795 ac_lo=0 ac_mid=0
7796 while :; do
7797 cat >conftest.$ac_ext <<_ACEOF
7798#line $LINENO "configure"
7799#include "confdefs.h"
7800$ac_includes_default
7801#ifdef F77_DUMMY_MAIN
7802# ifdef __cplusplus
7803 extern "C"
7804# endif
7805 int F77_DUMMY_MAIN() { return 1; }
7806#endif
7807int
7808main ()
7809{
7810static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7811test_array [0] = 0
7812
7813 ;
7814 return 0;
7815}
7816_ACEOF
7817rm -f conftest.$ac_objext
7818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7819 (eval $ac_compile) 2>&5
7820 ac_status=$?
7821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7822 (exit $ac_status); } &&
7823 { ac_try='test -s conftest.$ac_objext'
7824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7825 (eval $ac_try) 2>&5
7826 ac_status=$?
7827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7828 (exit $ac_status); }; }; then
7829 ac_hi=$ac_mid; break
7830else
7831 echo "$as_me: failed program was:" >&5
7832cat conftest.$ac_ext >&5
7833ac_lo=`expr $ac_mid + 1`
7834 if test $ac_lo -le $ac_mid; then
7835 ac_lo= ac_hi=
7836 break
7837 fi
7838 ac_mid=`expr 2 '*' $ac_mid + 1`
7839fi
7840rm -f conftest.$ac_objext conftest.$ac_ext
7841 done
7842else
7843 echo "$as_me: failed program was:" >&5
7844cat conftest.$ac_ext >&5
7845cat >conftest.$ac_ext <<_ACEOF
7846#line $LINENO "configure"
7847#include "confdefs.h"
7848$ac_includes_default
7849#ifdef F77_DUMMY_MAIN
7850# ifdef __cplusplus
7851 extern "C"
7852# endif
7853 int F77_DUMMY_MAIN() { return 1; }
7854#endif
7855int
7856main ()
7857{
7858static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7859test_array [0] = 0
7860
7861 ;
7862 return 0;
7863}
7864_ACEOF
7865rm -f conftest.$ac_objext
7866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7867 (eval $ac_compile) 2>&5
7868 ac_status=$?
7869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7870 (exit $ac_status); } &&
7871 { ac_try='test -s conftest.$ac_objext'
7872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7873 (eval $ac_try) 2>&5
7874 ac_status=$?
7875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7876 (exit $ac_status); }; }; then
7877 ac_hi=-1 ac_mid=-1
7878 while :; do
7879 cat >conftest.$ac_ext <<_ACEOF
7880#line $LINENO "configure"
7881#include "confdefs.h"
7882$ac_includes_default
7883#ifdef F77_DUMMY_MAIN
7884# ifdef __cplusplus
7885 extern "C"
7886# endif
7887 int F77_DUMMY_MAIN() { return 1; }
7888#endif
7889int
7890main ()
7891{
7892static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7893test_array [0] = 0
7894
7895 ;
7896 return 0;
7897}
7898_ACEOF
7899rm -f conftest.$ac_objext
7900if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7901 (eval $ac_compile) 2>&5
7902 ac_status=$?
7903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7904 (exit $ac_status); } &&
7905 { ac_try='test -s conftest.$ac_objext'
7906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7907 (eval $ac_try) 2>&5
7908 ac_status=$?
7909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7910 (exit $ac_status); }; }; then
7911 ac_lo=$ac_mid; break
7912else
7913 echo "$as_me: failed program was:" >&5
7914cat conftest.$ac_ext >&5
7915ac_hi=`expr '(' $ac_mid ')' - 1`
7916 if test $ac_mid -le $ac_hi; then
7917 ac_lo= ac_hi=
7918 break
7919 fi
7920 ac_mid=`expr 2 '*' $ac_mid`
7921fi
7922rm -f conftest.$ac_objext conftest.$ac_ext
7923 done
7924else
7925 echo "$as_me: failed program was:" >&5
7926cat conftest.$ac_ext >&5
7927ac_lo= ac_hi=
7928fi
7929rm -f conftest.$ac_objext conftest.$ac_ext
7930fi
7931rm -f conftest.$ac_objext conftest.$ac_ext
7932# Binary search between lo and hi bounds.
7933while test "x$ac_lo" != "x$ac_hi"; do
7934 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7935 cat >conftest.$ac_ext <<_ACEOF
7936#line $LINENO "configure"
7937#include "confdefs.h"
7938$ac_includes_default
7939#ifdef F77_DUMMY_MAIN
7940# ifdef __cplusplus
7941 extern "C"
7942# endif
7943 int F77_DUMMY_MAIN() { return 1; }
7944#endif
7945int
7946main ()
7947{
7948static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7949test_array [0] = 0
7950
7951 ;
7952 return 0;
7953}
7954_ACEOF
7955rm -f conftest.$ac_objext
7956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7957 (eval $ac_compile) 2>&5
7958 ac_status=$?
7959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7960 (exit $ac_status); } &&
7961 { ac_try='test -s conftest.$ac_objext'
7962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7963 (eval $ac_try) 2>&5
7964 ac_status=$?
7965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7966 (exit $ac_status); }; }; then
7967 ac_hi=$ac_mid
7968else
7969 echo "$as_me: failed program was:" >&5
7970cat conftest.$ac_ext >&5
7971ac_lo=`expr '(' $ac_mid ')' + 1`
7972fi
7973rm -f conftest.$ac_objext conftest.$ac_ext
7974done
7975case $ac_lo in
7976?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7977'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7978echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7979 { (exit 1); exit 1; }; } ;;
7980esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007981else
7982 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007983 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7984echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7985 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007986else
Martin v. Löwis11437992002-04-12 09:54:03 +00007987 cat >conftest.$ac_ext <<_ACEOF
7988#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007989#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007990$ac_includes_default
7991long longval () { return (long) (sizeof (fpos_t)); }
7992unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007993#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007994#include <stdlib.h>
7995#ifdef F77_DUMMY_MAIN
7996# ifdef __cplusplus
7997 extern "C"
7998# endif
7999 int F77_DUMMY_MAIN() { return 1; }
8000#endif
8001int
8002main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008003{
Martin v. Löwis11437992002-04-12 09:54:03 +00008004
8005 FILE *f = fopen ("conftest.val", "w");
8006 if (! f)
8007 exit (1);
8008 if (((long) (sizeof (fpos_t))) < 0)
8009 {
8010 long i = longval ();
8011 if (i != ((long) (sizeof (fpos_t))))
8012 exit (1);
8013 fprintf (f, "%ld\n", i);
8014 }
8015 else
8016 {
8017 unsigned long i = ulongval ();
8018 if (i != ((long) (sizeof (fpos_t))))
8019 exit (1);
8020 fprintf (f, "%lu\n", i);
8021 }
8022 exit (ferror (f) || fclose (f) != 0);
8023
8024 ;
8025 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008026}
Martin v. Löwis11437992002-04-12 09:54:03 +00008027_ACEOF
8028rm -f conftest$ac_exeext
8029if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8030 (eval $ac_link) 2>&5
8031 ac_status=$?
8032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8033 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8035 (eval $ac_try) 2>&5
8036 ac_status=$?
8037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8038 (exit $ac_status); }; }; then
8039 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008040else
Martin v. Löwis11437992002-04-12 09:54:03 +00008041 echo "$as_me: program exited with status $ac_status" >&5
8042echo "$as_me: failed program was:" >&5
8043cat conftest.$ac_ext >&5
8044( exit $ac_status )
8045{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8046echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8047 { (exit 1); exit 1; }; }
8048fi
8049rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8050fi
8051fi
8052rm -f conftest.val
8053else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008054 ac_cv_sizeof_fpos_t=0
8055fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008056fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008057echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8058echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8059cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008060#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008061_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008062
Michael W. Hudson54241132001-12-07 15:38:26 +00008063
8064
Martin v. Löwis11437992002-04-12 09:54:03 +00008065echo "$as_me:$LINENO: checking for long long support" >&5
8066echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008067have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008068cat >conftest.$ac_ext <<_ACEOF
8069#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008070#include "confdefs.h"
8071
Martin v. Löwis11437992002-04-12 09:54:03 +00008072#ifdef F77_DUMMY_MAIN
8073# ifdef __cplusplus
8074 extern "C"
8075# endif
8076 int F77_DUMMY_MAIN() { return 1; }
8077#endif
8078int
8079main ()
8080{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008081long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 ;
8083 return 0;
8084}
8085_ACEOF
8086rm -f conftest.$ac_objext
8087if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8088 (eval $ac_compile) 2>&5
8089 ac_status=$?
8090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8091 (exit $ac_status); } &&
8092 { ac_try='test -s conftest.$ac_objext'
8093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8094 (eval $ac_try) 2>&5
8095 ac_status=$?
8096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8097 (exit $ac_status); }; }; then
8098
8099
8100cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008101#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008102_ACEOF
8103
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008104 have_long_long=yes
8105
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008106else
Martin v. Löwis11437992002-04-12 09:54:03 +00008107 echo "$as_me: failed program was:" >&5
8108cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008109fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008110rm -f conftest.$ac_objext conftest.$ac_ext
8111echo "$as_me:$LINENO: result: $have_long_long" >&5
8112echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008113if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008114echo "$as_me:$LINENO: checking for long long" >&5
8115echo $ECHO_N "checking for long long... $ECHO_C" >&6
8116if test "${ac_cv_type_long_long+set}" = set; then
8117 echo $ECHO_N "(cached) $ECHO_C" >&6
8118else
8119 cat >conftest.$ac_ext <<_ACEOF
8120#line $LINENO "configure"
8121#include "confdefs.h"
8122$ac_includes_default
8123#ifdef F77_DUMMY_MAIN
8124# ifdef __cplusplus
8125 extern "C"
8126# endif
8127 int F77_DUMMY_MAIN() { return 1; }
8128#endif
8129int
8130main ()
8131{
8132if ((long long *) 0)
8133 return 0;
8134if (sizeof (long long))
8135 return 0;
8136 ;
8137 return 0;
8138}
8139_ACEOF
8140rm -f conftest.$ac_objext
8141if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8142 (eval $ac_compile) 2>&5
8143 ac_status=$?
8144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8145 (exit $ac_status); } &&
8146 { ac_try='test -s conftest.$ac_objext'
8147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8148 (eval $ac_try) 2>&5
8149 ac_status=$?
8150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8151 (exit $ac_status); }; }; then
8152 ac_cv_type_long_long=yes
8153else
8154 echo "$as_me: failed program was:" >&5
8155cat conftest.$ac_ext >&5
8156ac_cv_type_long_long=no
8157fi
8158rm -f conftest.$ac_objext conftest.$ac_ext
8159fi
8160echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8161echo "${ECHO_T}$ac_cv_type_long_long" >&6
8162
8163echo "$as_me:$LINENO: checking size of long long" >&5
8164echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8165if test "${ac_cv_sizeof_long_long+set}" = set; then
8166 echo $ECHO_N "(cached) $ECHO_C" >&6
8167else
8168 if test "$ac_cv_type_long_long" = yes; then
8169 # The cast to unsigned long works around a bug in the HP C Compiler
8170 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8171 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8172 # This bug is HP SR number 8606223364.
8173 if test "$cross_compiling" = yes; then
8174 # Depending upon the size, compute the lo and hi bounds.
8175cat >conftest.$ac_ext <<_ACEOF
8176#line $LINENO "configure"
8177#include "confdefs.h"
8178$ac_includes_default
8179#ifdef F77_DUMMY_MAIN
8180# ifdef __cplusplus
8181 extern "C"
8182# endif
8183 int F77_DUMMY_MAIN() { return 1; }
8184#endif
8185int
8186main ()
8187{
8188static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8189test_array [0] = 0
8190
8191 ;
8192 return 0;
8193}
8194_ACEOF
8195rm -f conftest.$ac_objext
8196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8197 (eval $ac_compile) 2>&5
8198 ac_status=$?
8199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8200 (exit $ac_status); } &&
8201 { ac_try='test -s conftest.$ac_objext'
8202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8203 (eval $ac_try) 2>&5
8204 ac_status=$?
8205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8206 (exit $ac_status); }; }; then
8207 ac_lo=0 ac_mid=0
8208 while :; do
8209 cat >conftest.$ac_ext <<_ACEOF
8210#line $LINENO "configure"
8211#include "confdefs.h"
8212$ac_includes_default
8213#ifdef F77_DUMMY_MAIN
8214# ifdef __cplusplus
8215 extern "C"
8216# endif
8217 int F77_DUMMY_MAIN() { return 1; }
8218#endif
8219int
8220main ()
8221{
8222static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8223test_array [0] = 0
8224
8225 ;
8226 return 0;
8227}
8228_ACEOF
8229rm -f conftest.$ac_objext
8230if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8231 (eval $ac_compile) 2>&5
8232 ac_status=$?
8233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8234 (exit $ac_status); } &&
8235 { ac_try='test -s conftest.$ac_objext'
8236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8237 (eval $ac_try) 2>&5
8238 ac_status=$?
8239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8240 (exit $ac_status); }; }; then
8241 ac_hi=$ac_mid; break
8242else
8243 echo "$as_me: failed program was:" >&5
8244cat conftest.$ac_ext >&5
8245ac_lo=`expr $ac_mid + 1`
8246 if test $ac_lo -le $ac_mid; then
8247 ac_lo= ac_hi=
8248 break
8249 fi
8250 ac_mid=`expr 2 '*' $ac_mid + 1`
8251fi
8252rm -f conftest.$ac_objext conftest.$ac_ext
8253 done
8254else
8255 echo "$as_me: failed program was:" >&5
8256cat conftest.$ac_ext >&5
8257cat >conftest.$ac_ext <<_ACEOF
8258#line $LINENO "configure"
8259#include "confdefs.h"
8260$ac_includes_default
8261#ifdef F77_DUMMY_MAIN
8262# ifdef __cplusplus
8263 extern "C"
8264# endif
8265 int F77_DUMMY_MAIN() { return 1; }
8266#endif
8267int
8268main ()
8269{
8270static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8271test_array [0] = 0
8272
8273 ;
8274 return 0;
8275}
8276_ACEOF
8277rm -f conftest.$ac_objext
8278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8279 (eval $ac_compile) 2>&5
8280 ac_status=$?
8281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8282 (exit $ac_status); } &&
8283 { ac_try='test -s conftest.$ac_objext'
8284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8285 (eval $ac_try) 2>&5
8286 ac_status=$?
8287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8288 (exit $ac_status); }; }; then
8289 ac_hi=-1 ac_mid=-1
8290 while :; do
8291 cat >conftest.$ac_ext <<_ACEOF
8292#line $LINENO "configure"
8293#include "confdefs.h"
8294$ac_includes_default
8295#ifdef F77_DUMMY_MAIN
8296# ifdef __cplusplus
8297 extern "C"
8298# endif
8299 int F77_DUMMY_MAIN() { return 1; }
8300#endif
8301int
8302main ()
8303{
8304static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8305test_array [0] = 0
8306
8307 ;
8308 return 0;
8309}
8310_ACEOF
8311rm -f conftest.$ac_objext
8312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8313 (eval $ac_compile) 2>&5
8314 ac_status=$?
8315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8316 (exit $ac_status); } &&
8317 { ac_try='test -s conftest.$ac_objext'
8318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8319 (eval $ac_try) 2>&5
8320 ac_status=$?
8321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8322 (exit $ac_status); }; }; then
8323 ac_lo=$ac_mid; break
8324else
8325 echo "$as_me: failed program was:" >&5
8326cat conftest.$ac_ext >&5
8327ac_hi=`expr '(' $ac_mid ')' - 1`
8328 if test $ac_mid -le $ac_hi; then
8329 ac_lo= ac_hi=
8330 break
8331 fi
8332 ac_mid=`expr 2 '*' $ac_mid`
8333fi
8334rm -f conftest.$ac_objext conftest.$ac_ext
8335 done
8336else
8337 echo "$as_me: failed program was:" >&5
8338cat conftest.$ac_ext >&5
8339ac_lo= ac_hi=
8340fi
8341rm -f conftest.$ac_objext conftest.$ac_ext
8342fi
8343rm -f conftest.$ac_objext conftest.$ac_ext
8344# Binary search between lo and hi bounds.
8345while test "x$ac_lo" != "x$ac_hi"; do
8346 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8347 cat >conftest.$ac_ext <<_ACEOF
8348#line $LINENO "configure"
8349#include "confdefs.h"
8350$ac_includes_default
8351#ifdef F77_DUMMY_MAIN
8352# ifdef __cplusplus
8353 extern "C"
8354# endif
8355 int F77_DUMMY_MAIN() { return 1; }
8356#endif
8357int
8358main ()
8359{
8360static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8361test_array [0] = 0
8362
8363 ;
8364 return 0;
8365}
8366_ACEOF
8367rm -f conftest.$ac_objext
8368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8369 (eval $ac_compile) 2>&5
8370 ac_status=$?
8371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8372 (exit $ac_status); } &&
8373 { ac_try='test -s conftest.$ac_objext'
8374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8375 (eval $ac_try) 2>&5
8376 ac_status=$?
8377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8378 (exit $ac_status); }; }; then
8379 ac_hi=$ac_mid
8380else
8381 echo "$as_me: failed program was:" >&5
8382cat conftest.$ac_ext >&5
8383ac_lo=`expr '(' $ac_mid ')' + 1`
8384fi
8385rm -f conftest.$ac_objext conftest.$ac_ext
8386done
8387case $ac_lo in
8388?*) ac_cv_sizeof_long_long=$ac_lo;;
8389'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8390echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8391 { (exit 1); exit 1; }; } ;;
8392esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008393else
8394 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008395 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8396echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8397 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008398else
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 cat >conftest.$ac_ext <<_ACEOF
8400#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008401#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008402$ac_includes_default
8403long longval () { return (long) (sizeof (long long)); }
8404unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008405#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008406#include <stdlib.h>
8407#ifdef F77_DUMMY_MAIN
8408# ifdef __cplusplus
8409 extern "C"
8410# endif
8411 int F77_DUMMY_MAIN() { return 1; }
8412#endif
8413int
8414main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008415{
Martin v. Löwis11437992002-04-12 09:54:03 +00008416
8417 FILE *f = fopen ("conftest.val", "w");
8418 if (! f)
8419 exit (1);
8420 if (((long) (sizeof (long long))) < 0)
8421 {
8422 long i = longval ();
8423 if (i != ((long) (sizeof (long long))))
8424 exit (1);
8425 fprintf (f, "%ld\n", i);
8426 }
8427 else
8428 {
8429 unsigned long i = ulongval ();
8430 if (i != ((long) (sizeof (long long))))
8431 exit (1);
8432 fprintf (f, "%lu\n", i);
8433 }
8434 exit (ferror (f) || fclose (f) != 0);
8435
8436 ;
8437 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008438}
Martin v. Löwis11437992002-04-12 09:54:03 +00008439_ACEOF
8440rm -f conftest$ac_exeext
8441if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8442 (eval $ac_link) 2>&5
8443 ac_status=$?
8444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8445 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8447 (eval $ac_try) 2>&5
8448 ac_status=$?
8449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8450 (exit $ac_status); }; }; then
8451 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008452else
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 echo "$as_me: program exited with status $ac_status" >&5
8454echo "$as_me: failed program was:" >&5
8455cat conftest.$ac_ext >&5
8456( exit $ac_status )
8457{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8458echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8459 { (exit 1); exit 1; }; }
8460fi
8461rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8462fi
8463fi
8464rm -f conftest.val
8465else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008466 ac_cv_sizeof_long_long=0
8467fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008468fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008469echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8470echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8471cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008472#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008473_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008474
Michael W. Hudson54241132001-12-07 15:38:26 +00008475
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008476fi
8477
Martin v. Löwis11437992002-04-12 09:54:03 +00008478echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8479echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008480have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008481cat >conftest.$ac_ext <<_ACEOF
8482#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008483#include "confdefs.h"
8484
Martin v. Löwis11437992002-04-12 09:54:03 +00008485#ifdef F77_DUMMY_MAIN
8486# ifdef __cplusplus
8487 extern "C"
8488# endif
8489 int F77_DUMMY_MAIN() { return 1; }
8490#endif
8491int
8492main ()
8493{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008494uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008495 ;
8496 return 0;
8497}
8498_ACEOF
8499rm -f conftest.$ac_objext
8500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8501 (eval $ac_compile) 2>&5
8502 ac_status=$?
8503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8504 (exit $ac_status); } &&
8505 { ac_try='test -s conftest.$ac_objext'
8506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8507 (eval $ac_try) 2>&5
8508 ac_status=$?
8509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8510 (exit $ac_status); }; }; then
8511
8512
8513cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008514#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008515_ACEOF
8516
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008517 have_uintptr_t=yes
8518
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008519else
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 echo "$as_me: failed program was:" >&5
8521cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008522fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008523rm -f conftest.$ac_objext conftest.$ac_ext
8524echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8525echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008526if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008527echo "$as_me:$LINENO: checking for uintptr_t" >&5
8528echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8529if test "${ac_cv_type_uintptr_t+set}" = set; then
8530 echo $ECHO_N "(cached) $ECHO_C" >&6
8531else
8532 cat >conftest.$ac_ext <<_ACEOF
8533#line $LINENO "configure"
8534#include "confdefs.h"
8535$ac_includes_default
8536#ifdef F77_DUMMY_MAIN
8537# ifdef __cplusplus
8538 extern "C"
8539# endif
8540 int F77_DUMMY_MAIN() { return 1; }
8541#endif
8542int
8543main ()
8544{
8545if ((uintptr_t *) 0)
8546 return 0;
8547if (sizeof (uintptr_t))
8548 return 0;
8549 ;
8550 return 0;
8551}
8552_ACEOF
8553rm -f conftest.$ac_objext
8554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8555 (eval $ac_compile) 2>&5
8556 ac_status=$?
8557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8558 (exit $ac_status); } &&
8559 { ac_try='test -s conftest.$ac_objext'
8560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8561 (eval $ac_try) 2>&5
8562 ac_status=$?
8563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8564 (exit $ac_status); }; }; then
8565 ac_cv_type_uintptr_t=yes
8566else
8567 echo "$as_me: failed program was:" >&5
8568cat conftest.$ac_ext >&5
8569ac_cv_type_uintptr_t=no
8570fi
8571rm -f conftest.$ac_objext conftest.$ac_ext
8572fi
8573echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8574echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8575
8576echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8577echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8578if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8579 echo $ECHO_N "(cached) $ECHO_C" >&6
8580else
8581 if test "$ac_cv_type_uintptr_t" = yes; then
8582 # The cast to unsigned long works around a bug in the HP C Compiler
8583 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8584 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8585 # This bug is HP SR number 8606223364.
8586 if test "$cross_compiling" = yes; then
8587 # Depending upon the size, compute the lo and hi bounds.
8588cat >conftest.$ac_ext <<_ACEOF
8589#line $LINENO "configure"
8590#include "confdefs.h"
8591$ac_includes_default
8592#ifdef F77_DUMMY_MAIN
8593# ifdef __cplusplus
8594 extern "C"
8595# endif
8596 int F77_DUMMY_MAIN() { return 1; }
8597#endif
8598int
8599main ()
8600{
8601static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8602test_array [0] = 0
8603
8604 ;
8605 return 0;
8606}
8607_ACEOF
8608rm -f conftest.$ac_objext
8609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8610 (eval $ac_compile) 2>&5
8611 ac_status=$?
8612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8613 (exit $ac_status); } &&
8614 { ac_try='test -s conftest.$ac_objext'
8615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8616 (eval $ac_try) 2>&5
8617 ac_status=$?
8618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8619 (exit $ac_status); }; }; then
8620 ac_lo=0 ac_mid=0
8621 while :; do
8622 cat >conftest.$ac_ext <<_ACEOF
8623#line $LINENO "configure"
8624#include "confdefs.h"
8625$ac_includes_default
8626#ifdef F77_DUMMY_MAIN
8627# ifdef __cplusplus
8628 extern "C"
8629# endif
8630 int F77_DUMMY_MAIN() { return 1; }
8631#endif
8632int
8633main ()
8634{
8635static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8636test_array [0] = 0
8637
8638 ;
8639 return 0;
8640}
8641_ACEOF
8642rm -f conftest.$ac_objext
8643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8644 (eval $ac_compile) 2>&5
8645 ac_status=$?
8646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8647 (exit $ac_status); } &&
8648 { ac_try='test -s conftest.$ac_objext'
8649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8650 (eval $ac_try) 2>&5
8651 ac_status=$?
8652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8653 (exit $ac_status); }; }; then
8654 ac_hi=$ac_mid; break
8655else
8656 echo "$as_me: failed program was:" >&5
8657cat conftest.$ac_ext >&5
8658ac_lo=`expr $ac_mid + 1`
8659 if test $ac_lo -le $ac_mid; then
8660 ac_lo= ac_hi=
8661 break
8662 fi
8663 ac_mid=`expr 2 '*' $ac_mid + 1`
8664fi
8665rm -f conftest.$ac_objext conftest.$ac_ext
8666 done
8667else
8668 echo "$as_me: failed program was:" >&5
8669cat conftest.$ac_ext >&5
8670cat >conftest.$ac_ext <<_ACEOF
8671#line $LINENO "configure"
8672#include "confdefs.h"
8673$ac_includes_default
8674#ifdef F77_DUMMY_MAIN
8675# ifdef __cplusplus
8676 extern "C"
8677# endif
8678 int F77_DUMMY_MAIN() { return 1; }
8679#endif
8680int
8681main ()
8682{
8683static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8684test_array [0] = 0
8685
8686 ;
8687 return 0;
8688}
8689_ACEOF
8690rm -f conftest.$ac_objext
8691if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8692 (eval $ac_compile) 2>&5
8693 ac_status=$?
8694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8695 (exit $ac_status); } &&
8696 { ac_try='test -s conftest.$ac_objext'
8697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8698 (eval $ac_try) 2>&5
8699 ac_status=$?
8700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8701 (exit $ac_status); }; }; then
8702 ac_hi=-1 ac_mid=-1
8703 while :; do
8704 cat >conftest.$ac_ext <<_ACEOF
8705#line $LINENO "configure"
8706#include "confdefs.h"
8707$ac_includes_default
8708#ifdef F77_DUMMY_MAIN
8709# ifdef __cplusplus
8710 extern "C"
8711# endif
8712 int F77_DUMMY_MAIN() { return 1; }
8713#endif
8714int
8715main ()
8716{
8717static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8718test_array [0] = 0
8719
8720 ;
8721 return 0;
8722}
8723_ACEOF
8724rm -f conftest.$ac_objext
8725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8726 (eval $ac_compile) 2>&5
8727 ac_status=$?
8728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8729 (exit $ac_status); } &&
8730 { ac_try='test -s conftest.$ac_objext'
8731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8732 (eval $ac_try) 2>&5
8733 ac_status=$?
8734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8735 (exit $ac_status); }; }; then
8736 ac_lo=$ac_mid; break
8737else
8738 echo "$as_me: failed program was:" >&5
8739cat conftest.$ac_ext >&5
8740ac_hi=`expr '(' $ac_mid ')' - 1`
8741 if test $ac_mid -le $ac_hi; then
8742 ac_lo= ac_hi=
8743 break
8744 fi
8745 ac_mid=`expr 2 '*' $ac_mid`
8746fi
8747rm -f conftest.$ac_objext conftest.$ac_ext
8748 done
8749else
8750 echo "$as_me: failed program was:" >&5
8751cat conftest.$ac_ext >&5
8752ac_lo= ac_hi=
8753fi
8754rm -f conftest.$ac_objext conftest.$ac_ext
8755fi
8756rm -f conftest.$ac_objext conftest.$ac_ext
8757# Binary search between lo and hi bounds.
8758while test "x$ac_lo" != "x$ac_hi"; do
8759 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8760 cat >conftest.$ac_ext <<_ACEOF
8761#line $LINENO "configure"
8762#include "confdefs.h"
8763$ac_includes_default
8764#ifdef F77_DUMMY_MAIN
8765# ifdef __cplusplus
8766 extern "C"
8767# endif
8768 int F77_DUMMY_MAIN() { return 1; }
8769#endif
8770int
8771main ()
8772{
8773static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8774test_array [0] = 0
8775
8776 ;
8777 return 0;
8778}
8779_ACEOF
8780rm -f conftest.$ac_objext
8781if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8782 (eval $ac_compile) 2>&5
8783 ac_status=$?
8784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8785 (exit $ac_status); } &&
8786 { ac_try='test -s conftest.$ac_objext'
8787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8788 (eval $ac_try) 2>&5
8789 ac_status=$?
8790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8791 (exit $ac_status); }; }; then
8792 ac_hi=$ac_mid
8793else
8794 echo "$as_me: failed program was:" >&5
8795cat conftest.$ac_ext >&5
8796ac_lo=`expr '(' $ac_mid ')' + 1`
8797fi
8798rm -f conftest.$ac_objext conftest.$ac_ext
8799done
8800case $ac_lo in
8801?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8802'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8803echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8804 { (exit 1); exit 1; }; } ;;
8805esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008806else
8807 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008808 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8809echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8810 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008811else
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 cat >conftest.$ac_ext <<_ACEOF
8813#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008814#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008815$ac_includes_default
8816long longval () { return (long) (sizeof (uintptr_t)); }
8817unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008818#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008819#include <stdlib.h>
8820#ifdef F77_DUMMY_MAIN
8821# ifdef __cplusplus
8822 extern "C"
8823# endif
8824 int F77_DUMMY_MAIN() { return 1; }
8825#endif
8826int
8827main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008828{
Martin v. Löwis11437992002-04-12 09:54:03 +00008829
8830 FILE *f = fopen ("conftest.val", "w");
8831 if (! f)
8832 exit (1);
8833 if (((long) (sizeof (uintptr_t))) < 0)
8834 {
8835 long i = longval ();
8836 if (i != ((long) (sizeof (uintptr_t))))
8837 exit (1);
8838 fprintf (f, "%ld\n", i);
8839 }
8840 else
8841 {
8842 unsigned long i = ulongval ();
8843 if (i != ((long) (sizeof (uintptr_t))))
8844 exit (1);
8845 fprintf (f, "%lu\n", i);
8846 }
8847 exit (ferror (f) || fclose (f) != 0);
8848
8849 ;
8850 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008851}
Martin v. Löwis11437992002-04-12 09:54:03 +00008852_ACEOF
8853rm -f conftest$ac_exeext
8854if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8855 (eval $ac_link) 2>&5
8856 ac_status=$?
8857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8858 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8860 (eval $ac_try) 2>&5
8861 ac_status=$?
8862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8863 (exit $ac_status); }; }; then
8864 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008865else
Martin v. Löwis11437992002-04-12 09:54:03 +00008866 echo "$as_me: program exited with status $ac_status" >&5
8867echo "$as_me: failed program was:" >&5
8868cat conftest.$ac_ext >&5
8869( exit $ac_status )
8870{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8871echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8872 { (exit 1); exit 1; }; }
8873fi
8874rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8875fi
8876fi
8877rm -f conftest.val
8878else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008879 ac_cv_sizeof_uintptr_t=0
8880fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008881fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008882echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8883echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8884cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008885#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008886_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008887
Michael W. Hudson54241132001-12-07 15:38:26 +00008888
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008889fi
8890
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008891# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008892echo "$as_me:$LINENO: checking size of off_t" >&5
8893echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8894if test "${ac_cv_sizeof_off_t+set}" = set; then
8895 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008896else
8897 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008898 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008899else
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 cat >conftest.$ac_ext <<_ACEOF
8901#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008902#include "confdefs.h"
8903#include <stdio.h>
8904#include <sys/types.h>
8905main()
8906{
8907 FILE *f=fopen("conftestval", "w");
8908 if (!f) exit(1);
8909 fprintf(f, "%d\n", sizeof(off_t));
8910 exit(0);
8911}
Martin v. Löwis11437992002-04-12 09:54:03 +00008912_ACEOF
8913rm -f conftest$ac_exeext
8914if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8915 (eval $ac_link) 2>&5
8916 ac_status=$?
8917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8918 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8920 (eval $ac_try) 2>&5
8921 ac_status=$?
8922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8923 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008924 ac_cv_sizeof_off_t=`cat conftestval`
8925else
Martin v. Löwis11437992002-04-12 09:54:03 +00008926 echo "$as_me: program exited with status $ac_status" >&5
8927echo "$as_me: failed program was:" >&5
8928cat conftest.$ac_ext >&5
8929( exit $ac_status )
8930ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008931fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008932rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008933fi
8934
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008935fi
8936
Martin v. Löwis11437992002-04-12 09:54:03 +00008937echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8938echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8939
8940cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008941#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008942_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008943
Michael W. Hudson54241132001-12-07 15:38:26 +00008944
Martin v. Löwis11437992002-04-12 09:54:03 +00008945echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8946echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008947if test "$have_long_long" = yes -a \
8948 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8949 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008950
Martin v. Löwis11437992002-04-12 09:54:03 +00008951cat >>confdefs.h <<\_ACEOF
8952#define HAVE_LARGEFILE_SUPPORT 1
8953_ACEOF
8954
8955 echo "$as_me:$LINENO: result: yes" >&5
8956echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008957else
Martin v. Löwis11437992002-04-12 09:54:03 +00008958 echo "$as_me:$LINENO: result: no" >&5
8959echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008960fi
8961
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008962# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008963echo "$as_me:$LINENO: checking size of time_t" >&5
8964echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8965if test "${ac_cv_sizeof_time_t+set}" = set; then
8966 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008967else
8968 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008969 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008970else
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 cat >conftest.$ac_ext <<_ACEOF
8972#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008973#include "confdefs.h"
8974#include <stdio.h>
8975#include <time.h>
8976main()
8977{
8978 FILE *f=fopen("conftestval", "w");
8979 if (!f) exit(1);
8980 fprintf(f, "%d\n", sizeof(time_t));
8981 exit(0);
8982}
Martin v. Löwis11437992002-04-12 09:54:03 +00008983_ACEOF
8984rm -f conftest$ac_exeext
8985if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8986 (eval $ac_link) 2>&5
8987 ac_status=$?
8988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8989 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8991 (eval $ac_try) 2>&5
8992 ac_status=$?
8993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8994 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008995 ac_cv_sizeof_time_t=`cat conftestval`
8996else
Martin v. Löwis11437992002-04-12 09:54:03 +00008997 echo "$as_me: program exited with status $ac_status" >&5
8998echo "$as_me: failed program was:" >&5
8999cat conftest.$ac_ext >&5
9000( exit $ac_status )
9001ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009002fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009003rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009004fi
9005
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009006fi
9007
Martin v. Löwis11437992002-04-12 09:54:03 +00009008echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9009echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9010
9011cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009012#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009013_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009014
Michael W. Hudson54241132001-12-07 15:38:26 +00009015
9016
Trent Mick635f6fb2000-08-23 21:33:05 +00009017# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009018ac_save_cc="$CC"
9019if test "$ac_cv_kpthread" = "yes"
9020then CC="$CC -Kpthread"
9021fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009022echo "$as_me:$LINENO: checking for pthread_t" >&5
9023echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009024have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009025cat >conftest.$ac_ext <<_ACEOF
9026#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009027#include "confdefs.h"
9028#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009029#ifdef F77_DUMMY_MAIN
9030# ifdef __cplusplus
9031 extern "C"
9032# endif
9033 int F77_DUMMY_MAIN() { return 1; }
9034#endif
9035int
9036main ()
9037{
Guido van Rossum12580492000-09-24 16:47:19 +00009038pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 ;
9040 return 0;
9041}
9042_ACEOF
9043rm -f conftest.$ac_objext
9044if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9045 (eval $ac_compile) 2>&5
9046 ac_status=$?
9047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9048 (exit $ac_status); } &&
9049 { ac_try='test -s conftest.$ac_objext'
9050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9051 (eval $ac_try) 2>&5
9052 ac_status=$?
9053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9054 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009055 have_pthread_t=yes
9056else
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 echo "$as_me: failed program was:" >&5
9058cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009060rm -f conftest.$ac_objext conftest.$ac_ext
9061echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9062echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009063if test "$have_pthread_t" = yes ; then
9064 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009065 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9066echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9067 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9068 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009069else
9070 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009071 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009072else
Martin v. Löwis11437992002-04-12 09:54:03 +00009073 cat >conftest.$ac_ext <<_ACEOF
9074#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009075#include "confdefs.h"
9076#include <stdio.h>
9077 #include <pthread.h>
9078 main()
9079 {
9080 FILE *f=fopen("conftestval", "w");
9081 if (!f) exit(1);
9082 fprintf(f, "%d\n", sizeof(pthread_t));
9083 exit(0);
9084 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009085_ACEOF
9086rm -f conftest$ac_exeext
9087if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9088 (eval $ac_link) 2>&5
9089 ac_status=$?
9090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9091 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9093 (eval $ac_try) 2>&5
9094 ac_status=$?
9095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9096 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009097 ac_cv_sizeof_pthread_t=`cat conftestval`
9098else
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 echo "$as_me: program exited with status $ac_status" >&5
9100echo "$as_me: failed program was:" >&5
9101cat conftest.$ac_ext >&5
9102( exit $ac_status )
9103ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009104fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009105rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009106fi
9107
Trent Mick635f6fb2000-08-23 21:33:05 +00009108fi
9109
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9111echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9112
9113cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009114#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009115_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009116
9117fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009118CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009119
Martin v. Löwis11437992002-04-12 09:54:03 +00009120echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9121echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009122# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9123if test "${enable_toolbox_glue+set}" = set; then
9124 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009125
Martin v. Löwis11437992002-04-12 09:54:03 +00009126fi;
Jack Jansene578a632001-08-15 01:27:14 +00009127
9128if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009129then
Jack Jansene578a632001-08-15 01:27:14 +00009130 case $ac_sys_system/$ac_sys_release in
9131 Darwin/*)
9132 enable_toolbox_glue="yes";;
9133 *)
9134 enable_toolbox_glue="no";;
9135 esac
9136fi
9137case "$enable_toolbox_glue" in
9138yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009139 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009140 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009141 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009142
9143cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009144#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009145_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009146
9147 ;;
9148*)
9149 extra_frameworks=""
9150 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009151 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009152 ;;
9153esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009154echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9155echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009156
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009157
9158case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009159 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009160 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009161 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009162 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9163 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009164 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009165 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009166 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009167 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9168 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009169esac
9170
Martin v. Löwis11437992002-04-12 09:54:03 +00009171echo "$as_me:$LINENO: checking for --enable-framework" >&5
9172echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009173if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009174then
Jack Jansenca06bc62001-08-03 15:32:23 +00009175 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009177 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009178 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009179
Martin v. Löwis11437992002-04-12 09:54:03 +00009180cat >>confdefs.h <<\_ACEOF
9181#define WITH_NEXT_FRAMEWORK 1
9182_ACEOF
9183
9184 echo "$as_me:$LINENO: result: yes" >&5
9185echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009186else
Martin v. Löwis11437992002-04-12 09:54:03 +00009187 echo "$as_me:$LINENO: result: no" >&5
9188echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009189fi
9190
Martin v. Löwis11437992002-04-12 09:54:03 +00009191echo "$as_me:$LINENO: checking for dyld" >&5
9192echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009193case $ac_sys_system/$ac_sys_release in
9194 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009195
Martin v. Löwis11437992002-04-12 09:54:03 +00009196cat >>confdefs.h <<\_ACEOF
9197#define WITH_DYLD 1
9198_ACEOF
9199
9200 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9201echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009202 ;;
9203 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009204 echo "$as_me:$LINENO: result: no" >&5
9205echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009206 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009207esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009208
Guido van Rossum0a516c91994-09-12 10:58:40 +00009209# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009210
Michael W. Hudson54241132001-12-07 15:38:26 +00009211
9212
9213
9214
Guido van Rossum0a516c91994-09-12 10:58:40 +00009215# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009216# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009217echo "$as_me:$LINENO: checking SO" >&5
9218echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009219if test -z "$SO"
9220then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009221 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009222 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009223 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009224 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009225 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009226fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009227echo "$as_me:$LINENO: result: $SO" >&5
9228echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009229# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009230# -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009231# (Shared libraries in this instance are shared modules to be loaded into
9232# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009233echo "$as_me:$LINENO: checking LDSHARED" >&5
9234echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009235if test -z "$LDSHARED"
9236then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009237 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009238 AIX*)
9239 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009240 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009241 ;;
9242 BeOS*)
9243 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009244 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009245 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009246 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009247 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009248 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009249 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009250 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009251 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009252 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009253 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009254 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009255 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9256 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009257 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009258 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9259 if test "$enable_framework" ; then
9260 # Link against the framework. All externals should be defined.
9261 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9262 else
9263 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009264 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009265 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009266 Darwin/*)
9267 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9268 if test "$enable_framework" ; then
9269 # Link against the framework. All externals should be defined.
9270 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9271 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009272 # No framework, use the Python app as bundle-loader
9273 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9274 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009275 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009276 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009277 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009278 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009279 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009280 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009281 then
9282 LDSHARED="cc -shared ${LDFLAGS}"
9283 else
9284 LDSHARED="ld -Bshareable ${LDFLAGS}"
9285 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009286 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009287 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009288 if test "$GCC" = "yes"
9289 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009290 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009291 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009292 SCO_SV*) LDSHARED="$(CC) -Wl,-G,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00009293 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009294 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009295 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009296 *) LDSHARED="ld";;
9297 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009298fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009299echo "$as_me:$LINENO: result: $LDSHARED" >&5
9300echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009301BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009302# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009303# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009304echo "$as_me:$LINENO: checking CCSHARED" >&5
9305echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009306if test -z "$CCSHARED"
9307then
Guido van Rossum07397971997-04-29 21:49:50 +00009308 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009309 SunOS*) if test "$GCC" = yes;
9310 then CCSHARED="-fPIC";
9311 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009312 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009313 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009314 else CCSHARED="+z";
9315 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009316 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009317 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009318 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009319 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009320 if test "$GCC" = "yes"
9321 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009322 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009323 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009324 SCO_SV*)
9325 if test "$GCC" = "yes"
9326 then CCSHARED="-fPIC"
9327 else CCSHARED="-Kpic -belf"
9328 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009329 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009330 IRIX*/6*) case $CC in
9331 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009332 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009333 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009334 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009335 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009337echo "$as_me:$LINENO: result: $CCSHARED" >&5
9338echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009339# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009340# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009341echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9342echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009343if test -z "$LINKFORSHARED"
9344then
Guido van Rossum07397971997-04-29 21:49:50 +00009345 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009346 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009347 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009348 LINKFORSHARED="-Wl,-E -Wl,+s";;
9349# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009350 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009351 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009352 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009353 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009354 # -u __dummy makes the linker aware of the objc runtime
9355 # in System.framework; otherwise, __objcInit (referenced in
9356 # crt1.o) gets erroneously defined as common, which breaks dynamic
9357 # loading of any modules which reference it in System.framework.
9358 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9359 # not used by the core itself but which needs to be in the core so
9360 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009361 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009362 if test "$enable_framework"
9363 then
9364 LINKFORSHARED="$LINKFORSHARED -framework Python"
9365 fi
9366 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009367 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009368 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009369 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009370 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009371 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9372 then
9373 LINKFORSHARED="-Wl,--export-dynamic"
9374 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009375 SunOS/5*) case $CC in
9376 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009377 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009378 then
9379 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009380 fi;;
9381 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009382 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009383fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009384echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9385echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009386
Michael W. Hudson54241132001-12-07 15:38:26 +00009387
Martin v. Löwis11437992002-04-12 09:54:03 +00009388echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9389echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009390if test ! "$LIBRARY" = "$LDLIBRARY"
9391then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009392 case $ac_sys_system in
9393 CYGWIN*)
9394 # Cygwin needs CCSHARED when building extension DLLs
9395 # but not when building the interpreter DLL.
9396 CFLAGSFORSHARED='';;
9397 *)
9398 CFLAGSFORSHARED='$(CCSHARED)'
9399 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009400fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009401echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9402echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009403
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009404# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9405# library (with --enable-shared).
9406# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009407# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9408# if it is not required, since it creates a dependency of the shared library
9409# to LIBS. This, in turn, means that applications linking the shared libpython
9410# don't need to link LIBS explicitly. The default should be only changed
9411# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009412
9413echo "$as_me:$LINENO: checking SHLIBS" >&5
9414echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9415case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009416 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009417 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009418esac
9419echo "$as_me:$LINENO: result: $SHLIBS" >&5
9420echo "${ECHO_T}$SHLIBS" >&6
9421
9422
Guido van Rossum627b2d71993-12-24 10:39:16 +00009423# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009424
9425echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9426echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9427if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9428 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009429else
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009431LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009432cat >conftest.$ac_ext <<_ACEOF
9433#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009434#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009435
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009436/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009437#ifdef __cplusplus
9438extern "C"
9439#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009440/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 builtin and then its argument prototype would still apply. */
9442char dlopen ();
9443#ifdef F77_DUMMY_MAIN
9444# ifdef __cplusplus
9445 extern "C"
9446# endif
9447 int F77_DUMMY_MAIN() { return 1; }
9448#endif
9449int
9450main ()
9451{
9452dlopen ();
9453 ;
9454 return 0;
9455}
9456_ACEOF
9457rm -f conftest.$ac_objext conftest$ac_exeext
9458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9459 (eval $ac_link) 2>&5
9460 ac_status=$?
9461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9462 (exit $ac_status); } &&
9463 { ac_try='test -s conftest$ac_exeext'
9464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9465 (eval $ac_try) 2>&5
9466 ac_status=$?
9467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9468 (exit $ac_status); }; }; then
9469 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009470else
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 echo "$as_me: failed program was:" >&5
9472cat conftest.$ac_ext >&5
9473ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009474fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009475rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9476LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009477fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009478echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9479echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9480if test $ac_cv_lib_dl_dlopen = yes; then
9481 cat >>confdefs.h <<_ACEOF
9482#define HAVE_LIBDL 1
9483_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009484
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009485 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009486
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009487fi
9488 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009489
9490echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9491echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9492if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9493 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009494else
Martin v. Löwis11437992002-04-12 09:54:03 +00009495 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009496LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009497cat >conftest.$ac_ext <<_ACEOF
9498#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009499#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009500
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009501/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009502#ifdef __cplusplus
9503extern "C"
9504#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009505/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009506 builtin and then its argument prototype would still apply. */
9507char shl_load ();
9508#ifdef F77_DUMMY_MAIN
9509# ifdef __cplusplus
9510 extern "C"
9511# endif
9512 int F77_DUMMY_MAIN() { return 1; }
9513#endif
9514int
9515main ()
9516{
9517shl_load ();
9518 ;
9519 return 0;
9520}
9521_ACEOF
9522rm -f conftest.$ac_objext conftest$ac_exeext
9523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9524 (eval $ac_link) 2>&5
9525 ac_status=$?
9526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9527 (exit $ac_status); } &&
9528 { ac_try='test -s conftest$ac_exeext'
9529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9530 (eval $ac_try) 2>&5
9531 ac_status=$?
9532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9533 (exit $ac_status); }; }; then
9534 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009535else
Martin v. Löwis11437992002-04-12 09:54:03 +00009536 echo "$as_me: failed program was:" >&5
9537cat conftest.$ac_ext >&5
9538ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009539fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009540rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9541LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009542fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009543echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9544echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9545if test $ac_cv_lib_dld_shl_load = yes; then
9546 cat >>confdefs.h <<_ACEOF
9547#define HAVE_LIBDLD 1
9548_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009549
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009550 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009551
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009552fi
9553 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009554echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9555echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9556if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009557 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009558else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009559 ac_func_search_save_LIBS=$LIBS
9560ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009561cat >conftest.$ac_ext <<_ACEOF
9562#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009563#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009564
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009565/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009566#ifdef __cplusplus
9567extern "C"
9568#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009569/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009570 builtin and then its argument prototype would still apply. */
9571char sem_init ();
9572#ifdef F77_DUMMY_MAIN
9573# ifdef __cplusplus
9574 extern "C"
9575# endif
9576 int F77_DUMMY_MAIN() { return 1; }
9577#endif
9578int
9579main ()
9580{
9581sem_init ();
9582 ;
9583 return 0;
9584}
9585_ACEOF
9586rm -f conftest.$ac_objext conftest$ac_exeext
9587if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9588 (eval $ac_link) 2>&5
9589 ac_status=$?
9590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9591 (exit $ac_status); } &&
9592 { ac_try='test -s conftest$ac_exeext'
9593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9594 (eval $ac_try) 2>&5
9595 ac_status=$?
9596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9597 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009598 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009599else
Martin v. Löwis11437992002-04-12 09:54:03 +00009600 echo "$as_me: failed program was:" >&5
9601cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009603rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009604if test "$ac_cv_search_sem_init" = no; then
9605 for ac_lib in rt posix4; do
9606 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9607 cat >conftest.$ac_ext <<_ACEOF
9608#line $LINENO "configure"
9609#include "confdefs.h"
9610
9611/* Override any gcc2 internal prototype to avoid an error. */
9612#ifdef __cplusplus
9613extern "C"
9614#endif
9615/* We use char because int might match the return type of a gcc2
9616 builtin and then its argument prototype would still apply. */
9617char sem_init ();
9618#ifdef F77_DUMMY_MAIN
9619# ifdef __cplusplus
9620 extern "C"
9621# endif
9622 int F77_DUMMY_MAIN() { return 1; }
9623#endif
9624int
9625main ()
9626{
9627sem_init ();
9628 ;
9629 return 0;
9630}
Martin v. Löwis11437992002-04-12 09:54:03 +00009631_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009632rm -f conftest.$ac_objext conftest$ac_exeext
9633if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9634 (eval $ac_link) 2>&5
9635 ac_status=$?
9636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9637 (exit $ac_status); } &&
9638 { ac_try='test -s conftest$ac_exeext'
9639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9640 (eval $ac_try) 2>&5
9641 ac_status=$?
9642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9643 (exit $ac_status); }; }; then
9644 ac_cv_search_sem_init="-l$ac_lib"
9645break
9646else
9647 echo "$as_me: failed program was:" >&5
9648cat conftest.$ac_ext >&5
9649fi
9650rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9651 done
9652fi
9653LIBS=$ac_func_search_save_LIBS
9654fi
9655echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9656echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9657if test "$ac_cv_search_sem_init" != no; then
9658 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009659
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009660fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009661 # 'Real Time' functions on Solaris,
9662 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009663
9664# checks for system dependent C++ extensions support
9665case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009666 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9667echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9668 cat >conftest.$ac_ext <<_ACEOF
9669#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009670#include "confdefs.h"
9671#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009672#ifdef F77_DUMMY_MAIN
9673# ifdef __cplusplus
9674 extern "C"
9675# endif
9676 int F77_DUMMY_MAIN() { return 1; }
9677#endif
9678int
9679main ()
9680{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009681loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 ;
9683 return 0;
9684}
9685_ACEOF
9686rm -f conftest.$ac_objext conftest$ac_exeext
9687if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9688 (eval $ac_link) 2>&5
9689 ac_status=$?
9690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9691 (exit $ac_status); } &&
9692 { ac_try='test -s conftest$ac_exeext'
9693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9694 (eval $ac_try) 2>&5
9695 ac_status=$?
9696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9697 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009698
Martin v. Löwis11437992002-04-12 09:54:03 +00009699cat >>confdefs.h <<\_ACEOF
9700#define AIX_GENUINE_CPLUSPLUS 1
9701_ACEOF
9702
9703 echo "$as_me:$LINENO: result: yes" >&5
9704echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009705else
Martin v. Löwis11437992002-04-12 09:54:03 +00009706 echo "$as_me: failed program was:" >&5
9707cat conftest.$ac_ext >&5
9708echo "$as_me:$LINENO: result: no" >&5
9709echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009710fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009711rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009712 *) ;;
9713esac
9714
Guido van Rossum70c7f481998-03-26 18:44:10 +00009715# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9716# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009717# BeOS' sockets are stashed in libnet.
9718case "$ac_sys_system" in
9719IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009720*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009721echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9722echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9723if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9724 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009725else
Martin v. Löwis11437992002-04-12 09:54:03 +00009726 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009727LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009728cat >conftest.$ac_ext <<_ACEOF
9729#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009730#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009731
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009732/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009733#ifdef __cplusplus
9734extern "C"
9735#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009736/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 builtin and then its argument prototype would still apply. */
9738char t_open ();
9739#ifdef F77_DUMMY_MAIN
9740# ifdef __cplusplus
9741 extern "C"
9742# endif
9743 int F77_DUMMY_MAIN() { return 1; }
9744#endif
9745int
9746main ()
9747{
9748t_open ();
9749 ;
9750 return 0;
9751}
9752_ACEOF
9753rm -f conftest.$ac_objext conftest$ac_exeext
9754if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9755 (eval $ac_link) 2>&5
9756 ac_status=$?
9757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9758 (exit $ac_status); } &&
9759 { ac_try='test -s conftest$ac_exeext'
9760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9761 (eval $ac_try) 2>&5
9762 ac_status=$?
9763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9764 (exit $ac_status); }; }; then
9765 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009766else
Martin v. Löwis11437992002-04-12 09:54:03 +00009767 echo "$as_me: failed program was:" >&5
9768cat conftest.$ac_ext >&5
9769ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009770fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009771rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9772LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009773fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009774echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9775echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9776if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009777 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009778fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009779 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009780echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9781echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9782if test "${ac_cv_lib_socket_socket+set}" = set; then
9783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009784else
Martin v. Löwis11437992002-04-12 09:54:03 +00009785 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009786LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009787cat >conftest.$ac_ext <<_ACEOF
9788#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009789#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009790
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009791/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009792#ifdef __cplusplus
9793extern "C"
9794#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009795/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009796 builtin and then its argument prototype would still apply. */
9797char socket ();
9798#ifdef F77_DUMMY_MAIN
9799# ifdef __cplusplus
9800 extern "C"
9801# endif
9802 int F77_DUMMY_MAIN() { return 1; }
9803#endif
9804int
9805main ()
9806{
9807socket ();
9808 ;
9809 return 0;
9810}
9811_ACEOF
9812rm -f conftest.$ac_objext conftest$ac_exeext
9813if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9814 (eval $ac_link) 2>&5
9815 ac_status=$?
9816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9817 (exit $ac_status); } &&
9818 { ac_try='test -s conftest$ac_exeext'
9819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9820 (eval $ac_try) 2>&5
9821 ac_status=$?
9822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9823 (exit $ac_status); }; }; then
9824 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009825else
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 echo "$as_me: failed program was:" >&5
9827cat conftest.$ac_ext >&5
9828ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009829fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009830rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9831LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009832fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009833echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9834echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9835if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009836 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009837fi
9838 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009839;;
9840esac
9841case "$ac_sys_system" in
9842BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009843echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9844echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9845if test "${ac_cv_lib_net_socket+set}" = set; then
9846 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009847else
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009849LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009850cat >conftest.$ac_ext <<_ACEOF
9851#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009852#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009853
Guido van Rossumad678af1998-10-02 14:42:15 +00009854/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009855#ifdef __cplusplus
9856extern "C"
9857#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009858/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 builtin and then its argument prototype would still apply. */
9860char socket ();
9861#ifdef F77_DUMMY_MAIN
9862# ifdef __cplusplus
9863 extern "C"
9864# endif
9865 int F77_DUMMY_MAIN() { return 1; }
9866#endif
9867int
9868main ()
9869{
9870socket ();
9871 ;
9872 return 0;
9873}
9874_ACEOF
9875rm -f conftest.$ac_objext conftest$ac_exeext
9876if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9877 (eval $ac_link) 2>&5
9878 ac_status=$?
9879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9880 (exit $ac_status); } &&
9881 { ac_try='test -s conftest$ac_exeext'
9882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9883 (eval $ac_try) 2>&5
9884 ac_status=$?
9885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9886 (exit $ac_status); }; }; then
9887 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009888else
Martin v. Löwis11437992002-04-12 09:54:03 +00009889 echo "$as_me: failed program was:" >&5
9890cat conftest.$ac_ext >&5
9891ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009892fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009893rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9894LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009895fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009896echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9897echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9898if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009899 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009900fi
9901 # BeOS
9902;;
9903esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009904
Martin v. Löwis11437992002-04-12 09:54:03 +00009905echo "$as_me:$LINENO: checking for --with-libs" >&5
9906echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9907
Guido van Rossuma68acba1996-07-31 17:36:39 +00009908# Check whether --with-libs or --without-libs was given.
9909if test "${with_libs+set}" = set; then
9910 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009911
9912echo "$as_me:$LINENO: result: $withval" >&5
9913echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009914LIBS="$withval $LIBS"
9915
9916else
Martin v. Löwis11437992002-04-12 09:54:03 +00009917 echo "$as_me:$LINENO: result: no" >&5
9918echo "${ECHO_T}no" >&6
9919fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009920
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009921# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009922
9923
Martin v. Löwis11437992002-04-12 09:54:03 +00009924echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9925echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9926
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009927# Check whether --with-signal-module or --without-signal-module was given.
9928if test "${with_signal_module+set}" = set; then
9929 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009930
Martin v. Löwis11437992002-04-12 09:54:03 +00009931fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009932
9933if test -z "$with_signal_module"
9934then with_signal_module="yes"
9935fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009936echo "$as_me:$LINENO: result: $with_signal_module" >&5
9937echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009938
9939if test "${with_signal_module}" = "yes"; then
9940 USE_SIGNAL_MODULE=""
9941 SIGNAL_OBJS=""
9942else
9943 USE_SIGNAL_MODULE="#"
9944 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9945fi
9946
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009947# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009948
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009949USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009950
Martin v. Löwis11437992002-04-12 09:54:03 +00009951echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9952echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9953
Guido van Rossumec2f0731997-01-22 20:54:01 +00009954
9955# Check whether --with-dec-threads or --without-dec-threads was given.
9956if test "${with_dec_threads+set}" = set; then
9957 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009958
9959echo "$as_me:$LINENO: result: $withval" >&5
9960echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009961LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009962if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009963 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009964fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009965else
Martin v. Löwis11437992002-04-12 09:54:03 +00009966 echo "$as_me:$LINENO: result: no" >&5
9967echo "${ECHO_T}no" >&6
9968fi;
9969
9970# Templates for things AC_DEFINEd more than once.
9971# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009972
9973
Martin v. Löwis11437992002-04-12 09:54:03 +00009974
9975
9976
9977
9978
9979echo "$as_me:$LINENO: checking for --with-threads" >&5
9980echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9981
Guido van Rossumec2f0731997-01-22 20:54:01 +00009982# Check whether --with-threads or --without-threads was given.
9983if test "${with_threads+set}" = set; then
9984 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009985
Martin v. Löwis11437992002-04-12 09:54:03 +00009986fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009987
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009988# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009989
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009990# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009991if test "${with_thread+set}" = set; then
9992 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009993 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +00009994fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009995
9996if test -z "$with_threads"
9997then with_threads="yes"
9998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009999echo "$as_me:$LINENO: result: $with_threads" >&5
10000echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010001
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010002
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010003if test "$with_threads" = "no"
10004then
10005 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010006elif test "$ac_cv_pthread_is_default" = yes
10007then
Martin v. Löwis11437992002-04-12 09:54:03 +000010008 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010009#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010010_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010011
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010012 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010013 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010014#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010015_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010016
10017 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010018 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010019elif test "$ac_cv_kpthread" = "yes"
10020then
10021 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010022 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010023#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010024_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010025
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010026 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010027 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010028else
10029 if test ! -z "$with_threads" -a -d "$with_threads"
10030 then LDFLAGS="$LDFLAGS -L$with_threads"
10031 fi
10032 if test ! -z "$withval" -a -d "$withval"
10033 then LDFLAGS="$LDFLAGS -L$withval"
10034 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010035
10036 # According to the POSIX spec, a pthreads implementation must
10037 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010038 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10039echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10040 cat >conftest.$ac_ext <<_ACEOF
10041#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010042#include "confdefs.h"
10043#include <unistd.h>
10044 #ifdef _POSIX_THREADS
10045 yes
10046 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010047
10048_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10050 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010051 unistd_defines_pthreads=yes
10052else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010053 unistd_defines_pthreads=no
10054fi
10055rm -f conftest*
10056
Martin v. Löwis11437992002-04-12 09:54:03 +000010057 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10058echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010059
Martin v. Löwis11437992002-04-12 09:54:03 +000010060 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010061#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010062_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010063
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 if test "${ac_cv_header_cthreads_h+set}" = set; then
10065 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10066echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10067if test "${ac_cv_header_cthreads_h+set}" = set; then
10068 echo $ECHO_N "(cached) $ECHO_C" >&6
10069fi
10070echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10071echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010072else
Martin v. Löwis11437992002-04-12 09:54:03 +000010073 # Is the header compilable?
10074echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10075echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10076cat >conftest.$ac_ext <<_ACEOF
10077#line $LINENO "configure"
10078#include "confdefs.h"
10079$ac_includes_default
10080#include <cthreads.h>
10081_ACEOF
10082rm -f conftest.$ac_objext
10083if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10084 (eval $ac_compile) 2>&5
10085 ac_status=$?
10086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10087 (exit $ac_status); } &&
10088 { ac_try='test -s conftest.$ac_objext'
10089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10090 (eval $ac_try) 2>&5
10091 ac_status=$?
10092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10093 (exit $ac_status); }; }; then
10094 ac_header_compiler=yes
10095else
10096 echo "$as_me: failed program was:" >&5
10097cat conftest.$ac_ext >&5
10098ac_header_compiler=no
10099fi
10100rm -f conftest.$ac_objext conftest.$ac_ext
10101echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10102echo "${ECHO_T}$ac_header_compiler" >&6
10103
10104# Is the header present?
10105echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10106echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10107cat >conftest.$ac_ext <<_ACEOF
10108#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010109#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010110#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010111_ACEOF
10112if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10113 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10114 ac_status=$?
10115 egrep -v '^ *\+' conftest.er1 >conftest.err
10116 rm -f conftest.er1
10117 cat conftest.err >&5
10118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10119 (exit $ac_status); } >/dev/null; then
10120 if test -s conftest.err; then
10121 ac_cpp_err=$ac_c_preproc_warn_flag
10122 else
10123 ac_cpp_err=
10124 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010125else
Martin v. Löwis11437992002-04-12 09:54:03 +000010126 ac_cpp_err=yes
10127fi
10128if test -z "$ac_cpp_err"; then
10129 ac_header_preproc=yes
10130else
10131 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010132 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010133 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010135rm -f conftest.err conftest.$ac_ext
10136echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10137echo "${ECHO_T}$ac_header_preproc" >&6
10138
10139# So? What about this header?
10140case $ac_header_compiler:$ac_header_preproc in
10141 yes:no )
10142 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10143echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10144 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10145echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10146 no:yes )
10147 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10148echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10149 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10150echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10151 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10152echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10153esac
10154echo "$as_me:$LINENO: checking for cthreads.h" >&5
10155echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10156if test "${ac_cv_header_cthreads_h+set}" = set; then
10157 echo $ECHO_N "(cached) $ECHO_C" >&6
10158else
10159 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010160fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010161echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10162echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10163
10164fi
10165if test $ac_cv_header_cthreads_h = yes; then
10166 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010167#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010168_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010169
Martin v. Löwis11437992002-04-12 09:54:03 +000010170 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010171#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010172_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010173
Martin v. Löwis11437992002-04-12 09:54:03 +000010174
10175cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010176#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010177_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010178
10179 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010180 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010181else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010182
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10184 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10185echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10186if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10187 echo $ECHO_N "(cached) $ECHO_C" >&6
10188fi
10189echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10190echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010191else
Martin v. Löwis11437992002-04-12 09:54:03 +000010192 # Is the header compilable?
10193echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10194echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10195cat >conftest.$ac_ext <<_ACEOF
10196#line $LINENO "configure"
10197#include "confdefs.h"
10198$ac_includes_default
10199#include <mach/cthreads.h>
10200_ACEOF
10201rm -f conftest.$ac_objext
10202if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10203 (eval $ac_compile) 2>&5
10204 ac_status=$?
10205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10206 (exit $ac_status); } &&
10207 { ac_try='test -s conftest.$ac_objext'
10208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10209 (eval $ac_try) 2>&5
10210 ac_status=$?
10211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10212 (exit $ac_status); }; }; then
10213 ac_header_compiler=yes
10214else
10215 echo "$as_me: failed program was:" >&5
10216cat conftest.$ac_ext >&5
10217ac_header_compiler=no
10218fi
10219rm -f conftest.$ac_objext conftest.$ac_ext
10220echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10221echo "${ECHO_T}$ac_header_compiler" >&6
10222
10223# Is the header present?
10224echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10225echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10226cat >conftest.$ac_ext <<_ACEOF
10227#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010228#include "confdefs.h"
10229#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010230_ACEOF
10231if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10232 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10233 ac_status=$?
10234 egrep -v '^ *\+' conftest.er1 >conftest.err
10235 rm -f conftest.er1
10236 cat conftest.err >&5
10237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10238 (exit $ac_status); } >/dev/null; then
10239 if test -s conftest.err; then
10240 ac_cpp_err=$ac_c_preproc_warn_flag
10241 else
10242 ac_cpp_err=
10243 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010244else
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_cpp_err=yes
10246fi
10247if test -z "$ac_cpp_err"; then
10248 ac_header_preproc=yes
10249else
10250 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010251 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010253fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010254rm -f conftest.err conftest.$ac_ext
10255echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10256echo "${ECHO_T}$ac_header_preproc" >&6
10257
10258# So? What about this header?
10259case $ac_header_compiler:$ac_header_preproc in
10260 yes:no )
10261 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10262echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10263 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10264echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10265 no:yes )
10266 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10267echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10268 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10269echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10270 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10271echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10272esac
10273echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10274echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10275if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10276 echo $ECHO_N "(cached) $ECHO_C" >&6
10277else
10278 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010279fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010280echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10281echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10282
10283fi
10284if test $ac_cv_header_mach_cthreads_h = yes; then
10285 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010286#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010287_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010288
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010290#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010291_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010292
Martin v. Löwis11437992002-04-12 09:54:03 +000010293
10294cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010295#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010296_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010297
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010298 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010299else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010300
Martin v. Löwis11437992002-04-12 09:54:03 +000010301 echo "$as_me:$LINENO: checking for --with-pth" >&5
10302echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10303
10304# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010305if test "${with_pth+set}" = set; then
10306 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010307 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010308echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010309 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010310#define WITH_THREAD 1
10311_ACEOF
10312
10313
10314cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010315#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010316_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010317
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010318 LIBS="-lpth $LIBS"
10319 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010320else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010321 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010322echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010323
10324 # Just looking for pthread_create in libpthread is not enough:
10325 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10326 # So we really have to include pthread.h, and then link.
10327 _libs=$LIBS
10328 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10330echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10331 cat >conftest.$ac_ext <<_ACEOF
10332#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010333#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010334#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010335
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010336void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010337#ifdef F77_DUMMY_MAIN
10338# ifdef __cplusplus
10339 extern "C"
10340# endif
10341 int F77_DUMMY_MAIN() { return 1; }
10342#endif
10343int
10344main ()
10345{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010346
10347pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 ;
10349 return 0;
10350}
10351_ACEOF
10352rm -f conftest.$ac_objext conftest$ac_exeext
10353if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10354 (eval $ac_link) 2>&5
10355 ac_status=$?
10356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10357 (exit $ac_status); } &&
10358 { ac_try='test -s conftest$ac_exeext'
10359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10360 (eval $ac_try) 2>&5
10361 ac_status=$?
10362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10363 (exit $ac_status); }; }; then
10364
10365 echo "$as_me:$LINENO: result: yes" >&5
10366echo "${ECHO_T}yes" >&6
10367 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010368#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010369_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010370
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010371 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010372 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010373else
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 echo "$as_me: failed program was:" >&5
10375cat conftest.$ac_ext >&5
10376
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010377 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10379echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10380if test "${ac_cv_func_pthread_detach+set}" = set; then
10381 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010382else
Martin v. Löwis11437992002-04-12 09:54:03 +000010383 cat >conftest.$ac_ext <<_ACEOF
10384#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010385#include "confdefs.h"
10386/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010388#include <assert.h>
10389/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010390#ifdef __cplusplus
10391extern "C"
10392#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010393/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 builtin and then its argument prototype would still apply. */
10395char pthread_detach ();
10396char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010397
Martin v. Löwis11437992002-04-12 09:54:03 +000010398#ifdef F77_DUMMY_MAIN
10399# ifdef __cplusplus
10400 extern "C"
10401# endif
10402 int F77_DUMMY_MAIN() { return 1; }
10403#endif
10404int
10405main ()
10406{
Guido van Rossumad678af1998-10-02 14:42:15 +000010407/* The GNU C library defines this for functions which it implements
10408 to always fail with ENOSYS. Some functions are actually named
10409 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010410#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010411choke me
10412#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010413f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010414#endif
10415
Martin v. Löwis11437992002-04-12 09:54:03 +000010416 ;
10417 return 0;
10418}
10419_ACEOF
10420rm -f conftest.$ac_objext conftest$ac_exeext
10421if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10422 (eval $ac_link) 2>&5
10423 ac_status=$?
10424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10425 (exit $ac_status); } &&
10426 { ac_try='test -s conftest$ac_exeext'
10427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10428 (eval $ac_try) 2>&5
10429 ac_status=$?
10430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10431 (exit $ac_status); }; }; then
10432 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010433else
Martin v. Löwis11437992002-04-12 09:54:03 +000010434 echo "$as_me: failed program was:" >&5
10435cat conftest.$ac_ext >&5
10436ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010438rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010440echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10441echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10442if test $ac_cv_func_pthread_detach = yes; then
10443 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010444#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010445_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010446
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010447 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010448 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010449else
Guido van Rossumad678af1998-10-02 14:42:15 +000010450
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010451 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10452 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10453echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10454if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10455 echo $ECHO_N "(cached) $ECHO_C" >&6
10456fi
10457echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10458echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10459else
10460 # Is the header compilable?
10461echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10462echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10463cat >conftest.$ac_ext <<_ACEOF
10464#line $LINENO "configure"
10465#include "confdefs.h"
10466$ac_includes_default
10467#include <atheos/threads.h>
10468_ACEOF
10469rm -f conftest.$ac_objext
10470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10471 (eval $ac_compile) 2>&5
10472 ac_status=$?
10473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10474 (exit $ac_status); } &&
10475 { ac_try='test -s conftest.$ac_objext'
10476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10477 (eval $ac_try) 2>&5
10478 ac_status=$?
10479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10480 (exit $ac_status); }; }; then
10481 ac_header_compiler=yes
10482else
10483 echo "$as_me: failed program was:" >&5
10484cat conftest.$ac_ext >&5
10485ac_header_compiler=no
10486fi
10487rm -f conftest.$ac_objext conftest.$ac_ext
10488echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10489echo "${ECHO_T}$ac_header_compiler" >&6
10490
10491# Is the header present?
10492echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10493echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10494cat >conftest.$ac_ext <<_ACEOF
10495#line $LINENO "configure"
10496#include "confdefs.h"
10497#include <atheos/threads.h>
10498_ACEOF
10499if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10500 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10501 ac_status=$?
10502 egrep -v '^ *\+' conftest.er1 >conftest.err
10503 rm -f conftest.er1
10504 cat conftest.err >&5
10505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10506 (exit $ac_status); } >/dev/null; then
10507 if test -s conftest.err; then
10508 ac_cpp_err=$ac_c_preproc_warn_flag
10509 else
10510 ac_cpp_err=
10511 fi
10512else
10513 ac_cpp_err=yes
10514fi
10515if test -z "$ac_cpp_err"; then
10516 ac_header_preproc=yes
10517else
10518 echo "$as_me: failed program was:" >&5
10519 cat conftest.$ac_ext >&5
10520 ac_header_preproc=no
10521fi
10522rm -f conftest.err conftest.$ac_ext
10523echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10524echo "${ECHO_T}$ac_header_preproc" >&6
10525
10526# So? What about this header?
10527case $ac_header_compiler:$ac_header_preproc in
10528 yes:no )
10529 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10530echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10531 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10532echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10533 no:yes )
10534 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10535echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10536 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10537echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10538 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10539echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10540esac
10541echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10542echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10543if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10544 echo $ECHO_N "(cached) $ECHO_C" >&6
10545else
10546 ac_cv_header_atheos_threads_h=$ac_header_preproc
10547fi
10548echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10549echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10550
10551fi
10552if test $ac_cv_header_atheos_threads_h = yes; then
10553 cat >>confdefs.h <<\_ACEOF
10554#define WITH_THREAD 1
10555_ACEOF
10556
10557
10558cat >>confdefs.h <<\_ACEOF
10559#define ATHEOS_THREADS 1
10560_ACEOF
10561
10562 THREADOBJ="Python/thread.o"
10563else
10564
Martin v. Löwis11437992002-04-12 09:54:03 +000010565 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10566 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10567echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10568if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10569 echo $ECHO_N "(cached) $ECHO_C" >&6
10570fi
10571echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10572echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010573else
Martin v. Löwis11437992002-04-12 09:54:03 +000010574 # Is the header compilable?
10575echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10576echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10577cat >conftest.$ac_ext <<_ACEOF
10578#line $LINENO "configure"
10579#include "confdefs.h"
10580$ac_includes_default
10581#include <kernel/OS.h>
10582_ACEOF
10583rm -f conftest.$ac_objext
10584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10585 (eval $ac_compile) 2>&5
10586 ac_status=$?
10587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10588 (exit $ac_status); } &&
10589 { ac_try='test -s conftest.$ac_objext'
10590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10591 (eval $ac_try) 2>&5
10592 ac_status=$?
10593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10594 (exit $ac_status); }; }; then
10595 ac_header_compiler=yes
10596else
10597 echo "$as_me: failed program was:" >&5
10598cat conftest.$ac_ext >&5
10599ac_header_compiler=no
10600fi
10601rm -f conftest.$ac_objext conftest.$ac_ext
10602echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10603echo "${ECHO_T}$ac_header_compiler" >&6
10604
10605# Is the header present?
10606echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10607echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10608cat >conftest.$ac_ext <<_ACEOF
10609#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010610#include "confdefs.h"
10611#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010612_ACEOF
10613if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10614 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10615 ac_status=$?
10616 egrep -v '^ *\+' conftest.er1 >conftest.err
10617 rm -f conftest.er1
10618 cat conftest.err >&5
10619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10620 (exit $ac_status); } >/dev/null; then
10621 if test -s conftest.err; then
10622 ac_cpp_err=$ac_c_preproc_warn_flag
10623 else
10624 ac_cpp_err=
10625 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010626else
Martin v. Löwis11437992002-04-12 09:54:03 +000010627 ac_cpp_err=yes
10628fi
10629if test -z "$ac_cpp_err"; then
10630 ac_header_preproc=yes
10631else
10632 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010633 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010636rm -f conftest.err conftest.$ac_ext
10637echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10638echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010639
Martin v. Löwis11437992002-04-12 09:54:03 +000010640# So? What about this header?
10641case $ac_header_compiler:$ac_header_preproc in
10642 yes:no )
10643 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10644echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10645 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10646echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10647 no:yes )
10648 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10649echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10650 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10651echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10652 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10653echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10654esac
10655echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10656echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10657if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10658 echo $ECHO_N "(cached) $ECHO_C" >&6
10659else
10660 ac_cv_header_kernel_OS_h=$ac_header_preproc
10661fi
10662echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10663echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10664
10665fi
10666if test $ac_cv_header_kernel_OS_h = yes; then
10667 cat >>confdefs.h <<\_ACEOF
10668#define WITH_THREAD 1
10669_ACEOF
10670
10671
10672cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010673#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010674_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010675
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010676 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010677else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010678
Martin v. Löwis11437992002-04-12 09:54:03 +000010679 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10680echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10681if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10682 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010683else
Martin v. Löwis11437992002-04-12 09:54:03 +000010684 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010685LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010686cat >conftest.$ac_ext <<_ACEOF
10687#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010688#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010689
Greg Steinadf63d62000-07-05 10:38:09 +000010690/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010691#ifdef __cplusplus
10692extern "C"
10693#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010694/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 builtin and then its argument prototype would still apply. */
10696char pthread_create ();
10697#ifdef F77_DUMMY_MAIN
10698# ifdef __cplusplus
10699 extern "C"
10700# endif
10701 int F77_DUMMY_MAIN() { return 1; }
10702#endif
10703int
10704main ()
10705{
10706pthread_create ();
10707 ;
10708 return 0;
10709}
10710_ACEOF
10711rm -f conftest.$ac_objext conftest$ac_exeext
10712if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10713 (eval $ac_link) 2>&5
10714 ac_status=$?
10715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10716 (exit $ac_status); } &&
10717 { ac_try='test -s conftest$ac_exeext'
10718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10719 (eval $ac_try) 2>&5
10720 ac_status=$?
10721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10722 (exit $ac_status); }; }; then
10723 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010724else
Martin v. Löwis11437992002-04-12 09:54:03 +000010725 echo "$as_me: failed program was:" >&5
10726cat conftest.$ac_ext >&5
10727ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010728fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010729rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10730LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010731fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010732echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10733echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10734if test $ac_cv_lib_pthreads_pthread_create = yes; then
10735 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010736#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010737_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010738
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010739 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010740 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010741 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010742else
Greg Steinadf63d62000-07-05 10:38:09 +000010743
Martin v. Löwis11437992002-04-12 09:54:03 +000010744 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10745echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10746if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10747 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010748else
Martin v. Löwis11437992002-04-12 09:54:03 +000010749 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010750LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010751cat >conftest.$ac_ext <<_ACEOF
10752#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010753#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010754
Guido van Rossum49545951997-12-02 19:28:29 +000010755/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010756#ifdef __cplusplus
10757extern "C"
10758#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010759/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 builtin and then its argument prototype would still apply. */
10761char pthread_create ();
10762#ifdef F77_DUMMY_MAIN
10763# ifdef __cplusplus
10764 extern "C"
10765# endif
10766 int F77_DUMMY_MAIN() { return 1; }
10767#endif
10768int
10769main ()
10770{
10771pthread_create ();
10772 ;
10773 return 0;
10774}
10775_ACEOF
10776rm -f conftest.$ac_objext conftest$ac_exeext
10777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10778 (eval $ac_link) 2>&5
10779 ac_status=$?
10780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10781 (exit $ac_status); } &&
10782 { ac_try='test -s conftest$ac_exeext'
10783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10784 (eval $ac_try) 2>&5
10785 ac_status=$?
10786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10787 (exit $ac_status); }; }; then
10788 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010789else
Martin v. Löwis11437992002-04-12 09:54:03 +000010790 echo "$as_me: failed program was:" >&5
10791cat conftest.$ac_ext >&5
10792ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010793fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010794rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10795LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010796fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010797echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10798echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10799if test $ac_cv_lib_c_r_pthread_create = yes; then
10800 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010801#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010802_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010803
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010804 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010805 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010806 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010807else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010808
Martin v. Löwis11437992002-04-12 09:54:03 +000010809 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10810echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10811if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10812 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010813else
Martin v. Löwis11437992002-04-12 09:54:03 +000010814 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010815LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010816cat >conftest.$ac_ext <<_ACEOF
10817#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010818#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010819
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010820/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010821#ifdef __cplusplus
10822extern "C"
10823#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010824/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010825 builtin and then its argument prototype would still apply. */
10826char __d6_pthread_create ();
10827#ifdef F77_DUMMY_MAIN
10828# ifdef __cplusplus
10829 extern "C"
10830# endif
10831 int F77_DUMMY_MAIN() { return 1; }
10832#endif
10833int
10834main ()
10835{
10836__d6_pthread_create ();
10837 ;
10838 return 0;
10839}
10840_ACEOF
10841rm -f conftest.$ac_objext conftest$ac_exeext
10842if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10843 (eval $ac_link) 2>&5
10844 ac_status=$?
10845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10846 (exit $ac_status); } &&
10847 { ac_try='test -s conftest$ac_exeext'
10848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10849 (eval $ac_try) 2>&5
10850 ac_status=$?
10851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10852 (exit $ac_status); }; }; then
10853 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010854else
Martin v. Löwis11437992002-04-12 09:54:03 +000010855 echo "$as_me: failed program was:" >&5
10856cat conftest.$ac_ext >&5
10857ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010858fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010859rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10860LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010861fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010862echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10863echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10864if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10865 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010866#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010867_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010868
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010869 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010870 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010871 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010872else
Guido van Rossum49545951997-12-02 19:28:29 +000010873
Martin v. Löwis11437992002-04-12 09:54:03 +000010874 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10875echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10876if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10877 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010878else
Martin v. Löwis11437992002-04-12 09:54:03 +000010879 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010880LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010881cat >conftest.$ac_ext <<_ACEOF
10882#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010883#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010884
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010885/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010886#ifdef __cplusplus
10887extern "C"
10888#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010889/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010890 builtin and then its argument prototype would still apply. */
10891char __pthread_create_system ();
10892#ifdef F77_DUMMY_MAIN
10893# ifdef __cplusplus
10894 extern "C"
10895# endif
10896 int F77_DUMMY_MAIN() { return 1; }
10897#endif
10898int
10899main ()
10900{
10901__pthread_create_system ();
10902 ;
10903 return 0;
10904}
10905_ACEOF
10906rm -f conftest.$ac_objext conftest$ac_exeext
10907if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10908 (eval $ac_link) 2>&5
10909 ac_status=$?
10910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10911 (exit $ac_status); } &&
10912 { ac_try='test -s conftest$ac_exeext'
10913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10914 (eval $ac_try) 2>&5
10915 ac_status=$?
10916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10917 (exit $ac_status); }; }; then
10918 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010919else
Martin v. Löwis11437992002-04-12 09:54:03 +000010920 echo "$as_me: failed program was:" >&5
10921cat conftest.$ac_ext >&5
10922ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010923fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010924rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10925LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010926fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010927echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10928echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10929if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10930 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010931#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010932_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010933
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010934 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010935 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010936 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010937else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010938
Martin v. Löwis11437992002-04-12 09:54:03 +000010939 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10940echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10941if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10942 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010943else
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010945LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010946cat >conftest.$ac_ext <<_ACEOF
10947#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010948#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010949
Guido van Rossumb93a8621998-05-07 13:27:32 +000010950/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010951#ifdef __cplusplus
10952extern "C"
10953#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010954/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010955 builtin and then its argument prototype would still apply. */
10956char pthread_create ();
10957#ifdef F77_DUMMY_MAIN
10958# ifdef __cplusplus
10959 extern "C"
10960# endif
10961 int F77_DUMMY_MAIN() { return 1; }
10962#endif
10963int
10964main ()
10965{
10966pthread_create ();
10967 ;
10968 return 0;
10969}
10970_ACEOF
10971rm -f conftest.$ac_objext conftest$ac_exeext
10972if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10973 (eval $ac_link) 2>&5
10974 ac_status=$?
10975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10976 (exit $ac_status); } &&
10977 { ac_try='test -s conftest$ac_exeext'
10978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10979 (eval $ac_try) 2>&5
10980 ac_status=$?
10981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10982 (exit $ac_status); }; }; then
10983 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010984else
Martin v. Löwis11437992002-04-12 09:54:03 +000010985 echo "$as_me: failed program was:" >&5
10986cat conftest.$ac_ext >&5
10987ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010988fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010989rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10990LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010991fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010992echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10993echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10994if test $ac_cv_lib_cma_pthread_create = yes; then
10995 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010996#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010997_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010998
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010999 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011000 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011001 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011002else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011003
Martin v. Löwis130fb172001-07-19 11:00:41 +000011004 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011005fi
11006
Guido van Rossum627b2d71993-12-24 10:39:16 +000011007
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011008fi
11009
Guido van Rossum0be3e491997-05-22 20:33:33 +000011010fi
11011
Guido van Rossum49545951997-12-02 19:28:29 +000011012fi
11013
Guido van Rossumb93a8621998-05-07 13:27:32 +000011014fi
11015
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011016fi
11017
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011018
Michael W. Hudson54241132001-12-07 15:38:26 +000011019fi
11020
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011021
11022fi
11023
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011025rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11026fi;
11027fi
11028
11029
11030fi
11031
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011032
Michael W. Hudson54241132001-12-07 15:38:26 +000011033
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011034 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011035 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011036
11037cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011038#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011039_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011040
11041 fi
11042
Martin v. Löwis11437992002-04-12 09:54:03 +000011043 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11044echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11045 if test "${ac_cv_pthread_system_supported+set}" = set; then
11046 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011047else
11048 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011049 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011050else
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 cat >conftest.$ac_ext <<_ACEOF
11052#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011053#include "confdefs.h"
11054#include <pthread.h>
11055 void *foo(void *parm) {
11056 return NULL;
11057 }
11058 main() {
11059 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011060 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011061 if (pthread_attr_init(&attr)) exit(-1);
11062 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011063 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011064 exit(0);
11065 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011066_ACEOF
11067rm -f conftest$ac_exeext
11068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11069 (eval $ac_link) 2>&5
11070 ac_status=$?
11071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11074 (eval $ac_try) 2>&5
11075 ac_status=$?
11076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11077 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011078 ac_cv_pthread_system_supported=yes
11079else
Martin v. Löwis11437992002-04-12 09:54:03 +000011080 echo "$as_me: program exited with status $ac_status" >&5
11081echo "$as_me: failed program was:" >&5
11082cat conftest.$ac_ext >&5
11083( exit $ac_status )
11084ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011085fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011086rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011087fi
11088
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011089fi
11090
Martin v. Löwis11437992002-04-12 09:54:03 +000011091 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11092echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011093 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011094
11095cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011096#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011097_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011098
11099 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011100
11101for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011102do
Martin v. Löwis11437992002-04-12 09:54:03 +000011103as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11104echo "$as_me:$LINENO: checking for $ac_func" >&5
11105echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11106if eval "test \"\${$as_ac_var+set}\" = set"; then
11107 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011108else
Martin v. Löwis11437992002-04-12 09:54:03 +000011109 cat >conftest.$ac_ext <<_ACEOF
11110#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011111#include "confdefs.h"
11112/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011114#include <assert.h>
11115/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011116#ifdef __cplusplus
11117extern "C"
11118#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011119/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 builtin and then its argument prototype would still apply. */
11121char $ac_func ();
11122char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011123
Martin v. Löwis11437992002-04-12 09:54:03 +000011124#ifdef F77_DUMMY_MAIN
11125# ifdef __cplusplus
11126 extern "C"
11127# endif
11128 int F77_DUMMY_MAIN() { return 1; }
11129#endif
11130int
11131main ()
11132{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011133/* The GNU C library defines this for functions which it implements
11134 to always fail with ENOSYS. Some functions are actually named
11135 something starting with __ and the normal name is an alias. */
11136#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11137choke me
11138#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011139f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011140#endif
11141
Martin v. Löwis11437992002-04-12 09:54:03 +000011142 ;
11143 return 0;
11144}
11145_ACEOF
11146rm -f conftest.$ac_objext conftest$ac_exeext
11147if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11148 (eval $ac_link) 2>&5
11149 ac_status=$?
11150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11151 (exit $ac_status); } &&
11152 { ac_try='test -s conftest$ac_exeext'
11153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11154 (eval $ac_try) 2>&5
11155 ac_status=$?
11156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11157 (exit $ac_status); }; }; then
11158 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011159else
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 echo "$as_me: failed program was:" >&5
11161cat conftest.$ac_ext >&5
11162eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011163fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011164rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011165fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011166echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11167echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11168if test `eval echo '${'$as_ac_var'}'` = yes; then
11169 cat >>confdefs.h <<_ACEOF
11170#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11171_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011172
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011173fi
11174done
11175
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011176 fi
11177
Martin v. Löwis11437992002-04-12 09:54:03 +000011178 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11179echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11180if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11181 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011182else
Martin v. Löwis11437992002-04-12 09:54:03 +000011183 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011184LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011185cat >conftest.$ac_ext <<_ACEOF
11186#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011187#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011188
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011189/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011190#ifdef __cplusplus
11191extern "C"
11192#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011193/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 builtin and then its argument prototype would still apply. */
11195char usconfig ();
11196#ifdef F77_DUMMY_MAIN
11197# ifdef __cplusplus
11198 extern "C"
11199# endif
11200 int F77_DUMMY_MAIN() { return 1; }
11201#endif
11202int
11203main ()
11204{
11205usconfig ();
11206 ;
11207 return 0;
11208}
11209_ACEOF
11210rm -f conftest.$ac_objext conftest$ac_exeext
11211if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11212 (eval $ac_link) 2>&5
11213 ac_status=$?
11214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11215 (exit $ac_status); } &&
11216 { ac_try='test -s conftest$ac_exeext'
11217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11218 (eval $ac_try) 2>&5
11219 ac_status=$?
11220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11221 (exit $ac_status); }; }; then
11222 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011223else
Martin v. Löwis11437992002-04-12 09:54:03 +000011224 echo "$as_me: failed program was:" >&5
11225cat conftest.$ac_ext >&5
11226ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011227fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011228rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11229LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011231echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11232echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11233if test $ac_cv_lib_mpc_usconfig = yes; then
11234 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011235#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011236_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011237
Martin v. Löwis130fb172001-07-19 11:00:41 +000011238 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011239 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011240 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011241fi
11242
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011243
Neal Norwitza978ab02002-11-02 16:58:05 +000011244 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011245 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11246echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11247if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11248 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011249else
Martin v. Löwis11437992002-04-12 09:54:03 +000011250 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011251LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011252cat >conftest.$ac_ext <<_ACEOF
11253#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011254#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011255
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011256/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011257#ifdef __cplusplus
11258extern "C"
11259#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011260/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 builtin and then its argument prototype would still apply. */
11262char thr_create ();
11263#ifdef F77_DUMMY_MAIN
11264# ifdef __cplusplus
11265 extern "C"
11266# endif
11267 int F77_DUMMY_MAIN() { return 1; }
11268#endif
11269int
11270main ()
11271{
11272thr_create ();
11273 ;
11274 return 0;
11275}
11276_ACEOF
11277rm -f conftest.$ac_objext conftest$ac_exeext
11278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11279 (eval $ac_link) 2>&5
11280 ac_status=$?
11281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11282 (exit $ac_status); } &&
11283 { ac_try='test -s conftest$ac_exeext'
11284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11285 (eval $ac_try) 2>&5
11286 ac_status=$?
11287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11288 (exit $ac_status); }; }; then
11289 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011290else
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 echo "$as_me: failed program was:" >&5
11292cat conftest.$ac_ext >&5
11293ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011294fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011295rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11296LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011297fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011298echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11299echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11300if test $ac_cv_lib_thread_thr_create = yes; then
11301 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011302#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011303_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011304
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011305 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011306 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011307 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011308fi
11309
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011310 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011311
Martin v. Löwis130fb172001-07-19 11:00:41 +000011312 if test "$USE_THREAD_MODULE" != "#"
11313 then
11314 # If the above checks didn't disable threads, (at least) OSF1
11315 # needs this '-threads' argument during linking.
11316 case $ac_sys_system in
11317 OSF1) LDLAST=-threads;;
11318 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011319 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011320
11321 if test "$posix_threads" = yes -a \
11322 "$ac_sys_system" = "SunOS" -a \
11323 "$ac_sys_release" = "5.6"; then
11324
11325cat >>confdefs.h <<\_ACEOF
11326#define HAVE_PTHREAD_DESTRUCTOR 1
11327_ACEOF
11328
11329 fi
11330
Guido van Rossum627b2d71993-12-24 10:39:16 +000011331fi
11332
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011333# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011334
11335
11336echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11337echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011338# Check whether --enable-ipv6 or --disable-ipv6 was given.
11339if test "${enable_ipv6+set}" = set; then
11340 enableval="$enable_ipv6"
11341 case "$enableval" in
11342 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 echo "$as_me:$LINENO: result: no" >&5
11344echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011345 ipv6=no
11346 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011347 *) echo "$as_me:$LINENO: result: yes" >&5
11348echo "${ECHO_T}yes" >&6
11349 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011350#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011351_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011352
11353 ipv6=yes
11354 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011355 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011356else
Martin v. Löwis11437992002-04-12 09:54:03 +000011357
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011358 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 echo "$as_me:$LINENO: result: no" >&5
11360echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011361 ipv6=no
11362
11363else
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 cat >conftest.$ac_ext <<_ACEOF
11365#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011366#include "confdefs.h"
11367 /* AF_INET6 available check */
11368#include <sys/types.h>
11369#include <sys/socket.h>
11370main()
11371{
11372 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11373 exit(1);
11374 else
11375 exit(0);
11376}
11377
Martin v. Löwis11437992002-04-12 09:54:03 +000011378_ACEOF
11379rm -f conftest$ac_exeext
11380if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11381 (eval $ac_link) 2>&5
11382 ac_status=$?
11383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11384 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11386 (eval $ac_try) 2>&5
11387 ac_status=$?
11388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11389 (exit $ac_status); }; }; then
11390 echo "$as_me:$LINENO: result: yes" >&5
11391echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011392 ipv6=yes
11393else
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 echo "$as_me: program exited with status $ac_status" >&5
11395echo "$as_me: failed program was:" >&5
11396cat conftest.$ac_ext >&5
11397( exit $ac_status )
11398echo "$as_me:$LINENO: result: no" >&5
11399echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011400 ipv6=no
11401fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011402rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011403fi
11404
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011405if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11407echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11408 cat >conftest.$ac_ext <<_ACEOF
11409#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011410#include "confdefs.h"
11411#include <sys/types.h>
11412#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011413#ifdef F77_DUMMY_MAIN
11414# ifdef __cplusplus
11415 extern "C"
11416# endif
11417 int F77_DUMMY_MAIN() { return 1; }
11418#endif
11419int
11420main ()
11421{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011422struct sockaddr_in6 x;
11423x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 ;
11425 return 0;
11426}
11427_ACEOF
11428rm -f conftest.$ac_objext
11429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11430 (eval $ac_compile) 2>&5
11431 ac_status=$?
11432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11433 (exit $ac_status); } &&
11434 { ac_try='test -s conftest.$ac_objext'
11435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11436 (eval $ac_try) 2>&5
11437 ac_status=$?
11438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11439 (exit $ac_status); }; }; then
11440 echo "$as_me:$LINENO: result: yes" >&5
11441echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011442 ipv6=yes
11443else
Martin v. Löwis11437992002-04-12 09:54:03 +000011444 echo "$as_me: failed program was:" >&5
11445cat conftest.$ac_ext >&5
11446echo "$as_me:$LINENO: result: no" >&5
11447echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011448 ipv6=no
11449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011450rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011451fi
11452
11453if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011455#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011456_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011457
11458fi
11459
Martin v. Löwis11437992002-04-12 09:54:03 +000011460fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011461
11462ipv6type=unknown
11463ipv6lib=none
11464ipv6trylibc=no
11465
11466if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011467 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11468echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011469 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11470 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011471 case $i in
11472 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011473 cat >conftest.$ac_ext <<_ACEOF
11474#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011475#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011476
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011477#include <netinet/in.h>
11478#ifdef IPV6_INRIA_VERSION
11479yes
11480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011481_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11483 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011484 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011485fi
11486rm -f conftest*
11487
11488 ;;
11489 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011490 cat >conftest.$ac_ext <<_ACEOF
11491#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011492#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011493
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011494#include <netinet/in.h>
11495#ifdef __KAME__
11496yes
11497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011498_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11500 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011501 ipv6type=$i;
11502 ipv6lib=inet6
11503 ipv6libdir=/usr/local/v6/lib
11504 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011505fi
11506rm -f conftest*
11507
11508 ;;
11509 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 cat >conftest.$ac_ext <<_ACEOF
11511#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011512#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011513
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011514#include <features.h>
11515#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11516yes
11517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011518_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11520 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011521 ipv6type=$i;
11522 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011523fi
11524rm -f conftest*
11525
11526 ;;
11527 linux-inet6)
11528 if test -d /usr/inet6; then
11529 ipv6type=$i
11530 ipv6lib=inet6
11531 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011532 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011533 fi
11534 ;;
11535 solaris)
11536 if test -f /etc/netconfig; then
11537 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11538 ipv6type=$i
11539 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011540 fi
11541 fi
11542 ;;
11543 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011544 cat >conftest.$ac_ext <<_ACEOF
11545#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011546#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011547
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011548#include <sys/param.h>
11549#ifdef _TOSHIBA_INET6
11550yes
11551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011552_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011553if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11554 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011555 ipv6type=$i;
11556 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011557 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011558fi
11559rm -f conftest*
11560
11561 ;;
11562 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011563 cat >conftest.$ac_ext <<_ACEOF
11564#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011565#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011566
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011567#include </usr/local/v6/include/sys/v6config.h>
11568#ifdef __V6D__
11569yes
11570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011571_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11573 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011574 ipv6type=$i;
11575 ipv6lib=v6;
11576 ipv6libdir=/usr/local/v6/lib;
11577 OPT="-I/usr/local/v6/include $OPT"
11578fi
11579rm -f conftest*
11580
11581 ;;
11582 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011583 cat >conftest.$ac_ext <<_ACEOF
11584#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011585#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011586
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011587#include <sys/param.h>
11588#ifdef _ZETA_MINAMI_INET6
11589yes
11590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011591_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11593 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011594 ipv6type=$i;
11595 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011596 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011597fi
11598rm -f conftest*
11599
11600 ;;
11601 esac
11602 if test "$ipv6type" != "unknown"; then
11603 break
11604 fi
11605 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011606 echo "$as_me:$LINENO: result: $ipv6type" >&5
11607echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011608fi
11609
11610if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11611 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11612 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11613 echo "using lib$ipv6lib"
11614 else
11615 if test $ipv6trylibc = "yes"; then
11616 echo "using libc"
11617 else
11618 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11619 echo "You need to fetch lib$ipv6lib.a from appropriate"
11620 echo 'ipv6 kit and compile beforehand.'
11621 exit 1
11622 fi
11623 fi
11624fi
11625
Jack Jansen7b8c7542002-04-14 20:12:41 +000011626# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011627echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11628echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011629
11630# Check whether --with-universal-newlines or --without-universal-newlines was given.
11631if test "${with_universal_newlines+set}" = set; then
11632 withval="$with_universal_newlines"
11633
11634fi;
11635
11636if test -z "$with_universal_newlines"
11637then with_universal_newlines="yes"
11638fi
11639if test "$with_universal_newlines" != "no"
11640then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011641
11642cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011643#define WITH_UNIVERSAL_NEWLINES 1
11644_ACEOF
11645
11646fi
11647echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11648echo "${ECHO_T}$with_universal_newlines" >&6
11649
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011650# Check for --with-doc-strings
11651echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11652echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11653
11654# Check whether --with-doc-strings or --without-doc-strings was given.
11655if test "${with_doc_strings+set}" = set; then
11656 withval="$with_doc_strings"
11657
11658fi;
11659
11660if test -z "$with_doc_strings"
11661then with_doc_strings="yes"
11662fi
11663if test "$with_doc_strings" != "no"
11664then
11665
11666cat >>confdefs.h <<\_ACEOF
11667#define WITH_DOC_STRINGS 1
11668_ACEOF
11669
11670fi
11671echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11672echo "${ECHO_T}$with_doc_strings" >&6
11673
Neil Schemenauera35c6882001-02-27 04:45:05 +000011674# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011675echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11676echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11677
Neil Schemenauera35c6882001-02-27 04:45:05 +000011678# Check whether --with-pymalloc or --without-pymalloc was given.
11679if test "${with_pymalloc+set}" = set; then
11680 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011681
Martin v. Löwis11437992002-04-12 09:54:03 +000011682fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011683
Neil Schemenauer16c22972002-03-22 15:34:49 +000011684if test -z "$with_pymalloc"
11685then with_pymalloc="yes"
11686fi
11687if test "$with_pymalloc" != "no"
11688then
Martin v. Löwis11437992002-04-12 09:54:03 +000011689
11690cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011691#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011692_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011693
11694fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011695echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11696echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011697
Barry Warsawef82cd72000-06-30 16:21:01 +000011698# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011699echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11700echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11701
Barry Warsawef82cd72000-06-30 16:21:01 +000011702# Check whether --with-wctype-functions or --without-wctype-functions was given.
11703if test "${with_wctype_functions+set}" = set; then
11704 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011705
Barry Warsawef82cd72000-06-30 16:21:01 +000011706if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011707then
11708
11709cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011710#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011711_ACEOF
11712
11713 echo "$as_me:$LINENO: result: yes" >&5
11714echo "${ECHO_T}yes" >&6
11715else echo "$as_me:$LINENO: result: no" >&5
11716echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011717fi
11718else
Martin v. Löwis11437992002-04-12 09:54:03 +000011719 echo "$as_me:$LINENO: result: no" >&5
11720echo "${ECHO_T}no" >&6
11721fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011722
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011723# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011724
Guido van Rossum98935bf2001-09-05 19:13:16 +000011725DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011726
Martin v. Löwis11437992002-04-12 09:54:03 +000011727echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11728echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11729
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011730# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011731if test "${with_sgi_dl+set}" = set; then
11732 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011733
11734echo "$as_me:$LINENO: result: $withval" >&5
11735echo "${ECHO_T}$withval" >&6
11736
11737cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011738#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011739_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011740
Guido van Rossume97ee181999-12-20 21:27:22 +000011741DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011742dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011743if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011744then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011745else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11746echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11747 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011748fi
11749DLINCLDIR=${dldir}
11750LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011751else
Martin v. Löwis11437992002-04-12 09:54:03 +000011752 echo "$as_me:$LINENO: result: no" >&5
11753echo "${ECHO_T}no" >&6
11754fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011755
Martin v. Löwis11437992002-04-12 09:54:03 +000011756echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11757echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011758
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011759# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011760if test "${with_dl_dld+set}" = set; then
11761 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011762
11763echo "$as_me:$LINENO: result: $withval" >&5
11764echo "${ECHO_T}$withval" >&6
11765
11766cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011767#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011768_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011769
Guido van Rossume97ee181999-12-20 21:27:22 +000011770DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011771dldir=`echo "$withval" | sed 's/,.*//'`
11772dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011773if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011774then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011775else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11776echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11777 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011778fi
11779DLINCLDIR=${dldir}
11780LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011781else
Martin v. Löwis11437992002-04-12 09:54:03 +000011782 echo "$as_me:$LINENO: result: no" >&5
11783echo "${ECHO_T}no" >&6
11784fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011785
Guido van Rossume97ee181999-12-20 21:27:22 +000011786# the dlopen() function means we might want to use dynload_shlib.o. some
11787# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011788
Thomas Wouters3a584202000-08-05 23:28:51 +000011789for ac_func in dlopen
11790do
Martin v. Löwis11437992002-04-12 09:54:03 +000011791as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11792echo "$as_me:$LINENO: checking for $ac_func" >&5
11793echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11794if eval "test \"\${$as_ac_var+set}\" = set"; then
11795 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011796else
Martin v. Löwis11437992002-04-12 09:54:03 +000011797 cat >conftest.$ac_ext <<_ACEOF
11798#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011799#include "confdefs.h"
11800/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011801 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011802#include <assert.h>
11803/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011804#ifdef __cplusplus
11805extern "C"
11806#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011807/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011808 builtin and then its argument prototype would still apply. */
11809char $ac_func ();
11810char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011811
Martin v. Löwis11437992002-04-12 09:54:03 +000011812#ifdef F77_DUMMY_MAIN
11813# ifdef __cplusplus
11814 extern "C"
11815# endif
11816 int F77_DUMMY_MAIN() { return 1; }
11817#endif
11818int
11819main ()
11820{
Guido van Rossume97ee181999-12-20 21:27:22 +000011821/* The GNU C library defines this for functions which it implements
11822 to always fail with ENOSYS. Some functions are actually named
11823 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011824#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011825choke me
11826#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011827f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011828#endif
11829
Martin v. Löwis11437992002-04-12 09:54:03 +000011830 ;
11831 return 0;
11832}
11833_ACEOF
11834rm -f conftest.$ac_objext conftest$ac_exeext
11835if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11836 (eval $ac_link) 2>&5
11837 ac_status=$?
11838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11839 (exit $ac_status); } &&
11840 { ac_try='test -s conftest$ac_exeext'
11841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11842 (eval $ac_try) 2>&5
11843 ac_status=$?
11844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11845 (exit $ac_status); }; }; then
11846 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011847else
Martin v. Löwis11437992002-04-12 09:54:03 +000011848 echo "$as_me: failed program was:" >&5
11849cat conftest.$ac_ext >&5
11850eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011851fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011852rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011853fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011854echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11855echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11856if test `eval echo '${'$as_ac_var'}'` = yes; then
11857 cat >>confdefs.h <<_ACEOF
11858#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11859_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011860
Guido van Rossume97ee181999-12-20 21:27:22 +000011861fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011862done
Guido van Rossume97ee181999-12-20 21:27:22 +000011863
Michael W. Hudson54241132001-12-07 15:38:26 +000011864
Guido van Rossume97ee181999-12-20 21:27:22 +000011865# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11866# loading of modules.
11867
Martin v. Löwis11437992002-04-12 09:54:03 +000011868echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11869echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011870if test -z "$DYNLOADFILE"
11871then
11872 case $ac_sys_system/$ac_sys_release in
11873 AIX*) DYNLOADFILE="dynload_aix.o";;
11874 BeOS*) DYNLOADFILE="dynload_beos.o";;
11875 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011876 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011877 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011878 *)
11879 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11880 # out any dynamic loading
11881 if test "$ac_cv_func_dlopen" = yes
11882 then DYNLOADFILE="dynload_shlib.o"
11883 else DYNLOADFILE="dynload_stub.o"
11884 fi
11885 ;;
11886 esac
11887fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011888echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11889echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011890if test "$DYNLOADFILE" != "dynload_stub.o"
11891then
Martin v. Löwis11437992002-04-12 09:54:03 +000011892
11893cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011894#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011895_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011896
11897fi
11898
Neil Schemenauer4e425612001-06-19 15:44:15 +000011899# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11900
Michael W. Hudson54241132001-12-07 15:38:26 +000011901
Martin v. Löwis11437992002-04-12 09:54:03 +000011902echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11903echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011904if test -z "$MACHDEP_OBJS"
11905then
Jack Jansene578a632001-08-15 01:27:14 +000011906 MACHDEP_OBJS=$extra_machdep_objs
11907else
11908 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011909fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011910echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11911echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011912
Guido van Rossum627b2d71993-12-24 10:39:16 +000011913# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011987
Fred Drake6b3cc522002-04-15 19:20:27 +000011988
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011989for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011990 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011991 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011992 hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000011993 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011994 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011995 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011996 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011997 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011998 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011999 truncate uname unsetenv utimes waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000012000do
Martin v. Löwis11437992002-04-12 09:54:03 +000012001as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12002echo "$as_me:$LINENO: checking for $ac_func" >&5
12003echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12004if eval "test \"\${$as_ac_var+set}\" = set"; then
12005 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012006else
Martin v. Löwis11437992002-04-12 09:54:03 +000012007 cat >conftest.$ac_ext <<_ACEOF
12008#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012009#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012010/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012011 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012012#include <assert.h>
12013/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012014#ifdef __cplusplus
12015extern "C"
12016#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012017/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012018 builtin and then its argument prototype would still apply. */
12019char $ac_func ();
12020char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012021
Martin v. Löwis11437992002-04-12 09:54:03 +000012022#ifdef F77_DUMMY_MAIN
12023# ifdef __cplusplus
12024 extern "C"
12025# endif
12026 int F77_DUMMY_MAIN() { return 1; }
12027#endif
12028int
12029main ()
12030{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012031/* The GNU C library defines this for functions which it implements
12032 to always fail with ENOSYS. Some functions are actually named
12033 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012034#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012035choke me
12036#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012037f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012038#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012039
Martin v. Löwis11437992002-04-12 09:54:03 +000012040 ;
12041 return 0;
12042}
12043_ACEOF
12044rm -f conftest.$ac_objext conftest$ac_exeext
12045if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12046 (eval $ac_link) 2>&5
12047 ac_status=$?
12048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12049 (exit $ac_status); } &&
12050 { ac_try='test -s conftest$ac_exeext'
12051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12052 (eval $ac_try) 2>&5
12053 ac_status=$?
12054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12055 (exit $ac_status); }; }; then
12056 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012057else
Martin v. Löwis11437992002-04-12 09:54:03 +000012058 echo "$as_me: failed program was:" >&5
12059cat conftest.$ac_ext >&5
12060eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012061fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012062rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012063fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012064echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12065echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12066if test `eval echo '${'$as_ac_var'}'` = yes; then
12067 cat >>confdefs.h <<_ACEOF
12068#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12069_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012070
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012071fi
12072done
12073
Michael W. Hudson54241132001-12-07 15:38:26 +000012074
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012075# For some functions, having a definition is not sufficient, since
12076# we want to take their address.
12077echo "$as_me:$LINENO: checking for chroot" >&5
12078echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12079cat >conftest.$ac_ext <<_ACEOF
12080#line $LINENO "configure"
12081#include "confdefs.h"
12082#include <unistd.h>
12083#ifdef F77_DUMMY_MAIN
12084# ifdef __cplusplus
12085 extern "C"
12086# endif
12087 int F77_DUMMY_MAIN() { return 1; }
12088#endif
12089int
12090main ()
12091{
12092void *x=chroot
12093 ;
12094 return 0;
12095}
12096_ACEOF
12097rm -f conftest.$ac_objext
12098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12099 (eval $ac_compile) 2>&5
12100 ac_status=$?
12101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12102 (exit $ac_status); } &&
12103 { ac_try='test -s conftest.$ac_objext'
12104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12105 (eval $ac_try) 2>&5
12106 ac_status=$?
12107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12108 (exit $ac_status); }; }; then
12109
12110cat >>confdefs.h <<\_ACEOF
12111#define HAVE_CHROOT 1
12112_ACEOF
12113
12114 echo "$as_me:$LINENO: result: yes" >&5
12115echo "${ECHO_T}yes" >&6
12116else
12117 echo "$as_me: failed program was:" >&5
12118cat conftest.$ac_ext >&5
12119echo "$as_me:$LINENO: result: no" >&5
12120echo "${ECHO_T}no" >&6
12121
12122fi
12123rm -f conftest.$ac_objext conftest.$ac_ext
12124echo "$as_me:$LINENO: checking for link" >&5
12125echo $ECHO_N "checking for link... $ECHO_C" >&6
12126cat >conftest.$ac_ext <<_ACEOF
12127#line $LINENO "configure"
12128#include "confdefs.h"
12129#include <unistd.h>
12130#ifdef F77_DUMMY_MAIN
12131# ifdef __cplusplus
12132 extern "C"
12133# endif
12134 int F77_DUMMY_MAIN() { return 1; }
12135#endif
12136int
12137main ()
12138{
12139void *x=link
12140 ;
12141 return 0;
12142}
12143_ACEOF
12144rm -f conftest.$ac_objext
12145if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12146 (eval $ac_compile) 2>&5
12147 ac_status=$?
12148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12149 (exit $ac_status); } &&
12150 { ac_try='test -s conftest.$ac_objext'
12151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12152 (eval $ac_try) 2>&5
12153 ac_status=$?
12154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12155 (exit $ac_status); }; }; then
12156
12157cat >>confdefs.h <<\_ACEOF
12158#define HAVE_LINK 1
12159_ACEOF
12160
12161 echo "$as_me:$LINENO: result: yes" >&5
12162echo "${ECHO_T}yes" >&6
12163else
12164 echo "$as_me: failed program was:" >&5
12165cat conftest.$ac_ext >&5
12166echo "$as_me:$LINENO: result: no" >&5
12167echo "${ECHO_T}no" >&6
12168
12169fi
12170rm -f conftest.$ac_objext conftest.$ac_ext
12171echo "$as_me:$LINENO: checking for symlink" >&5
12172echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12173cat >conftest.$ac_ext <<_ACEOF
12174#line $LINENO "configure"
12175#include "confdefs.h"
12176#include <unistd.h>
12177#ifdef F77_DUMMY_MAIN
12178# ifdef __cplusplus
12179 extern "C"
12180# endif
12181 int F77_DUMMY_MAIN() { return 1; }
12182#endif
12183int
12184main ()
12185{
12186void *x=symlink
12187 ;
12188 return 0;
12189}
12190_ACEOF
12191rm -f conftest.$ac_objext
12192if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12193 (eval $ac_compile) 2>&5
12194 ac_status=$?
12195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12196 (exit $ac_status); } &&
12197 { ac_try='test -s conftest.$ac_objext'
12198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12199 (eval $ac_try) 2>&5
12200 ac_status=$?
12201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12202 (exit $ac_status); }; }; then
12203
12204cat >>confdefs.h <<\_ACEOF
12205#define HAVE_SYMLINK 1
12206_ACEOF
12207
12208 echo "$as_me:$LINENO: result: yes" >&5
12209echo "${ECHO_T}yes" >&6
12210else
12211 echo "$as_me: failed program was:" >&5
12212cat conftest.$ac_ext >&5
12213echo "$as_me:$LINENO: result: no" >&5
12214echo "${ECHO_T}no" >&6
12215
12216fi
12217rm -f conftest.$ac_objext conftest.$ac_ext
12218
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012219# check for openpty and forkpty
12220
Martin v. Löwis11437992002-04-12 09:54:03 +000012221
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012222for ac_func in openpty
12223do
Martin v. Löwis11437992002-04-12 09:54:03 +000012224as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12225echo "$as_me:$LINENO: checking for $ac_func" >&5
12226echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12227if eval "test \"\${$as_ac_var+set}\" = set"; then
12228 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012229else
Martin v. Löwis11437992002-04-12 09:54:03 +000012230 cat >conftest.$ac_ext <<_ACEOF
12231#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012232#include "confdefs.h"
12233/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012234 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012235#include <assert.h>
12236/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012237#ifdef __cplusplus
12238extern "C"
12239#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012240/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012241 builtin and then its argument prototype would still apply. */
12242char $ac_func ();
12243char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012244
Martin v. Löwis11437992002-04-12 09:54:03 +000012245#ifdef F77_DUMMY_MAIN
12246# ifdef __cplusplus
12247 extern "C"
12248# endif
12249 int F77_DUMMY_MAIN() { return 1; }
12250#endif
12251int
12252main ()
12253{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012254/* The GNU C library defines this for functions which it implements
12255 to always fail with ENOSYS. Some functions are actually named
12256 something starting with __ and the normal name is an alias. */
12257#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12258choke me
12259#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012260f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012261#endif
12262
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 ;
12264 return 0;
12265}
12266_ACEOF
12267rm -f conftest.$ac_objext conftest$ac_exeext
12268if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12269 (eval $ac_link) 2>&5
12270 ac_status=$?
12271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12272 (exit $ac_status); } &&
12273 { ac_try='test -s conftest$ac_exeext'
12274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12275 (eval $ac_try) 2>&5
12276 ac_status=$?
12277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12278 (exit $ac_status); }; }; then
12279 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012280else
Martin v. Löwis11437992002-04-12 09:54:03 +000012281 echo "$as_me: failed program was:" >&5
12282cat conftest.$ac_ext >&5
12283eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012284fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012285rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012286fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012287echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12288echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12289if test `eval echo '${'$as_ac_var'}'` = yes; then
12290 cat >>confdefs.h <<_ACEOF
12291#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12292_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012293
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012294else
Martin v. Löwis11437992002-04-12 09:54:03 +000012295 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12296echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12297if test "${ac_cv_lib_util_openpty+set}" = set; then
12298 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012299else
Martin v. Löwis11437992002-04-12 09:54:03 +000012300 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012301LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012302cat >conftest.$ac_ext <<_ACEOF
12303#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012304#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012305
Fred Drake8cef4cf2000-06-28 16:40:38 +000012306/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012307#ifdef __cplusplus
12308extern "C"
12309#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012310/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012311 builtin and then its argument prototype would still apply. */
12312char openpty ();
12313#ifdef F77_DUMMY_MAIN
12314# ifdef __cplusplus
12315 extern "C"
12316# endif
12317 int F77_DUMMY_MAIN() { return 1; }
12318#endif
12319int
12320main ()
12321{
12322openpty ();
12323 ;
12324 return 0;
12325}
12326_ACEOF
12327rm -f conftest.$ac_objext conftest$ac_exeext
12328if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12329 (eval $ac_link) 2>&5
12330 ac_status=$?
12331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12332 (exit $ac_status); } &&
12333 { ac_try='test -s conftest$ac_exeext'
12334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12335 (eval $ac_try) 2>&5
12336 ac_status=$?
12337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12338 (exit $ac_status); }; }; then
12339 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012340else
Martin v. Löwis11437992002-04-12 09:54:03 +000012341 echo "$as_me: failed program was:" >&5
12342cat conftest.$ac_ext >&5
12343ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012344fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012345rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12346LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012347fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012348echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12349echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12350if test $ac_cv_lib_util_openpty = yes; then
12351 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012352#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012353_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012354 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012355fi
12356
12357fi
12358done
12359
Martin v. Löwis11437992002-04-12 09:54:03 +000012360
Fred Drake8cef4cf2000-06-28 16:40:38 +000012361for ac_func in forkpty
12362do
Martin v. Löwis11437992002-04-12 09:54:03 +000012363as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12364echo "$as_me:$LINENO: checking for $ac_func" >&5
12365echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12366if eval "test \"\${$as_ac_var+set}\" = set"; then
12367 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012368else
Martin v. Löwis11437992002-04-12 09:54:03 +000012369 cat >conftest.$ac_ext <<_ACEOF
12370#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012371#include "confdefs.h"
12372/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012373 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000012374#include <assert.h>
12375/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012376#ifdef __cplusplus
12377extern "C"
12378#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012379/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012380 builtin and then its argument prototype would still apply. */
12381char $ac_func ();
12382char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012383
Martin v. Löwis11437992002-04-12 09:54:03 +000012384#ifdef F77_DUMMY_MAIN
12385# ifdef __cplusplus
12386 extern "C"
12387# endif
12388 int F77_DUMMY_MAIN() { return 1; }
12389#endif
12390int
12391main ()
12392{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012393/* The GNU C library defines this for functions which it implements
12394 to always fail with ENOSYS. Some functions are actually named
12395 something starting with __ and the normal name is an alias. */
12396#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12397choke me
12398#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012399f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012400#endif
12401
Martin v. Löwis11437992002-04-12 09:54:03 +000012402 ;
12403 return 0;
12404}
12405_ACEOF
12406rm -f conftest.$ac_objext conftest$ac_exeext
12407if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12408 (eval $ac_link) 2>&5
12409 ac_status=$?
12410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12411 (exit $ac_status); } &&
12412 { ac_try='test -s conftest$ac_exeext'
12413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12414 (eval $ac_try) 2>&5
12415 ac_status=$?
12416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12417 (exit $ac_status); }; }; then
12418 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012419else
Martin v. Löwis11437992002-04-12 09:54:03 +000012420 echo "$as_me: failed program was:" >&5
12421cat conftest.$ac_ext >&5
12422eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012424rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012425fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012426echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12427echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12428if test `eval echo '${'$as_ac_var'}'` = yes; then
12429 cat >>confdefs.h <<_ACEOF
12430#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12431_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012432
Fred Drake8cef4cf2000-06-28 16:40:38 +000012433else
Martin v. Löwis11437992002-04-12 09:54:03 +000012434 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12435echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12436if test "${ac_cv_lib_util_forkpty+set}" = set; then
12437 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012438else
Martin v. Löwis11437992002-04-12 09:54:03 +000012439 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012440LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012441cat >conftest.$ac_ext <<_ACEOF
12442#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012443#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012444
Fred Drake8cef4cf2000-06-28 16:40:38 +000012445/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012446#ifdef __cplusplus
12447extern "C"
12448#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012449/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012450 builtin and then its argument prototype would still apply. */
12451char forkpty ();
12452#ifdef F77_DUMMY_MAIN
12453# ifdef __cplusplus
12454 extern "C"
12455# endif
12456 int F77_DUMMY_MAIN() { return 1; }
12457#endif
12458int
12459main ()
12460{
12461forkpty ();
12462 ;
12463 return 0;
12464}
12465_ACEOF
12466rm -f conftest.$ac_objext conftest$ac_exeext
12467if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12468 (eval $ac_link) 2>&5
12469 ac_status=$?
12470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12471 (exit $ac_status); } &&
12472 { ac_try='test -s conftest$ac_exeext'
12473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12474 (eval $ac_try) 2>&5
12475 ac_status=$?
12476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12477 (exit $ac_status); }; }; then
12478 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012479else
Martin v. Löwis11437992002-04-12 09:54:03 +000012480 echo "$as_me: failed program was:" >&5
12481cat conftest.$ac_ext >&5
12482ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012483fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012484rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12485LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012486fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012487echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12488echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12489if test $ac_cv_lib_util_forkpty = yes; then
12490 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012491#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012492_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012493 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012494fi
12495
12496fi
12497done
12498
Jack Jansendd19cf82001-12-06 22:36:17 +000012499
Michael W. Hudson54241132001-12-07 15:38:26 +000012500# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012501
12502
12503
12504
12505
12506
Fred Drake8cef4cf2000-06-28 16:40:38 +000012507for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12508do
Martin v. Löwis11437992002-04-12 09:54:03 +000012509as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12510echo "$as_me:$LINENO: checking for $ac_func" >&5
12511echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12512if eval "test \"\${$as_ac_var+set}\" = set"; then
12513 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012514else
Martin v. Löwis11437992002-04-12 09:54:03 +000012515 cat >conftest.$ac_ext <<_ACEOF
12516#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012517#include "confdefs.h"
12518/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012519 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012520#include <assert.h>
12521/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012522#ifdef __cplusplus
12523extern "C"
12524#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012525/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012526 builtin and then its argument prototype would still apply. */
12527char $ac_func ();
12528char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012529
Martin v. Löwis11437992002-04-12 09:54:03 +000012530#ifdef F77_DUMMY_MAIN
12531# ifdef __cplusplus
12532 extern "C"
12533# endif
12534 int F77_DUMMY_MAIN() { return 1; }
12535#endif
12536int
12537main ()
12538{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012539/* The GNU C library defines this for functions which it implements
12540 to always fail with ENOSYS. Some functions are actually named
12541 something starting with __ and the normal name is an alias. */
12542#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12543choke me
12544#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012545f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012546#endif
12547
Martin v. Löwis11437992002-04-12 09:54:03 +000012548 ;
12549 return 0;
12550}
12551_ACEOF
12552rm -f conftest.$ac_objext conftest$ac_exeext
12553if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12554 (eval $ac_link) 2>&5
12555 ac_status=$?
12556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12557 (exit $ac_status); } &&
12558 { ac_try='test -s conftest$ac_exeext'
12559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12560 (eval $ac_try) 2>&5
12561 ac_status=$?
12562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12563 (exit $ac_status); }; }; then
12564 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012565else
Martin v. Löwis11437992002-04-12 09:54:03 +000012566 echo "$as_me: failed program was:" >&5
12567cat conftest.$ac_ext >&5
12568eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012569fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012570rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012571fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012572echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12573echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12574if test `eval echo '${'$as_ac_var'}'` = yes; then
12575 cat >>confdefs.h <<_ACEOF
12576#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12577_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012578
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012579fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012580done
12581
Michael W. Hudson54241132001-12-07 15:38:26 +000012582
Martin v. Löwis11437992002-04-12 09:54:03 +000012583
12584
12585
12586
12587
Martin v. Löwis1142de32002-03-29 16:28:31 +000012588for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012589do
Martin v. Löwis11437992002-04-12 09:54:03 +000012590as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12591echo "$as_me:$LINENO: checking for $ac_func" >&5
12592echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12593if eval "test \"\${$as_ac_var+set}\" = set"; then
12594 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012595else
Martin v. Löwis11437992002-04-12 09:54:03 +000012596 cat >conftest.$ac_ext <<_ACEOF
12597#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012598#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012599/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012600 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012601#include <assert.h>
12602/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012603#ifdef __cplusplus
12604extern "C"
12605#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012606/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 builtin and then its argument prototype would still apply. */
12608char $ac_func ();
12609char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012610
Martin v. Löwis11437992002-04-12 09:54:03 +000012611#ifdef F77_DUMMY_MAIN
12612# ifdef __cplusplus
12613 extern "C"
12614# endif
12615 int F77_DUMMY_MAIN() { return 1; }
12616#endif
12617int
12618main ()
12619{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012620/* The GNU C library defines this for functions which it implements
12621 to always fail with ENOSYS. Some functions are actually named
12622 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012623#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012624choke me
12625#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012626f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012627#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012628
Martin v. Löwis11437992002-04-12 09:54:03 +000012629 ;
12630 return 0;
12631}
12632_ACEOF
12633rm -f conftest.$ac_objext conftest$ac_exeext
12634if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12635 (eval $ac_link) 2>&5
12636 ac_status=$?
12637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12638 (exit $ac_status); } &&
12639 { ac_try='test -s conftest$ac_exeext'
12640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12641 (eval $ac_try) 2>&5
12642 ac_status=$?
12643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12644 (exit $ac_status); }; }; then
12645 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012646else
Martin v. Löwis11437992002-04-12 09:54:03 +000012647 echo "$as_me: failed program was:" >&5
12648cat conftest.$ac_ext >&5
12649eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012650fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012651rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012652fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012653echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12654echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12655if test `eval echo '${'$as_ac_var'}'` = yes; then
12656 cat >>confdefs.h <<_ACEOF
12657#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12658_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012659
Martin v. Löwis1142de32002-03-29 16:28:31 +000012660else
Martin v. Löwis11437992002-04-12 09:54:03 +000012661 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012662fi
12663done
12664
12665
Martin v. Löwis11437992002-04-12 09:54:03 +000012666
Martin v. Löwis1142de32002-03-29 16:28:31 +000012667for ac_func in getpgrp
12668do
Martin v. Löwis11437992002-04-12 09:54:03 +000012669as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12670echo "$as_me:$LINENO: checking for $ac_func" >&5
12671echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12672if eval "test \"\${$as_ac_var+set}\" = set"; then
12673 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012674else
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 cat >conftest.$ac_ext <<_ACEOF
12676#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012677#include "confdefs.h"
12678/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012679 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012680#include <assert.h>
12681/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012682#ifdef __cplusplus
12683extern "C"
12684#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012685/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012686 builtin and then its argument prototype would still apply. */
12687char $ac_func ();
12688char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012689
Martin v. Löwis11437992002-04-12 09:54:03 +000012690#ifdef F77_DUMMY_MAIN
12691# ifdef __cplusplus
12692 extern "C"
12693# endif
12694 int F77_DUMMY_MAIN() { return 1; }
12695#endif
12696int
12697main ()
12698{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012699/* The GNU C library defines this for functions which it implements
12700 to always fail with ENOSYS. Some functions are actually named
12701 something starting with __ and the normal name is an alias. */
12702#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12703choke me
12704#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012705f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012706#endif
12707
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 ;
12709 return 0;
12710}
12711_ACEOF
12712rm -f conftest.$ac_objext conftest$ac_exeext
12713if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12714 (eval $ac_link) 2>&5
12715 ac_status=$?
12716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12717 (exit $ac_status); } &&
12718 { ac_try='test -s conftest$ac_exeext'
12719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12720 (eval $ac_try) 2>&5
12721 ac_status=$?
12722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12723 (exit $ac_status); }; }; then
12724 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012725else
Martin v. Löwis11437992002-04-12 09:54:03 +000012726 echo "$as_me: failed program was:" >&5
12727cat conftest.$ac_ext >&5
12728eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012729fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012730rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012731fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012732echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12733echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12734if test `eval echo '${'$as_ac_var'}'` = yes; then
12735 cat >>confdefs.h <<_ACEOF
12736#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12737_ACEOF
12738 cat >conftest.$ac_ext <<_ACEOF
12739#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012740#include "confdefs.h"
12741#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012742#ifdef F77_DUMMY_MAIN
12743# ifdef __cplusplus
12744 extern "C"
12745# endif
12746 int F77_DUMMY_MAIN() { return 1; }
12747#endif
12748int
12749main ()
12750{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012751getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012752 ;
12753 return 0;
12754}
12755_ACEOF
12756rm -f conftest.$ac_objext
12757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12758 (eval $ac_compile) 2>&5
12759 ac_status=$?
12760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12761 (exit $ac_status); } &&
12762 { ac_try='test -s conftest.$ac_objext'
12763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12764 (eval $ac_try) 2>&5
12765 ac_status=$?
12766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12767 (exit $ac_status); }; }; then
12768
12769cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012770#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012771_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012772
Martin v. Löwis11437992002-04-12 09:54:03 +000012773
Guido van Rossumf78abae1997-01-21 22:02:36 +000012774else
Martin v. Löwis11437992002-04-12 09:54:03 +000012775 echo "$as_me: failed program was:" >&5
12776cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012777fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012778rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012779
Guido van Rossum627b2d71993-12-24 10:39:16 +000012780fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012781done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012782
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012783echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12784echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12785if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012786 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012787else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012788 if test "$cross_compiling" = yes; then
12789 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12790echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12791 { (exit 1); exit 1; }; }
12792else
Martin v. Löwis11437992002-04-12 09:54:03 +000012793 cat >conftest.$ac_ext <<_ACEOF
12794#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012795#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012796#if HAVE_UNISTD_H
12797# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012798#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012799
Martin v. Löwis11437992002-04-12 09:54:03 +000012800#ifdef F77_DUMMY_MAIN
12801# ifdef __cplusplus
12802 extern "C"
12803# endif
12804 int F77_DUMMY_MAIN() { return 1; }
12805#endif
12806int
12807main ()
12808{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012809/* If this system has a BSD-style setpgrp which takes arguments,
12810 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12811 exit successfully. */
12812 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012813 ;
12814 return 0;
12815}
12816_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012817rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012818if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12819 (eval $ac_link) 2>&5
12820 ac_status=$?
12821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012822 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12824 (eval $ac_try) 2>&5
12825 ac_status=$?
12826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12827 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012828 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012829else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012830 echo "$as_me: program exited with status $ac_status" >&5
12831echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012832cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012833( exit $ac_status )
12834ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012835fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012836rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012837fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012838fi
12839echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12840echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12841if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012842
12843cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012844#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012845_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012846
12847fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012848
Martin v. Löwis11437992002-04-12 09:54:03 +000012849
Thomas Wouters3a584202000-08-05 23:28:51 +000012850for ac_func in gettimeofday
12851do
Martin v. Löwis11437992002-04-12 09:54:03 +000012852as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12853echo "$as_me:$LINENO: checking for $ac_func" >&5
12854echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12855if eval "test \"\${$as_ac_var+set}\" = set"; then
12856 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012857else
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 cat >conftest.$ac_ext <<_ACEOF
12859#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012860#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012861/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012862 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012863#include <assert.h>
12864/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012865#ifdef __cplusplus
12866extern "C"
12867#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012868/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012869 builtin and then its argument prototype would still apply. */
12870char $ac_func ();
12871char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012872
Martin v. Löwis11437992002-04-12 09:54:03 +000012873#ifdef F77_DUMMY_MAIN
12874# ifdef __cplusplus
12875 extern "C"
12876# endif
12877 int F77_DUMMY_MAIN() { return 1; }
12878#endif
12879int
12880main ()
12881{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012882/* The GNU C library defines this for functions which it implements
12883 to always fail with ENOSYS. Some functions are actually named
12884 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012885#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012886choke me
12887#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012888f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012889#endif
12890
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 ;
12892 return 0;
12893}
12894_ACEOF
12895rm -f conftest.$ac_objext conftest$ac_exeext
12896if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12897 (eval $ac_link) 2>&5
12898 ac_status=$?
12899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12900 (exit $ac_status); } &&
12901 { ac_try='test -s conftest$ac_exeext'
12902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12903 (eval $ac_try) 2>&5
12904 ac_status=$?
12905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12906 (exit $ac_status); }; }; then
12907 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012908else
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 echo "$as_me: failed program was:" >&5
12910cat conftest.$ac_ext >&5
12911eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012912fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012913rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012914fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012915echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12916echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12917if test `eval echo '${'$as_ac_var'}'` = yes; then
12918 cat >>confdefs.h <<_ACEOF
12919#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12920_ACEOF
12921 cat >conftest.$ac_ext <<_ACEOF
12922#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012923#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012924#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012925#ifdef F77_DUMMY_MAIN
12926# ifdef __cplusplus
12927 extern "C"
12928# endif
12929 int F77_DUMMY_MAIN() { return 1; }
12930#endif
12931int
12932main ()
12933{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012934gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012935 ;
12936 return 0;
12937}
12938_ACEOF
12939rm -f conftest.$ac_objext
12940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12941 (eval $ac_compile) 2>&5
12942 ac_status=$?
12943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12944 (exit $ac_status); } &&
12945 { ac_try='test -s conftest.$ac_objext'
12946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12947 (eval $ac_try) 2>&5
12948 ac_status=$?
12949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12950 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012951 :
12952else
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 echo "$as_me: failed program was:" >&5
12954cat conftest.$ac_ext >&5
12955
12956cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012957#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012958_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012959
Martin v. Löwis11437992002-04-12 09:54:03 +000012960
Guido van Rossum627b2d71993-12-24 10:39:16 +000012961fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012962rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012963
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012964fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012965done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012966
Michael W. Hudson54241132001-12-07 15:38:26 +000012967
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012968echo "$as_me:$LINENO: checking for major" >&5
12969echo $ECHO_N "checking for major... $ECHO_C" >&6
12970cat >conftest.$ac_ext <<_ACEOF
12971#line $LINENO "configure"
12972#include "confdefs.h"
12973
12974 #if defined(MAJOR_IN_MKDEV)
12975 #include <sys/mkdev.h>
12976 #elif defined(MAJOR_IN_SYSMACROS)
12977 #include <sys/sysmacros.h>
12978 #else
12979 #include <sys/types.h>
12980 #endif
12981
12982#ifdef F77_DUMMY_MAIN
12983# ifdef __cplusplus
12984 extern "C"
12985# endif
12986 int F77_DUMMY_MAIN() { return 1; }
12987#endif
12988int
12989main ()
12990{
12991
12992 makedev(major(0),minor(0));
12993
12994 ;
12995 return 0;
12996}
12997_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000012998rm -f conftest.$ac_objext conftest$ac_exeext
12999if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13000 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013001 ac_status=$?
13002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13003 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013004 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13006 (eval $ac_try) 2>&5
13007 ac_status=$?
13008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13009 (exit $ac_status); }; }; then
13010
13011
13012cat >>confdefs.h <<\_ACEOF
13013#define HAVE_DEVICE_MACROS 1
13014_ACEOF
13015
13016 echo "$as_me:$LINENO: result: yes" >&5
13017echo "${ECHO_T}yes" >&6
13018
13019else
13020 echo "$as_me: failed program was:" >&5
13021cat conftest.$ac_ext >&5
13022
13023 echo "$as_me:$LINENO: result: no" >&5
13024echo "${ECHO_T}no" >&6
13025
13026fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013027rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013028
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013029# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013030# for [no]getaddrinfo in netdb.h.
13031echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13032echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13033cat >conftest.$ac_ext <<_ACEOF
13034#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013035#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013036
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013037#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013038#include <sys/socket.h>
13039#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013040#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013041
Martin v. Löwis11437992002-04-12 09:54:03 +000013042#ifdef F77_DUMMY_MAIN
13043# ifdef __cplusplus
13044 extern "C"
13045# endif
13046 int F77_DUMMY_MAIN() { return 1; }
13047#endif
13048int
13049main ()
13050{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013051
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013052getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013053
Martin v. Löwis11437992002-04-12 09:54:03 +000013054 ;
13055 return 0;
13056}
13057_ACEOF
13058rm -f conftest.$ac_objext conftest$ac_exeext
13059if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13060 (eval $ac_link) 2>&5
13061 ac_status=$?
13062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13063 (exit $ac_status); } &&
13064 { ac_try='test -s conftest$ac_exeext'
13065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13066 (eval $ac_try) 2>&5
13067 ac_status=$?
13068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13069 (exit $ac_status); }; }; then
13070
13071echo "$as_me:$LINENO: result: yes" >&5
13072echo "${ECHO_T}yes" >&6
13073echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13074echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013075if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013076 echo "$as_me:$LINENO: result: buggy" >&5
13077echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013078buggygetaddrinfo=yes
13079else
Martin v. Löwis11437992002-04-12 09:54:03 +000013080 cat >conftest.$ac_ext <<_ACEOF
13081#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013082#include "confdefs.h"
13083
13084#include <sys/types.h>
13085#include <netdb.h>
13086#include <string.h>
13087#include <sys/socket.h>
13088#include <netinet/in.h>
13089
13090main()
13091{
13092 int passive, gaierr, inet4 = 0, inet6 = 0;
13093 struct addrinfo hints, *ai, *aitop;
13094 char straddr[INET6_ADDRSTRLEN], strport[16];
13095
13096 for (passive = 0; passive <= 1; passive++) {
13097 memset(&hints, 0, sizeof(hints));
13098 hints.ai_family = AF_UNSPEC;
13099 hints.ai_flags = passive ? AI_PASSIVE : 0;
13100 hints.ai_socktype = SOCK_STREAM;
13101 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13102 (void)gai_strerror(gaierr);
13103 goto bad;
13104 }
13105 for (ai = aitop; ai; ai = ai->ai_next) {
13106 if (ai->ai_addr == NULL ||
13107 ai->ai_addrlen == 0 ||
13108 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13109 straddr, sizeof(straddr), strport, sizeof(strport),
13110 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13111 goto bad;
13112 }
13113 switch (ai->ai_family) {
13114 case AF_INET:
13115 if (strcmp(strport, "54321") != 0) {
13116 goto bad;
13117 }
13118 if (passive) {
13119 if (strcmp(straddr, "0.0.0.0") != 0) {
13120 goto bad;
13121 }
13122 } else {
13123 if (strcmp(straddr, "127.0.0.1") != 0) {
13124 goto bad;
13125 }
13126 }
13127 inet4++;
13128 break;
13129 case AF_INET6:
13130 if (strcmp(strport, "54321") != 0) {
13131 goto bad;
13132 }
13133 if (passive) {
13134 if (strcmp(straddr, "::") != 0) {
13135 goto bad;
13136 }
13137 } else {
13138 if (strcmp(straddr, "::1") != 0) {
13139 goto bad;
13140 }
13141 }
13142 inet6++;
13143 break;
13144 case AF_UNSPEC:
13145 goto bad;
13146 break;
13147 default:
13148 /* another family support? */
13149 break;
13150 }
13151 }
13152 }
13153
13154 if (!(inet4 == 0 || inet4 == 2))
13155 goto bad;
13156 if (!(inet6 == 0 || inet6 == 2))
13157 goto bad;
13158
13159 if (aitop)
13160 freeaddrinfo(aitop);
13161 exit(0);
13162
13163 bad:
13164 if (aitop)
13165 freeaddrinfo(aitop);
13166 exit(1);
13167}
13168
Martin v. Löwis11437992002-04-12 09:54:03 +000013169_ACEOF
13170rm -f conftest$ac_exeext
13171if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13172 (eval $ac_link) 2>&5
13173 ac_status=$?
13174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13175 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13177 (eval $ac_try) 2>&5
13178 ac_status=$?
13179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13180 (exit $ac_status); }; }; then
13181 echo "$as_me:$LINENO: result: good" >&5
13182echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013183buggygetaddrinfo=no
13184else
Martin v. Löwis11437992002-04-12 09:54:03 +000013185 echo "$as_me: program exited with status $ac_status" >&5
13186echo "$as_me: failed program was:" >&5
13187cat conftest.$ac_ext >&5
13188( exit $ac_status )
13189echo "$as_me:$LINENO: result: buggy" >&5
13190echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013191buggygetaddrinfo=yes
13192fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013193rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013194fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013195else
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 echo "$as_me: failed program was:" >&5
13197cat conftest.$ac_ext >&5
13198
13199echo "$as_me:$LINENO: result: no" >&5
13200echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013201buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013202
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013203fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013204rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013205
13206if test "$buggygetaddrinfo" = "yes"; then
13207 if test "$ipv6" = "yes"; then
13208 echo 'Fatal: You must get working getaddrinfo() function.'
13209 echo ' or you can specify "--disable-ipv6"'.
13210 exit 1
13211 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013212else
Martin v. Löwis11437992002-04-12 09:54:03 +000013213
13214cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013215#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013216_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013217
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013218fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013219
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013220for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013221do
Martin v. Löwis11437992002-04-12 09:54:03 +000013222as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13223echo "$as_me:$LINENO: checking for $ac_func" >&5
13224echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13225if eval "test \"\${$as_ac_var+set}\" = set"; then
13226 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013227else
Martin v. Löwis11437992002-04-12 09:54:03 +000013228 cat >conftest.$ac_ext <<_ACEOF
13229#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013230#include "confdefs.h"
13231/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013232 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013233#include <assert.h>
13234/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013235#ifdef __cplusplus
13236extern "C"
13237#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013238/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013239 builtin and then its argument prototype would still apply. */
13240char $ac_func ();
13241char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013242
Martin v. Löwis11437992002-04-12 09:54:03 +000013243#ifdef F77_DUMMY_MAIN
13244# ifdef __cplusplus
13245 extern "C"
13246# endif
13247 int F77_DUMMY_MAIN() { return 1; }
13248#endif
13249int
13250main ()
13251{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013252/* The GNU C library defines this for functions which it implements
13253 to always fail with ENOSYS. Some functions are actually named
13254 something starting with __ and the normal name is an alias. */
13255#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13256choke me
13257#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013258f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013259#endif
13260
Martin v. Löwis11437992002-04-12 09:54:03 +000013261 ;
13262 return 0;
13263}
13264_ACEOF
13265rm -f conftest.$ac_objext conftest$ac_exeext
13266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13267 (eval $ac_link) 2>&5
13268 ac_status=$?
13269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13270 (exit $ac_status); } &&
13271 { ac_try='test -s conftest$ac_exeext'
13272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13273 (eval $ac_try) 2>&5
13274 ac_status=$?
13275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13276 (exit $ac_status); }; }; then
13277 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013278else
Martin v. Löwis11437992002-04-12 09:54:03 +000013279 echo "$as_me: failed program was:" >&5
13280cat conftest.$ac_ext >&5
13281eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013283rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013284fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013285echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13286echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13287if test `eval echo '${'$as_ac_var'}'` = yes; then
13288 cat >>confdefs.h <<_ACEOF
13289#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13290_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013291
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013292fi
13293done
13294
Michael W. Hudson54241132001-12-07 15:38:26 +000013295
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013296# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013297echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13298echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13299if test "${ac_cv_header_time+set}" = set; then
13300 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013301else
Martin v. Löwis11437992002-04-12 09:54:03 +000013302 cat >conftest.$ac_ext <<_ACEOF
13303#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013304#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305#include <sys/types.h>
13306#include <sys/time.h>
13307#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013308
13309#ifdef F77_DUMMY_MAIN
13310# ifdef __cplusplus
13311 extern "C"
13312# endif
13313 int F77_DUMMY_MAIN() { return 1; }
13314#endif
13315int
13316main ()
13317{
13318if ((struct tm *) 0)
13319return 0;
13320 ;
13321 return 0;
13322}
13323_ACEOF
13324rm -f conftest.$ac_objext
13325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13326 (eval $ac_compile) 2>&5
13327 ac_status=$?
13328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13329 (exit $ac_status); } &&
13330 { ac_try='test -s conftest.$ac_objext'
13331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13332 (eval $ac_try) 2>&5
13333 ac_status=$?
13334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13335 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013336 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013337else
Martin v. Löwis11437992002-04-12 09:54:03 +000013338 echo "$as_me: failed program was:" >&5
13339cat conftest.$ac_ext >&5
13340ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013341fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013342rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013344echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13345echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013346if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013347
13348cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013349#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013350_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013351
13352fi
13353
Martin v. Löwis11437992002-04-12 09:54:03 +000013354echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13355echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13356if test "${ac_cv_struct_tm+set}" = set; then
13357 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013358else
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 cat >conftest.$ac_ext <<_ACEOF
13360#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013361#include "confdefs.h"
13362#include <sys/types.h>
13363#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013364
13365#ifdef F77_DUMMY_MAIN
13366# ifdef __cplusplus
13367 extern "C"
13368# endif
13369 int F77_DUMMY_MAIN() { return 1; }
13370#endif
13371int
13372main ()
13373{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013374struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000013375 ;
13376 return 0;
13377}
13378_ACEOF
13379rm -f conftest.$ac_objext
13380if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13381 (eval $ac_compile) 2>&5
13382 ac_status=$?
13383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13384 (exit $ac_status); } &&
13385 { ac_try='test -s conftest.$ac_objext'
13386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13387 (eval $ac_try) 2>&5
13388 ac_status=$?
13389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13390 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013391 ac_cv_struct_tm=time.h
13392else
Martin v. Löwis11437992002-04-12 09:54:03 +000013393 echo "$as_me: failed program was:" >&5
13394cat conftest.$ac_ext >&5
13395ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013396fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013397rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013398fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013399echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13400echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013401if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013402
13403cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013404#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013405_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013406
13407fi
13408
Martin v. Löwis11437992002-04-12 09:54:03 +000013409echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13410echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13411if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13412 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013413else
Martin v. Löwis11437992002-04-12 09:54:03 +000013414 cat >conftest.$ac_ext <<_ACEOF
13415#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013416#include "confdefs.h"
13417#include <sys/types.h>
13418#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013419
13420
13421#ifdef F77_DUMMY_MAIN
13422# ifdef __cplusplus
13423 extern "C"
13424# endif
13425 int F77_DUMMY_MAIN() { return 1; }
13426#endif
13427int
13428main ()
13429{
13430static struct tm ac_aggr;
13431if (ac_aggr.tm_zone)
13432return 0;
13433 ;
13434 return 0;
13435}
13436_ACEOF
13437rm -f conftest.$ac_objext
13438if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13439 (eval $ac_compile) 2>&5
13440 ac_status=$?
13441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13442 (exit $ac_status); } &&
13443 { ac_try='test -s conftest.$ac_objext'
13444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13445 (eval $ac_try) 2>&5
13446 ac_status=$?
13447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13448 (exit $ac_status); }; }; then
13449 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013450else
Martin v. Löwis11437992002-04-12 09:54:03 +000013451 echo "$as_me: failed program was:" >&5
13452cat conftest.$ac_ext >&5
13453ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013454fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013455rm -f conftest.$ac_objext conftest.$ac_ext
13456fi
13457echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13458echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13459if test $ac_cv_member_struct_tm_tm_zone = yes; then
13460
13461cat >>confdefs.h <<_ACEOF
13462#define HAVE_STRUCT_TM_TM_ZONE 1
13463_ACEOF
13464
13465
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013466fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013467
Martin v. Löwis11437992002-04-12 09:54:03 +000013468if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13469
13470cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013471#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013472_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013473
13474else
Martin v. Löwis11437992002-04-12 09:54:03 +000013475 echo "$as_me:$LINENO: checking for tzname" >&5
13476echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13477if test "${ac_cv_var_tzname+set}" = set; then
13478 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013479else
Martin v. Löwis11437992002-04-12 09:54:03 +000013480 cat >conftest.$ac_ext <<_ACEOF
13481#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013482#include "confdefs.h"
13483#include <time.h>
13484#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013485extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013486#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013487
13488#ifdef F77_DUMMY_MAIN
13489# ifdef __cplusplus
13490 extern "C"
13491# endif
13492 int F77_DUMMY_MAIN() { return 1; }
13493#endif
13494int
13495main ()
13496{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013497atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013498 ;
13499 return 0;
13500}
13501_ACEOF
13502rm -f conftest.$ac_objext conftest$ac_exeext
13503if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13504 (eval $ac_link) 2>&5
13505 ac_status=$?
13506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13507 (exit $ac_status); } &&
13508 { ac_try='test -s conftest$ac_exeext'
13509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13510 (eval $ac_try) 2>&5
13511 ac_status=$?
13512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13513 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013514 ac_cv_var_tzname=yes
13515else
Martin v. Löwis11437992002-04-12 09:54:03 +000013516 echo "$as_me: failed program was:" >&5
13517cat conftest.$ac_ext >&5
13518ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013519fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013520rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013522echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13523echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013524 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013525
13526cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013527#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013528_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013529
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013530 fi
13531fi
13532
Martin v. Löwis11437992002-04-12 09:54:03 +000013533echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13534echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13535if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13536 echo $ECHO_N "(cached) $ECHO_C" >&6
13537else
13538 cat >conftest.$ac_ext <<_ACEOF
13539#line $LINENO "configure"
13540#include "confdefs.h"
13541$ac_includes_default
13542#ifdef F77_DUMMY_MAIN
13543# ifdef __cplusplus
13544 extern "C"
13545# endif
13546 int F77_DUMMY_MAIN() { return 1; }
13547#endif
13548int
13549main ()
13550{
13551static struct stat ac_aggr;
13552if (ac_aggr.st_rdev)
13553return 0;
13554 ;
13555 return 0;
13556}
13557_ACEOF
13558rm -f conftest.$ac_objext
13559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13560 (eval $ac_compile) 2>&5
13561 ac_status=$?
13562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13563 (exit $ac_status); } &&
13564 { ac_try='test -s conftest.$ac_objext'
13565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13566 (eval $ac_try) 2>&5
13567 ac_status=$?
13568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13569 (exit $ac_status); }; }; then
13570 ac_cv_member_struct_stat_st_rdev=yes
13571else
13572 echo "$as_me: failed program was:" >&5
13573cat conftest.$ac_ext >&5
13574ac_cv_member_struct_stat_st_rdev=no
13575fi
13576rm -f conftest.$ac_objext conftest.$ac_ext
13577fi
13578echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13579echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13580if test $ac_cv_member_struct_stat_st_rdev = yes; then
13581
13582cat >>confdefs.h <<_ACEOF
13583#define HAVE_STRUCT_STAT_ST_RDEV 1
13584_ACEOF
13585
13586
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013587fi
13588
Martin v. Löwis11437992002-04-12 09:54:03 +000013589echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13590echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13591if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13592 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013593else
Martin v. Löwis11437992002-04-12 09:54:03 +000013594 cat >conftest.$ac_ext <<_ACEOF
13595#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013596#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013597$ac_includes_default
13598#ifdef F77_DUMMY_MAIN
13599# ifdef __cplusplus
13600 extern "C"
13601# endif
13602 int F77_DUMMY_MAIN() { return 1; }
13603#endif
13604int
13605main ()
13606{
13607static struct stat ac_aggr;
13608if (ac_aggr.st_blksize)
13609return 0;
13610 ;
13611 return 0;
13612}
13613_ACEOF
13614rm -f conftest.$ac_objext
13615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13616 (eval $ac_compile) 2>&5
13617 ac_status=$?
13618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13619 (exit $ac_status); } &&
13620 { ac_try='test -s conftest.$ac_objext'
13621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13622 (eval $ac_try) 2>&5
13623 ac_status=$?
13624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13625 (exit $ac_status); }; }; then
13626 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013627else
Martin v. Löwis11437992002-04-12 09:54:03 +000013628 echo "$as_me: failed program was:" >&5
13629cat conftest.$ac_ext >&5
13630ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013631fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013632rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013633fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013634echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13635echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13636if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013637
Martin v. Löwis11437992002-04-12 09:54:03 +000013638cat >>confdefs.h <<_ACEOF
13639#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13640_ACEOF
13641
13642
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013643fi
13644
Martin v. Löwis11437992002-04-12 09:54:03 +000013645echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13646echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13647if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13648 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013649else
Martin v. Löwis11437992002-04-12 09:54:03 +000013650 cat >conftest.$ac_ext <<_ACEOF
13651#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013652#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013653$ac_includes_default
13654#ifdef F77_DUMMY_MAIN
13655# ifdef __cplusplus
13656 extern "C"
13657# endif
13658 int F77_DUMMY_MAIN() { return 1; }
13659#endif
13660int
13661main ()
13662{
13663static struct stat ac_aggr;
13664if (ac_aggr.st_blocks)
13665return 0;
13666 ;
13667 return 0;
13668}
13669_ACEOF
13670rm -f conftest.$ac_objext
13671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13672 (eval $ac_compile) 2>&5
13673 ac_status=$?
13674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13675 (exit $ac_status); } &&
13676 { ac_try='test -s conftest.$ac_objext'
13677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13678 (eval $ac_try) 2>&5
13679 ac_status=$?
13680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13681 (exit $ac_status); }; }; then
13682 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013683else
Martin v. Löwis11437992002-04-12 09:54:03 +000013684 echo "$as_me: failed program was:" >&5
13685cat conftest.$ac_ext >&5
13686ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013687fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013688rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013689fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013690echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13691echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13692if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013693
Martin v. Löwis11437992002-04-12 09:54:03 +000013694cat >>confdefs.h <<_ACEOF
13695#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13696_ACEOF
13697
13698
13699cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013700#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013701_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013702
13703else
Martin v. Löwis11437992002-04-12 09:54:03 +000013704 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013705fi
13706
Michael W. Hudson54241132001-12-07 15:38:26 +000013707
Martin v. Löwis11437992002-04-12 09:54:03 +000013708
13709echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13710echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13711if test "${ac_cv_header_time_altzone+set}" = set; then
13712 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013713else
Martin v. Löwis11437992002-04-12 09:54:03 +000013714 cat >conftest.$ac_ext <<_ACEOF
13715#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013716#include "confdefs.h"
13717#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013718#ifdef F77_DUMMY_MAIN
13719# ifdef __cplusplus
13720 extern "C"
13721# endif
13722 int F77_DUMMY_MAIN() { return 1; }
13723#endif
13724int
13725main ()
13726{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013727return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013728 ;
13729 return 0;
13730}
13731_ACEOF
13732rm -f conftest.$ac_objext
13733if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13734 (eval $ac_compile) 2>&5
13735 ac_status=$?
13736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13737 (exit $ac_status); } &&
13738 { ac_try='test -s conftest.$ac_objext'
13739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13740 (eval $ac_try) 2>&5
13741 ac_status=$?
13742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13743 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013744 ac_cv_header_time_altzone=yes
13745else
Martin v. Löwis11437992002-04-12 09:54:03 +000013746 echo "$as_me: failed program was:" >&5
13747cat conftest.$ac_ext >&5
13748ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013749fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013750rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013751fi
13752
Martin v. Löwis11437992002-04-12 09:54:03 +000013753echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13754echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013755if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013756
13757cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013758#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013759_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013760
13761fi
13762
Guido van Rossumda88dad1995-01-26 00:46:29 +000013763was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013764echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13765echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13766cat >conftest.$ac_ext <<_ACEOF
13767#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013768#include "confdefs.h"
13769
13770#include <sys/types.h>
13771#include <sys/select.h>
13772#include <sys/time.h>
13773
Martin v. Löwis11437992002-04-12 09:54:03 +000013774#ifdef F77_DUMMY_MAIN
13775# ifdef __cplusplus
13776 extern "C"
13777# endif
13778 int F77_DUMMY_MAIN() { return 1; }
13779#endif
13780int
13781main ()
13782{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013783;
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 ;
13785 return 0;
13786}
13787_ACEOF
13788rm -f conftest.$ac_objext
13789if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13790 (eval $ac_compile) 2>&5
13791 ac_status=$?
13792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13793 (exit $ac_status); } &&
13794 { ac_try='test -s conftest.$ac_objext'
13795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13796 (eval $ac_try) 2>&5
13797 ac_status=$?
13798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13799 (exit $ac_status); }; }; then
13800
13801
13802cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013803#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013804_ACEOF
13805
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013806 was_it_defined=yes
13807
Guido van Rossumf78abae1997-01-21 22:02:36 +000013808else
Martin v. Löwis11437992002-04-12 09:54:03 +000013809 echo "$as_me: failed program was:" >&5
13810cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013811fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013812rm -f conftest.$ac_objext conftest.$ac_ext
13813echo "$as_me:$LINENO: result: $was_it_defined" >&5
13814echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013815
Martin v. Löwis11437992002-04-12 09:54:03 +000013816echo "$as_me:$LINENO: checking for addrinfo" >&5
13817echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13818if test "${ac_cv_struct_addrinfo+set}" = set; then
13819 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013820else
Martin v. Löwis11437992002-04-12 09:54:03 +000013821 cat >conftest.$ac_ext <<_ACEOF
13822#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013823#include "confdefs.h"
13824
13825# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013826#ifdef F77_DUMMY_MAIN
13827# ifdef __cplusplus
13828 extern "C"
13829# endif
13830 int F77_DUMMY_MAIN() { return 1; }
13831#endif
13832int
13833main ()
13834{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013835struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013836 ;
13837 return 0;
13838}
13839_ACEOF
13840rm -f conftest.$ac_objext
13841if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13842 (eval $ac_compile) 2>&5
13843 ac_status=$?
13844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13845 (exit $ac_status); } &&
13846 { ac_try='test -s conftest.$ac_objext'
13847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13848 (eval $ac_try) 2>&5
13849 ac_status=$?
13850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13851 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013852 ac_cv_struct_addrinfo=yes
13853else
Martin v. Löwis11437992002-04-12 09:54:03 +000013854 echo "$as_me: failed program was:" >&5
13855cat conftest.$ac_ext >&5
13856ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013857fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013858rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013859fi
13860
Martin v. Löwis11437992002-04-12 09:54:03 +000013861echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13862echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013863if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013864
13865cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013866#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013867_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013868
13869fi
13870
Martin v. Löwis11437992002-04-12 09:54:03 +000013871echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13872echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13873if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13874 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013875else
Martin v. Löwis11437992002-04-12 09:54:03 +000013876 cat >conftest.$ac_ext <<_ACEOF
13877#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013878#include "confdefs.h"
13879
13880# include <sys/types.h>
13881# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013882#ifdef F77_DUMMY_MAIN
13883# ifdef __cplusplus
13884 extern "C"
13885# endif
13886 int F77_DUMMY_MAIN() { return 1; }
13887#endif
13888int
13889main ()
13890{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013891struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013892 ;
13893 return 0;
13894}
13895_ACEOF
13896rm -f conftest.$ac_objext
13897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13898 (eval $ac_compile) 2>&5
13899 ac_status=$?
13900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13901 (exit $ac_status); } &&
13902 { ac_try='test -s conftest.$ac_objext'
13903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13904 (eval $ac_try) 2>&5
13905 ac_status=$?
13906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13907 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013908 ac_cv_struct_sockaddr_storage=yes
13909else
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 echo "$as_me: failed program was:" >&5
13911cat conftest.$ac_ext >&5
13912ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013913fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013914rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013915fi
13916
Martin v. Löwis11437992002-04-12 09:54:03 +000013917echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13918echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013919if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013920
13921cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013922#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013923_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013924
13925fi
13926
Guido van Rossum627b2d71993-12-24 10:39:16 +000013927# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013928
Michael W. Hudson54241132001-12-07 15:38:26 +000013929
Martin v. Löwis11437992002-04-12 09:54:03 +000013930echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13931echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13932if test "${ac_cv_c_char_unsigned+set}" = set; then
13933 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013934else
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 cat >conftest.$ac_ext <<_ACEOF
13936#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013937#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013938$ac_includes_default
13939#ifdef F77_DUMMY_MAIN
13940# ifdef __cplusplus
13941 extern "C"
13942# endif
13943 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013945int
13946main ()
13947{
13948static int test_array [1 - 2 * !(((char) -1) < 0)];
13949test_array [0] = 0
13950
13951 ;
13952 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013953}
Martin v. Löwis11437992002-04-12 09:54:03 +000013954_ACEOF
13955rm -f conftest.$ac_objext
13956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13957 (eval $ac_compile) 2>&5
13958 ac_status=$?
13959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13960 (exit $ac_status); } &&
13961 { ac_try='test -s conftest.$ac_objext'
13962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13963 (eval $ac_try) 2>&5
13964 ac_status=$?
13965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13966 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013967 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013968else
13969 echo "$as_me: failed program was:" >&5
13970cat conftest.$ac_ext >&5
13971ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013972fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013973rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013974fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013975echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13976echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013977if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013978 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013979#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013980_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013981
13982fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013983
Martin v. Löwis11437992002-04-12 09:54:03 +000013984echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13985echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13986if test "${ac_cv_prog_cc_stdc+set}" = set; then
13987 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013988else
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 ac_cv_prog_cc_stdc=no
13990ac_save_CC=$CC
13991cat >conftest.$ac_ext <<_ACEOF
13992#line $LINENO "configure"
13993#include "confdefs.h"
13994#include <stdarg.h>
13995#include <stdio.h>
13996#include <sys/types.h>
13997#include <sys/stat.h>
13998/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13999struct buf { int x; };
14000FILE * (*rcsopen) (struct buf *, struct stat *, int);
14001static char *e (p, i)
14002 char **p;
14003 int i;
14004{
14005 return p[i];
14006}
14007static char *f (char * (*g) (char **, int), char **p, ...)
14008{
14009 char *s;
14010 va_list v;
14011 va_start (v,p);
14012 s = g (p, va_arg (v,int));
14013 va_end (v);
14014 return s;
14015}
14016int test (int i, double x);
14017struct s1 {int (*f) (int a);};
14018struct s2 {int (*f) (double a);};
14019int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14020int argc;
14021char **argv;
14022#ifdef F77_DUMMY_MAIN
14023# ifdef __cplusplus
14024 extern "C"
14025# endif
14026 int F77_DUMMY_MAIN() { return 1; }
14027#endif
14028int
14029main ()
14030{
14031return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14032 ;
14033 return 0;
14034}
14035_ACEOF
14036# Don't try gcc -ansi; that turns off useful extensions and
14037# breaks some systems' header files.
14038# AIX -qlanglvl=ansi
14039# Ultrix and OSF/1 -std1
14040# HP-UX 10.20 and later -Ae
14041# HP-UX older versions -Aa -D_HPUX_SOURCE
14042# SVR4 -Xc -D__EXTENSIONS__
14043for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14044do
14045 CC="$ac_save_CC $ac_arg"
14046 rm -f conftest.$ac_objext
14047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14048 (eval $ac_compile) 2>&5
14049 ac_status=$?
14050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14051 (exit $ac_status); } &&
14052 { ac_try='test -s conftest.$ac_objext'
14053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14054 (eval $ac_try) 2>&5
14055 ac_status=$?
14056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14057 (exit $ac_status); }; }; then
14058 ac_cv_prog_cc_stdc=$ac_arg
14059break
14060else
14061 echo "$as_me: failed program was:" >&5
14062cat conftest.$ac_ext >&5
14063fi
14064rm -f conftest.$ac_objext
14065done
14066rm -f conftest.$ac_ext conftest.$ac_objext
14067CC=$ac_save_CC
14068
14069fi
14070
14071case "x$ac_cv_prog_cc_stdc" in
14072 x|xno)
14073 echo "$as_me:$LINENO: result: none needed" >&5
14074echo "${ECHO_T}none needed" >&6 ;;
14075 *)
14076 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14077echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14078 CC="$CC $ac_cv_prog_cc_stdc" ;;
14079esac
14080
14081echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14082echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14083if test "${ac_cv_c_const+set}" = set; then
14084 echo $ECHO_N "(cached) $ECHO_C" >&6
14085else
14086 cat >conftest.$ac_ext <<_ACEOF
14087#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014088#include "confdefs.h"
14089
Martin v. Löwis11437992002-04-12 09:54:03 +000014090#ifdef F77_DUMMY_MAIN
14091# ifdef __cplusplus
14092 extern "C"
14093# endif
14094 int F77_DUMMY_MAIN() { return 1; }
14095#endif
14096int
14097main ()
14098{
14099/* FIXME: Include the comments suggested by Paul. */
14100#ifndef __cplusplus
14101 /* Ultrix mips cc rejects this. */
14102 typedef int charset[2];
14103 const charset x;
14104 /* SunOS 4.1.1 cc rejects this. */
14105 char const *const *ccp;
14106 char **p;
14107 /* NEC SVR4.0.2 mips cc rejects this. */
14108 struct point {int x, y;};
14109 static struct point const zero = {0,0};
14110 /* AIX XL C 1.02.0.0 rejects this.
14111 It does not let you subtract one const X* pointer from another in
14112 an arm of an if-expression whose if-part is not a constant
14113 expression */
14114 const char *g = "string";
14115 ccp = &g + (g ? g-g : 0);
14116 /* HPUX 7.0 cc rejects these. */
14117 ++ccp;
14118 p = (char**) ccp;
14119 ccp = (char const *const *) p;
14120 { /* SCO 3.2v4 cc rejects this. */
14121 char *t;
14122 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014123
Martin v. Löwis11437992002-04-12 09:54:03 +000014124 *t++ = 0;
14125 }
14126 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14127 int x[] = {25, 17};
14128 const int *foo = &x[0];
14129 ++foo;
14130 }
14131 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14132 typedef const int *iptr;
14133 iptr p = 0;
14134 ++p;
14135 }
14136 { /* AIX XL C 1.02.0.0 rejects this saying
14137 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14138 struct s { int j; const int *ap[3]; };
14139 struct s *b; b->j = 5;
14140 }
14141 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14142 const int foo = 10;
14143 }
14144#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014145
Martin v. Löwis11437992002-04-12 09:54:03 +000014146 ;
14147 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014148}
Martin v. Löwis11437992002-04-12 09:54:03 +000014149_ACEOF
14150rm -f conftest.$ac_objext
14151if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14152 (eval $ac_compile) 2>&5
14153 ac_status=$?
14154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14155 (exit $ac_status); } &&
14156 { ac_try='test -s conftest.$ac_objext'
14157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14158 (eval $ac_try) 2>&5
14159 ac_status=$?
14160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14161 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014162 ac_cv_c_const=yes
14163else
Martin v. Löwis11437992002-04-12 09:54:03 +000014164 echo "$as_me: failed program was:" >&5
14165cat conftest.$ac_ext >&5
14166ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014167fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014168rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014169fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014170echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14171echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014172if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014173
14174cat >>confdefs.h <<\_ACEOF
14175#define const
14176_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014177
14178fi
14179
Michael W. Hudson54241132001-12-07 15:38:26 +000014180
Guido van Rossumda88dad1995-01-26 00:46:29 +000014181works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014182echo "$as_me:$LINENO: checking for working volatile" >&5
14183echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14184cat >conftest.$ac_ext <<_ACEOF
14185#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014186#include "confdefs.h"
14187
Martin v. Löwis11437992002-04-12 09:54:03 +000014188#ifdef F77_DUMMY_MAIN
14189# ifdef __cplusplus
14190 extern "C"
14191# endif
14192 int F77_DUMMY_MAIN() { return 1; }
14193#endif
14194int
14195main ()
14196{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014197volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014198 ;
14199 return 0;
14200}
14201_ACEOF
14202rm -f conftest.$ac_objext
14203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14204 (eval $ac_compile) 2>&5
14205 ac_status=$?
14206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14207 (exit $ac_status); } &&
14208 { ac_try='test -s conftest.$ac_objext'
14209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14210 (eval $ac_try) 2>&5
14211 ac_status=$?
14212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14213 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014214 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014215else
Martin v. Löwis11437992002-04-12 09:54:03 +000014216 echo "$as_me: failed program was:" >&5
14217cat conftest.$ac_ext >&5
14218
14219cat >>confdefs.h <<\_ACEOF
14220#define volatile
14221_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014222
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014223
Guido van Rossum627b2d71993-12-24 10:39:16 +000014224fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014225rm -f conftest.$ac_objext conftest.$ac_ext
14226echo "$as_me:$LINENO: result: $works" >&5
14227echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014228
Guido van Rossumda88dad1995-01-26 00:46:29 +000014229works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014230echo "$as_me:$LINENO: checking for working signed char" >&5
14231echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14232cat >conftest.$ac_ext <<_ACEOF
14233#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014234#include "confdefs.h"
14235
Martin v. Löwis11437992002-04-12 09:54:03 +000014236#ifdef F77_DUMMY_MAIN
14237# ifdef __cplusplus
14238 extern "C"
14239# endif
14240 int F77_DUMMY_MAIN() { return 1; }
14241#endif
14242int
14243main ()
14244{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014245signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014246 ;
14247 return 0;
14248}
14249_ACEOF
14250rm -f conftest.$ac_objext
14251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14252 (eval $ac_compile) 2>&5
14253 ac_status=$?
14254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14255 (exit $ac_status); } &&
14256 { ac_try='test -s conftest.$ac_objext'
14257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14258 (eval $ac_try) 2>&5
14259 ac_status=$?
14260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14261 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014262 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014263else
Martin v. Löwis11437992002-04-12 09:54:03 +000014264 echo "$as_me: failed program was:" >&5
14265cat conftest.$ac_ext >&5
14266
14267cat >>confdefs.h <<\_ACEOF
14268#define signed
14269_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014270
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014271
Guido van Rossum7f43da71994-08-01 12:15:30 +000014272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014273rm -f conftest.$ac_objext conftest.$ac_ext
14274echo "$as_me:$LINENO: result: $works" >&5
14275echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014276
Guido van Rossumda88dad1995-01-26 00:46:29 +000014277have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014278echo "$as_me:$LINENO: checking for prototypes" >&5
14279echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14280cat >conftest.$ac_ext <<_ACEOF
14281#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014282#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014283int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014284#ifdef F77_DUMMY_MAIN
14285# ifdef __cplusplus
14286 extern "C"
14287# endif
14288 int F77_DUMMY_MAIN() { return 1; }
14289#endif
14290int
14291main ()
14292{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014293return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014294 ;
14295 return 0;
14296}
14297_ACEOF
14298rm -f conftest.$ac_objext
14299if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14300 (eval $ac_compile) 2>&5
14301 ac_status=$?
14302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14303 (exit $ac_status); } &&
14304 { ac_try='test -s conftest.$ac_objext'
14305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14306 (eval $ac_try) 2>&5
14307 ac_status=$?
14308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14309 (exit $ac_status); }; }; then
14310
14311
14312cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014313#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014314_ACEOF
14315
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014316 have_prototypes=yes
14317
Guido van Rossumf78abae1997-01-21 22:02:36 +000014318else
Martin v. Löwis11437992002-04-12 09:54:03 +000014319 echo "$as_me: failed program was:" >&5
14320cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014321fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014322rm -f conftest.$ac_objext conftest.$ac_ext
14323echo "$as_me:$LINENO: result: $have_prototypes" >&5
14324echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014325
Guido van Rossumda88dad1995-01-26 00:46:29 +000014326works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014327echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
14328echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
14329cat >conftest.$ac_ext <<_ACEOF
14330#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014331#include "confdefs.h"
14332
14333#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014334int foo(int x, ...) {
14335 va_list va;
14336 va_start(va, x);
14337 va_arg(va, int);
14338 va_arg(va, char *);
14339 va_arg(va, double);
14340 return 0;
14341}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014342
Martin v. Löwis11437992002-04-12 09:54:03 +000014343#ifdef F77_DUMMY_MAIN
14344# ifdef __cplusplus
14345 extern "C"
14346# endif
14347 int F77_DUMMY_MAIN() { return 1; }
14348#endif
14349int
14350main ()
14351{
Guido van Rossum90eea071996-08-30 20:58:57 +000014352return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014353 ;
14354 return 0;
14355}
14356_ACEOF
14357rm -f conftest.$ac_objext
14358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14359 (eval $ac_compile) 2>&5
14360 ac_status=$?
14361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14362 (exit $ac_status); } &&
14363 { ac_try='test -s conftest.$ac_objext'
14364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14365 (eval $ac_try) 2>&5
14366 ac_status=$?
14367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14368 (exit $ac_status); }; }; then
14369
14370
14371cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014372#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014373_ACEOF
14374
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014375 works=yes
14376
Guido van Rossumf78abae1997-01-21 22:02:36 +000014377else
Martin v. Löwis11437992002-04-12 09:54:03 +000014378 echo "$as_me: failed program was:" >&5
14379cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000014380fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014381rm -f conftest.$ac_objext conftest.$ac_ext
14382echo "$as_me:$LINENO: result: $works" >&5
14383echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014384
Guido van Rossumda88dad1995-01-26 00:46:29 +000014385if test "$have_prototypes" = yes; then
14386bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014387echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
14388echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
14389cat >conftest.$ac_ext <<_ACEOF
14390#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014391#include "confdefs.h"
14392#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014393#ifdef F77_DUMMY_MAIN
14394# ifdef __cplusplus
14395 extern "C"
14396# endif
14397 int F77_DUMMY_MAIN() { return 1; }
14398#endif
14399int
14400main ()
14401{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014402char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000014403 ;
14404 return 0;
14405}
14406_ACEOF
14407rm -f conftest.$ac_objext
14408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14409 (eval $ac_compile) 2>&5
14410 ac_status=$?
14411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14412 (exit $ac_status); } &&
14413 { ac_try='test -s conftest.$ac_objext'
14414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14415 (eval $ac_try) 2>&5
14416 ac_status=$?
14417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14418 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014419 :
14420else
Martin v. Löwis11437992002-04-12 09:54:03 +000014421 echo "$as_me: failed program was:" >&5
14422cat conftest.$ac_ext >&5
14423
14424cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014425#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014426_ACEOF
14427
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014428 bad_prototypes=yes
14429
Guido van Rossum627b2d71993-12-24 10:39:16 +000014430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014431rm -f conftest.$ac_objext conftest.$ac_ext
14432echo "$as_me:$LINENO: result: $bad_prototypes" >&5
14433echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014434fi
14435
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014436# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000014437echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
14438echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
14439cat >conftest.$ac_ext <<_ACEOF
14440#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014441#include "confdefs.h"
14442#include <sys/types.h>
14443#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014444#ifdef F77_DUMMY_MAIN
14445# ifdef __cplusplus
14446 extern "C"
14447# endif
14448 int F77_DUMMY_MAIN() { return 1; }
14449#endif
14450int
14451main ()
14452{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014453struct sockaddr x;
14454x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 ;
14456 return 0;
14457}
14458_ACEOF
14459rm -f conftest.$ac_objext
14460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14461 (eval $ac_compile) 2>&5
14462 ac_status=$?
14463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14464 (exit $ac_status); } &&
14465 { ac_try='test -s conftest.$ac_objext'
14466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14467 (eval $ac_try) 2>&5
14468 ac_status=$?
14469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14470 (exit $ac_status); }; }; then
14471 echo "$as_me:$LINENO: result: yes" >&5
14472echo "${ECHO_T}yes" >&6
14473
14474cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014475#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014476_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014477
14478else
Martin v. Löwis11437992002-04-12 09:54:03 +000014479 echo "$as_me: failed program was:" >&5
14480cat conftest.$ac_ext >&5
14481echo "$as_me:$LINENO: result: no" >&5
14482echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014483fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014484rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014485
Guido van Rossumda88dad1995-01-26 00:46:29 +000014486va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014487echo "$as_me:$LINENO: checking whether va_list is an array" >&5
14488echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
14489cat >conftest.$ac_ext <<_ACEOF
14490#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014491#include "confdefs.h"
14492
14493#ifdef HAVE_STDARG_PROTOTYPES
14494#include <stdarg.h>
14495#else
14496#include <varargs.h>
14497#endif
14498
Martin v. Löwis11437992002-04-12 09:54:03 +000014499#ifdef F77_DUMMY_MAIN
14500# ifdef __cplusplus
14501 extern "C"
14502# endif
14503 int F77_DUMMY_MAIN() { return 1; }
14504#endif
14505int
14506main ()
14507{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014508va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 ;
14510 return 0;
14511}
14512_ACEOF
14513rm -f conftest.$ac_objext
14514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14515 (eval $ac_compile) 2>&5
14516 ac_status=$?
14517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14518 (exit $ac_status); } &&
14519 { ac_try='test -s conftest.$ac_objext'
14520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14521 (eval $ac_try) 2>&5
14522 ac_status=$?
14523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14524 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014525 :
14526else
Martin v. Löwis11437992002-04-12 09:54:03 +000014527 echo "$as_me: failed program was:" >&5
14528cat conftest.$ac_ext >&5
14529
14530
14531cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014532#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014533_ACEOF
14534
Guido van Rossumda88dad1995-01-26 00:46:29 +000014535 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014536
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014537fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014538rm -f conftest.$ac_objext conftest.$ac_ext
14539echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14540echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014541
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014542# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014543
14544
14545
14546echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14547echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14548if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14549 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014550else
Martin v. Löwis11437992002-04-12 09:54:03 +000014551 cat >conftest.$ac_ext <<_ACEOF
14552#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014553#include "confdefs.h"
14554/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014556#include <assert.h>
14557/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014558#ifdef __cplusplus
14559extern "C"
14560#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014561/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014562 builtin and then its argument prototype would still apply. */
14563char gethostbyname_r ();
14564char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014565
Martin v. Löwis11437992002-04-12 09:54:03 +000014566#ifdef F77_DUMMY_MAIN
14567# ifdef __cplusplus
14568 extern "C"
14569# endif
14570 int F77_DUMMY_MAIN() { return 1; }
14571#endif
14572int
14573main ()
14574{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014575/* The GNU C library defines this for functions which it implements
14576 to always fail with ENOSYS. Some functions are actually named
14577 something starting with __ and the normal name is an alias. */
14578#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14579choke me
14580#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014581f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014582#endif
14583
Martin v. Löwis11437992002-04-12 09:54:03 +000014584 ;
14585 return 0;
14586}
14587_ACEOF
14588rm -f conftest.$ac_objext conftest$ac_exeext
14589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14590 (eval $ac_link) 2>&5
14591 ac_status=$?
14592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14593 (exit $ac_status); } &&
14594 { ac_try='test -s conftest$ac_exeext'
14595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14596 (eval $ac_try) 2>&5
14597 ac_status=$?
14598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14599 (exit $ac_status); }; }; then
14600 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014601else
Martin v. Löwis11437992002-04-12 09:54:03 +000014602 echo "$as_me: failed program was:" >&5
14603cat conftest.$ac_ext >&5
14604ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014605fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014606rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014607fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014608echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14609echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14610if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014611
Martin v. Löwis11437992002-04-12 09:54:03 +000014612 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014613#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014614_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014615
Martin v. Löwis11437992002-04-12 09:54:03 +000014616 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14617echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014618 OLD_CFLAGS=$CFLAGS
14619 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 cat >conftest.$ac_ext <<_ACEOF
14621#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014622#include "confdefs.h"
14623
14624# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014625
14626#ifdef F77_DUMMY_MAIN
14627# ifdef __cplusplus
14628 extern "C"
14629# endif
14630 int F77_DUMMY_MAIN() { return 1; }
14631#endif
14632int
14633main ()
14634{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014635
14636 char *name;
14637 struct hostent *he, *res;
14638 char buffer[2048];
14639 int buflen = 2048;
14640 int h_errnop;
14641
14642 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014643
14644 ;
14645 return 0;
14646}
14647_ACEOF
14648rm -f conftest.$ac_objext
14649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14650 (eval $ac_compile) 2>&5
14651 ac_status=$?
14652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14653 (exit $ac_status); } &&
14654 { ac_try='test -s conftest.$ac_objext'
14655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14656 (eval $ac_try) 2>&5
14657 ac_status=$?
14658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14659 (exit $ac_status); }; }; then
14660
14661 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014662#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014663_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014664
Martin v. Löwis11437992002-04-12 09:54:03 +000014665
14666cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014667#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014668_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014669
Martin v. Löwis11437992002-04-12 09:54:03 +000014670 echo "$as_me:$LINENO: result: yes" >&5
14671echo "${ECHO_T}yes" >&6
14672
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014673else
Martin v. Löwis11437992002-04-12 09:54:03 +000014674 echo "$as_me: failed program was:" >&5
14675cat conftest.$ac_ext >&5
14676
14677 echo "$as_me:$LINENO: result: no" >&5
14678echo "${ECHO_T}no" >&6
14679 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14680echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14681 cat >conftest.$ac_ext <<_ACEOF
14682#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014683#include "confdefs.h"
14684
14685# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014686
14687#ifdef F77_DUMMY_MAIN
14688# ifdef __cplusplus
14689 extern "C"
14690# endif
14691 int F77_DUMMY_MAIN() { return 1; }
14692#endif
14693int
14694main ()
14695{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014696
14697 char *name;
14698 struct hostent *he;
14699 char buffer[2048];
14700 int buflen = 2048;
14701 int h_errnop;
14702
14703 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014704
14705 ;
14706 return 0;
14707}
14708_ACEOF
14709rm -f conftest.$ac_objext
14710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14711 (eval $ac_compile) 2>&5
14712 ac_status=$?
14713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14714 (exit $ac_status); } &&
14715 { ac_try='test -s conftest.$ac_objext'
14716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14717 (eval $ac_try) 2>&5
14718 ac_status=$?
14719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14720 (exit $ac_status); }; }; then
14721
14722 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014723#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014724_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014725
Martin v. Löwis11437992002-04-12 09:54:03 +000014726
14727cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014728#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014729_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014730
Martin v. Löwis11437992002-04-12 09:54:03 +000014731 echo "$as_me:$LINENO: result: yes" >&5
14732echo "${ECHO_T}yes" >&6
14733
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014734else
Martin v. Löwis11437992002-04-12 09:54:03 +000014735 echo "$as_me: failed program was:" >&5
14736cat conftest.$ac_ext >&5
14737
14738 echo "$as_me:$LINENO: result: no" >&5
14739echo "${ECHO_T}no" >&6
14740 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14741echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14742 cat >conftest.$ac_ext <<_ACEOF
14743#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014744#include "confdefs.h"
14745
14746# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014747
14748#ifdef F77_DUMMY_MAIN
14749# ifdef __cplusplus
14750 extern "C"
14751# endif
14752 int F77_DUMMY_MAIN() { return 1; }
14753#endif
14754int
14755main ()
14756{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014757
14758 char *name;
14759 struct hostent *he;
14760 struct hostent_data data;
14761
14762 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014763
14764 ;
14765 return 0;
14766}
14767_ACEOF
14768rm -f conftest.$ac_objext
14769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14770 (eval $ac_compile) 2>&5
14771 ac_status=$?
14772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14773 (exit $ac_status); } &&
14774 { ac_try='test -s conftest.$ac_objext'
14775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14776 (eval $ac_try) 2>&5
14777 ac_status=$?
14778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14779 (exit $ac_status); }; }; then
14780
14781 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014782#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014783_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014784
Martin v. Löwis11437992002-04-12 09:54:03 +000014785
14786cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014787#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014788_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014789
Martin v. Löwis11437992002-04-12 09:54:03 +000014790 echo "$as_me:$LINENO: result: yes" >&5
14791echo "${ECHO_T}yes" >&6
14792
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014793else
Martin v. Löwis11437992002-04-12 09:54:03 +000014794 echo "$as_me: failed program was:" >&5
14795cat conftest.$ac_ext >&5
14796
14797 echo "$as_me:$LINENO: result: no" >&5
14798echo "${ECHO_T}no" >&6
14799
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014800fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014801rm -f conftest.$ac_objext conftest.$ac_ext
14802
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014803fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014804rm -f conftest.$ac_objext conftest.$ac_ext
14805
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014806fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014807rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014808 CFLAGS=$OLD_CFLAGS
14809
14810else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014811
Martin v. Löwis11437992002-04-12 09:54:03 +000014812
14813for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014814do
Martin v. Löwis11437992002-04-12 09:54:03 +000014815as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14816echo "$as_me:$LINENO: checking for $ac_func" >&5
14817echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14818if eval "test \"\${$as_ac_var+set}\" = set"; then
14819 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014820else
Martin v. Löwis11437992002-04-12 09:54:03 +000014821 cat >conftest.$ac_ext <<_ACEOF
14822#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014823#include "confdefs.h"
14824/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014825 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014826#include <assert.h>
14827/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014828#ifdef __cplusplus
14829extern "C"
14830#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014831/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014832 builtin and then its argument prototype would still apply. */
14833char $ac_func ();
14834char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014835
Martin v. Löwis11437992002-04-12 09:54:03 +000014836#ifdef F77_DUMMY_MAIN
14837# ifdef __cplusplus
14838 extern "C"
14839# endif
14840 int F77_DUMMY_MAIN() { return 1; }
14841#endif
14842int
14843main ()
14844{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014845/* The GNU C library defines this for functions which it implements
14846 to always fail with ENOSYS. Some functions are actually named
14847 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014848#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014849choke me
14850#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014851f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014852#endif
14853
Martin v. Löwis11437992002-04-12 09:54:03 +000014854 ;
14855 return 0;
14856}
14857_ACEOF
14858rm -f conftest.$ac_objext conftest$ac_exeext
14859if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14860 (eval $ac_link) 2>&5
14861 ac_status=$?
14862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14863 (exit $ac_status); } &&
14864 { ac_try='test -s conftest$ac_exeext'
14865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14866 (eval $ac_try) 2>&5
14867 ac_status=$?
14868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14869 (exit $ac_status); }; }; then
14870 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014871else
Martin v. Löwis11437992002-04-12 09:54:03 +000014872 echo "$as_me: failed program was:" >&5
14873cat conftest.$ac_ext >&5
14874eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014875fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014876rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014877fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014878echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14879echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14880if test `eval echo '${'$as_ac_var'}'` = yes; then
14881 cat >>confdefs.h <<_ACEOF
14882#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14883_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014884
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014885fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014886done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014887
Michael W. Hudson54241132001-12-07 15:38:26 +000014888
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014889fi
14890
Michael W. Hudson54241132001-12-07 15:38:26 +000014891
14892
14893
14894
14895
14896
Guido van Rossum627b2d71993-12-24 10:39:16 +000014897# checks for system services
14898# (none yet)
14899
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014900# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014901echo "$as_me:$LINENO: checking for __fpu_control" >&5
14902echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14903if test "${ac_cv_func___fpu_control+set}" = set; then
14904 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014905else
Martin v. Löwis11437992002-04-12 09:54:03 +000014906 cat >conftest.$ac_ext <<_ACEOF
14907#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014908#include "confdefs.h"
14909/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014910 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014911#include <assert.h>
14912/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014913#ifdef __cplusplus
14914extern "C"
14915#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014916/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014917 builtin and then its argument prototype would still apply. */
14918char __fpu_control ();
14919char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014920
Martin v. Löwis11437992002-04-12 09:54:03 +000014921#ifdef F77_DUMMY_MAIN
14922# ifdef __cplusplus
14923 extern "C"
14924# endif
14925 int F77_DUMMY_MAIN() { return 1; }
14926#endif
14927int
14928main ()
14929{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014930/* The GNU C library defines this for functions which it implements
14931 to always fail with ENOSYS. Some functions are actually named
14932 something starting with __ and the normal name is an alias. */
14933#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14934choke me
14935#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014936f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014937#endif
14938
Martin v. Löwis11437992002-04-12 09:54:03 +000014939 ;
14940 return 0;
14941}
14942_ACEOF
14943rm -f conftest.$ac_objext conftest$ac_exeext
14944if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14945 (eval $ac_link) 2>&5
14946 ac_status=$?
14947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14948 (exit $ac_status); } &&
14949 { ac_try='test -s conftest$ac_exeext'
14950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14951 (eval $ac_try) 2>&5
14952 ac_status=$?
14953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14954 (exit $ac_status); }; }; then
14955 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014956else
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 echo "$as_me: failed program was:" >&5
14958cat conftest.$ac_ext >&5
14959ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014960fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014961rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014962fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014963echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14964echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14965if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014966 :
14967else
Martin v. Löwis11437992002-04-12 09:54:03 +000014968
14969echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14970echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14971if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14972 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014973else
Martin v. Löwis11437992002-04-12 09:54:03 +000014974 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014975LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014976cat >conftest.$ac_ext <<_ACEOF
14977#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014978#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014979
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014980/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014981#ifdef __cplusplus
14982extern "C"
14983#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014984/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 builtin and then its argument prototype would still apply. */
14986char __fpu_control ();
14987#ifdef F77_DUMMY_MAIN
14988# ifdef __cplusplus
14989 extern "C"
14990# endif
14991 int F77_DUMMY_MAIN() { return 1; }
14992#endif
14993int
14994main ()
14995{
14996__fpu_control ();
14997 ;
14998 return 0;
14999}
15000_ACEOF
15001rm -f conftest.$ac_objext conftest$ac_exeext
15002if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15003 (eval $ac_link) 2>&5
15004 ac_status=$?
15005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15006 (exit $ac_status); } &&
15007 { ac_try='test -s conftest$ac_exeext'
15008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15009 (eval $ac_try) 2>&5
15010 ac_status=$?
15011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15012 (exit $ac_status); }; }; then
15013 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015014else
Martin v. Löwis11437992002-04-12 09:54:03 +000015015 echo "$as_me: failed program was:" >&5
15016cat conftest.$ac_ext >&5
15017ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015018fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015019rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15020LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015021fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015022echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15023echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15024if test $ac_cv_lib_ieee___fpu_control = yes; then
15025 cat >>confdefs.h <<_ACEOF
15026#define HAVE_LIBIEEE 1
15027_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015028
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015029 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015030
Guido van Rossum627b2d71993-12-24 10:39:16 +000015031fi
15032
Michael W. Hudson54241132001-12-07 15:38:26 +000015033
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015034fi
15035
Michael W. Hudson54241132001-12-07 15:38:26 +000015036
Guido van Rossum7f253911997-05-09 02:42:48 +000015037# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015038echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15039echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15040
Guido van Rossum7f253911997-05-09 02:42:48 +000015041# Check whether --with-fpectl or --without-fpectl was given.
15042if test "${with_fpectl+set}" = set; then
15043 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015044
Guido van Rossum7f253911997-05-09 02:42:48 +000015045if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015046then
15047
15048cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015049#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015050_ACEOF
15051
15052 echo "$as_me:$LINENO: result: yes" >&5
15053echo "${ECHO_T}yes" >&6
15054else echo "$as_me:$LINENO: result: no" >&5
15055echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015056fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015057else
Martin v. Löwis11437992002-04-12 09:54:03 +000015058 echo "$as_me:$LINENO: result: no" >&5
15059echo "${ECHO_T}no" >&6
15060fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015061
Guido van Rossum7f43da71994-08-01 12:15:30 +000015062# check for --with-libm=...
15063
Guido van Rossum563e7081996-09-10 18:20:48 +000015064case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015065Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015066BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015067*) LIBM=-lm
15068esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015069echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15070echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15071
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015072# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015073if test "${with_libm+set}" = set; then
15074 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015075
Guido van Rossum7f253911997-05-09 02:42:48 +000015076if test "$withval" = no
15077then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015078 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15079echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015080elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015081then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15083echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15084else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15085echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15086 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015087fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015088else
Martin v. Löwis11437992002-04-12 09:54:03 +000015089 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15090echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15091fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015092
15093# check for --with-libc=...
15094
Martin v. Löwis11437992002-04-12 09:54:03 +000015095echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15096echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15097
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015098# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015099if test "${with_libc+set}" = set; then
15100 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015101
Guido van Rossum7f253911997-05-09 02:42:48 +000015102if test "$withval" = no
15103then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15105echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015106elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015107then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015108 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15109echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15110else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15111echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15112 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015113fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015114else
Martin v. Löwis11437992002-04-12 09:54:03 +000015115 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15116echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15117fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015118
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015119# check for hypot() in math library
15120LIBS_SAVE=$LIBS
15121LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015122
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015123for ac_func in hypot
15124do
Martin v. Löwis11437992002-04-12 09:54:03 +000015125as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15126echo "$as_me:$LINENO: checking for $ac_func" >&5
15127echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15128if eval "test \"\${$as_ac_var+set}\" = set"; then
15129 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015130else
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 cat >conftest.$ac_ext <<_ACEOF
15132#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015133#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015134/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015136#include <assert.h>
15137/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015138#ifdef __cplusplus
15139extern "C"
15140#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015141/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015142 builtin and then its argument prototype would still apply. */
15143char $ac_func ();
15144char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015145
Martin v. Löwis11437992002-04-12 09:54:03 +000015146#ifdef F77_DUMMY_MAIN
15147# ifdef __cplusplus
15148 extern "C"
15149# endif
15150 int F77_DUMMY_MAIN() { return 1; }
15151#endif
15152int
15153main ()
15154{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015155/* The GNU C library defines this for functions which it implements
15156 to always fail with ENOSYS. Some functions are actually named
15157 something starting with __ and the normal name is an alias. */
15158#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15159choke me
15160#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015161f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015162#endif
15163
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 ;
15165 return 0;
15166}
15167_ACEOF
15168rm -f conftest.$ac_objext conftest$ac_exeext
15169if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15170 (eval $ac_link) 2>&5
15171 ac_status=$?
15172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15173 (exit $ac_status); } &&
15174 { ac_try='test -s conftest$ac_exeext'
15175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15176 (eval $ac_try) 2>&5
15177 ac_status=$?
15178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15179 (exit $ac_status); }; }; then
15180 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015181else
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 echo "$as_me: failed program was:" >&5
15183cat conftest.$ac_ext >&5
15184eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015185fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015186rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015187fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015188echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15189echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15190if test `eval echo '${'$as_ac_var'}'` = yes; then
15191 cat >>confdefs.h <<_ACEOF
15192#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15193_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015194
Michael W. Hudson54241132001-12-07 15:38:26 +000015195else
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015197fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015198done
15199
Michael W. Hudson54241132001-12-07 15:38:26 +000015200
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015201LIBS=$LIBS_SAVE
15202
Guido van Rossumad713701997-07-10 22:42:38 +000015203# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000015204echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
15205echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
15206if test "${ac_cv_malloc_zero+set}" = set; then
15207 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015208else
15209 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015210 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000015211else
Martin v. Löwis11437992002-04-12 09:54:03 +000015212 cat >conftest.$ac_ext <<_ACEOF
15213#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000015214#include "confdefs.h"
15215#include <stdio.h>
15216#ifdef HAVE_STDLIB
15217#include <stdlib.h>
15218#else
15219char *malloc(), *realloc();
15220int *free();
15221#endif
15222main() {
15223 char *p;
15224 p = malloc(0);
15225 if (p == NULL) exit(1);
15226 p = realloc(p, 0);
15227 if (p == NULL) exit(1);
15228 free(p);
15229 exit(0);
15230}
Martin v. Löwis11437992002-04-12 09:54:03 +000015231_ACEOF
15232rm -f conftest$ac_exeext
15233if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15234 (eval $ac_link) 2>&5
15235 ac_status=$?
15236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15237 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15239 (eval $ac_try) 2>&5
15240 ac_status=$?
15241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15242 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000015243 ac_cv_malloc_zero=nonnull
15244else
Martin v. Löwis11437992002-04-12 09:54:03 +000015245 echo "$as_me: program exited with status $ac_status" >&5
15246echo "$as_me: failed program was:" >&5
15247cat conftest.$ac_ext >&5
15248( exit $ac_status )
15249ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000015250fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015251rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000015252fi
Guido van Rossumad713701997-07-10 22:42:38 +000015253fi
Guido van Rossum3065c942001-09-17 04:03:14 +000015254 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000015255echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
15256echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015257if test "$ac_cv_malloc_zero" = null
15258then
Martin v. Löwis11437992002-04-12 09:54:03 +000015259
15260cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015261#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015262_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015263
15264fi
15265
Guido van Rossumef2255b2000-03-10 22:30:29 +000015266# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015267if test "${ac_cv_header_wchar_h+set}" = set; then
15268 echo "$as_me:$LINENO: checking for wchar.h" >&5
15269echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15270if test "${ac_cv_header_wchar_h+set}" = set; then
15271 echo $ECHO_N "(cached) $ECHO_C" >&6
15272fi
15273echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15274echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015275else
Martin v. Löwis11437992002-04-12 09:54:03 +000015276 # Is the header compilable?
15277echo "$as_me:$LINENO: checking wchar.h usability" >&5
15278echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15279cat >conftest.$ac_ext <<_ACEOF
15280#line $LINENO "configure"
15281#include "confdefs.h"
15282$ac_includes_default
15283#include <wchar.h>
15284_ACEOF
15285rm -f conftest.$ac_objext
15286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15287 (eval $ac_compile) 2>&5
15288 ac_status=$?
15289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15290 (exit $ac_status); } &&
15291 { ac_try='test -s conftest.$ac_objext'
15292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15293 (eval $ac_try) 2>&5
15294 ac_status=$?
15295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15296 (exit $ac_status); }; }; then
15297 ac_header_compiler=yes
15298else
15299 echo "$as_me: failed program was:" >&5
15300cat conftest.$ac_ext >&5
15301ac_header_compiler=no
15302fi
15303rm -f conftest.$ac_objext conftest.$ac_ext
15304echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15305echo "${ECHO_T}$ac_header_compiler" >&6
15306
15307# Is the header present?
15308echo "$as_me:$LINENO: checking wchar.h presence" >&5
15309echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15310cat >conftest.$ac_ext <<_ACEOF
15311#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015312#include "confdefs.h"
15313#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015314_ACEOF
15315if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15316 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15317 ac_status=$?
15318 egrep -v '^ *\+' conftest.er1 >conftest.err
15319 rm -f conftest.er1
15320 cat conftest.err >&5
15321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15322 (exit $ac_status); } >/dev/null; then
15323 if test -s conftest.err; then
15324 ac_cpp_err=$ac_c_preproc_warn_flag
15325 else
15326 ac_cpp_err=
15327 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015328else
Martin v. Löwis11437992002-04-12 09:54:03 +000015329 ac_cpp_err=yes
15330fi
15331if test -z "$ac_cpp_err"; then
15332 ac_header_preproc=yes
15333else
15334 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015335 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015336 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015337fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015338rm -f conftest.err conftest.$ac_ext
15339echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15340echo "${ECHO_T}$ac_header_preproc" >&6
15341
15342# So? What about this header?
15343case $ac_header_compiler:$ac_header_preproc in
15344 yes:no )
15345 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15346echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15347 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15348echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15349 no:yes )
15350 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15351echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15352 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15353echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15354 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15355echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15356esac
15357echo "$as_me:$LINENO: checking for wchar.h" >&5
15358echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15359if test "${ac_cv_header_wchar_h+set}" = set; then
15360 echo $ECHO_N "(cached) $ECHO_C" >&6
15361else
15362 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015363fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015364echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15365echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15366
15367fi
15368if test $ac_cv_header_wchar_h = yes; then
15369
15370
15371cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015372#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015373_ACEOF
15374
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015375 wchar_h="yes"
15376
Guido van Rossumef2255b2000-03-10 22:30:29 +000015377else
Martin v. Löwis11437992002-04-12 09:54:03 +000015378 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015379
15380fi
15381
Michael W. Hudson54241132001-12-07 15:38:26 +000015382
Martin v. Löwis11437992002-04-12 09:54:03 +000015383
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015384# determine wchar_t size
15385if test "$wchar_h" = yes
15386then
Martin v. Löwis11437992002-04-12 09:54:03 +000015387 echo "$as_me:$LINENO: checking for wchar_t" >&5
15388echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
15389if test "${ac_cv_type_wchar_t+set}" = set; then
15390 echo $ECHO_N "(cached) $ECHO_C" >&6
15391else
15392 cat >conftest.$ac_ext <<_ACEOF
15393#line $LINENO "configure"
15394#include "confdefs.h"
15395#include <wchar.h>
15396
15397#ifdef F77_DUMMY_MAIN
15398# ifdef __cplusplus
15399 extern "C"
15400# endif
15401 int F77_DUMMY_MAIN() { return 1; }
15402#endif
15403int
15404main ()
15405{
15406if ((wchar_t *) 0)
15407 return 0;
15408if (sizeof (wchar_t))
15409 return 0;
15410 ;
15411 return 0;
15412}
15413_ACEOF
15414rm -f conftest.$ac_objext
15415if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15416 (eval $ac_compile) 2>&5
15417 ac_status=$?
15418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15419 (exit $ac_status); } &&
15420 { ac_try='test -s conftest.$ac_objext'
15421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15422 (eval $ac_try) 2>&5
15423 ac_status=$?
15424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15425 (exit $ac_status); }; }; then
15426 ac_cv_type_wchar_t=yes
15427else
15428 echo "$as_me: failed program was:" >&5
15429cat conftest.$ac_ext >&5
15430ac_cv_type_wchar_t=no
15431fi
15432rm -f conftest.$ac_objext conftest.$ac_ext
15433fi
15434echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
15435echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
15436
15437echo "$as_me:$LINENO: checking size of wchar_t" >&5
15438echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
15439if test "${ac_cv_sizeof_wchar_t+set}" = set; then
15440 echo $ECHO_N "(cached) $ECHO_C" >&6
15441else
15442 if test "$ac_cv_type_wchar_t" = yes; then
15443 # The cast to unsigned long works around a bug in the HP C Compiler
15444 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15445 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15446 # This bug is HP SR number 8606223364.
15447 if test "$cross_compiling" = yes; then
15448 # Depending upon the size, compute the lo and hi bounds.
15449cat >conftest.$ac_ext <<_ACEOF
15450#line $LINENO "configure"
15451#include "confdefs.h"
15452#include <wchar.h>
15453
15454#ifdef F77_DUMMY_MAIN
15455# ifdef __cplusplus
15456 extern "C"
15457# endif
15458 int F77_DUMMY_MAIN() { return 1; }
15459#endif
15460int
15461main ()
15462{
15463static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
15464test_array [0] = 0
15465
15466 ;
15467 return 0;
15468}
15469_ACEOF
15470rm -f conftest.$ac_objext
15471if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15472 (eval $ac_compile) 2>&5
15473 ac_status=$?
15474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15475 (exit $ac_status); } &&
15476 { ac_try='test -s conftest.$ac_objext'
15477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15478 (eval $ac_try) 2>&5
15479 ac_status=$?
15480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15481 (exit $ac_status); }; }; then
15482 ac_lo=0 ac_mid=0
15483 while :; do
15484 cat >conftest.$ac_ext <<_ACEOF
15485#line $LINENO "configure"
15486#include "confdefs.h"
15487#include <wchar.h>
15488
15489#ifdef F77_DUMMY_MAIN
15490# ifdef __cplusplus
15491 extern "C"
15492# endif
15493 int F77_DUMMY_MAIN() { return 1; }
15494#endif
15495int
15496main ()
15497{
15498static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15499test_array [0] = 0
15500
15501 ;
15502 return 0;
15503}
15504_ACEOF
15505rm -f conftest.$ac_objext
15506if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15507 (eval $ac_compile) 2>&5
15508 ac_status=$?
15509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15510 (exit $ac_status); } &&
15511 { ac_try='test -s conftest.$ac_objext'
15512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15513 (eval $ac_try) 2>&5
15514 ac_status=$?
15515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15516 (exit $ac_status); }; }; then
15517 ac_hi=$ac_mid; break
15518else
15519 echo "$as_me: failed program was:" >&5
15520cat conftest.$ac_ext >&5
15521ac_lo=`expr $ac_mid + 1`
15522 if test $ac_lo -le $ac_mid; then
15523 ac_lo= ac_hi=
15524 break
15525 fi
15526 ac_mid=`expr 2 '*' $ac_mid + 1`
15527fi
15528rm -f conftest.$ac_objext conftest.$ac_ext
15529 done
15530else
15531 echo "$as_me: failed program was:" >&5
15532cat conftest.$ac_ext >&5
15533cat >conftest.$ac_ext <<_ACEOF
15534#line $LINENO "configure"
15535#include "confdefs.h"
15536#include <wchar.h>
15537
15538#ifdef F77_DUMMY_MAIN
15539# ifdef __cplusplus
15540 extern "C"
15541# endif
15542 int F77_DUMMY_MAIN() { return 1; }
15543#endif
15544int
15545main ()
15546{
15547static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
15548test_array [0] = 0
15549
15550 ;
15551 return 0;
15552}
15553_ACEOF
15554rm -f conftest.$ac_objext
15555if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15556 (eval $ac_compile) 2>&5
15557 ac_status=$?
15558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15559 (exit $ac_status); } &&
15560 { ac_try='test -s conftest.$ac_objext'
15561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15562 (eval $ac_try) 2>&5
15563 ac_status=$?
15564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15565 (exit $ac_status); }; }; then
15566 ac_hi=-1 ac_mid=-1
15567 while :; do
15568 cat >conftest.$ac_ext <<_ACEOF
15569#line $LINENO "configure"
15570#include "confdefs.h"
15571#include <wchar.h>
15572
15573#ifdef F77_DUMMY_MAIN
15574# ifdef __cplusplus
15575 extern "C"
15576# endif
15577 int F77_DUMMY_MAIN() { return 1; }
15578#endif
15579int
15580main ()
15581{
15582static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15583test_array [0] = 0
15584
15585 ;
15586 return 0;
15587}
15588_ACEOF
15589rm -f conftest.$ac_objext
15590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15591 (eval $ac_compile) 2>&5
15592 ac_status=$?
15593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15594 (exit $ac_status); } &&
15595 { ac_try='test -s conftest.$ac_objext'
15596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15597 (eval $ac_try) 2>&5
15598 ac_status=$?
15599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15600 (exit $ac_status); }; }; then
15601 ac_lo=$ac_mid; break
15602else
15603 echo "$as_me: failed program was:" >&5
15604cat conftest.$ac_ext >&5
15605ac_hi=`expr '(' $ac_mid ')' - 1`
15606 if test $ac_mid -le $ac_hi; then
15607 ac_lo= ac_hi=
15608 break
15609 fi
15610 ac_mid=`expr 2 '*' $ac_mid`
15611fi
15612rm -f conftest.$ac_objext conftest.$ac_ext
15613 done
15614else
15615 echo "$as_me: failed program was:" >&5
15616cat conftest.$ac_ext >&5
15617ac_lo= ac_hi=
15618fi
15619rm -f conftest.$ac_objext conftest.$ac_ext
15620fi
15621rm -f conftest.$ac_objext conftest.$ac_ext
15622# Binary search between lo and hi bounds.
15623while test "x$ac_lo" != "x$ac_hi"; do
15624 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15625 cat >conftest.$ac_ext <<_ACEOF
15626#line $LINENO "configure"
15627#include "confdefs.h"
15628#include <wchar.h>
15629
15630#ifdef F77_DUMMY_MAIN
15631# ifdef __cplusplus
15632 extern "C"
15633# endif
15634 int F77_DUMMY_MAIN() { return 1; }
15635#endif
15636int
15637main ()
15638{
15639static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15640test_array [0] = 0
15641
15642 ;
15643 return 0;
15644}
15645_ACEOF
15646rm -f conftest.$ac_objext
15647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15648 (eval $ac_compile) 2>&5
15649 ac_status=$?
15650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15651 (exit $ac_status); } &&
15652 { ac_try='test -s conftest.$ac_objext'
15653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15654 (eval $ac_try) 2>&5
15655 ac_status=$?
15656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15657 (exit $ac_status); }; }; then
15658 ac_hi=$ac_mid
15659else
15660 echo "$as_me: failed program was:" >&5
15661cat conftest.$ac_ext >&5
15662ac_lo=`expr '(' $ac_mid ')' + 1`
15663fi
15664rm -f conftest.$ac_objext conftest.$ac_ext
15665done
15666case $ac_lo in
15667?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15668'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15669echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15670 { (exit 1); exit 1; }; } ;;
15671esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015672else
15673 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015674 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15675echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15676 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015677else
Martin v. Löwis11437992002-04-12 09:54:03 +000015678 cat >conftest.$ac_ext <<_ACEOF
15679#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015680#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015681#include <wchar.h>
15682
15683long longval () { return (long) (sizeof (wchar_t)); }
15684unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015685#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015686#include <stdlib.h>
15687#ifdef F77_DUMMY_MAIN
15688# ifdef __cplusplus
15689 extern "C"
15690# endif
15691 int F77_DUMMY_MAIN() { return 1; }
15692#endif
15693int
15694main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015695{
Martin v. Löwis11437992002-04-12 09:54:03 +000015696
15697 FILE *f = fopen ("conftest.val", "w");
15698 if (! f)
15699 exit (1);
15700 if (((long) (sizeof (wchar_t))) < 0)
15701 {
15702 long i = longval ();
15703 if (i != ((long) (sizeof (wchar_t))))
15704 exit (1);
15705 fprintf (f, "%ld\n", i);
15706 }
15707 else
15708 {
15709 unsigned long i = ulongval ();
15710 if (i != ((long) (sizeof (wchar_t))))
15711 exit (1);
15712 fprintf (f, "%lu\n", i);
15713 }
15714 exit (ferror (f) || fclose (f) != 0);
15715
15716 ;
15717 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015718}
Martin v. Löwis11437992002-04-12 09:54:03 +000015719_ACEOF
15720rm -f conftest$ac_exeext
15721if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15722 (eval $ac_link) 2>&5
15723 ac_status=$?
15724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15725 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15727 (eval $ac_try) 2>&5
15728 ac_status=$?
15729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15730 (exit $ac_status); }; }; then
15731 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015732else
Martin v. Löwis11437992002-04-12 09:54:03 +000015733 echo "$as_me: program exited with status $ac_status" >&5
15734echo "$as_me: failed program was:" >&5
15735cat conftest.$ac_ext >&5
15736( exit $ac_status )
15737{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15738echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15739 { (exit 1); exit 1; }; }
15740fi
15741rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15742fi
15743fi
15744rm -f conftest.val
15745else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015746 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015747fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015748fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015749echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15750echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15751cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015752#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015753_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015754
Michael W. Hudson54241132001-12-07 15:38:26 +000015755
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015756fi
15757
Martin v. Löwis11437992002-04-12 09:54:03 +000015758echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15759echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015760# Check whether --enable-unicode or --disable-unicode was given.
15761if test "${enable_unicode+set}" = set; then
15762 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015763
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015764else
15765 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015766fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015767
15768if test $enable_unicode = yes
15769then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015770 # Without any arguments, Py_UNICODE defaults to two-byte mode
15771 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015772fi
15773
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015774
15775
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015776case "$enable_unicode" in
15777ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015778 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015779#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015780_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015781
15782 ;;
15783ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015784 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015785#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015786_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015787
15788 ;;
15789esac
15790
Michael W. Hudson54241132001-12-07 15:38:26 +000015791
Martin v. Löwis11437992002-04-12 09:54:03 +000015792
15793
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015794
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015795if test "$enable_unicode" = "no"
15796then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015797 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015798 echo "$as_me:$LINENO: result: not used" >&5
15799echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015800else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015801 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015802
15803cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015804#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015805_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015806
15807 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15808 then
15809 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015810
Martin v. Löwis11437992002-04-12 09:54:03 +000015811cat >>confdefs.h <<\_ACEOF
15812#define HAVE_USABLE_WCHAR_T 1
15813_ACEOF
15814
15815 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015816#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015817_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015818
15819 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15820 then
15821 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015822 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015823#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015824_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015825
15826 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15827 then
15828 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015829 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015830#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015831_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015832
15833 else
15834 PY_UNICODE_TYPE="no type found"
15835 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015836 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15837echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015838fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015839
15840# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015841echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15842echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15843if test "${ac_cv_c_bigendian+set}" = set; then
15844 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015845else
Martin v. Löwis11437992002-04-12 09:54:03 +000015846 # See if sys/param.h defines the BYTE_ORDER macro.
15847cat >conftest.$ac_ext <<_ACEOF
15848#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015849#include "confdefs.h"
15850#include <sys/types.h>
15851#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015852
Martin v. Löwis11437992002-04-12 09:54:03 +000015853#ifdef F77_DUMMY_MAIN
15854# ifdef __cplusplus
15855 extern "C"
15856# endif
15857 int F77_DUMMY_MAIN() { return 1; }
15858#endif
15859int
15860main ()
15861{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015862#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15863 bogus endian macros
15864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015865
15866 ;
15867 return 0;
15868}
15869_ACEOF
15870rm -f conftest.$ac_objext
15871if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15872 (eval $ac_compile) 2>&5
15873 ac_status=$?
15874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15875 (exit $ac_status); } &&
15876 { ac_try='test -s conftest.$ac_objext'
15877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15878 (eval $ac_try) 2>&5
15879 ac_status=$?
15880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15881 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015882 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015883cat >conftest.$ac_ext <<_ACEOF
15884#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015885#include "confdefs.h"
15886#include <sys/types.h>
15887#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015888
Martin v. Löwis11437992002-04-12 09:54:03 +000015889#ifdef F77_DUMMY_MAIN
15890# ifdef __cplusplus
15891 extern "C"
15892# endif
15893 int F77_DUMMY_MAIN() { return 1; }
15894#endif
15895int
15896main ()
15897{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015898#if BYTE_ORDER != BIG_ENDIAN
15899 not big endian
15900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015901
15902 ;
15903 return 0;
15904}
15905_ACEOF
15906rm -f conftest.$ac_objext
15907if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15908 (eval $ac_compile) 2>&5
15909 ac_status=$?
15910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15911 (exit $ac_status); } &&
15912 { ac_try='test -s conftest.$ac_objext'
15913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15914 (eval $ac_try) 2>&5
15915 ac_status=$?
15916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15917 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015918 ac_cv_c_bigendian=yes
15919else
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 echo "$as_me: failed program was:" >&5
15921cat conftest.$ac_ext >&5
15922ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015923fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015924rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015925else
Martin v. Löwis11437992002-04-12 09:54:03 +000015926 echo "$as_me: failed program was:" >&5
15927cat conftest.$ac_ext >&5
15928# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015929if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015930 # try to guess the endianess by grep'ing values into an object file
15931 ac_cv_c_bigendian=unknown
15932 cat >conftest.$ac_ext <<_ACEOF
15933#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015934#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015935short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15936short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15937void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15938short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15939short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15940void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15941#ifdef F77_DUMMY_MAIN
15942# ifdef __cplusplus
15943 extern "C"
15944# endif
15945 int F77_DUMMY_MAIN() { return 1; }
15946#endif
15947int
15948main ()
15949{
15950 _ascii (); _ebcdic ();
15951 ;
15952 return 0;
15953}
15954_ACEOF
15955rm -f conftest.$ac_objext
15956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15957 (eval $ac_compile) 2>&5
15958 ac_status=$?
15959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15960 (exit $ac_status); } &&
15961 { ac_try='test -s conftest.$ac_objext'
15962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15963 (eval $ac_try) 2>&5
15964 ac_status=$?
15965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15966 (exit $ac_status); }; }; then
15967 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15968 ac_cv_c_bigendian=yes
15969fi
15970if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15971 if test "$ac_cv_c_bigendian" = unknown; then
15972 ac_cv_c_bigendian=no
15973 else
15974 # finding both strings is unlikely to happen, but who knows?
15975 ac_cv_c_bigendian=unknown
15976 fi
15977fi
15978else
15979 echo "$as_me: failed program was:" >&5
15980cat conftest.$ac_ext >&5
15981fi
15982rm -f conftest.$ac_objext conftest.$ac_ext
15983else
15984 cat >conftest.$ac_ext <<_ACEOF
15985#line $LINENO "configure"
15986#include "confdefs.h"
15987int
15988main ()
15989{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015990 /* Are we little or big endian? From Harbison&Steele. */
15991 union
15992 {
15993 long l;
15994 char c[sizeof (long)];
15995 } u;
15996 u.l = 1;
15997 exit (u.c[sizeof (long) - 1] == 1);
15998}
Martin v. Löwis11437992002-04-12 09:54:03 +000015999_ACEOF
16000rm -f conftest$ac_exeext
16001if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16002 (eval $ac_link) 2>&5
16003 ac_status=$?
16004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16005 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16007 (eval $ac_try) 2>&5
16008 ac_status=$?
16009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16010 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016011 ac_cv_c_bigendian=no
16012else
Martin v. Löwis11437992002-04-12 09:54:03 +000016013 echo "$as_me: program exited with status $ac_status" >&5
16014echo "$as_me: failed program was:" >&5
16015cat conftest.$ac_ext >&5
16016( exit $ac_status )
16017ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016018fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016019rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016020fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016021fi
16022rm -f conftest.$ac_objext conftest.$ac_ext
16023fi
16024echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16025echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16026case $ac_cv_c_bigendian in
16027 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016028
Martin v. Löwis11437992002-04-12 09:54:03 +000016029cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016030#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016031_ACEOF
16032 ;;
16033 no)
16034 ;;
16035 *)
16036 { { echo "$as_me:$LINENO: error: unknown endianess
16037presetting ac_cv_c_bigendian=no (or yes) will help" >&5
16038echo "$as_me: error: unknown endianess
16039presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16040 { (exit 1); exit 1; }; } ;;
16041esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016042
Michael W. Hudson54241132001-12-07 15:38:26 +000016043
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016044# Check whether right shifting a negative integer extends the sign bit
16045# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016046echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16047echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16048if test "${ac_cv_rshift_extends_sign+set}" = set; then
16049 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016050else
Martin v. Löwis11437992002-04-12 09:54:03 +000016051
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016052if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016053 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016054else
Martin v. Löwis11437992002-04-12 09:54:03 +000016055 cat >conftest.$ac_ext <<_ACEOF
16056#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016057#include "confdefs.h"
16058
16059int main()
16060{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016061 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016062}
16063
Martin v. Löwis11437992002-04-12 09:54:03 +000016064_ACEOF
16065rm -f conftest$ac_exeext
16066if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16067 (eval $ac_link) 2>&5
16068 ac_status=$?
16069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16070 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16072 (eval $ac_try) 2>&5
16073 ac_status=$?
16074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16075 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016076 ac_cv_rshift_extends_sign=yes
16077else
Martin v. Löwis11437992002-04-12 09:54:03 +000016078 echo "$as_me: program exited with status $ac_status" >&5
16079echo "$as_me: failed program was:" >&5
16080cat conftest.$ac_ext >&5
16081( exit $ac_status )
16082ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016084rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16085fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016086fi
16087
Martin v. Löwis11437992002-04-12 09:54:03 +000016088echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16089echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016090if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016091then
Martin v. Löwis11437992002-04-12 09:54:03 +000016092
16093cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016094#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016095_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016096
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016097fi
16098
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016099# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016100echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16101echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16102if test "${ac_cv_have_getc_unlocked+set}" = set; then
16103 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016104else
Martin v. Löwis11437992002-04-12 09:54:03 +000016105
16106cat >conftest.$ac_ext <<_ACEOF
16107#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016108#include "confdefs.h"
16109#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016110#ifdef F77_DUMMY_MAIN
16111# ifdef __cplusplus
16112 extern "C"
16113# endif
16114 int F77_DUMMY_MAIN() { return 1; }
16115#endif
16116int
16117main ()
16118{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016119
16120 FILE *f = fopen("/dev/null", "r");
16121 flockfile(f);
16122 getc_unlocked(f);
16123 funlockfile(f);
16124
Martin v. Löwis11437992002-04-12 09:54:03 +000016125 ;
16126 return 0;
16127}
16128_ACEOF
16129rm -f conftest.$ac_objext conftest$ac_exeext
16130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16131 (eval $ac_link) 2>&5
16132 ac_status=$?
16133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16134 (exit $ac_status); } &&
16135 { ac_try='test -s conftest$ac_exeext'
16136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16137 (eval $ac_try) 2>&5
16138 ac_status=$?
16139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16140 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016141 ac_cv_have_getc_unlocked=yes
16142else
Martin v. Löwis11437992002-04-12 09:54:03 +000016143 echo "$as_me: failed program was:" >&5
16144cat conftest.$ac_ext >&5
16145ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016146fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016147rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016148fi
16149
Martin v. Löwis11437992002-04-12 09:54:03 +000016150echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16151echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016152if test "$ac_cv_have_getc_unlocked" = yes
16153then
Martin v. Löwis11437992002-04-12 09:54:03 +000016154
16155cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016156#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016157_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016158
16159fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016160
Martin v. Löwis0daad592001-09-30 21:09:59 +000016161# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016162echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16163echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16164if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16165 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016166else
Martin v. Löwis11437992002-04-12 09:54:03 +000016167 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016168LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016169cat >conftest.$ac_ext <<_ACEOF
16170#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016171#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016172
Guido van Rossum353ae582001-07-10 16:45:32 +000016173/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016174#ifdef __cplusplus
16175extern "C"
16176#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016177/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016178 builtin and then its argument prototype would still apply. */
16179char rl_pre_input_hook ();
16180#ifdef F77_DUMMY_MAIN
16181# ifdef __cplusplus
16182 extern "C"
16183# endif
16184 int F77_DUMMY_MAIN() { return 1; }
16185#endif
16186int
16187main ()
16188{
16189rl_pre_input_hook ();
16190 ;
16191 return 0;
16192}
16193_ACEOF
16194rm -f conftest.$ac_objext conftest$ac_exeext
16195if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16196 (eval $ac_link) 2>&5
16197 ac_status=$?
16198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16199 (exit $ac_status); } &&
16200 { ac_try='test -s conftest$ac_exeext'
16201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16202 (eval $ac_try) 2>&5
16203 ac_status=$?
16204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16205 (exit $ac_status); }; }; then
16206 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016207else
Martin v. Löwis11437992002-04-12 09:54:03 +000016208 echo "$as_me: failed program was:" >&5
16209cat conftest.$ac_ext >&5
16210ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016211fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016212rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16213LIBS=$ac_check_lib_save_LIBS
16214fi
16215echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16216echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16217if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016218
Martin v. Löwis11437992002-04-12 09:54:03 +000016219cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016220#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016221_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016222
Martin v. Löwis0daad592001-09-30 21:09:59 +000016223fi
16224
Michael W. Hudson54241132001-12-07 15:38:26 +000016225
Martin v. Löwis0daad592001-09-30 21:09:59 +000016226# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016227echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16228echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16229if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16230 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016231else
Martin v. Löwis11437992002-04-12 09:54:03 +000016232 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016233LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016234cat >conftest.$ac_ext <<_ACEOF
16235#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016236#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016237
Martin v. Löwis0daad592001-09-30 21:09:59 +000016238/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016239#ifdef __cplusplus
16240extern "C"
16241#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016242/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016243 builtin and then its argument prototype would still apply. */
16244char rl_completion_matches ();
16245#ifdef F77_DUMMY_MAIN
16246# ifdef __cplusplus
16247 extern "C"
16248# endif
16249 int F77_DUMMY_MAIN() { return 1; }
16250#endif
16251int
16252main ()
16253{
16254rl_completion_matches ();
16255 ;
16256 return 0;
16257}
16258_ACEOF
16259rm -f conftest.$ac_objext conftest$ac_exeext
16260if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16261 (eval $ac_link) 2>&5
16262 ac_status=$?
16263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16264 (exit $ac_status); } &&
16265 { ac_try='test -s conftest$ac_exeext'
16266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16267 (eval $ac_try) 2>&5
16268 ac_status=$?
16269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16270 (exit $ac_status); }; }; then
16271 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016272else
Martin v. Löwis11437992002-04-12 09:54:03 +000016273 echo "$as_me: failed program was:" >&5
16274cat conftest.$ac_ext >&5
16275ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016276fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016277rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16278LIBS=$ac_check_lib_save_LIBS
16279fi
16280echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16281echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16282if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016283
Martin v. Löwis11437992002-04-12 09:54:03 +000016284cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016285#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016286_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016287
Guido van Rossum353ae582001-07-10 16:45:32 +000016288fi
16289
Jack Jansendd19cf82001-12-06 22:36:17 +000016290
Martin v. Löwis11437992002-04-12 09:54:03 +000016291echo "$as_me:$LINENO: checking for broken nice()" >&5
16292echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16293if test "${ac_cv_broken_nice+set}" = set; then
16294 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016295else
Martin v. Löwis11437992002-04-12 09:54:03 +000016296
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016297if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016298 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016299else
Martin v. Löwis11437992002-04-12 09:54:03 +000016300 cat >conftest.$ac_ext <<_ACEOF
16301#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016302#include "confdefs.h"
16303
16304int main()
16305{
16306 int val1 = nice(1);
16307 if (val1 != -1 && val1 == nice(2))
16308 exit(0);
16309 exit(1);
16310}
16311
Martin v. Löwis11437992002-04-12 09:54:03 +000016312_ACEOF
16313rm -f conftest$ac_exeext
16314if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16315 (eval $ac_link) 2>&5
16316 ac_status=$?
16317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16318 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16320 (eval $ac_try) 2>&5
16321 ac_status=$?
16322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16323 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016324 ac_cv_broken_nice=yes
16325else
Martin v. Löwis11437992002-04-12 09:54:03 +000016326 echo "$as_me: program exited with status $ac_status" >&5
16327echo "$as_me: failed program was:" >&5
16328cat conftest.$ac_ext >&5
16329( exit $ac_status )
16330ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016331fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016332rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16333fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016334fi
16335
Martin v. Löwis11437992002-04-12 09:54:03 +000016336echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
16337echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016338if test "$ac_cv_broken_nice" = yes
16339then
Martin v. Löwis11437992002-04-12 09:54:03 +000016340
16341cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016342#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016343_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016344
16345fi
16346
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016347# Look for subsecond timestamps in struct stat
16348echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
16349echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
16350if test "${ac_cv_stat_tv_nsec+set}" = set; then
16351 echo $ECHO_N "(cached) $ECHO_C" >&6
16352else
16353 cat >conftest.$ac_ext <<_ACEOF
16354#line $LINENO "configure"
16355#include "confdefs.h"
16356#include <sys/stat.h>
16357#ifdef F77_DUMMY_MAIN
16358# ifdef __cplusplus
16359 extern "C"
16360# endif
16361 int F77_DUMMY_MAIN() { return 1; }
16362#endif
16363int
16364main ()
16365{
16366
16367struct stat st;
16368st.st_mtim.tv_nsec = 1;
16369
16370 ;
16371 return 0;
16372}
16373_ACEOF
16374rm -f conftest.$ac_objext
16375if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16376 (eval $ac_compile) 2>&5
16377 ac_status=$?
16378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16379 (exit $ac_status); } &&
16380 { ac_try='test -s conftest.$ac_objext'
16381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16382 (eval $ac_try) 2>&5
16383 ac_status=$?
16384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16385 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016386 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016387else
16388 echo "$as_me: failed program was:" >&5
16389cat conftest.$ac_ext >&5
16390ac_cv_stat_tv_nsec=no
16391fi
16392rm -f conftest.$ac_objext conftest.$ac_ext
16393fi
16394
16395echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
16396echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
16397if test "$ac_cv_stat_tv_nsec" = yes
16398then
16399
16400cat >>confdefs.h <<\_ACEOF
16401#define HAVE_STAT_TV_NSEC 1
16402_ACEOF
16403
16404fi
16405
Jack Jansen666b1e72001-10-31 12:11:48 +000016406# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000016407echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
16408echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
16409if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
16410 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016411else
Martin v. Löwis11437992002-04-12 09:54:03 +000016412 cat >conftest.$ac_ext <<_ACEOF
16413#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016414#include "confdefs.h"
16415#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016416#ifdef F77_DUMMY_MAIN
16417# ifdef __cplusplus
16418 extern "C"
16419# endif
16420 int F77_DUMMY_MAIN() { return 1; }
16421#endif
16422int
16423main ()
16424{
Jack Jansen666b1e72001-10-31 12:11:48 +000016425
16426 int rtn;
16427 rtn = mvwdelch(0,0,0);
16428
Martin v. Löwis11437992002-04-12 09:54:03 +000016429 ;
16430 return 0;
16431}
16432_ACEOF
16433rm -f conftest.$ac_objext
16434if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16435 (eval $ac_compile) 2>&5
16436 ac_status=$?
16437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16438 (exit $ac_status); } &&
16439 { ac_try='test -s conftest.$ac_objext'
16440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16441 (eval $ac_try) 2>&5
16442 ac_status=$?
16443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16444 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016445 ac_cv_mvwdelch_is_expression=yes
16446else
Martin v. Löwis11437992002-04-12 09:54:03 +000016447 echo "$as_me: failed program was:" >&5
16448cat conftest.$ac_ext >&5
16449ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016450fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016451rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016452fi
16453
Martin v. Löwis11437992002-04-12 09:54:03 +000016454echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
16455echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016456
16457if test "$ac_cv_mvwdelch_is_expression" = yes
16458then
Martin v. Löwis11437992002-04-12 09:54:03 +000016459
16460cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016461#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016462_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016463
16464fi
16465
Martin v. Löwis11437992002-04-12 09:54:03 +000016466echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
16467echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
16468if test "${ac_cv_window_has_flags+set}" = set; then
16469 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016470else
Martin v. Löwis11437992002-04-12 09:54:03 +000016471 cat >conftest.$ac_ext <<_ACEOF
16472#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016473#include "confdefs.h"
16474#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016475#ifdef F77_DUMMY_MAIN
16476# ifdef __cplusplus
16477 extern "C"
16478# endif
16479 int F77_DUMMY_MAIN() { return 1; }
16480#endif
16481int
16482main ()
16483{
Jack Jansen666b1e72001-10-31 12:11:48 +000016484
16485 WINDOW *w;
16486 w->_flags = 0;
16487
Martin v. Löwis11437992002-04-12 09:54:03 +000016488 ;
16489 return 0;
16490}
16491_ACEOF
16492rm -f conftest.$ac_objext
16493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16494 (eval $ac_compile) 2>&5
16495 ac_status=$?
16496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16497 (exit $ac_status); } &&
16498 { ac_try='test -s conftest.$ac_objext'
16499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16500 (eval $ac_try) 2>&5
16501 ac_status=$?
16502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16503 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016504 ac_cv_window_has_flags=yes
16505else
Martin v. Löwis11437992002-04-12 09:54:03 +000016506 echo "$as_me: failed program was:" >&5
16507cat conftest.$ac_ext >&5
16508ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016509fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016510rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016511fi
16512
Martin v. Löwis11437992002-04-12 09:54:03 +000016513echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
16514echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016515
Jack Jansen666b1e72001-10-31 12:11:48 +000016516
16517if test "$ac_cv_window_has_flags" = yes
16518then
Martin v. Löwis11437992002-04-12 09:54:03 +000016519
16520cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016521#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016522_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016523
16524fi
16525
Guido van Rossum95713eb2000-05-18 20:53:31 +000016526# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
16527# Add sys/socket.h to confdefs.h
16528cat >> confdefs.h <<\EOF
16529#ifdef HAVE_SYS_SOCKET_H
16530#include <sys/socket.h>
16531#endif
16532EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016533echo "$as_me:$LINENO: checking for socklen_t" >&5
16534echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
16535if test "${ac_cv_type_socklen_t+set}" = set; then
16536 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000016537else
Martin v. Löwis11437992002-04-12 09:54:03 +000016538 cat >conftest.$ac_ext <<_ACEOF
16539#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000016540#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016541$ac_includes_default
16542#ifdef F77_DUMMY_MAIN
16543# ifdef __cplusplus
16544 extern "C"
16545# endif
16546 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016547#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016548int
16549main ()
16550{
16551if ((socklen_t *) 0)
16552 return 0;
16553if (sizeof (socklen_t))
16554 return 0;
16555 ;
16556 return 0;
16557}
16558_ACEOF
16559rm -f conftest.$ac_objext
16560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16561 (eval $ac_compile) 2>&5
16562 ac_status=$?
16563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16564 (exit $ac_status); } &&
16565 { ac_try='test -s conftest.$ac_objext'
16566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16567 (eval $ac_try) 2>&5
16568 ac_status=$?
16569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16570 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016571 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000016572else
Martin v. Löwis11437992002-04-12 09:54:03 +000016573 echo "$as_me: failed program was:" >&5
16574cat conftest.$ac_ext >&5
16575ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000016576fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016577rm -f conftest.$ac_objext conftest.$ac_ext
16578fi
16579echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
16580echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
16581if test $ac_cv_type_socklen_t = yes; then
16582 :
16583else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016584
Martin v. Löwis11437992002-04-12 09:54:03 +000016585cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016586#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000016587_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016588
16589fi
16590
Michael W. Hudson54241132001-12-07 15:38:26 +000016591
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016592#AC_MSG_CHECKING(for Modules/Setup)
16593#if test ! -f Modules/Setup ; then
16594# if test ! -d Modules ; then
16595# mkdir Modules
16596# fi
16597# cp "$srcdir/Modules/Setup.dist" Modules/Setup
16598# AC_MSG_RESULT(creating)
16599#else
16600# AC_MSG_RESULT(already exists)
16601#fi
16602
Michael W. Hudson54241132001-12-07 15:38:26 +000016603
16604
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016605for h in `(cd $srcdir;echo Python/thread_*.h)`
16606do
16607 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16608done
16609
Michael W. Hudson54241132001-12-07 15:38:26 +000016610
Jack Jansen0b06be72002-06-21 14:48:38 +000016611SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000016612echo "$as_me:$LINENO: checking for build directories" >&5
16613echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016614for dir in $SRCDIRS; do
16615 if test ! -d $dir; then
16616 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016617 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016618done
Martin v. Löwis11437992002-04-12 09:54:03 +000016619echo "$as_me:$LINENO: result: done" >&5
16620echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016621
Guido van Rossum627b2d71993-12-24 10:39:16 +000016622# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016623ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016624
Martin v. Löwis11437992002-04-12 09:54:03 +000016625cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016626# This file is a shell script that caches the results of configure
16627# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016628# scripts and configure runs, see configure's option --config-cache.
16629# It is not useful on other systems. If it contains results you don't
16630# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016631#
Martin v. Löwis11437992002-04-12 09:54:03 +000016632# config.status only pays attention to the cache file if you give it
16633# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016634#
Martin v. Löwis11437992002-04-12 09:54:03 +000016635# `ac_cv_env_foo' variables (set or unset) will be overriden when
16636# loading this file, other *unset* `ac_cv_foo' will be assigned the
16637# following values.
16638
16639_ACEOF
16640
Guido van Rossumf78abae1997-01-21 22:02:36 +000016641# The following way of writing the cache mishandles newlines in values,
16642# but we know of no workaround that is simple, portable, and efficient.
16643# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016644# Ultrix sh set writes to stderr and can't be redirected directly,
16645# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016646{
16647 (set) 2>&1 |
16648 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16649 *ac_space=\ *)
16650 # `set' does not quote correctly, so add quotes (double-quote
16651 # substitution turns \\\\ into \\, and sed turns \\ into \).
16652 sed -n \
16653 "s/'/'\\\\''/g;
16654 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16655 ;;
16656 *)
16657 # `set' quotes correctly as required by POSIX, so do not add quotes.
16658 sed -n \
16659 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16660 ;;
16661 esac;
16662} |
16663 sed '
16664 t clear
16665 : clear
16666 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16667 t end
16668 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16669 : end' >>confcache
16670if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016671 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016672 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16673 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016674 else
16675 echo "not updating unwritable cache $cache_file"
16676 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016677fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016678rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016679
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016680test "x$prefix" = xNONE && prefix=$ac_default_prefix
16681# Let make expand exec_prefix.
16682test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016683
Martin v. Löwis11437992002-04-12 09:54:03 +000016684# VPATH may cause trouble with some makes, so we remove $(srcdir),
16685# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16686# trailing colons and then remove the whole line if VPATH becomes empty
16687# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016688if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016689 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16690s/:*\$(srcdir):*/:/;
16691s/:*\${srcdir}:*/:/;
16692s/:*@srcdir@:*/:/;
16693s/^\([^=]*=[ ]*\):*/\1/;
16694s/:*$//;
16695s/^[^=]*=[ ]*$//;
16696}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016697fi
16698
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016699DEFS=-DHAVE_CONFIG_H
16700
Martin v. Löwis11437992002-04-12 09:54:03 +000016701
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016702: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016703ac_clean_files_save=$ac_clean_files
16704ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16705{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16706echo "$as_me: creating $CONFIG_STATUS" >&6;}
16707cat >$CONFIG_STATUS <<_ACEOF
16708#! $SHELL
16709# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016710# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016711# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016712# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016713
Martin v. Löwis11437992002-04-12 09:54:03 +000016714debug=false
16715SHELL=\${CONFIG_SHELL-$SHELL}
16716_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016717
Martin v. Löwis11437992002-04-12 09:54:03 +000016718cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016719
Martin v. Löwis11437992002-04-12 09:54:03 +000016720## --------------------- ##
16721## M4sh Initialization. ##
16722## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016723
Martin v. Löwis11437992002-04-12 09:54:03 +000016724# Be Bourne compatible
16725if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16726 emulate sh
16727 NULLCMD=:
16728elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16729 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016730fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016731
Martin v. Löwis11437992002-04-12 09:54:03 +000016732# NLS nuisances.
16733# Support unset when possible.
16734if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16735 as_unset=unset
16736else
16737 as_unset=false
16738fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016739
Martin v. Löwis11437992002-04-12 09:54:03 +000016740(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16741 { $as_unset LANG || test "${LANG+set}" != set; } ||
16742 { LANG=C; export LANG; }
16743(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16744 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16745 { LC_ALL=C; export LC_ALL; }
16746(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16747 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16748 { LC_TIME=C; export LC_TIME; }
16749(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16750 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16751 { LC_CTYPE=C; export LC_CTYPE; }
16752(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16753 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16754 { LANGUAGE=C; export LANGUAGE; }
16755(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16756 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16757 { LC_COLLATE=C; export LC_COLLATE; }
16758(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16759 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16760 { LC_NUMERIC=C; export LC_NUMERIC; }
16761(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16762 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16763 { LC_MESSAGES=C; export LC_MESSAGES; }
16764
16765
16766# Name of the executable.
16767as_me=`(basename "$0") 2>/dev/null ||
16768$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16769 X"$0" : 'X\(//\)$' \| \
16770 X"$0" : 'X\(/\)$' \| \
16771 . : '\(.\)' 2>/dev/null ||
16772echo X/"$0" |
16773 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16774 /^X\/\(\/\/\)$/{ s//\1/; q; }
16775 /^X\/\(\/\).*/{ s//\1/; q; }
16776 s/.*/./; q'`
16777
16778# PATH needs CR, and LINENO needs CR and PATH.
16779# Avoid depending upon Character Ranges.
16780as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16781as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16782as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16783as_cr_digits='0123456789'
16784as_cr_alnum=$as_cr_Letters$as_cr_digits
16785
16786# The user is always right.
16787if test "${PATH_SEPARATOR+set}" != set; then
16788 echo "#! /bin/sh" >conftest.sh
16789 echo "exit 0" >>conftest.sh
16790 chmod +x conftest.sh
16791 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16792 PATH_SEPARATOR=';'
16793 else
16794 PATH_SEPARATOR=:
16795 fi
16796 rm -f conftest.sh
16797fi
16798
16799
16800 as_lineno_1=$LINENO
16801 as_lineno_2=$LINENO
16802 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16803 test "x$as_lineno_1" != "x$as_lineno_2" &&
16804 test "x$as_lineno_3" = "x$as_lineno_2" || {
16805 # Find who we are. Look in the path if we contain no path at all
16806 # relative or not.
16807 case $0 in
16808 *[\\/]* ) as_myself=$0 ;;
16809 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16810for as_dir in $PATH
16811do
16812 IFS=$as_save_IFS
16813 test -z "$as_dir" && as_dir=.
16814 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16815done
16816
16817 ;;
16818 esac
16819 # We did not find ourselves, most probably we were run as `sh COMMAND'
16820 # in which case we are not to be found in the path.
16821 if test "x$as_myself" = x; then
16822 as_myself=$0
16823 fi
16824 if test ! -f "$as_myself"; then
16825 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16826echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16827 { (exit 1); exit 1; }; }
16828 fi
16829 case $CONFIG_SHELL in
16830 '')
16831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16832for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16833do
16834 IFS=$as_save_IFS
16835 test -z "$as_dir" && as_dir=.
16836 for as_base in sh bash ksh sh5; do
16837 case $as_dir in
16838 /*)
16839 if ("$as_dir/$as_base" -c '
16840 as_lineno_1=$LINENO
16841 as_lineno_2=$LINENO
16842 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16843 test "x$as_lineno_1" != "x$as_lineno_2" &&
16844 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16845 CONFIG_SHELL=$as_dir/$as_base
16846 export CONFIG_SHELL
16847 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16848 fi;;
16849 esac
16850 done
16851done
16852;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016853 esac
16854
Martin v. Löwis11437992002-04-12 09:54:03 +000016855 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16856 # uniformly replaced by the line number. The first 'sed' inserts a
16857 # line-number line before each line; the second 'sed' does the real
16858 # work. The second script uses 'N' to pair each line-number line
16859 # with the numbered line, and appends trailing '-' during
16860 # substitution so that $LINENO is not a special case at line end.
16861 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16862 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16863 sed '=' <$as_myself |
16864 sed '
16865 N
16866 s,$,-,
16867 : loop
16868 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16869 t loop
16870 s,-$,,
16871 s,^['$as_cr_digits']*\n,,
16872 ' >$as_me.lineno &&
16873 chmod +x $as_me.lineno ||
16874 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16875echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16876 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016877
Martin v. Löwis11437992002-04-12 09:54:03 +000016878 # Don't try to exec as it changes $[0], causing all sort of problems
16879 # (the dirname of $[0] is not the place where we might find the
16880 # original and so on. Autoconf is especially sensible to this).
16881 . ./$as_me.lineno
16882 # Exit status is that of the last command.
16883 exit
16884}
16885
16886
16887case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16888 *c*,-n*) ECHO_N= ECHO_C='
16889' ECHO_T=' ' ;;
16890 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16891 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16892esac
16893
16894if expr a : '\(a\)' >/dev/null 2>&1; then
16895 as_expr=expr
16896else
16897 as_expr=false
16898fi
16899
16900rm -f conf$$ conf$$.exe conf$$.file
16901echo >conf$$.file
16902if ln -s conf$$.file conf$$ 2>/dev/null; then
16903 # We could just check for DJGPP; but this test a) works b) is more generic
16904 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16905 if test -f conf$$.exe; then
16906 # Don't use ln at all; we don't have any links
16907 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016908 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016909 as_ln_s='ln -s'
16910 fi
16911elif ln conf$$.file conf$$ 2>/dev/null; then
16912 as_ln_s=ln
16913else
16914 as_ln_s='cp -p'
16915fi
16916rm -f conf$$ conf$$.exe conf$$.file
16917
16918as_executable_p="test -f"
16919
16920# Sed expression to map a string onto a valid CPP name.
16921as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16922
16923# Sed expression to map a string onto a valid variable name.
16924as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16925
16926
16927# IFS
16928# We need space, tab and new line, in precisely that order.
16929as_nl='
16930'
16931IFS=" $as_nl"
16932
16933# CDPATH.
16934$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16935
16936exec 6>&1
16937
16938# Open the log real soon, to keep \$[0] and so on meaningful, and to
16939# report actual input values of CONFIG_FILES etc. instead of their
16940# values after options handling. Logging --version etc. is OK.
16941exec 5>>config.log
16942{
16943 echo
16944 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16945## Running $as_me. ##
16946_ASBOX
16947} >&5
16948cat >&5 <<_CSEOF
16949
Martin v. Löwis88afe662002-10-26 13:47:44 +000016950This file was extended by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +000016951generated by GNU Autoconf 2.53. Invocation command line was
16952
16953 CONFIG_FILES = $CONFIG_FILES
16954 CONFIG_HEADERS = $CONFIG_HEADERS
16955 CONFIG_LINKS = $CONFIG_LINKS
16956 CONFIG_COMMANDS = $CONFIG_COMMANDS
16957 $ $0 $@
16958
16959_CSEOF
16960echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16961echo >&5
16962_ACEOF
16963
16964# Files that config.status was made for.
16965if test -n "$ac_config_files"; then
16966 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16967fi
16968
16969if test -n "$ac_config_headers"; then
16970 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16971fi
16972
16973if test -n "$ac_config_links"; then
16974 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16975fi
16976
16977if test -n "$ac_config_commands"; then
16978 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16979fi
16980
16981cat >>$CONFIG_STATUS <<\_ACEOF
16982
16983ac_cs_usage="\
16984\`$as_me' instantiates files from templates according to the
16985current configuration.
16986
16987Usage: $0 [OPTIONS] [FILE]...
16988
16989 -h, --help print this help, then exit
16990 -V, --version print version number, then exit
16991 -d, --debug don't remove temporary files
16992 --recheck update $as_me by reconfiguring in the same conditions
16993 --file=FILE[:TEMPLATE]
16994 instantiate the configuration file FILE
16995 --header=FILE[:TEMPLATE]
16996 instantiate the configuration header FILE
16997
16998Configuration files:
16999$config_files
17000
17001Configuration headers:
17002$config_headers
17003
17004Report bugs to <bug-autoconf@gnu.org>."
17005_ACEOF
17006
17007cat >>$CONFIG_STATUS <<_ACEOF
17008ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017009python config.status 2.3
Martin v. Löwis11437992002-04-12 09:54:03 +000017010configured by $0, generated by GNU Autoconf 2.53,
17011 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17012
17013Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17014Free Software Foundation, Inc.
17015This config.status script is free software; the Free Software Foundation
17016gives unlimited permission to copy, distribute and modify it."
17017srcdir=$srcdir
17018INSTALL="$INSTALL"
17019_ACEOF
17020
17021cat >>$CONFIG_STATUS <<\_ACEOF
17022# If no file are specified by the user, then we need to provide default
17023# value. By we need to know if files were specified by the user.
17024ac_need_defaults=:
17025while test $# != 0
17026do
17027 case $1 in
17028 --*=*)
17029 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17030 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17031 shift
17032 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17033 shift
17034 ;;
17035 -*);;
17036 *) # This is not an option, so the user has probably given explicit
17037 # arguments.
17038 ac_need_defaults=false;;
17039 esac
17040
17041 case $1 in
17042 # Handling of the options.
17043_ACEOF
17044cat >>$CONFIG_STATUS <<_ACEOF
17045 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17046 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17047 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17048_ACEOF
17049cat >>$CONFIG_STATUS <<\_ACEOF
17050 --version | --vers* | -V )
17051 echo "$ac_cs_version"; exit 0 ;;
17052 --he | --h)
17053 # Conflict between --help and --header
17054 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17055Try \`$0 --help' for more information." >&5
17056echo "$as_me: error: ambiguous option: $1
17057Try \`$0 --help' for more information." >&2;}
17058 { (exit 1); exit 1; }; };;
17059 --help | --hel | -h )
17060 echo "$ac_cs_usage"; exit 0 ;;
17061 --debug | --d* | -d )
17062 debug=: ;;
17063 --file | --fil | --fi | --f )
17064 shift
17065 CONFIG_FILES="$CONFIG_FILES $1"
17066 ac_need_defaults=false;;
17067 --header | --heade | --head | --hea )
17068 shift
17069 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17070 ac_need_defaults=false;;
17071
17072 # This is an error.
17073 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17074Try \`$0 --help' for more information." >&5
17075echo "$as_me: error: unrecognized option: $1
17076Try \`$0 --help' for more information." >&2;}
17077 { (exit 1); exit 1; }; } ;;
17078
17079 *) ac_config_targets="$ac_config_targets $1" ;;
17080
17081 esac
17082 shift
17083done
17084
17085_ACEOF
17086
17087
17088
17089
17090
17091cat >>$CONFIG_STATUS <<\_ACEOF
17092for ac_config_target in $ac_config_targets
17093do
17094 case "$ac_config_target" in
17095 # Handling of arguments.
17096 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17097 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17098 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17099 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17100echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17101 { (exit 1); exit 1; }; };;
17102 esac
17103done
17104
17105# If the user did not use the arguments to specify the items to instantiate,
17106# then the envvar interface is used. Set only those that are not.
17107# We use the long form for the default assignment because of an extremely
17108# bizarre bug on SunOS 4.1.3.
17109if $ac_need_defaults; then
17110 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17111 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17112fi
17113
17114# Create a temporary directory, and hook for its removal unless debugging.
17115$debug ||
17116{
17117 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17118 trap '{ (exit 1); exit 1; }' 1 2 13 15
17119}
17120
17121# Create a (secure) tmp directory for tmp files.
17122: ${TMPDIR=/tmp}
17123{
17124 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17125 test -n "$tmp" && test -d "$tmp"
17126} ||
17127{
17128 tmp=$TMPDIR/cs$$-$RANDOM
17129 (umask 077 && mkdir $tmp)
17130} ||
17131{
17132 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17133 { (exit 1); exit 1; }
17134}
17135
17136_ACEOF
17137
17138cat >>$CONFIG_STATUS <<_ACEOF
17139
17140#
17141# CONFIG_FILES section.
17142#
17143
17144# No need to generate the scripts if there are no CONFIG_FILES.
17145# This happens for instance when ./config.status config.h
17146if test -n "\$CONFIG_FILES"; then
17147 # Protect against being on the right side of a sed subst in config.status.
17148 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17149 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17150s,@SHELL@,$SHELL,;t t
17151s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17152s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17153s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17154s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17155s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17156s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17157s,@exec_prefix@,$exec_prefix,;t t
17158s,@prefix@,$prefix,;t t
17159s,@program_transform_name@,$program_transform_name,;t t
17160s,@bindir@,$bindir,;t t
17161s,@sbindir@,$sbindir,;t t
17162s,@libexecdir@,$libexecdir,;t t
17163s,@datadir@,$datadir,;t t
17164s,@sysconfdir@,$sysconfdir,;t t
17165s,@sharedstatedir@,$sharedstatedir,;t t
17166s,@localstatedir@,$localstatedir,;t t
17167s,@libdir@,$libdir,;t t
17168s,@includedir@,$includedir,;t t
17169s,@oldincludedir@,$oldincludedir,;t t
17170s,@infodir@,$infodir,;t t
17171s,@mandir@,$mandir,;t t
17172s,@build_alias@,$build_alias,;t t
17173s,@host_alias@,$host_alias,;t t
17174s,@target_alias@,$target_alias,;t t
17175s,@DEFS@,$DEFS,;t t
17176s,@ECHO_C@,$ECHO_C,;t t
17177s,@ECHO_N@,$ECHO_N,;t t
17178s,@ECHO_T@,$ECHO_T,;t t
17179s,@LIBS@,$LIBS,;t t
17180s,@VERSION@,$VERSION,;t t
17181s,@SOVERSION@,$SOVERSION,;t t
17182s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
17183s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
17184s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
17185s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17186s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17187s,@MACHDEP@,$MACHDEP,;t t
17188s,@SGI_ABI@,$SGI_ABI,;t t
17189s,@CXX@,$CXX,;t t
17190s,@MAINOBJ@,$MAINOBJ,;t t
17191s,@EXEEXT@,$EXEEXT,;t t
17192s,@CC@,$CC,;t t
17193s,@CFLAGS@,$CFLAGS,;t t
17194s,@LDFLAGS@,$LDFLAGS,;t t
17195s,@CPPFLAGS@,$CPPFLAGS,;t t
17196s,@ac_ct_CC@,$ac_ct_CC,;t t
17197s,@OBJEXT@,$OBJEXT,;t t
17198s,@CPP@,$CPP,;t t
17199s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17200s,@LIBRARY@,$LIBRARY,;t t
17201s,@LDLIBRARY@,$LDLIBRARY,;t t
17202s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17203s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17204s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17205s,@INSTSONAME@,$INSTSONAME,;t t
17206s,@RUNSHARED@,$RUNSHARED,;t t
17207s,@LINKCC@,$LINKCC,;t t
17208s,@RANLIB@,$RANLIB,;t t
17209s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17210s,@AR@,$AR,;t t
17211s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17212s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17213s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17214s,@LN@,$LN,;t t
17215s,@OPT@,$OPT,;t t
17216s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17217s,@SO@,$SO,;t t
17218s,@LDSHARED@,$LDSHARED,;t t
17219s,@BLDSHARED@,$BLDSHARED,;t t
17220s,@CCSHARED@,$CCSHARED,;t t
17221s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17222s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017223s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017224s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17225s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17226s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17227s,@LDLAST@,$LDLAST,;t t
17228s,@THREADOBJ@,$THREADOBJ,;t t
17229s,@DLINCLDIR@,$DLINCLDIR,;t t
17230s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17231s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17232s,@LIBOBJS@,$LIBOBJS,;t t
17233s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17234s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17235s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17236s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17237s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17238s,@LIBM@,$LIBM,;t t
17239s,@LIBC@,$LIBC,;t t
17240s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
17241s,@THREADHEADERS@,$THREADHEADERS,;t t
17242s,@SRCDIRS@,$SRCDIRS,;t t
17243CEOF
17244
17245_ACEOF
17246
17247 cat >>$CONFIG_STATUS <<\_ACEOF
17248 # Split the substitutions into bite-sized pieces for seds with
17249 # small command number limits, like on Digital OSF/1 and HP-UX.
17250 ac_max_sed_lines=48
17251 ac_sed_frag=1 # Number of current file.
17252 ac_beg=1 # First line for current file.
17253 ac_end=$ac_max_sed_lines # Line after last line for current file.
17254 ac_more_lines=:
17255 ac_sed_cmds=
17256 while $ac_more_lines; do
17257 if test $ac_beg -gt 1; then
17258 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17259 else
17260 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17261 fi
17262 if test ! -s $tmp/subs.frag; then
17263 ac_more_lines=false
17264 else
17265 # The purpose of the label and of the branching condition is to
17266 # speed up the sed processing (if there are no `@' at all, there
17267 # is no need to browse any of the substitutions).
17268 # These are the two extra sed commands mentioned above.
17269 (echo ':t
17270 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17271 if test -z "$ac_sed_cmds"; then
17272 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17273 else
17274 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17275 fi
17276 ac_sed_frag=`expr $ac_sed_frag + 1`
17277 ac_beg=$ac_end
17278 ac_end=`expr $ac_end + $ac_max_sed_lines`
17279 fi
17280 done
17281 if test -z "$ac_sed_cmds"; then
17282 ac_sed_cmds=cat
17283 fi
17284fi # test -n "$CONFIG_FILES"
17285
17286_ACEOF
17287cat >>$CONFIG_STATUS <<\_ACEOF
17288for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17289 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17290 case $ac_file in
17291 - | *:- | *:-:* ) # input from stdin
17292 cat >$tmp/stdin
17293 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17294 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17295 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17296 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17297 * ) ac_file_in=$ac_file.in ;;
17298 esac
17299
17300 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17301 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17302$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17303 X"$ac_file" : 'X\(//\)[^/]' \| \
17304 X"$ac_file" : 'X\(//\)$' \| \
17305 X"$ac_file" : 'X\(/\)' \| \
17306 . : '\(.\)' 2>/dev/null ||
17307echo X"$ac_file" |
17308 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17309 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17310 /^X\(\/\/\)$/{ s//\1/; q; }
17311 /^X\(\/\).*/{ s//\1/; q; }
17312 s/.*/./; q'`
17313 { case "$ac_dir" in
17314 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17315 *) as_incr_dir=.;;
17316esac
17317as_dummy="$ac_dir"
17318for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17319 case $as_mkdir_dir in
17320 # Skip DOS drivespec
17321 ?:) as_incr_dir=$as_mkdir_dir ;;
17322 *)
17323 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17324 test -d "$as_incr_dir" ||
17325 mkdir "$as_incr_dir" ||
17326 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17327echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17328 { (exit 1); exit 1; }; }
17329 ;;
17330 esac
17331done; }
17332
17333 ac_builddir=.
17334
17335if test "$ac_dir" != .; then
17336 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17337 # A "../" for each directory in $ac_dir_suffix.
17338 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17339else
17340 ac_dir_suffix= ac_top_builddir=
17341fi
17342
17343case $srcdir in
17344 .) # No --srcdir option. We are building in place.
17345 ac_srcdir=.
17346 if test -z "$ac_top_builddir"; then
17347 ac_top_srcdir=.
17348 else
17349 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17350 fi ;;
17351 [\\/]* | ?:[\\/]* ) # Absolute path.
17352 ac_srcdir=$srcdir$ac_dir_suffix;
17353 ac_top_srcdir=$srcdir ;;
17354 *) # Relative path.
17355 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17356 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17357esac
17358# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17359# absolute.
17360ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise3271202002-11-07 07:42:30 +000017361ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000017362ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17363ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17364
17365
17366 case $INSTALL in
17367 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17368 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17369 esac
17370
17371 if test x"$ac_file" != x-; then
17372 { echo "$as_me:$LINENO: creating $ac_file" >&5
17373echo "$as_me: creating $ac_file" >&6;}
17374 rm -f "$ac_file"
17375 fi
17376 # Let's still pretend it is `configure' which instantiates (i.e., don't
17377 # use $as_me), people would be surprised to read:
17378 # /* config.h. Generated by config.status. */
17379 if test x"$ac_file" = x-; then
17380 configure_input=
17381 else
17382 configure_input="$ac_file. "
17383 fi
17384 configure_input=$configure_input"Generated from `echo $ac_file_in |
17385 sed 's,.*/,,'` by configure."
17386
17387 # First look for the input files in the build tree, otherwise in the
17388 # src tree.
17389 ac_file_inputs=`IFS=:
17390 for f in $ac_file_in; do
17391 case $f in
17392 -) echo $tmp/stdin ;;
17393 [\\/$]*)
17394 # Absolute (can't be DOS-style, as IFS=:)
17395 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17396echo "$as_me: error: cannot find input file: $f" >&2;}
17397 { (exit 1); exit 1; }; }
17398 echo $f;;
17399 *) # Relative
17400 if test -f "$f"; then
17401 # Build tree
17402 echo $f
17403 elif test -f "$srcdir/$f"; then
17404 # Source tree
17405 echo $srcdir/$f
17406 else
17407 # /dev/null tree
17408 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17409echo "$as_me: error: cannot find input file: $f" >&2;}
17410 { (exit 1); exit 1; }; }
17411 fi;;
17412 esac
17413 done` || { (exit 1); exit 1; }
17414_ACEOF
17415cat >>$CONFIG_STATUS <<_ACEOF
17416 sed "$ac_vpsub
17417$extrasub
17418_ACEOF
17419cat >>$CONFIG_STATUS <<\_ACEOF
17420:t
17421/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17422s,@configure_input@,$configure_input,;t t
17423s,@srcdir@,$ac_srcdir,;t t
17424s,@abs_srcdir@,$ac_abs_srcdir,;t t
17425s,@top_srcdir@,$ac_top_srcdir,;t t
17426s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17427s,@builddir@,$ac_builddir,;t t
17428s,@abs_builddir@,$ac_abs_builddir,;t t
17429s,@top_builddir@,$ac_top_builddir,;t t
17430s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17431s,@INSTALL@,$ac_INSTALL,;t t
17432" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17433 rm -f $tmp/stdin
17434 if test x"$ac_file" != x-; then
17435 mv $tmp/out $ac_file
17436 else
17437 cat $tmp/out
17438 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017439 fi
17440
Martin v. Löwis11437992002-04-12 09:54:03 +000017441done
17442_ACEOF
17443cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017444
Martin v. Löwis11437992002-04-12 09:54:03 +000017445#
17446# CONFIG_HEADER section.
17447#
Guido van Rossum627b2d71993-12-24 10:39:16 +000017448
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017449# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17450# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017451#
17452# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000017453ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17454ac_dB='[ ].*$,\1#\2'
17455ac_dC=' '
17456ac_dD=',;t'
17457# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17458ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17459ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017460ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000017461ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017462
Martin v. Löwis11437992002-04-12 09:54:03 +000017463for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000017464 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000017465 case $ac_file in
17466 - | *:- | *:-:* ) # input from stdin
17467 cat >$tmp/stdin
17468 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17469 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17470 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17471 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17472 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017473 esac
17474
Martin v. Löwis11437992002-04-12 09:54:03 +000017475 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17476echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017477
Martin v. Löwis11437992002-04-12 09:54:03 +000017478 # First look for the input files in the build tree, otherwise in the
17479 # src tree.
17480 ac_file_inputs=`IFS=:
17481 for f in $ac_file_in; do
17482 case $f in
17483 -) echo $tmp/stdin ;;
17484 [\\/$]*)
17485 # Absolute (can't be DOS-style, as IFS=:)
17486 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17487echo "$as_me: error: cannot find input file: $f" >&2;}
17488 { (exit 1); exit 1; }; }
17489 echo $f;;
17490 *) # Relative
17491 if test -f "$f"; then
17492 # Build tree
17493 echo $f
17494 elif test -f "$srcdir/$f"; then
17495 # Source tree
17496 echo $srcdir/$f
17497 else
17498 # /dev/null tree
17499 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17500echo "$as_me: error: cannot find input file: $f" >&2;}
17501 { (exit 1); exit 1; }; }
17502 fi;;
17503 esac
17504 done` || { (exit 1); exit 1; }
17505 # Remove the trailing spaces.
17506 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017507
Martin v. Löwis11437992002-04-12 09:54:03 +000017508_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017509
Martin v. Löwis11437992002-04-12 09:54:03 +000017510# Transform confdefs.h into two sed scripts, `conftest.defines' and
17511# `conftest.undefs', that substitutes the proper values into
17512# config.h.in to produce config.h. The first handles `#define'
17513# templates, and the second `#undef' templates.
17514# And first: Protect against being on the right side of a sed subst in
17515# config.status. Protect against being in an unquoted here document
17516# in config.status.
17517rm -f conftest.defines conftest.undefs
17518# Using a here document instead of a string reduces the quoting nightmare.
17519# Putting comments in sed scripts is not portable.
17520#
17521# `end' is used to avoid that the second main sed command (meant for
17522# 0-ary CPP macros) applies to n-ary macro definitions.
17523# See the Autoconf documentation for `clear'.
17524cat >confdef2sed.sed <<\_ACEOF
17525s/[\\&,]/\\&/g
17526s,[\\$`],\\&,g
17527t clear
17528: clear
17529s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17530t end
17531s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17532: end
17533_ACEOF
17534# If some macros were called several times there might be several times
17535# the same #defines, which is useless. Nevertheless, we may not want to
17536# sort them, since we want the *last* AC-DEFINE to be honored.
17537uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17538sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17539rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017540
17541# This sed command replaces #undef with comments. This is necessary, for
17542# example, in the case of _POSIX_SOURCE, which is predefined and required
17543# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017544cat >>conftest.undefs <<\_ACEOF
17545s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17546_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017547
Martin v. Löwis11437992002-04-12 09:54:03 +000017548# Break up conftest.defines because some shells have a limit on the size
17549# of here documents, and old seds have small limits too (100 cmds).
17550echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17551echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17552echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17553echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017554rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000017555while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000017556do
Martin v. Löwis11437992002-04-12 09:54:03 +000017557 # Write a limited-size here document to $tmp/defines.sed.
17558 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17559 # Speed up: don't consider the non `#define' lines.
17560 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
17561 # Work around the forget-to-reset-the-flag bug.
17562 echo 't clr' >>$CONFIG_STATUS
17563 echo ': clr' >>$CONFIG_STATUS
17564 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017565 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017566 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17567 rm -f $tmp/in
17568 mv $tmp/out $tmp/in
17569' >>$CONFIG_STATUS
17570 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17571 rm -f conftest.defines
17572 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000017573done
Martin v. Löwis11437992002-04-12 09:54:03 +000017574rm -f conftest.defines
17575echo ' fi # egrep' >>$CONFIG_STATUS
17576echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017577
Martin v. Löwis11437992002-04-12 09:54:03 +000017578# Break up conftest.undefs because some shells have a limit on the size
17579# of here documents, and old seds have small limits too (100 cmds).
17580echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17581rm -f conftest.tail
17582while grep . conftest.undefs >/dev/null
17583do
17584 # Write a limited-size here document to $tmp/undefs.sed.
17585 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17586 # Speed up: don't consider the non `#undef'
17587 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17588 # Work around the forget-to-reset-the-flag bug.
17589 echo 't clr' >>$CONFIG_STATUS
17590 echo ': clr' >>$CONFIG_STATUS
17591 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17592 echo 'CEOF
17593 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17594 rm -f $tmp/in
17595 mv $tmp/out $tmp/in
17596' >>$CONFIG_STATUS
17597 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17598 rm -f conftest.undefs
17599 mv conftest.tail conftest.undefs
17600done
17601rm -f conftest.undefs
17602
17603cat >>$CONFIG_STATUS <<\_ACEOF
17604 # Let's still pretend it is `configure' which instantiates (i.e., don't
17605 # use $as_me), people would be surprised to read:
17606 # /* config.h. Generated by config.status. */
17607 if test x"$ac_file" = x-; then
17608 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000017609 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017610 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000017611 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017612 cat $tmp/in >>$tmp/config.h
17613 rm -f $tmp/in
17614 if test x"$ac_file" != x-; then
17615 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17616 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17617echo "$as_me: $ac_file is unchanged" >&6;}
17618 else
17619 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17620$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17621 X"$ac_file" : 'X\(//\)[^/]' \| \
17622 X"$ac_file" : 'X\(//\)$' \| \
17623 X"$ac_file" : 'X\(/\)' \| \
17624 . : '\(.\)' 2>/dev/null ||
17625echo X"$ac_file" |
17626 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17627 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17628 /^X\(\/\/\)$/{ s//\1/; q; }
17629 /^X\(\/\).*/{ s//\1/; q; }
17630 s/.*/./; q'`
17631 { case "$ac_dir" in
17632 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17633 *) as_incr_dir=.;;
17634esac
17635as_dummy="$ac_dir"
17636for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17637 case $as_mkdir_dir in
17638 # Skip DOS drivespec
17639 ?:) as_incr_dir=$as_mkdir_dir ;;
17640 *)
17641 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17642 test -d "$as_incr_dir" ||
17643 mkdir "$as_incr_dir" ||
17644 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17645echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17646 { (exit 1); exit 1; }; }
17647 ;;
17648 esac
17649done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017650
Martin v. Löwis11437992002-04-12 09:54:03 +000017651 rm -f $ac_file
17652 mv $tmp/config.h $ac_file
17653 fi
17654 else
17655 cat $tmp/config.h
17656 rm -f $tmp/config.h
17657 fi
17658done
17659_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017660
Martin v. Löwis11437992002-04-12 09:54:03 +000017661cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017662
Martin v. Löwis11437992002-04-12 09:54:03 +000017663{ (exit 0); exit 0; }
17664_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017665chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017666ac_clean_files=$ac_clean_files_save
17667
17668
17669# configure is writing to config.log, and then calls config.status.
17670# config.status does its own redirection, appending to config.log.
17671# Unfortunately, on DOS this fails, as config.log is still kept open
17672# by configure, so config.status won't be able to write to it; its
17673# output is simply discarded. So we exec the FD to /dev/null,
17674# effectively closing config.log, so it can be properly (re)opened and
17675# appended to by config.status. When coming back to configure, we
17676# need to make the FD available again.
17677if test "$no_create" != yes; then
17678 ac_cs_success=:
17679 exec 5>/dev/null
17680 $SHELL $CONFIG_STATUS || ac_cs_success=false
17681 exec 5>>config.log
17682 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17683 # would make configure fail if this is the last instruction.
17684 $ac_cs_success || { (exit 1); exit 1; }
17685fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017686
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017687
17688echo "creating Setup"
17689if test ! -f Modules/Setup
17690then
17691 cp $srcdir/Modules/Setup.dist Modules/Setup
17692fi
17693
17694echo "creating Setup.local"
17695if test ! -f Modules/Setup.local
17696then
17697 echo "# Edit this file for local setup changes" >Modules/Setup.local
17698fi
17699
17700echo "creating Makefile"
17701$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17702 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017703 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017704mv config.c Modules