blob: 200479130bca4160dcbad76d59fd8107c9713ceb [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis88afe662002-10-26 13:47:44 +00002# From configure.in Revision: 1.359 .
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]
828 --enable-framework=INSTALLDIR Build (MacOSX|Darwin) framework
829 --enable-shared disable/enable building shared python library
830 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
831 --enable-ipv6 Enable ipv6 (with ipv4) support
832 --disable-ipv6 Disable ipv6 support
833 --enable-unicode=ucs2,ucs4 Enable Unicode strings (default is yes)
834
835Optional Packages:
836 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
837 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
838 --without-gcc never use gcc
839 --with-cxx=<compiler> enable C++ support
840 --with-suffix=.exe set executable suffix
841 --with-pydebug build with Py_DEBUG defined
842 --with-libs='lib1 ...' link against additional libs
843 --with-signal-module disable/enable signal module
844 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
845 --with(out)-threads=DIRECTORY disable/enable thread support
846 --with(out)-thread=DIRECTORY deprecated; use --with(out)-threads
847 --with-pth use GNU pth threading libraries
Jack Jansen7b8c7542002-04-14 20:12:41 +0000848 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +0000849 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwis11437992002-04-12 09:54:03 +0000850 --with(out)-pymalloc disable/enable specialized mallocs
851 --with-wctype-functions use wctype.h functions
852 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
853 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
854 --with-fpectl enable SIGFPE catching
855 --with-libm=STRING math library
856 --with-libc=STRING C library
857
858Some influential environment variables:
859 CC C compiler command
860 CFLAGS C compiler flags
861 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
862 nonstandard directory <lib dir>
863 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
864 headers in a nonstandard directory <include dir>
865 CPP C preprocessor
866
867Use these variables to override the choices made by `configure' or to help
868it to find libraries and programs with nonstandard names/locations.
869
870_ACEOF
871fi
872
873if test "$ac_init_help" = "recursive"; then
874 # If there are subdirs, report their specific --help.
875 ac_popdir=`pwd`
876 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
877 test -d $ac_dir || continue
878 ac_builddir=.
879
880if test "$ac_dir" != .; then
881 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
882 # A "../" for each directory in $ac_dir_suffix.
883 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
884else
885 ac_dir_suffix= ac_top_builddir=
886fi
887
888case $srcdir in
889 .) # No --srcdir option. We are building in place.
890 ac_srcdir=.
891 if test -z "$ac_top_builddir"; then
892 ac_top_srcdir=.
893 else
894 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
895 fi ;;
896 [\\/]* | ?:[\\/]* ) # Absolute path.
897 ac_srcdir=$srcdir$ac_dir_suffix;
898 ac_top_srcdir=$srcdir ;;
899 *) # Relative path.
900 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
901 ac_top_srcdir=$ac_top_builddir$srcdir ;;
902esac
903# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
904# absolute.
905ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise4826582002-10-26 13:33:00 +0000906ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000907ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
908ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
909
910 cd $ac_dir
911 # Check for guested configure; otherwise get Cygnus style configure.
912 if test -f $ac_srcdir/configure.gnu; then
913 echo
914 $SHELL $ac_srcdir/configure.gnu --help=recursive
915 elif test -f $ac_srcdir/configure; then
916 echo
917 $SHELL $ac_srcdir/configure --help=recursive
918 elif test -f $ac_srcdir/configure.ac ||
919 test -f $ac_srcdir/configure.in; then
920 echo
921 $ac_configure --help
922 else
923 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
924 fi
925 cd $ac_popdir
926 done
927fi
928
929test -n "$ac_init_help" && exit 0
930if $ac_init_version; then
931 cat <<\_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000932python configure 2.3
933generated by GNU Autoconf 2.53
Martin v. Löwis11437992002-04-12 09:54:03 +0000934
935Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
936Free Software Foundation, Inc.
937This configure script is free software; the Free Software Foundation
938gives unlimited permission to copy, distribute and modify it.
939_ACEOF
940 exit 0
941fi
942exec 5>config.log
943cat >&5 <<_ACEOF
944This file contains any messages produced by compilers while
945running configure, to aid debugging if configure makes a mistake.
946
Martin v. Löwis88afe662002-10-26 13:47:44 +0000947It was created by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +0000948generated by GNU Autoconf 2.53. Invocation command line was
949
950 $ $0 $@
951
952_ACEOF
953{
954cat <<_ASUNAME
955## --------- ##
956## Platform. ##
957## --------- ##
958
959hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
960uname -m = `(uname -m) 2>/dev/null || echo unknown`
961uname -r = `(uname -r) 2>/dev/null || echo unknown`
962uname -s = `(uname -s) 2>/dev/null || echo unknown`
963uname -v = `(uname -v) 2>/dev/null || echo unknown`
964
965/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
966/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
967
968/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
969/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
970/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
971hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
972/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
973/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
974/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
975
976_ASUNAME
977
978as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
979for as_dir in $PATH
980do
981 IFS=$as_save_IFS
982 test -z "$as_dir" && as_dir=.
983 echo "PATH: $as_dir"
984done
985
986} >&5
987
988cat >&5 <<_ACEOF
989
990
991## ----------- ##
992## Core tests. ##
993## ----------- ##
994
995_ACEOF
996
997
998# Keep a trace of the command line.
999# Strip out --no-create and --no-recursion so they do not pile up.
1000# Also quote any args containing shell meta-characters.
1001ac_configure_args=
1002ac_sep=
1003for ac_arg
1004do
1005 case $ac_arg in
1006 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1007 | --no-cr | --no-c | -n ) continue ;;
1008 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1009 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1010 continue ;;
1011 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1012 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1013 esac
1014 case " $ac_configure_args " in
1015 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1016 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1017 ac_sep=" " ;;
1018 esac
1019 # Get rid of the leading space.
1020done
1021
1022# When interrupted or exit'd, cleanup temporary files, and complete
1023# config.log. We remove comments because anyway the quotes in there
1024# would cause problems or look ugly.
1025# WARNING: Be sure not to use single quotes in there, as some shells,
1026# such as our DU 5.0 friend, will then `close' the trap.
1027trap 'exit_status=$?
1028 # Save into config.log some information that might help in debugging.
1029 {
1030 echo
1031 cat <<\_ASBOX
1032## ---------------- ##
1033## Cache variables. ##
1034## ---------------- ##
1035_ASBOX
1036 echo
1037 # The following way of writing the cache mishandles newlines in values,
1038{
1039 (set) 2>&1 |
1040 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1041 *ac_space=\ *)
1042 sed -n \
1043 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1044 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1045 ;;
1046 *)
1047 sed -n \
1048 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1049 ;;
1050 esac;
1051}
1052 echo
1053 if test -s confdefs.h; then
1054 cat <<\_ASBOX
1055## ----------- ##
1056## confdefs.h. ##
1057## ----------- ##
1058_ASBOX
1059 echo
1060 sed "/^$/d" confdefs.h
1061 echo
1062 fi
1063 test "$ac_signal" != 0 &&
1064 echo "$as_me: caught signal $ac_signal"
1065 echo "$as_me: exit $exit_status"
1066 } >&5
1067 rm -f core core.* *.core &&
1068 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1069 exit $exit_status
1070 ' 0
1071for ac_signal in 1 2 13 15; do
1072 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1073done
1074ac_signal=0
1075
1076# confdefs.h avoids OS command line length limits that DEFS can exceed.
1077rm -rf conftest* confdefs.h
1078# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1079echo >confdefs.h
1080
1081# Predefined preprocessor variables.
1082
1083cat >>confdefs.h <<_ACEOF
1084#define PACKAGE_NAME "$PACKAGE_NAME"
1085_ACEOF
1086
1087
1088cat >>confdefs.h <<_ACEOF
1089#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1090_ACEOF
1091
1092
1093cat >>confdefs.h <<_ACEOF
1094#define PACKAGE_VERSION "$PACKAGE_VERSION"
1095_ACEOF
1096
1097
1098cat >>confdefs.h <<_ACEOF
1099#define PACKAGE_STRING "$PACKAGE_STRING"
1100_ACEOF
1101
1102
1103cat >>confdefs.h <<_ACEOF
1104#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1105_ACEOF
1106
1107
1108# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001109# Prefer explicitly selected file to automatically selected ones.
1110if test -z "$CONFIG_SITE"; then
1111 if test "x$prefix" != xNONE; then
1112 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1113 else
1114 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1115 fi
1116fi
1117for ac_site_file in $CONFIG_SITE; do
1118 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1120echo "$as_me: loading site script $ac_site_file" >&6;}
1121 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001122 . "$ac_site_file"
1123 fi
1124done
1125
1126if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 # Some versions of bash will fail to source /dev/null (special
1128 # files actually), so we avoid doing that.
1129 if test -f "$cache_file"; then
1130 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1131echo "$as_me: loading cache $cache_file" >&6;}
1132 case $cache_file in
1133 [\\/]* | ?:[\\/]* ) . $cache_file;;
1134 *) . ./$cache_file;;
1135 esac
1136 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137else
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1139echo "$as_me: creating cache $cache_file" >&6;}
1140 >$cache_file
1141fi
1142
1143# Check that the precious variables saved in the cache have kept the same
1144# value.
1145ac_cache_corrupted=false
1146for ac_var in `(set) 2>&1 |
1147 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1148 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1149 eval ac_new_set=\$ac_env_${ac_var}_set
1150 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1151 eval ac_new_val="\$ac_env_${ac_var}_value"
1152 case $ac_old_set,$ac_new_set in
1153 set,)
1154 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1155echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1156 ac_cache_corrupted=: ;;
1157 ,set)
1158 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1159echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1160 ac_cache_corrupted=: ;;
1161 ,);;
1162 *)
1163 if test "x$ac_old_val" != "x$ac_new_val"; then
1164 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1165echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1166 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1167echo "$as_me: former value: $ac_old_val" >&2;}
1168 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1169echo "$as_me: current value: $ac_new_val" >&2;}
1170 ac_cache_corrupted=:
1171 fi;;
1172 esac
1173 # Pass precious variables to config.status.
1174 if test "$ac_new_set" = set; then
1175 case $ac_new_val in
1176 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1177 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1178 *) ac_arg=$ac_var=$ac_new_val ;;
1179 esac
1180 case " $ac_configure_args " in
1181 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1182 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1183 esac
1184 fi
1185done
1186if $ac_cache_corrupted; then
1187 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1188echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1189 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1190echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1191 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192fi
1193
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001196ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1197ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1198ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199
Guido van Rossum627b2d71993-12-24 10:39:16 +00001200
Michael W. Hudson54241132001-12-07 15:38:26 +00001201
1202
Guido van Rossum627b2d71993-12-24 10:39:16 +00001203
Martin v. Löwis11437992002-04-12 09:54:03 +00001204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
Martin v. Löwis88afe662002-10-26 13:47:44 +00001217
1218
1219
1220
1221
1222
1223
1224
1225
Martin v. Löwis11437992002-04-12 09:54:03 +00001226ac_config_headers="$ac_config_headers pyconfig.h"
1227
1228
1229# This is for stuff that absolutely must end up in pyconfig.h.
1230# Please use pyport.h instead, if possible.
1231
1232
1233
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001234
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001235VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001236
Martin v. Löwis1142de32002-03-29 16:28:31 +00001237
1238SOVERSION=1.0
1239
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001240# The later defininition of _XOPEN_SOURCE disables certain features
1241# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1242
1243cat >>confdefs.h <<\_ACEOF
1244#define _GNU_SOURCE 1
1245_ACEOF
1246
1247
1248# The definition of _GNU_SOURCE potentially causes a change of the value
1249# of _XOPEN_SOURCE. So define it only conditionally.
1250
1251
1252cat >>confdefs.h <<\_ACEOF
1253#define _XOPEN_SOURCE 500
1254_ACEOF
1255
1256
Martin v. Löwise4826582002-10-26 13:33:00 +00001257# On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition
1258# of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else several APIs
1259# are not declared. Since this is also needed in some cases for HP-UX,
1260# we define it globally.
1261
1262cat >>confdefs.h <<\_ACEOF
1263#define _XOPEN_SOURCE_EXTENDED 1
1264_ACEOF
1265
1266
1267cat >>confdefs.h <<\_ACEOF
1268#define _POSIX_C_SOURCE 199506L
1269_ACEOF
1270
1271
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001272# Arguments passed to configure.
1273
1274CONFIG_ARGS="$ac_configure_args"
1275
Michael W. Hudson54241132001-12-07 15:38:26 +00001276
Jack Jansene578a632001-08-15 01:27:14 +00001277# Check whether --enable-framework or --disable-framework was given.
1278if test "${enable_framework+set}" = set; then
1279 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001280
Jack Jansene578a632001-08-15 01:27:14 +00001281 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001283 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001284 esac
1285 case $enableval in
1286 no)
1287 PYTHONFRAMEWORK=
1288 PYTHONFRAMEWORKDIR=no-framework
1289 PYTHONFRAMEWORKPREFIX=
1290 PYTHONFRAMEWORKINSTALLDIR=
1291 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001292 ;;
1293 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001294 PYTHONFRAMEWORK=Python
1295 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001296 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001297 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1298 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001299 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001300
Guido van Rossum563e7081996-09-10 18:20:48 +00001301else
Martin v. Löwis11437992002-04-12 09:54:03 +00001302
Jack Jansene578a632001-08-15 01:27:14 +00001303 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001304 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001305 PYTHONFRAMEWORKPREFIX=
1306 PYTHONFRAMEWORKINSTALLDIR=
1307 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001310
1311
1312
1313
Jack Jansene578a632001-08-15 01:27:14 +00001314
1315##AC_ARG_WITH(dyld,
1316##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1317##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001318# Set name for machine-dependent library files
1319
Martin v. Löwis11437992002-04-12 09:54:03 +00001320echo "$as_me:$LINENO: checking MACHDEP" >&5
1321echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001322if test -z "$MACHDEP"
1323then
Guido van Rossum563e7081996-09-10 18:20:48 +00001324 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001325 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1326 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001327 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001328 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001329 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001330 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001331 ac_md_system=`echo $ac_sys_system |
1332 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1333 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001334 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001335 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001336
Guido van Rossum07397971997-04-29 21:49:50 +00001337 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001338 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001339 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001340 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001341 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001342 esac
1343fi
Guido van Rossum91922671997-10-09 20:24:13 +00001344
1345#
1346# SGI compilers allow the specification of the both the ABI and the
1347# ISA on the command line. Depending on the values of these switches,
1348# different and often incompatable code will be generated.
1349#
1350# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1351# thus supply support for various ABI/ISA combinations. The MACHDEP
1352# variable is also adjusted.
1353#
1354
1355if test ! -z "$SGI_ABI"
1356then
1357 CC="cc $SGI_ABI"
1358 LDFLAGS="$SGI_ABI $LDFLAGS"
1359 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001361echo "$as_me:$LINENO: result: $MACHDEP" >&5
1362echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001363
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001365echo "$as_me:$LINENO: checking for --without-gcc" >&5
1366echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1367
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001368# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001369if test "${with_gcc+set}" = set; then
1370 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001371
Guido van Rossum7f43da71994-08-01 12:15:30 +00001372 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001373 no) CC=cc
1374 without_gcc=yes;;
1375 yes) CC=gcc
1376 without_gcc=no;;
1377 *) CC=$withval
1378 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001379 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001380else
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001382 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001383 AIX*) CC=cc_r
1384 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001385 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001386 case $BE_HOST_CPU in
1387 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001388 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001389 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001390 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001391 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001392 ;;
1393 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001394 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001395 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001396 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001397 ;;
1398 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1400echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1401 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001402 ;;
1403 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001404 AR="\$(srcdir)/Modules/ar_beos"
1405 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001406 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001407 Monterey*)
1408 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001409 without_gcc=;;
1410 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001411 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001412fi;
1413echo "$as_me:$LINENO: result: $without_gcc" >&5
1414echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001415
1416
Guido van Rossum95012191999-12-16 17:50:52 +00001417
Fred Drakea1a84e72001-03-06 05:52:16 +00001418MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001419echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1420echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1421
Guido van Rossum95012191999-12-16 17:50:52 +00001422# Check whether --with-cxx or --without-cxx was given.
1423if test "${with_cxx+set}" = set; then
1424 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
Martin v. Löwis22352952000-12-13 17:37:02 +00001426 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001427 case $withval in
1428 no) CXX=
1429 with_cxx=no;;
1430 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001431 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001432 with_cxx=$withval;;
1433 esac
1434else
Martin v. Löwis11437992002-04-12 09:54:03 +00001435
Guido van Rossum95012191999-12-16 17:50:52 +00001436 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001437 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001438
Martin v. Löwis11437992002-04-12 09:54:03 +00001439fi;
1440echo "$as_me:$LINENO: result: $with_cxx" >&5
1441echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001442
1443if test "$with_cxx" = "yes"
1444then
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1446echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1447 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001448fi
1449
1450
1451
1452
Martin v. Löwis11437992002-04-12 09:54:03 +00001453if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001454then
1455 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1456do
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 # 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 +00001458set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001459echo "$as_me:$LINENO: checking for $ac_word" >&5
1460echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1461if test "${ac_cv_prog_CXX+set}" = set; then
1462 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001463else
1464 if test -n "$CXX"; then
1465 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1466else
Martin v. Löwis11437992002-04-12 09:54:03 +00001467as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1468for as_dir in $PATH
1469do
1470 IFS=$as_save_IFS
1471 test -z "$as_dir" && as_dir=.
1472 for ac_exec_ext in '' $ac_executable_extensions; do
1473 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1474 ac_cv_prog_CXX="$ac_prog"
1475 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1476 break 2
1477 fi
1478done
1479done
1480
Martin v. Löwis22352952000-12-13 17:37:02 +00001481fi
1482fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001483CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001484if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001485 echo "$as_me:$LINENO: result: $CXX" >&5
1486echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001487else
Martin v. Löwis11437992002-04-12 09:54:03 +00001488 echo "$as_me:$LINENO: result: no" >&5
1489echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001490fi
1491
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001493done
1494test -n "$CXX" || CXX="notfound"
1495
1496 if test "$CXX" = "notfound"
1497 then
1498 CXX=
1499 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001500 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001501ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001502ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1503ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1504ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1505 cat >conftest.$ac_ext <<_ACEOF
1506#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001507#include "confdefs.h"
1508
Martin v. Löwis11437992002-04-12 09:54:03 +00001509#ifdef F77_DUMMY_MAIN
1510# ifdef __cplusplus
1511 extern "C"
1512# endif
1513 int F77_DUMMY_MAIN() { return 1; }
1514#endif
1515int
1516main ()
1517{
Michael W. Hudson54241132001-12-07 15:38:26 +00001518
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 ;
1520 return 0;
1521}
1522_ACEOF
1523ac_clean_files_save=$ac_clean_files
1524ac_clean_files="$ac_clean_files a.out a.exe"
1525# Try to create an executable without -o first, disregard a.out.
1526# It will help us diagnose broken compilers, and finding out an intuition
1527# of exeext.
1528echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1529echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1530ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1531if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1532 (eval $ac_link_default) 2>&5
1533 ac_status=$?
1534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1535 (exit $ac_status); }; then
1536 # Find the output, starting from the most likely. This scheme is
1537# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1538# resort.
1539
1540# Be careful to initialize this variable, since it used to be cached.
1541# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1542ac_cv_exeext=
1543for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1544 ls a.out conftest 2>/dev/null;
1545 ls a.* conftest.* 2>/dev/null`; do
1546 case $ac_file in
1547 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1548 a.out ) # We found the default executable, but exeext='' is most
1549 # certainly right.
1550 break;;
1551 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1552 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1553 export ac_cv_exeext
1554 break;;
1555 * ) break;;
1556 esac
1557done
1558else
1559 echo "$as_me: failed program was:" >&5
1560cat conftest.$ac_ext >&5
1561{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1562echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1563 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001564fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001565
1566ac_exeext=$ac_cv_exeext
1567echo "$as_me:$LINENO: result: $ac_file" >&5
1568echo "${ECHO_T}$ac_file" >&6
1569
1570# Check the compiler produces executables we can run. If not, either
1571# the compiler is broken, or we cross compile.
1572echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1573echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1574# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1575# If not cross compiling, check that we can run a simple program.
1576if test "$cross_compiling" != yes; then
1577 if { ac_try='./$ac_file'
1578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1579 (eval $ac_try) 2>&5
1580 ac_status=$?
1581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1582 (exit $ac_status); }; }; then
1583 cross_compiling=no
1584 else
1585 if test "$cross_compiling" = maybe; then
1586 cross_compiling=yes
1587 else
1588 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1589If you meant to cross compile, use \`--host'." >&5
1590echo "$as_me: error: cannot run C++ compiled programs.
1591If you meant to cross compile, use \`--host'." >&2;}
1592 { (exit 1); exit 1; }; }
1593 fi
1594 fi
1595fi
1596echo "$as_me:$LINENO: result: yes" >&5
1597echo "${ECHO_T}yes" >&6
1598
1599rm -f a.out a.exe conftest$ac_cv_exeext
1600ac_clean_files=$ac_clean_files_save
1601# Check the compiler produces executables we can run. If not, either
1602# the compiler is broken, or we cross compile.
1603echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1604echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1605echo "$as_me:$LINENO: result: $cross_compiling" >&5
1606echo "${ECHO_T}$cross_compiling" >&6
1607
1608echo "$as_me:$LINENO: checking for suffix of executables" >&5
1609echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1610if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1611 (eval $ac_link) 2>&5
1612 ac_status=$?
1613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1614 (exit $ac_status); }; then
1615 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1616# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1617# work properly (i.e., refer to `conftest.exe'), while it won't with
1618# `rm'.
1619for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1620 case $ac_file in
1621 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1622 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1623 export ac_cv_exeext
1624 break;;
1625 * ) break;;
1626 esac
1627done
1628else
1629 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1630echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1631 { (exit 1); exit 1; }; }
1632fi
1633
1634rm -f conftest$ac_cv_exeext
1635echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1636echo "${ECHO_T}$ac_cv_exeext" >&6
1637
1638rm -f conftest.$ac_ext
1639EXEEXT=$ac_cv_exeext
1640ac_exeext=$EXEEXT
1641
1642 ac_ext=c
1643ac_cpp='$CPP $CPPFLAGS'
1644ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1645ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1646ac_compiler_gnu=$ac_cv_c_compiler_gnu
1647
1648
Martin v. Löwis22352952000-12-13 17:37:02 +00001649
1650 fi
1651fi
1652
Guido van Rossum8b131c51995-03-09 14:10:13 +00001653# If the user switches compilers, we can't believe the cache
1654if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1655then
Martin v. Löwis11437992002-04-12 09:54:03 +00001656 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1657(it is also a good idea to do 'make clean' before compiling)" >&5
1658echo "$as_me: error: cached CC is different -- throw away $cache_file
1659(it is also a good idea to do 'make clean' before compiling)" >&2;}
1660 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001661fi
1662
Martin v. Löwis11437992002-04-12 09:54:03 +00001663ac_ext=c
1664ac_cpp='$CPP $CPPFLAGS'
1665ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1666ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1667ac_compiler_gnu=$ac_cv_c_compiler_gnu
1668if test -n "$ac_tool_prefix"; then
1669 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1670set dummy ${ac_tool_prefix}gcc; ac_word=$2
1671echo "$as_me:$LINENO: checking for $ac_word" >&5
1672echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1673if test "${ac_cv_prog_CC+set}" = set; then
1674 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001675else
1676 if test -n "$CC"; then
1677 ac_cv_prog_CC="$CC" # Let the user override the test.
1678else
Martin v. Löwis11437992002-04-12 09:54:03 +00001679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1680for as_dir in $PATH
1681do
1682 IFS=$as_save_IFS
1683 test -z "$as_dir" && as_dir=.
1684 for ac_exec_ext in '' $ac_executable_extensions; do
1685 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1686 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1687 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1688 break 2
1689 fi
1690done
1691done
1692
Jack Jansendd19cf82001-12-06 22:36:17 +00001693fi
1694fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001695CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001696if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001697 echo "$as_me:$LINENO: result: $CC" >&5
1698echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001699else
Martin v. Löwis11437992002-04-12 09:54:03 +00001700 echo "$as_me:$LINENO: result: no" >&5
1701echo "${ECHO_T}no" >&6
1702fi
1703
1704fi
1705if test -z "$ac_cv_prog_CC"; then
1706 ac_ct_CC=$CC
1707 # Extract the first word of "gcc", so it can be a program name with args.
1708set dummy gcc; ac_word=$2
1709echo "$as_me:$LINENO: checking for $ac_word" >&5
1710echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1711if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1712 echo $ECHO_N "(cached) $ECHO_C" >&6
1713else
1714 if test -n "$ac_ct_CC"; then
1715 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1716else
1717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1718for as_dir in $PATH
1719do
1720 IFS=$as_save_IFS
1721 test -z "$as_dir" && as_dir=.
1722 for ac_exec_ext in '' $ac_executable_extensions; do
1723 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1724 ac_cv_prog_ac_ct_CC="gcc"
1725 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1726 break 2
1727 fi
1728done
1729done
1730
1731fi
1732fi
1733ac_ct_CC=$ac_cv_prog_ac_ct_CC
1734if test -n "$ac_ct_CC"; then
1735 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1736echo "${ECHO_T}$ac_ct_CC" >&6
1737else
1738 echo "$as_me:$LINENO: result: no" >&5
1739echo "${ECHO_T}no" >&6
1740fi
1741
1742 CC=$ac_ct_CC
1743else
1744 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001745fi
1746
Jack Jansendd19cf82001-12-06 22:36:17 +00001747if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001748 if test -n "$ac_tool_prefix"; then
1749 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1750set dummy ${ac_tool_prefix}cc; ac_word=$2
1751echo "$as_me:$LINENO: checking for $ac_word" >&5
1752echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1753if test "${ac_cv_prog_CC+set}" = set; then
1754 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001755else
1756 if test -n "$CC"; then
1757 ac_cv_prog_CC="$CC" # Let the user override the test.
1758else
Martin v. Löwis11437992002-04-12 09:54:03 +00001759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1760for as_dir in $PATH
1761do
1762 IFS=$as_save_IFS
1763 test -z "$as_dir" && as_dir=.
1764 for ac_exec_ext in '' $ac_executable_extensions; do
1765 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1766 ac_cv_prog_CC="${ac_tool_prefix}cc"
1767 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1768 break 2
1769 fi
1770done
1771done
1772
1773fi
1774fi
1775CC=$ac_cv_prog_CC
1776if test -n "$CC"; then
1777 echo "$as_me:$LINENO: result: $CC" >&5
1778echo "${ECHO_T}$CC" >&6
1779else
1780 echo "$as_me:$LINENO: result: no" >&5
1781echo "${ECHO_T}no" >&6
1782fi
1783
1784fi
1785if test -z "$ac_cv_prog_CC"; then
1786 ac_ct_CC=$CC
1787 # Extract the first word of "cc", so it can be a program name with args.
1788set dummy cc; ac_word=$2
1789echo "$as_me:$LINENO: checking for $ac_word" >&5
1790echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1791if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1792 echo $ECHO_N "(cached) $ECHO_C" >&6
1793else
1794 if test -n "$ac_ct_CC"; then
1795 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1796else
1797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1798for as_dir in $PATH
1799do
1800 IFS=$as_save_IFS
1801 test -z "$as_dir" && as_dir=.
1802 for ac_exec_ext in '' $ac_executable_extensions; do
1803 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1804 ac_cv_prog_ac_ct_CC="cc"
1805 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1806 break 2
1807 fi
1808done
1809done
1810
1811fi
1812fi
1813ac_ct_CC=$ac_cv_prog_ac_ct_CC
1814if test -n "$ac_ct_CC"; then
1815 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1816echo "${ECHO_T}$ac_ct_CC" >&6
1817else
1818 echo "$as_me:$LINENO: result: no" >&5
1819echo "${ECHO_T}no" >&6
1820fi
1821
1822 CC=$ac_ct_CC
1823else
1824 CC="$ac_cv_prog_CC"
1825fi
1826
1827fi
1828if test -z "$CC"; then
1829 # Extract the first word of "cc", so it can be a program name with args.
1830set dummy cc; ac_word=$2
1831echo "$as_me:$LINENO: checking for $ac_word" >&5
1832echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1833if test "${ac_cv_prog_CC+set}" = set; then
1834 echo $ECHO_N "(cached) $ECHO_C" >&6
1835else
1836 if test -n "$CC"; then
1837 ac_cv_prog_CC="$CC" # Let the user override the test.
1838else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001839 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1841for as_dir in $PATH
1842do
1843 IFS=$as_save_IFS
1844 test -z "$as_dir" && as_dir=.
1845 for ac_exec_ext in '' $ac_executable_extensions; do
1846 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1847 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1848 ac_prog_rejected=yes
1849 continue
1850 fi
1851 ac_cv_prog_CC="cc"
1852 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1853 break 2
1854 fi
1855done
1856done
1857
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001858if test $ac_prog_rejected = yes; then
1859 # We found a bogon in the path, so make sure we never use it.
1860 set dummy $ac_cv_prog_CC
1861 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001862 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001863 # We chose a different compiler from the bogus one.
1864 # However, it has the same basename, so the bogon will be chosen
1865 # first if we set CC to just the basename; use the full file name.
1866 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001867 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001868 shift
1869 ac_cv_prog_CC="$@"
1870 fi
1871fi
1872fi
1873fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001874CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001875if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001876 echo "$as_me:$LINENO: result: $CC" >&5
1877echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001878else
Martin v. Löwis11437992002-04-12 09:54:03 +00001879 echo "$as_me:$LINENO: result: no" >&5
1880echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001881fi
1882
Martin v. Löwis11437992002-04-12 09:54:03 +00001883fi
1884if test -z "$CC"; then
1885 if test -n "$ac_tool_prefix"; then
1886 for ac_prog in cl
1887 do
1888 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1889set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1890echo "$as_me:$LINENO: checking for $ac_word" >&5
1891echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1892if test "${ac_cv_prog_CC+set}" = set; then
1893 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001894else
1895 if test -n "$CC"; then
1896 ac_cv_prog_CC="$CC" # Let the user override the test.
1897else
Martin v. Löwis11437992002-04-12 09:54:03 +00001898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1899for as_dir in $PATH
1900do
1901 IFS=$as_save_IFS
1902 test -z "$as_dir" && as_dir=.
1903 for ac_exec_ext in '' $ac_executable_extensions; do
1904 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1905 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1906 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1907 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001908 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001909done
1910done
1911
1912fi
1913fi
1914CC=$ac_cv_prog_CC
1915if test -n "$CC"; then
1916 echo "$as_me:$LINENO: result: $CC" >&5
1917echo "${ECHO_T}$CC" >&6
1918else
1919 echo "$as_me:$LINENO: result: no" >&5
1920echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001921fi
1922
Martin v. Löwis11437992002-04-12 09:54:03 +00001923 test -n "$CC" && break
1924 done
1925fi
1926if test -z "$CC"; then
1927 ac_ct_CC=$CC
1928 for ac_prog in cl
1929do
1930 # Extract the first word of "$ac_prog", so it can be a program name with args.
1931set dummy $ac_prog; ac_word=$2
1932echo "$as_me:$LINENO: checking for $ac_word" >&5
1933echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1934if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1935 echo $ECHO_N "(cached) $ECHO_C" >&6
1936else
1937 if test -n "$ac_ct_CC"; then
1938 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1939else
1940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1941for as_dir in $PATH
1942do
1943 IFS=$as_save_IFS
1944 test -z "$as_dir" && as_dir=.
1945 for ac_exec_ext in '' $ac_executable_extensions; do
1946 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1947 ac_cv_prog_ac_ct_CC="$ac_prog"
1948 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1949 break 2
1950 fi
1951done
1952done
Jack Jansendd19cf82001-12-06 22:36:17 +00001953
Martin v. Löwis11437992002-04-12 09:54:03 +00001954fi
1955fi
1956ac_ct_CC=$ac_cv_prog_ac_ct_CC
1957if test -n "$ac_ct_CC"; then
1958 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1959echo "${ECHO_T}$ac_ct_CC" >&6
1960else
1961 echo "$as_me:$LINENO: result: no" >&5
1962echo "${ECHO_T}no" >&6
1963fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001964
Martin v. Löwis11437992002-04-12 09:54:03 +00001965 test -n "$ac_ct_CC" && break
1966done
Michael W. Hudson54241132001-12-07 15:38:26 +00001967
Martin v. Löwis11437992002-04-12 09:54:03 +00001968 CC=$ac_ct_CC
1969fi
1970
1971fi
1972
1973
1974test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1975echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1976 { (exit 1); exit 1; }; }
1977
1978# Provide some information about the compiler.
1979echo "$as_me:$LINENO:" \
1980 "checking for C compiler version" >&5
1981ac_compiler=`set X $ac_compile; echo $2`
1982{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1983 (eval $ac_compiler --version </dev/null >&5) 2>&5
1984 ac_status=$?
1985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1986 (exit $ac_status); }
1987{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1988 (eval $ac_compiler -v </dev/null >&5) 2>&5
1989 ac_status=$?
1990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1991 (exit $ac_status); }
1992{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1993 (eval $ac_compiler -V </dev/null >&5) 2>&5
1994 ac_status=$?
1995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1996 (exit $ac_status); }
1997
1998cat >conftest.$ac_ext <<_ACEOF
1999#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002000#include "confdefs.h"
2001
Martin v. Löwis11437992002-04-12 09:54:03 +00002002#ifdef F77_DUMMY_MAIN
2003# ifdef __cplusplus
2004 extern "C"
2005# endif
2006 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002007#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002008int
2009main ()
2010{
2011
2012 ;
2013 return 0;
2014}
2015_ACEOF
2016ac_clean_files_save=$ac_clean_files
2017ac_clean_files="$ac_clean_files a.out a.exe"
2018# Try to create an executable without -o first, disregard a.out.
2019# It will help us diagnose broken compilers, and finding out an intuition
2020# of exeext.
2021echo "$as_me:$LINENO: checking for C compiler default output" >&5
2022echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2023ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2024if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2025 (eval $ac_link_default) 2>&5
2026 ac_status=$?
2027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2028 (exit $ac_status); }; then
2029 # Find the output, starting from the most likely. This scheme is
2030# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2031# resort.
2032
2033# Be careful to initialize this variable, since it used to be cached.
2034# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2035ac_cv_exeext=
2036for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2037 ls a.out conftest 2>/dev/null;
2038 ls a.* conftest.* 2>/dev/null`; do
2039 case $ac_file in
2040 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2041 a.out ) # We found the default executable, but exeext='' is most
2042 # certainly right.
2043 break;;
2044 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2045 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2046 export ac_cv_exeext
2047 break;;
2048 * ) break;;
2049 esac
2050done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002051else
Martin v. Löwis11437992002-04-12 09:54:03 +00002052 echo "$as_me: failed program was:" >&5
2053cat conftest.$ac_ext >&5
2054{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2055echo "$as_me: error: C compiler cannot create executables" >&2;}
2056 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002057fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002058
Martin v. Löwis11437992002-04-12 09:54:03 +00002059ac_exeext=$ac_cv_exeext
2060echo "$as_me:$LINENO: result: $ac_file" >&5
2061echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002062
Martin v. Löwis11437992002-04-12 09:54:03 +00002063# Check the compiler produces executables we can run. If not, either
2064# the compiler is broken, or we cross compile.
2065echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2066echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2067# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2068# If not cross compiling, check that we can run a simple program.
2069if test "$cross_compiling" != yes; then
2070 if { ac_try='./$ac_file'
2071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2072 (eval $ac_try) 2>&5
2073 ac_status=$?
2074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2075 (exit $ac_status); }; }; then
2076 cross_compiling=no
2077 else
2078 if test "$cross_compiling" = maybe; then
2079 cross_compiling=yes
2080 else
2081 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2082If you meant to cross compile, use \`--host'." >&5
2083echo "$as_me: error: cannot run C compiled programs.
2084If you meant to cross compile, use \`--host'." >&2;}
2085 { (exit 1); exit 1; }; }
2086 fi
2087 fi
2088fi
2089echo "$as_me:$LINENO: result: yes" >&5
2090echo "${ECHO_T}yes" >&6
2091
2092rm -f a.out a.exe conftest$ac_cv_exeext
2093ac_clean_files=$ac_clean_files_save
2094# Check the compiler produces executables we can run. If not, either
2095# the compiler is broken, or we cross compile.
2096echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2097echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2098echo "$as_me:$LINENO: result: $cross_compiling" >&5
2099echo "${ECHO_T}$cross_compiling" >&6
2100
2101echo "$as_me:$LINENO: checking for suffix of executables" >&5
2102echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2103if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2104 (eval $ac_link) 2>&5
2105 ac_status=$?
2106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2107 (exit $ac_status); }; then
2108 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2109# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2110# work properly (i.e., refer to `conftest.exe'), while it won't with
2111# `rm'.
2112for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2113 case $ac_file in
2114 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2115 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2116 export ac_cv_exeext
2117 break;;
2118 * ) break;;
2119 esac
2120done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002121else
Martin v. Löwis11437992002-04-12 09:54:03 +00002122 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2123echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2124 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002125fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002126
Martin v. Löwis11437992002-04-12 09:54:03 +00002127rm -f conftest$ac_cv_exeext
2128echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2129echo "${ECHO_T}$ac_cv_exeext" >&6
2130
2131rm -f conftest.$ac_ext
2132EXEEXT=$ac_cv_exeext
2133ac_exeext=$EXEEXT
2134echo "$as_me:$LINENO: checking for suffix of object files" >&5
2135echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2136if test "${ac_cv_objext+set}" = set; then
2137 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002138else
Martin v. Löwis11437992002-04-12 09:54:03 +00002139 cat >conftest.$ac_ext <<_ACEOF
2140#line $LINENO "configure"
2141#include "confdefs.h"
2142
2143#ifdef F77_DUMMY_MAIN
2144# ifdef __cplusplus
2145 extern "C"
2146# endif
2147 int F77_DUMMY_MAIN() { return 1; }
2148#endif
2149int
2150main ()
2151{
2152
2153 ;
2154 return 0;
2155}
2156_ACEOF
2157rm -f conftest.o conftest.obj
2158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2159 (eval $ac_compile) 2>&5
2160 ac_status=$?
2161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2162 (exit $ac_status); }; then
2163 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2164 case $ac_file in
2165 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2166 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2167 break;;
2168 esac
2169done
2170else
2171 echo "$as_me: failed program was:" >&5
2172cat conftest.$ac_ext >&5
2173{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2174echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2175 { (exit 1); exit 1; }; }
2176fi
2177
2178rm -f conftest.$ac_cv_objext conftest.$ac_ext
2179fi
2180echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2181echo "${ECHO_T}$ac_cv_objext" >&6
2182OBJEXT=$ac_cv_objext
2183ac_objext=$OBJEXT
2184echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2185echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2186if test "${ac_cv_c_compiler_gnu+set}" = set; then
2187 echo $ECHO_N "(cached) $ECHO_C" >&6
2188else
2189 cat >conftest.$ac_ext <<_ACEOF
2190#line $LINENO "configure"
2191#include "confdefs.h"
2192
2193#ifdef F77_DUMMY_MAIN
2194# ifdef __cplusplus
2195 extern "C"
2196# endif
2197 int F77_DUMMY_MAIN() { return 1; }
2198#endif
2199int
2200main ()
2201{
2202#ifndef __GNUC__
2203 choke me
2204#endif
2205
2206 ;
2207 return 0;
2208}
2209_ACEOF
2210rm -f conftest.$ac_objext
2211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2212 (eval $ac_compile) 2>&5
2213 ac_status=$?
2214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2215 (exit $ac_status); } &&
2216 { ac_try='test -s conftest.$ac_objext'
2217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2218 (eval $ac_try) 2>&5
2219 ac_status=$?
2220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2221 (exit $ac_status); }; }; then
2222 ac_compiler_gnu=yes
2223else
2224 echo "$as_me: failed program was:" >&5
2225cat conftest.$ac_ext >&5
2226ac_compiler_gnu=no
2227fi
2228rm -f conftest.$ac_objext conftest.$ac_ext
2229ac_cv_c_compiler_gnu=$ac_compiler_gnu
2230
2231fi
2232echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2233echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2234GCC=`test $ac_compiler_gnu = yes && echo yes`
2235ac_test_CFLAGS=${CFLAGS+set}
2236ac_save_CFLAGS=$CFLAGS
2237CFLAGS="-g"
2238echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2239echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2240if test "${ac_cv_prog_cc_g+set}" = set; then
2241 echo $ECHO_N "(cached) $ECHO_C" >&6
2242else
2243 cat >conftest.$ac_ext <<_ACEOF
2244#line $LINENO "configure"
2245#include "confdefs.h"
2246
2247#ifdef F77_DUMMY_MAIN
2248# ifdef __cplusplus
2249 extern "C"
2250# endif
2251 int F77_DUMMY_MAIN() { return 1; }
2252#endif
2253int
2254main ()
2255{
2256
2257 ;
2258 return 0;
2259}
2260_ACEOF
2261rm -f conftest.$ac_objext
2262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2263 (eval $ac_compile) 2>&5
2264 ac_status=$?
2265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2266 (exit $ac_status); } &&
2267 { ac_try='test -s conftest.$ac_objext'
2268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2269 (eval $ac_try) 2>&5
2270 ac_status=$?
2271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2272 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002273 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002274else
Martin v. Löwis11437992002-04-12 09:54:03 +00002275 echo "$as_me: failed program was:" >&5
2276cat conftest.$ac_ext >&5
2277ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002278fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002279rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002280fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002281echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2282echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002283if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002284 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002285elif test $ac_cv_prog_cc_g = yes; then
2286 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002287 CFLAGS="-g -O2"
2288 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002289 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002290 fi
2291else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002292 if test "$GCC" = yes; then
2293 CFLAGS="-O2"
2294 else
2295 CFLAGS=
2296 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002297fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002298# Some people use a C++ compiler to compile C. Since we use `exit',
2299# in C++ we need to declare it. In case someone uses the same compiler
2300# for both compiling C and C++ we need to have the C++ compiler decide
2301# the declaration of exit, since it's the most demanding environment.
2302cat >conftest.$ac_ext <<_ACEOF
2303#ifndef __cplusplus
2304 choke me
2305#endif
2306_ACEOF
2307rm -f conftest.$ac_objext
2308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2309 (eval $ac_compile) 2>&5
2310 ac_status=$?
2311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2312 (exit $ac_status); } &&
2313 { ac_try='test -s conftest.$ac_objext'
2314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2315 (eval $ac_try) 2>&5
2316 ac_status=$?
2317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2318 (exit $ac_status); }; }; then
2319 for ac_declaration in \
2320 ''\
2321 '#include <stdlib.h>' \
2322 'extern "C" void std::exit (int) throw (); using std::exit;' \
2323 'extern "C" void std::exit (int); using std::exit;' \
2324 'extern "C" void exit (int) throw ();' \
2325 'extern "C" void exit (int);' \
2326 'void exit (int);'
2327do
2328 cat >conftest.$ac_ext <<_ACEOF
2329#line $LINENO "configure"
2330#include "confdefs.h"
2331#include <stdlib.h>
2332$ac_declaration
2333#ifdef F77_DUMMY_MAIN
2334# ifdef __cplusplus
2335 extern "C"
2336# endif
2337 int F77_DUMMY_MAIN() { return 1; }
2338#endif
2339int
2340main ()
2341{
2342exit (42);
2343 ;
2344 return 0;
2345}
2346_ACEOF
2347rm -f conftest.$ac_objext
2348if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2349 (eval $ac_compile) 2>&5
2350 ac_status=$?
2351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2352 (exit $ac_status); } &&
2353 { ac_try='test -s conftest.$ac_objext'
2354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2355 (eval $ac_try) 2>&5
2356 ac_status=$?
2357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2358 (exit $ac_status); }; }; then
2359 :
2360else
2361 echo "$as_me: failed program was:" >&5
2362cat conftest.$ac_ext >&5
2363continue
2364fi
2365rm -f conftest.$ac_objext conftest.$ac_ext
2366 cat >conftest.$ac_ext <<_ACEOF
2367#line $LINENO "configure"
2368#include "confdefs.h"
2369$ac_declaration
2370#ifdef F77_DUMMY_MAIN
2371# ifdef __cplusplus
2372 extern "C"
2373# endif
2374 int F77_DUMMY_MAIN() { return 1; }
2375#endif
2376int
2377main ()
2378{
2379exit (42);
2380 ;
2381 return 0;
2382}
2383_ACEOF
2384rm -f conftest.$ac_objext
2385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2386 (eval $ac_compile) 2>&5
2387 ac_status=$?
2388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2389 (exit $ac_status); } &&
2390 { ac_try='test -s conftest.$ac_objext'
2391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2392 (eval $ac_try) 2>&5
2393 ac_status=$?
2394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2395 (exit $ac_status); }; }; then
2396 break
2397else
2398 echo "$as_me: failed program was:" >&5
2399cat conftest.$ac_ext >&5
2400fi
2401rm -f conftest.$ac_objext conftest.$ac_ext
2402done
2403rm -f conftest*
2404if test -n "$ac_declaration"; then
2405 echo '#ifdef __cplusplus' >>confdefs.h
2406 echo $ac_declaration >>confdefs.h
2407 echo '#endif' >>confdefs.h
2408fi
2409
2410else
2411 echo "$as_me: failed program was:" >&5
2412cat conftest.$ac_ext >&5
2413fi
2414rm -f conftest.$ac_objext conftest.$ac_ext
2415ac_ext=c
2416ac_cpp='$CPP $CPPFLAGS'
2417ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2418ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2419ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002420
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002421
2422# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002423
2424ac_ext=c
2425ac_cpp='$CPP $CPPFLAGS'
2426ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2427ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2428ac_compiler_gnu=$ac_cv_c_compiler_gnu
2429echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2430echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002431# On Suns, sometimes $CPP names a directory.
2432if test -n "$CPP" && test -d "$CPP"; then
2433 CPP=
2434fi
2435if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002436 if test "${ac_cv_prog_CPP+set}" = set; then
2437 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002438else
Martin v. Löwis11437992002-04-12 09:54:03 +00002439 # Double quotes because CPP needs to be expanded
2440 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2441 do
2442 ac_preproc_ok=false
2443for ac_c_preproc_warn_flag in '' yes
2444do
2445 # Use a header file that comes with gcc, so configuring glibc
2446 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002447 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002448 # not just through cpp. "Syntax error" is here to catch this case.
2449 cat >conftest.$ac_ext <<_ACEOF
2450#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002451#include "confdefs.h"
2452#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 Syntax error
2454_ACEOF
2455if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2456 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2457 ac_status=$?
2458 egrep -v '^ *\+' conftest.er1 >conftest.err
2459 rm -f conftest.er1
2460 cat conftest.err >&5
2461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2462 (exit $ac_status); } >/dev/null; then
2463 if test -s conftest.err; then
2464 ac_cpp_err=$ac_c_preproc_warn_flag
2465 else
2466 ac_cpp_err=
2467 fi
2468else
2469 ac_cpp_err=yes
2470fi
2471if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002472 :
2473else
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002475 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 # Broken: fails on valid input.
2477continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002478fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002479rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002480
Martin v. Löwis11437992002-04-12 09:54:03 +00002481 # OK, works on sane cases. Now check whether non-existent headers
2482 # can be detected and how.
2483 cat >conftest.$ac_ext <<_ACEOF
2484#line $LINENO "configure"
2485#include "confdefs.h"
2486#include <ac_nonexistent.h>
2487_ACEOF
2488if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2489 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2490 ac_status=$?
2491 egrep -v '^ *\+' conftest.er1 >conftest.err
2492 rm -f conftest.er1
2493 cat conftest.err >&5
2494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2495 (exit $ac_status); } >/dev/null; then
2496 if test -s conftest.err; then
2497 ac_cpp_err=$ac_c_preproc_warn_flag
2498 else
2499 ac_cpp_err=
2500 fi
2501else
2502 ac_cpp_err=yes
2503fi
2504if test -z "$ac_cpp_err"; then
2505 # Broken: success on invalid input.
2506continue
2507else
2508 echo "$as_me: failed program was:" >&5
2509 cat conftest.$ac_ext >&5
2510 # Passes both tests.
2511ac_preproc_ok=:
2512break
2513fi
2514rm -f conftest.err conftest.$ac_ext
2515
2516done
2517# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2518rm -f conftest.err conftest.$ac_ext
2519if $ac_preproc_ok; then
2520 break
2521fi
2522
2523 done
2524 ac_cv_prog_CPP=$CPP
2525
2526fi
2527 CPP=$ac_cv_prog_CPP
2528else
2529 ac_cv_prog_CPP=$CPP
2530fi
2531echo "$as_me:$LINENO: result: $CPP" >&5
2532echo "${ECHO_T}$CPP" >&6
2533ac_preproc_ok=false
2534for ac_c_preproc_warn_flag in '' yes
2535do
2536 # Use a header file that comes with gcc, so configuring glibc
2537 # with a fresh cross-compiler works.
2538 # On the NeXT, cc -E runs the code through the compiler's parser,
2539 # not just through cpp. "Syntax error" is here to catch this case.
2540 cat >conftest.$ac_ext <<_ACEOF
2541#line $LINENO "configure"
2542#include "confdefs.h"
2543#include <assert.h>
2544 Syntax error
2545_ACEOF
2546if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2547 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2548 ac_status=$?
2549 egrep -v '^ *\+' conftest.er1 >conftest.err
2550 rm -f conftest.er1
2551 cat conftest.err >&5
2552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2553 (exit $ac_status); } >/dev/null; then
2554 if test -s conftest.err; then
2555 ac_cpp_err=$ac_c_preproc_warn_flag
2556 else
2557 ac_cpp_err=
2558 fi
2559else
2560 ac_cpp_err=yes
2561fi
2562if test -z "$ac_cpp_err"; then
2563 :
2564else
2565 echo "$as_me: failed program was:" >&5
2566 cat conftest.$ac_ext >&5
2567 # Broken: fails on valid input.
2568continue
2569fi
2570rm -f conftest.err conftest.$ac_ext
2571
2572 # OK, works on sane cases. Now check whether non-existent headers
2573 # can be detected and how.
2574 cat >conftest.$ac_ext <<_ACEOF
2575#line $LINENO "configure"
2576#include "confdefs.h"
2577#include <ac_nonexistent.h>
2578_ACEOF
2579if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2580 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2581 ac_status=$?
2582 egrep -v '^ *\+' conftest.er1 >conftest.err
2583 rm -f conftest.er1
2584 cat conftest.err >&5
2585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2586 (exit $ac_status); } >/dev/null; then
2587 if test -s conftest.err; then
2588 ac_cpp_err=$ac_c_preproc_warn_flag
2589 else
2590 ac_cpp_err=
2591 fi
2592else
2593 ac_cpp_err=yes
2594fi
2595if test -z "$ac_cpp_err"; then
2596 # Broken: success on invalid input.
2597continue
2598else
2599 echo "$as_me: failed program was:" >&5
2600 cat conftest.$ac_ext >&5
2601 # Passes both tests.
2602ac_preproc_ok=:
2603break
2604fi
2605rm -f conftest.err conftest.$ac_ext
2606
2607done
2608# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2609rm -f conftest.err conftest.$ac_ext
2610if $ac_preproc_ok; then
2611 :
2612else
2613 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2614echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2615 { (exit 1); exit 1; }; }
2616fi
2617
2618ac_ext=c
2619ac_cpp='$CPP $CPPFLAGS'
2620ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2621ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2622ac_compiler_gnu=$ac_cv_c_compiler_gnu
2623
2624
2625
2626echo "$as_me:$LINENO: checking for AIX" >&5
2627echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2628cat >conftest.$ac_ext <<_ACEOF
2629#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002630#include "confdefs.h"
2631#ifdef _AIX
2632 yes
2633#endif
2634
Martin v. Löwis11437992002-04-12 09:54:03 +00002635_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002636if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2637 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 echo "$as_me:$LINENO: result: yes" >&5
2639echo "${ECHO_T}yes" >&6
2640cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002641#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002642_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002643
2644else
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 echo "$as_me:$LINENO: result: no" >&5
2646echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002647fi
2648rm -f conftest*
2649
Michael W. Hudson54241132001-12-07 15:38:26 +00002650
Martin v. Löwis11437992002-04-12 09:54:03 +00002651echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2652echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2653if test "${ac_cv_header_stdc+set}" = set; then
2654 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002655else
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 cat >conftest.$ac_ext <<_ACEOF
2657#line $LINENO "configure"
2658#include "confdefs.h"
2659#include <stdlib.h>
2660#include <stdarg.h>
2661#include <string.h>
2662#include <float.h>
2663
2664_ACEOF
2665if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2666 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2667 ac_status=$?
2668 egrep -v '^ *\+' conftest.er1 >conftest.err
2669 rm -f conftest.er1
2670 cat conftest.err >&5
2671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2672 (exit $ac_status); } >/dev/null; then
2673 if test -s conftest.err; then
2674 ac_cpp_err=$ac_c_preproc_warn_flag
2675 else
2676 ac_cpp_err=
2677 fi
2678else
2679 ac_cpp_err=yes
2680fi
2681if test -z "$ac_cpp_err"; then
2682 ac_cv_header_stdc=yes
2683else
2684 echo "$as_me: failed program was:" >&5
2685 cat conftest.$ac_ext >&5
2686 ac_cv_header_stdc=no
2687fi
2688rm -f conftest.err conftest.$ac_ext
2689
2690if test $ac_cv_header_stdc = yes; then
2691 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2692 cat >conftest.$ac_ext <<_ACEOF
2693#line $LINENO "configure"
2694#include "confdefs.h"
2695#include <string.h>
2696
2697_ACEOF
2698if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2699 egrep "memchr" >/dev/null 2>&1; then
2700 :
2701else
2702 ac_cv_header_stdc=no
2703fi
2704rm -f conftest*
2705
2706fi
2707
2708if test $ac_cv_header_stdc = yes; then
2709 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2710 cat >conftest.$ac_ext <<_ACEOF
2711#line $LINENO "configure"
2712#include "confdefs.h"
2713#include <stdlib.h>
2714
2715_ACEOF
2716if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2717 egrep "free" >/dev/null 2>&1; then
2718 :
2719else
2720 ac_cv_header_stdc=no
2721fi
2722rm -f conftest*
2723
2724fi
2725
2726if test $ac_cv_header_stdc = yes; then
2727 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2728 if test "$cross_compiling" = yes; then
2729 :
2730else
2731 cat >conftest.$ac_ext <<_ACEOF
2732#line $LINENO "configure"
2733#include "confdefs.h"
2734#include <ctype.h>
2735#if ((' ' & 0x0FF) == 0x020)
2736# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2737# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2738#else
2739# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2740 || ('j' <= (c) && (c) <= 'r') \
2741 || ('s' <= (c) && (c) <= 'z'))
2742# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2743#endif
2744
2745#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2746int
2747main ()
2748{
2749 int i;
2750 for (i = 0; i < 256; i++)
2751 if (XOR (islower (i), ISLOWER (i))
2752 || toupper (i) != TOUPPER (i))
2753 exit(2);
2754 exit (0);
2755}
2756_ACEOF
2757rm -f conftest$ac_exeext
2758if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2759 (eval $ac_link) 2>&5
2760 ac_status=$?
2761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2762 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2764 (eval $ac_try) 2>&5
2765 ac_status=$?
2766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2767 (exit $ac_status); }; }; then
2768 :
2769else
2770 echo "$as_me: program exited with status $ac_status" >&5
2771echo "$as_me: failed program was:" >&5
2772cat conftest.$ac_ext >&5
2773( exit $ac_status )
2774ac_cv_header_stdc=no
2775fi
2776rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2777fi
2778fi
2779fi
2780echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2781echo "${ECHO_T}$ac_cv_header_stdc" >&6
2782if test $ac_cv_header_stdc = yes; then
2783
2784cat >>confdefs.h <<\_ACEOF
2785#define STDC_HEADERS 1
2786_ACEOF
2787
2788fi
2789
2790# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2801 inttypes.h stdint.h unistd.h
2802do
2803as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2804echo "$as_me:$LINENO: checking for $ac_header" >&5
2805echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2806if eval "test \"\${$as_ac_Header+set}\" = set"; then
2807 echo $ECHO_N "(cached) $ECHO_C" >&6
2808else
2809 cat >conftest.$ac_ext <<_ACEOF
2810#line $LINENO "configure"
2811#include "confdefs.h"
2812$ac_includes_default
2813
2814#include <$ac_header>
2815_ACEOF
2816rm -f conftest.$ac_objext
2817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2818 (eval $ac_compile) 2>&5
2819 ac_status=$?
2820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2821 (exit $ac_status); } &&
2822 { ac_try='test -s conftest.$ac_objext'
2823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2824 (eval $ac_try) 2>&5
2825 ac_status=$?
2826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2827 (exit $ac_status); }; }; then
2828 eval "$as_ac_Header=yes"
2829else
2830 echo "$as_me: failed program was:" >&5
2831cat conftest.$ac_ext >&5
2832eval "$as_ac_Header=no"
2833fi
2834rm -f conftest.$ac_objext conftest.$ac_ext
2835fi
2836echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2837echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2838if test `eval echo '${'$as_ac_Header'}'` = yes; then
2839 cat >>confdefs.h <<_ACEOF
2840#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2841_ACEOF
2842
2843fi
2844
2845done
2846
2847
2848if test "${ac_cv_header_minix_config_h+set}" = set; then
2849 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2850echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2851if test "${ac_cv_header_minix_config_h+set}" = set; then
2852 echo $ECHO_N "(cached) $ECHO_C" >&6
2853fi
2854echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2855echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2856else
2857 # Is the header compilable?
2858echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2859echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2860cat >conftest.$ac_ext <<_ACEOF
2861#line $LINENO "configure"
2862#include "confdefs.h"
2863$ac_includes_default
2864#include <minix/config.h>
2865_ACEOF
2866rm -f conftest.$ac_objext
2867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2868 (eval $ac_compile) 2>&5
2869 ac_status=$?
2870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2871 (exit $ac_status); } &&
2872 { ac_try='test -s conftest.$ac_objext'
2873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2874 (eval $ac_try) 2>&5
2875 ac_status=$?
2876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2877 (exit $ac_status); }; }; then
2878 ac_header_compiler=yes
2879else
2880 echo "$as_me: failed program was:" >&5
2881cat conftest.$ac_ext >&5
2882ac_header_compiler=no
2883fi
2884rm -f conftest.$ac_objext conftest.$ac_ext
2885echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2886echo "${ECHO_T}$ac_header_compiler" >&6
2887
2888# Is the header present?
2889echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2890echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2891cat >conftest.$ac_ext <<_ACEOF
2892#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002893#include "confdefs.h"
2894#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002895_ACEOF
2896if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2897 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2898 ac_status=$?
2899 egrep -v '^ *\+' conftest.er1 >conftest.err
2900 rm -f conftest.er1
2901 cat conftest.err >&5
2902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2903 (exit $ac_status); } >/dev/null; then
2904 if test -s conftest.err; then
2905 ac_cpp_err=$ac_c_preproc_warn_flag
2906 else
2907 ac_cpp_err=
2908 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002909else
Martin v. Löwis11437992002-04-12 09:54:03 +00002910 ac_cpp_err=yes
2911fi
2912if test -z "$ac_cpp_err"; then
2913 ac_header_preproc=yes
2914else
2915 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002916 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002917 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002918fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002919rm -f conftest.err conftest.$ac_ext
2920echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2921echo "${ECHO_T}$ac_header_preproc" >&6
2922
2923# So? What about this header?
2924case $ac_header_compiler:$ac_header_preproc in
2925 yes:no )
2926 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2927echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2928 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2929echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2930 no:yes )
2931 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2932echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2933 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2934echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2935 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2936echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2937esac
2938echo "$as_me:$LINENO: checking for minix/config.h" >&5
2939echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2940if test "${ac_cv_header_minix_config_h+set}" = set; then
2941 echo $ECHO_N "(cached) $ECHO_C" >&6
2942else
2943 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002944fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002945echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2946echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2947
2948fi
2949if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002950 MINIX=yes
2951else
Martin v. Löwis11437992002-04-12 09:54:03 +00002952 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002953fi
2954
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002956if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002957
2958cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002959#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002960_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002961
Martin v. Löwis11437992002-04-12 09:54:03 +00002962
2963cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002964#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002965_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002966
Martin v. Löwis11437992002-04-12 09:54:03 +00002967
2968cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002969#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002970_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002971
2972fi
2973
2974
Michael W. Hudson54241132001-12-07 15:38:26 +00002975
Martin v. Löwis11437992002-04-12 09:54:03 +00002976echo "$as_me:$LINENO: checking for --with-suffix" >&5
2977echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002978
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002979# Check whether --with-suffix or --without-suffix was given.
2980if test "${with_suffix+set}" = set; then
2981 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002982
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002983 case $withval in
2984 no) EXEEXT=;;
2985 yes) EXEEXT=.exe;;
2986 *) EXEEXT=$withval;;
2987 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002988fi;
2989echo "$as_me:$LINENO: result: $EXEEXT" >&5
2990echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002991
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002992# Test whether we're running on a non-case-sensitive system, in which
2993# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002994
Martin v. Löwis11437992002-04-12 09:54:03 +00002995echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2996echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen0b06be72002-06-21 14:48:38 +00002997if test -d "${srcdir}/python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002998then
Martin v. Löwis11437992002-04-12 09:54:03 +00002999 echo "$as_me:$LINENO: result: yes" >&5
3000echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003001 BUILDEXEEXT=.exe
3002else
Martin v. Löwis11437992002-04-12 09:54:03 +00003003 echo "$as_me:$LINENO: result: no" >&5
3004echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003005 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003006fi
Guido van Rossumff555e32000-09-22 15:38:21 +00003007
Guido van Rossumdd997f71998-10-07 19:58:26 +00003008case $MACHDEP in
3009bsdos*)
3010 case $CC in
3011 gcc) CC="$CC -D_HAVE_BSDI";;
3012 esac;;
3013esac
3014
Guido van Rossum24b1e751997-08-21 02:29:16 +00003015case $ac_sys_system in
3016hp*|HP*)
3017 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003018 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003019 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003020Monterey*)
3021 case $CC in
3022 cc) CC="$CC -Wl,-Bexport";;
3023 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003024SunOS*)
3025 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003026
3027cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003028#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003029_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003030
3031 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003032esac
3033
Michael W. Hudson54241132001-12-07 15:38:26 +00003034
3035
Martin v. Löwis11437992002-04-12 09:54:03 +00003036echo "$as_me:$LINENO: checking LIBRARY" >&5
3037echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003038if test -z "$LIBRARY"
3039then
3040 LIBRARY='libpython$(VERSION).a'
3041fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003042echo "$as_me:$LINENO: result: $LIBRARY" >&5
3043echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003044
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003045# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003046# name of the library into which to insert object files). BLDLIBRARY is also
3047# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3048# is blank as the main program is not linked directly against LDLIBRARY.
3049# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3050# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3051# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3052# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003053#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003054# RUNSHARED is used to run shared python without installed libraries
3055#
3056# INSTSONAME is the name of the shared library that will be use to install
3057# on the system - some systems like version suffix, others don't
3058
3059
Michael W. Hudson54241132001-12-07 15:38:26 +00003060
3061
3062
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003063
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003064LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003065BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003066INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003067DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003068LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003069RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003070
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003071# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003072# If CXX is set, and if it is needed to link a main function that was
3073# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3074# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003075# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003076# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003077
Martin v. Löwis11437992002-04-12 09:54:03 +00003078echo "$as_me:$LINENO: checking LINKCC" >&5
3079echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003080if test -z "$LINKCC"
3081then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003082 if test -z "$CXX"; then
3083 LINKCC="\$(PURIFY) \$(CC)"
3084 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003085 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003086 $CXX -c conftest.$ac_ext 2>&5
3087 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3088 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3089 then
3090 LINKCC="\$(PURIFY) \$(CC)"
3091 else
3092 LINKCC="\$(PURIFY) \$(CXX)"
3093 fi
3094 rm -fr conftest*
3095 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003096 case $ac_sys_system in
3097 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003098 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003099 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003100 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003101 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003102 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003103 esac
3104fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003105echo "$as_me:$LINENO: result: $LINKCC" >&5
3106echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003107
Martin v. Löwis11437992002-04-12 09:54:03 +00003108echo "$as_me:$LINENO: checking for --enable-shared" >&5
3109echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003110# Check whether --enable-shared or --disable-shared was given.
3111if test "${enable_shared+set}" = set; then
3112 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003113
Martin v. Löwis11437992002-04-12 09:54:03 +00003114fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003115
3116if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003117then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003118 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003119 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003120 enable_shared="yes";;
3121 *)
3122 enable_shared="no";;
3123 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003124fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003125echo "$as_me:$LINENO: result: $enable_shared" >&5
3126echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003127
3128
Martin v. Löwis11437992002-04-12 09:54:03 +00003129echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3130echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003131
Guido van Rossumb8552162001-09-05 14:58:11 +00003132# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3133# library that we build, but we do not want to link against it (we
3134# will find it with a -framework option). For this reason there is an
3135# extra variable BLDLIBRARY against which Python and the extension
3136# modules are linked, BLDLIBRARY. This is normally the same as
3137# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003138if test "$enable_framework"
3139then
3140 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3141 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3142 BLDLIBRARY=''
3143else
3144 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003145fi
Jack Jansene578a632001-08-15 01:27:14 +00003146
Martin v. Löwis1142de32002-03-29 16:28:31 +00003147# Other platforms follow
3148if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003149
3150cat >>confdefs.h <<\_ACEOF
3151#define Py_ENABLE_SHARED 1
3152_ACEOF
3153
Martin v. Löwis1142de32002-03-29 16:28:31 +00003154 case $ac_sys_system in
3155 BeOS*)
3156 LDLIBRARY='libpython$(VERSION).so'
3157 ;;
3158 CYGWIN*)
3159 LDLIBRARY='libpython$(VERSION).dll.a'
3160 DLLLIBRARY='libpython$(VERSION).dll'
3161 ;;
3162 SunOS*)
3163 LDLIBRARY='libpython$(VERSION).so'
3164 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3165 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3166 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003167 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003168 LDLIBRARY='libpython$(VERSION).so'
3169 BLDLIBRARY='-L. -lpython$(VERSION)'
3170 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3171 INSTSONAME="$LDLIBRARY".$SOVERSION
3172 ;;
3173 hp*|HP*)
3174 LDLIBRARY='libpython$(VERSION).sl'
3175 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3176 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3177 ;;
3178 OSF*)
3179 LDLIBRARY='libpython$(VERSION).so'
3180 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3181 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3182 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003183 atheos*)
3184 LDLIBRARY='libpython$(VERSION).so'
3185 BLDLIBRARY='-L. -lpython$(VERSION)'
3186 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3187 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003188 esac
3189 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3190 case $MACHDEP in
3191 dguxR4)
3192 LDLIBRARY='libpython$(VERSION).so'
3193 OPT="$OPT -pic"
3194 ;;
3195 esac
3196fi
3197
Martin v. Löwis11437992002-04-12 09:54:03 +00003198echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3199echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003200
Martin v. Löwis11437992002-04-12 09:54:03 +00003201if test -n "$ac_tool_prefix"; then
3202 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3203set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3204echo "$as_me:$LINENO: checking for $ac_word" >&5
3205echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3206if test "${ac_cv_prog_RANLIB+set}" = set; then
3207 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003208else
3209 if test -n "$RANLIB"; then
3210 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3211else
Martin v. Löwis11437992002-04-12 09:54:03 +00003212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3213for as_dir in $PATH
3214do
3215 IFS=$as_save_IFS
3216 test -z "$as_dir" && as_dir=.
3217 for ac_exec_ext in '' $ac_executable_extensions; do
3218 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3219 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3220 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3221 break 2
3222 fi
3223done
3224done
3225
Guido van Rossum627b2d71993-12-24 10:39:16 +00003226fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003227fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003228RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003229if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003230 echo "$as_me:$LINENO: result: $RANLIB" >&5
3231echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003232else
Martin v. Löwis11437992002-04-12 09:54:03 +00003233 echo "$as_me:$LINENO: result: no" >&5
3234echo "${ECHO_T}no" >&6
3235fi
3236
3237fi
3238if test -z "$ac_cv_prog_RANLIB"; then
3239 ac_ct_RANLIB=$RANLIB
3240 # Extract the first word of "ranlib", so it can be a program name with args.
3241set dummy ranlib; ac_word=$2
3242echo "$as_me:$LINENO: checking for $ac_word" >&5
3243echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3244if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3245 echo $ECHO_N "(cached) $ECHO_C" >&6
3246else
3247 if test -n "$ac_ct_RANLIB"; then
3248 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3249else
3250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3251for as_dir in $PATH
3252do
3253 IFS=$as_save_IFS
3254 test -z "$as_dir" && as_dir=.
3255 for ac_exec_ext in '' $ac_executable_extensions; do
3256 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3257 ac_cv_prog_ac_ct_RANLIB="ranlib"
3258 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3259 break 2
3260 fi
3261done
3262done
3263
3264 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3265fi
3266fi
3267ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3268if test -n "$ac_ct_RANLIB"; then
3269 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3270echo "${ECHO_T}$ac_ct_RANLIB" >&6
3271else
3272 echo "$as_me:$LINENO: result: no" >&5
3273echo "${ECHO_T}no" >&6
3274fi
3275
3276 RANLIB=$ac_ct_RANLIB
3277else
3278 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003279fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003280
3281
Guido van Rossum7f43da71994-08-01 12:15:30 +00003282for ac_prog in ar aal
3283do
Martin v. Löwis11437992002-04-12 09:54:03 +00003284 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003285set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003286echo "$as_me:$LINENO: checking for $ac_word" >&5
3287echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3288if test "${ac_cv_prog_AR+set}" = set; then
3289 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003290else
3291 if test -n "$AR"; then
3292 ac_cv_prog_AR="$AR" # Let the user override the test.
3293else
Martin v. Löwis11437992002-04-12 09:54:03 +00003294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3295for as_dir in $PATH
3296do
3297 IFS=$as_save_IFS
3298 test -z "$as_dir" && as_dir=.
3299 for ac_exec_ext in '' $ac_executable_extensions; do
3300 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3301 ac_cv_prog_AR="$ac_prog"
3302 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3303 break 2
3304 fi
3305done
3306done
3307
Guido van Rossum7f43da71994-08-01 12:15:30 +00003308fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003309fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003310AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003311if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003312 echo "$as_me:$LINENO: result: $AR" >&5
3313echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003314else
Martin v. Löwis11437992002-04-12 09:54:03 +00003315 echo "$as_me:$LINENO: result: no" >&5
3316echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003317fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003318
Martin v. Löwis11437992002-04-12 09:54:03 +00003319 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003320done
3321test -n "$AR" || AR="ar"
3322
Michael W. Hudson54241132001-12-07 15:38:26 +00003323
Neil Schemenauera42c8272001-03-31 00:01:55 +00003324case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003325bsdos*|hp*|HP*)
3326 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003327 if test -z "$INSTALL"
3328 then
3329 INSTALL="${srcdir}/install-sh -c"
3330 fi
3331esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003332ac_aux_dir=
3333for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3334 if test -f $ac_dir/install-sh; then
3335 ac_aux_dir=$ac_dir
3336 ac_install_sh="$ac_aux_dir/install-sh -c"
3337 break
3338 elif test -f $ac_dir/install.sh; then
3339 ac_aux_dir=$ac_dir
3340 ac_install_sh="$ac_aux_dir/install.sh -c"
3341 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003342 elif test -f $ac_dir/shtool; then
3343 ac_aux_dir=$ac_dir
3344 ac_install_sh="$ac_aux_dir/shtool install -c"
3345 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003346 fi
3347done
3348if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003349 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3350echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3351 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003352fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003353ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3354ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3355ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003356
3357# Find a good install program. We prefer a C program (faster),
3358# so one script is as good as another. But avoid the broken or
3359# incompatible versions:
3360# SysV /etc/install, /usr/sbin/install
3361# SunOS /usr/etc/install
3362# IRIX /sbin/install
3363# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003364# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003365# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3366# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3367# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3368# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003369echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3370echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003371if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003372if test "${ac_cv_path_install+set}" = set; then
3373 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003374else
Martin v. Löwis11437992002-04-12 09:54:03 +00003375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3376for as_dir in $PATH
3377do
3378 IFS=$as_save_IFS
3379 test -z "$as_dir" && as_dir=.
3380 # Account for people who put trailing slashes in PATH elements.
3381case $as_dir/ in
3382 ./ | .// | /cC/* | \
3383 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3384 /usr/ucb/* ) ;;
3385 *)
3386 # OSF1 and SCO ODT 3.0 have their own names for install.
3387 # Don't use installbsd from OSF since it installs stuff as root
3388 # by default.
3389 for ac_prog in ginstall scoinst install; do
3390 for ac_exec_ext in '' $ac_executable_extensions; do
3391 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3392 if test $ac_prog = install &&
3393 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3394 # AIX install. It has an incompatible calling convention.
3395 :
3396 elif test $ac_prog = install &&
3397 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3398 # program-specific install script used by HP pwplus--don't use.
3399 :
3400 else
3401 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3402 break 3
3403 fi
3404 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003405 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003406 done
3407 ;;
3408esac
3409done
3410
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003411
3412fi
3413 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003414 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003415 else
3416 # As a last resort, use the slow shell script. We don't cache a
3417 # path for INSTALL within a source directory, because that will
3418 # break other packages using the cache if that directory is
3419 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003420 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003421 fi
3422fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003423echo "$as_me:$LINENO: result: $INSTALL" >&5
3424echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003425
3426# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3427# It thinks the first close brace ends the variable substitution.
3428test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3429
Martin v. Löwis11437992002-04-12 09:54:03 +00003430test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003431
3432test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3433
Michael W. Hudson54241132001-12-07 15:38:26 +00003434
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003435# Not every filesystem supports hard links
3436
3437if test -z "$LN" ; then
3438 case $ac_sys_system in
3439 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003440 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003441 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003442 *) LN=ln;;
3443 esac
3444fi
3445
Fred Drake109d9862001-07-11 06:27:56 +00003446# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003447echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3448echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3449
Fred Drake109d9862001-07-11 06:27:56 +00003450# Check whether --with-pydebug or --without-pydebug was given.
3451if test "${with_pydebug+set}" = set; then
3452 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003453
Fred Drake109d9862001-07-11 06:27:56 +00003454if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003455then
3456
3457cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003458#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003459_ACEOF
3460
3461 echo "$as_me:$LINENO: result: yes" >&5
3462echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003463 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003464else echo "$as_me:$LINENO: result: no" >&5
3465echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003466fi
3467else
Martin v. Löwis11437992002-04-12 09:54:03 +00003468 echo "$as_me:$LINENO: result: no" >&5
3469echo "${ECHO_T}no" >&6
3470fi;
Fred Drake109d9862001-07-11 06:27:56 +00003471
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003472# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003473
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003474if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003475then
Neal Norwitzd957f392002-09-25 21:26:19 +00003476 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003477 yes)
3478 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003479 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003480 if test "$Py_DEBUG" = 'true' ; then
3481 # Optimization messes up debuggers, so turn it off for
3482 # debug builds.
3483 OPT="-g -Wall -Wstrict-prototypes"
3484 else
3485 OPT="-g -O3 -Wall -Wstrict-prototypes"
3486 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003487 *)
Fred Drake109d9862001-07-11 06:27:56 +00003488 OPT="-O3 -Wall -Wstrict-prototypes";;
3489 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003490 case $ac_sys_system in
3491 SCO_SV*) OPT="$OPT -m486 -DSCO5";;
3492 esac
Fred Drake109d9862001-07-11 06:27:56 +00003493 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003494 *)
3495 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003496 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003497 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003498 SCO_SV*)
3499 CFLAGS="$CFLAGS -belf"
3500 OPT="-belf -O -Ki486 -DSCO5";;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003501 *)
3502 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003503 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003504 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003505 case $ac_sys_system in
3506 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003507 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003508 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003509fi
3510
Fred Drakee1ceaa02001-12-04 20:55:47 +00003511if test "$Py_DEBUG" = 'true'; then
3512 :
3513else
3514 OPT="-DNDEBUG $OPT"
3515fi
3516
Trent Mick635f6fb2000-08-23 21:33:05 +00003517# The current (beta) Monterey compiler dies with optimizations
3518case $ac_sys_system in
3519Monterey*) OPT="";;
3520esac
3521
Guido van Rossum563e7081996-09-10 18:20:48 +00003522if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003523then
3524 OPT="$OPT $ac_arch_flags"
3525fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003526
Martin v. Löwis11437992002-04-12 09:54:03 +00003527echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3528echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3529if test "${ac_cv_opt_olimit_ok+set}" = set; then
3530 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003531else
3532 ac_save_cc="$CC"
3533CC="$CC -OPT:Olimit=0"
3534if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003535 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003536else
Martin v. Löwis11437992002-04-12 09:54:03 +00003537 cat >conftest.$ac_ext <<_ACEOF
3538#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003539#include "confdefs.h"
3540int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003541_ACEOF
3542rm -f conftest$ac_exeext
3543if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3544 (eval $ac_link) 2>&5
3545 ac_status=$?
3546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3547 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3549 (eval $ac_try) 2>&5
3550 ac_status=$?
3551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3552 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003553 ac_cv_opt_olimit_ok=yes
3554else
Martin v. Löwis11437992002-04-12 09:54:03 +00003555 echo "$as_me: program exited with status $ac_status" >&5
3556echo "$as_me: failed program was:" >&5
3557cat conftest.$ac_ext >&5
3558( exit $ac_status )
3559ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003560fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003561rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003562fi
Guido van Rossum91922671997-10-09 20:24:13 +00003563CC="$ac_save_cc"
3564fi
3565
Martin v. Löwis11437992002-04-12 09:54:03 +00003566echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3567echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003568if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003569 case $ac_sys_system in
3570 Darwin*) OPT="$OPT" ;;
3571 *) OPT="$OPT -OPT:Olimit=0";;
3572 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003573else
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3575echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3576 if test "${ac_cv_olimit_ok+set}" = set; then
3577 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003578else
3579 ac_save_cc="$CC"
3580 CC="$CC -Olimit 1500"
3581 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003582 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003583else
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 cat >conftest.$ac_ext <<_ACEOF
3585#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003586#include "confdefs.h"
3587int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003588_ACEOF
3589rm -f conftest$ac_exeext
3590if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3591 (eval $ac_link) 2>&5
3592 ac_status=$?
3593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3594 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3596 (eval $ac_try) 2>&5
3597 ac_status=$?
3598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3599 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003600 ac_cv_olimit_ok=yes
3601else
Martin v. Löwis11437992002-04-12 09:54:03 +00003602 echo "$as_me: program exited with status $ac_status" >&5
3603echo "$as_me: failed program was:" >&5
3604cat conftest.$ac_ext >&5
3605( exit $ac_status )
3606ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003607fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003608rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003609fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003610 CC="$ac_save_cc"
3611fi
3612
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3614echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003615 if test $ac_cv_olimit_ok = yes; then
3616 OPT="$OPT -Olimit 1500"
3617 fi
3618fi
3619
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003620# On some compilers, pthreads are available without further options
3621# (e.g. MacOS X). On some of these systems, the compiler will not
3622# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3623# So we have to see first whether pthreads are available without
3624# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003625echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3626echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3627if test "${ac_cv_pthread_is_default+set}" = set; then
3628 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003629else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003630 if test "$cross_compiling" = yes; then
3631 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003632else
Martin v. Löwis11437992002-04-12 09:54:03 +00003633 cat >conftest.$ac_ext <<_ACEOF
3634#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003635#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003636
Martin v. Löwis130fb172001-07-19 11:00:41 +00003637#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003638
3639void* routine(void* p){return NULL;}
3640
3641int main(){
3642 pthread_t p;
3643 if(pthread_create(&p,NULL,routine,NULL)!=0)
3644 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003645 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003646 return 0;
3647}
3648
Martin v. Löwis11437992002-04-12 09:54:03 +00003649_ACEOF
3650rm -f conftest$ac_exeext
3651if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3652 (eval $ac_link) 2>&5
3653 ac_status=$?
3654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3655 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3657 (eval $ac_try) 2>&5
3658 ac_status=$?
3659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3660 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003661 ac_cv_pthread_is_default=yes
3662else
Martin v. Löwis11437992002-04-12 09:54:03 +00003663 echo "$as_me: program exited with status $ac_status" >&5
3664echo "$as_me: failed program was:" >&5
3665cat conftest.$ac_ext >&5
3666( exit $ac_status )
3667ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003668fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003669rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003670fi
3671
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003672fi
3673
Martin v. Löwis11437992002-04-12 09:54:03 +00003674echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3675echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003676
Michael W. Hudson54241132001-12-07 15:38:26 +00003677
Martin v. Löwis11437992002-04-12 09:54:03 +00003678if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003679then
3680 ac_cv_kpthread=no
3681else
3682# -Kpthread, if available, provides the right #defines
3683# and linker options to make pthread_create available
3684# Some compilers won't report that they do not support -Kpthread,
3685# so we need to run a program to see whether it really made the
3686# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003687echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3688echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3689if test "${ac_cv_kpthread+set}" = set; then
3690 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003691else
3692 ac_save_cc="$CC"
3693CC="$CC -Kpthread"
3694if test "$cross_compiling" = yes; then
3695 ac_cv_kpthread=no
3696else
Martin v. Löwis11437992002-04-12 09:54:03 +00003697 cat >conftest.$ac_ext <<_ACEOF
3698#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003699#include "confdefs.h"
3700
3701#include <pthread.h>
3702
3703void* routine(void* p){return NULL;}
3704
3705int main(){
3706 pthread_t p;
3707 if(pthread_create(&p,NULL,routine,NULL)!=0)
3708 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003709 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003710 return 0;
3711}
3712
Martin v. Löwis11437992002-04-12 09:54:03 +00003713_ACEOF
3714rm -f conftest$ac_exeext
3715if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3716 (eval $ac_link) 2>&5
3717 ac_status=$?
3718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3719 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3721 (eval $ac_try) 2>&5
3722 ac_status=$?
3723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3724 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003725 ac_cv_kpthread=yes
3726else
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 echo "$as_me: program exited with status $ac_status" >&5
3728echo "$as_me: failed program was:" >&5
3729cat conftest.$ac_ext >&5
3730( exit $ac_status )
3731ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003732fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003733rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003734fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003735CC="$ac_save_cc"
3736fi
3737
Martin v. Löwis11437992002-04-12 09:54:03 +00003738echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3739echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003740fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003741
Michael W. Hudson54241132001-12-07 15:38:26 +00003742
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003743# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003744echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3745echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3746if test "${ac_cv_header_stdc+set}" = set; then
3747 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003748else
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 cat >conftest.$ac_ext <<_ACEOF
3750#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003751#include "confdefs.h"
3752#include <stdlib.h>
3753#include <stdarg.h>
3754#include <string.h>
3755#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003756
3757_ACEOF
3758if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3759 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3760 ac_status=$?
3761 egrep -v '^ *\+' conftest.er1 >conftest.err
3762 rm -f conftest.er1
3763 cat conftest.err >&5
3764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3765 (exit $ac_status); } >/dev/null; then
3766 if test -s conftest.err; then
3767 ac_cpp_err=$ac_c_preproc_warn_flag
3768 else
3769 ac_cpp_err=
3770 fi
3771else
3772 ac_cpp_err=yes
3773fi
3774if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003775 ac_cv_header_stdc=yes
3776else
Martin v. Löwis11437992002-04-12 09:54:03 +00003777 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003778 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003779 ac_cv_header_stdc=no
3780fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003781rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003782
3783if test $ac_cv_header_stdc = yes; then
3784 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003785 cat >conftest.$ac_ext <<_ACEOF
3786#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003787#include "confdefs.h"
3788#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003789
3790_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3792 egrep "memchr" >/dev/null 2>&1; then
3793 :
3794else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003795 ac_cv_header_stdc=no
3796fi
3797rm -f conftest*
3798
3799fi
3800
3801if test $ac_cv_header_stdc = yes; then
3802 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003803 cat >conftest.$ac_ext <<_ACEOF
3804#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003805#include "confdefs.h"
3806#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003807
3808_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003809if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3810 egrep "free" >/dev/null 2>&1; then
3811 :
3812else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003813 ac_cv_header_stdc=no
3814fi
3815rm -f conftest*
3816
3817fi
3818
3819if test $ac_cv_header_stdc = yes; then
3820 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003821 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003822 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003823else
Martin v. Löwis11437992002-04-12 09:54:03 +00003824 cat >conftest.$ac_ext <<_ACEOF
3825#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003826#include "confdefs.h"
3827#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003828#if ((' ' & 0x0FF) == 0x020)
3829# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3830# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3831#else
3832# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3833 || ('j' <= (c) && (c) <= 'r') \
3834 || ('s' <= (c) && (c) <= 'z'))
3835# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3836#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3839int
3840main ()
3841{
3842 int i;
3843 for (i = 0; i < 256; i++)
3844 if (XOR (islower (i), ISLOWER (i))
3845 || toupper (i) != TOUPPER (i))
3846 exit(2);
3847 exit (0);
3848}
3849_ACEOF
3850rm -f conftest$ac_exeext
3851if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3852 (eval $ac_link) 2>&5
3853 ac_status=$?
3854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3855 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3857 (eval $ac_try) 2>&5
3858 ac_status=$?
3859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3860 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003861 :
3862else
Martin v. Löwis11437992002-04-12 09:54:03 +00003863 echo "$as_me: program exited with status $ac_status" >&5
3864echo "$as_me: failed program was:" >&5
3865cat conftest.$ac_ext >&5
3866( exit $ac_status )
3867ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003868fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003869rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003870fi
3871fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003872fi
3873echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3874echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003875if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003876
3877cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003878#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003879_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003880
3881fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003882
Martin v. Löwis11437992002-04-12 09:54:03 +00003883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
Martin v. Löwis11437992002-04-12 09:54:03 +00003920for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003921libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003922signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003923sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003924sys/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 +00003925sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003926sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003927do
Martin v. Löwis11437992002-04-12 09:54:03 +00003928as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3929if eval "test \"\${$as_ac_Header+set}\" = set"; then
3930 echo "$as_me:$LINENO: checking for $ac_header" >&5
3931echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3932if eval "test \"\${$as_ac_Header+set}\" = set"; then
3933 echo $ECHO_N "(cached) $ECHO_C" >&6
3934fi
3935echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3936echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003937else
Martin v. Löwis11437992002-04-12 09:54:03 +00003938 # Is the header compilable?
3939echo "$as_me:$LINENO: checking $ac_header usability" >&5
3940echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3941cat >conftest.$ac_ext <<_ACEOF
3942#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003943#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003944$ac_includes_default
3945#include <$ac_header>
3946_ACEOF
3947rm -f conftest.$ac_objext
3948if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3949 (eval $ac_compile) 2>&5
3950 ac_status=$?
3951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3952 (exit $ac_status); } &&
3953 { ac_try='test -s conftest.$ac_objext'
3954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3955 (eval $ac_try) 2>&5
3956 ac_status=$?
3957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3958 (exit $ac_status); }; }; then
3959 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003960else
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 echo "$as_me: failed program was:" >&5
3962cat conftest.$ac_ext >&5
3963ac_header_compiler=no
3964fi
3965rm -f conftest.$ac_objext conftest.$ac_ext
3966echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3967echo "${ECHO_T}$ac_header_compiler" >&6
3968
3969# Is the header present?
3970echo "$as_me:$LINENO: checking $ac_header presence" >&5
3971echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3972cat >conftest.$ac_ext <<_ACEOF
3973#line $LINENO "configure"
3974#include "confdefs.h"
3975#include <$ac_header>
3976_ACEOF
3977if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3978 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3979 ac_status=$?
3980 egrep -v '^ *\+' conftest.er1 >conftest.err
3981 rm -f conftest.er1
3982 cat conftest.err >&5
3983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3984 (exit $ac_status); } >/dev/null; then
3985 if test -s conftest.err; then
3986 ac_cpp_err=$ac_c_preproc_warn_flag
3987 else
3988 ac_cpp_err=
3989 fi
3990else
3991 ac_cpp_err=yes
3992fi
3993if test -z "$ac_cpp_err"; then
3994 ac_header_preproc=yes
3995else
3996 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003997 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003998 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003999fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004000rm -f conftest.err conftest.$ac_ext
4001echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4002echo "${ECHO_T}$ac_header_preproc" >&6
4003
4004# So? What about this header?
4005case $ac_header_compiler:$ac_header_preproc in
4006 yes:no )
4007 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4008echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4009 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4010echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4011 no:yes )
4012 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4013echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4014 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4015echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4016 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4017echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4018esac
4019echo "$as_me:$LINENO: checking for $ac_header" >&5
4020echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4021if eval "test \"\${$as_ac_Header+set}\" = set"; then
4022 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004023else
Martin v. Löwis11437992002-04-12 09:54:03 +00004024 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004025fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004026echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4027echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4028
4029fi
4030if test `eval echo '${'$as_ac_Header'}'` = yes; then
4031 cat >>confdefs.h <<_ACEOF
4032#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4033_ACEOF
4034
4035fi
4036
Guido van Rossum627b2d71993-12-24 10:39:16 +00004037done
4038
Martin v. Löwis11437992002-04-12 09:54:03 +00004039
4040
4041
4042
4043
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004044ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004045for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4046 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4047echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4048echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4049if eval "test \"\${$as_ac_Header+set}\" = set"; then
4050 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004051else
Martin v. Löwis11437992002-04-12 09:54:03 +00004052 cat >conftest.$ac_ext <<_ACEOF
4053#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004054#include "confdefs.h"
4055#include <sys/types.h>
4056#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004057
4058#ifdef F77_DUMMY_MAIN
4059# ifdef __cplusplus
4060 extern "C"
4061# endif
4062 int F77_DUMMY_MAIN() { return 1; }
4063#endif
4064int
4065main ()
4066{
4067if ((DIR *) 0)
4068return 0;
4069 ;
4070 return 0;
4071}
4072_ACEOF
4073rm -f conftest.$ac_objext
4074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4075 (eval $ac_compile) 2>&5
4076 ac_status=$?
4077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4078 (exit $ac_status); } &&
4079 { ac_try='test -s conftest.$ac_objext'
4080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4081 (eval $ac_try) 2>&5
4082 ac_status=$?
4083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4084 (exit $ac_status); }; }; then
4085 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004086else
Martin v. Löwis11437992002-04-12 09:54:03 +00004087 echo "$as_me: failed program was:" >&5
4088cat conftest.$ac_ext >&5
4089eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004090fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004091rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004092fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004093echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4094echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4095if test `eval echo '${'$as_ac_Header'}'` = yes; then
4096 cat >>confdefs.h <<_ACEOF
4097#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4098_ACEOF
4099
4100ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004101fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004102
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004103done
4104# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4105if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004106 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4107echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4108if test "${ac_cv_search_opendir+set}" = set; then
4109 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004110else
Martin v. Löwis11437992002-04-12 09:54:03 +00004111 ac_func_search_save_LIBS=$LIBS
4112ac_cv_search_opendir=no
4113cat >conftest.$ac_ext <<_ACEOF
4114#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004115#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004116
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004117/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004118#ifdef __cplusplus
4119extern "C"
4120#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004121/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004122 builtin and then its argument prototype would still apply. */
4123char opendir ();
4124#ifdef F77_DUMMY_MAIN
4125# ifdef __cplusplus
4126 extern "C"
4127# endif
4128 int F77_DUMMY_MAIN() { return 1; }
4129#endif
4130int
4131main ()
4132{
4133opendir ();
4134 ;
4135 return 0;
4136}
4137_ACEOF
4138rm -f conftest.$ac_objext conftest$ac_exeext
4139if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4140 (eval $ac_link) 2>&5
4141 ac_status=$?
4142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4143 (exit $ac_status); } &&
4144 { ac_try='test -s conftest$ac_exeext'
4145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4146 (eval $ac_try) 2>&5
4147 ac_status=$?
4148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4149 (exit $ac_status); }; }; then
4150 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004151else
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 echo "$as_me: failed program was:" >&5
4153cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004154fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004155rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4156if test "$ac_cv_search_opendir" = no; then
4157 for ac_lib in dir; do
4158 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4159 cat >conftest.$ac_ext <<_ACEOF
4160#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004161#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004162
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004163/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004164#ifdef __cplusplus
4165extern "C"
4166#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004167/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004168 builtin and then its argument prototype would still apply. */
4169char opendir ();
4170#ifdef F77_DUMMY_MAIN
4171# ifdef __cplusplus
4172 extern "C"
4173# endif
4174 int F77_DUMMY_MAIN() { return 1; }
4175#endif
4176int
4177main ()
4178{
4179opendir ();
4180 ;
4181 return 0;
4182}
4183_ACEOF
4184rm -f conftest.$ac_objext conftest$ac_exeext
4185if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4186 (eval $ac_link) 2>&5
4187 ac_status=$?
4188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4189 (exit $ac_status); } &&
4190 { ac_try='test -s conftest$ac_exeext'
4191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4192 (eval $ac_try) 2>&5
4193 ac_status=$?
4194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4195 (exit $ac_status); }; }; then
4196 ac_cv_search_opendir="-l$ac_lib"
4197break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004198else
Martin v. Löwis11437992002-04-12 09:54:03 +00004199 echo "$as_me: failed program was:" >&5
4200cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004201fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004202rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4203 done
4204fi
4205LIBS=$ac_func_search_save_LIBS
4206fi
4207echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4208echo "${ECHO_T}$ac_cv_search_opendir" >&6
4209if test "$ac_cv_search_opendir" != no; then
4210 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004211
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004212fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004213
Michael W. Hudson54241132001-12-07 15:38:26 +00004214else
Martin v. Löwis11437992002-04-12 09:54:03 +00004215 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4216echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4217if test "${ac_cv_search_opendir+set}" = set; then
4218 echo $ECHO_N "(cached) $ECHO_C" >&6
4219else
4220 ac_func_search_save_LIBS=$LIBS
4221ac_cv_search_opendir=no
4222cat >conftest.$ac_ext <<_ACEOF
4223#line $LINENO "configure"
4224#include "confdefs.h"
4225
4226/* Override any gcc2 internal prototype to avoid an error. */
4227#ifdef __cplusplus
4228extern "C"
4229#endif
4230/* We use char because int might match the return type of a gcc2
4231 builtin and then its argument prototype would still apply. */
4232char opendir ();
4233#ifdef F77_DUMMY_MAIN
4234# ifdef __cplusplus
4235 extern "C"
4236# endif
4237 int F77_DUMMY_MAIN() { return 1; }
4238#endif
4239int
4240main ()
4241{
4242opendir ();
4243 ;
4244 return 0;
4245}
4246_ACEOF
4247rm -f conftest.$ac_objext conftest$ac_exeext
4248if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4249 (eval $ac_link) 2>&5
4250 ac_status=$?
4251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4252 (exit $ac_status); } &&
4253 { ac_try='test -s conftest$ac_exeext'
4254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4255 (eval $ac_try) 2>&5
4256 ac_status=$?
4257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4258 (exit $ac_status); }; }; then
4259 ac_cv_search_opendir="none required"
4260else
4261 echo "$as_me: failed program was:" >&5
4262cat conftest.$ac_ext >&5
4263fi
4264rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4265if test "$ac_cv_search_opendir" = no; then
4266 for ac_lib in x; do
4267 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4268 cat >conftest.$ac_ext <<_ACEOF
4269#line $LINENO "configure"
4270#include "confdefs.h"
4271
4272/* Override any gcc2 internal prototype to avoid an error. */
4273#ifdef __cplusplus
4274extern "C"
4275#endif
4276/* We use char because int might match the return type of a gcc2
4277 builtin and then its argument prototype would still apply. */
4278char opendir ();
4279#ifdef F77_DUMMY_MAIN
4280# ifdef __cplusplus
4281 extern "C"
4282# endif
4283 int F77_DUMMY_MAIN() { return 1; }
4284#endif
4285int
4286main ()
4287{
4288opendir ();
4289 ;
4290 return 0;
4291}
4292_ACEOF
4293rm -f conftest.$ac_objext conftest$ac_exeext
4294if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4295 (eval $ac_link) 2>&5
4296 ac_status=$?
4297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4298 (exit $ac_status); } &&
4299 { ac_try='test -s conftest$ac_exeext'
4300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4301 (eval $ac_try) 2>&5
4302 ac_status=$?
4303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4304 (exit $ac_status); }; }; then
4305 ac_cv_search_opendir="-l$ac_lib"
4306break
4307else
4308 echo "$as_me: failed program was:" >&5
4309cat conftest.$ac_ext >&5
4310fi
4311rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4312 done
4313fi
4314LIBS=$ac_func_search_save_LIBS
4315fi
4316echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4317echo "${ECHO_T}$ac_cv_search_opendir" >&6
4318if test "$ac_cv_search_opendir" != no; then
4319 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4320
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004321fi
4322
4323fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004324
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004325echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4326echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4327if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4328 echo $ECHO_N "(cached) $ECHO_C" >&6
4329else
4330 cat >conftest.$ac_ext <<_ACEOF
4331#line $LINENO "configure"
4332#include "confdefs.h"
4333#include <sys/types.h>
4334#ifdef F77_DUMMY_MAIN
4335# ifdef __cplusplus
4336 extern "C"
4337# endif
4338 int F77_DUMMY_MAIN() { return 1; }
4339#endif
4340int
4341main ()
4342{
4343return makedev(0, 0);
4344 ;
4345 return 0;
4346}
4347_ACEOF
4348rm -f conftest.$ac_objext conftest$ac_exeext
4349if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4350 (eval $ac_link) 2>&5
4351 ac_status=$?
4352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4353 (exit $ac_status); } &&
4354 { ac_try='test -s conftest$ac_exeext'
4355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4356 (eval $ac_try) 2>&5
4357 ac_status=$?
4358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4359 (exit $ac_status); }; }; then
4360 ac_cv_header_sys_types_h_makedev=yes
4361else
4362 echo "$as_me: failed program was:" >&5
4363cat conftest.$ac_ext >&5
4364ac_cv_header_sys_types_h_makedev=no
4365fi
4366rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4367
4368fi
4369echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4370echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4371
4372if test $ac_cv_header_sys_types_h_makedev = no; then
4373if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4374 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4375echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4376if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4377 echo $ECHO_N "(cached) $ECHO_C" >&6
4378fi
4379echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4380echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4381else
4382 # Is the header compilable?
4383echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4384echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4385cat >conftest.$ac_ext <<_ACEOF
4386#line $LINENO "configure"
4387#include "confdefs.h"
4388$ac_includes_default
4389#include <sys/mkdev.h>
4390_ACEOF
4391rm -f conftest.$ac_objext
4392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4393 (eval $ac_compile) 2>&5
4394 ac_status=$?
4395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4396 (exit $ac_status); } &&
4397 { ac_try='test -s conftest.$ac_objext'
4398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4399 (eval $ac_try) 2>&5
4400 ac_status=$?
4401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4402 (exit $ac_status); }; }; then
4403 ac_header_compiler=yes
4404else
4405 echo "$as_me: failed program was:" >&5
4406cat conftest.$ac_ext >&5
4407ac_header_compiler=no
4408fi
4409rm -f conftest.$ac_objext conftest.$ac_ext
4410echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4411echo "${ECHO_T}$ac_header_compiler" >&6
4412
4413# Is the header present?
4414echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4415echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4416cat >conftest.$ac_ext <<_ACEOF
4417#line $LINENO "configure"
4418#include "confdefs.h"
4419#include <sys/mkdev.h>
4420_ACEOF
4421if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4422 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4423 ac_status=$?
4424 egrep -v '^ *\+' conftest.er1 >conftest.err
4425 rm -f conftest.er1
4426 cat conftest.err >&5
4427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4428 (exit $ac_status); } >/dev/null; then
4429 if test -s conftest.err; then
4430 ac_cpp_err=$ac_c_preproc_warn_flag
4431 else
4432 ac_cpp_err=
4433 fi
4434else
4435 ac_cpp_err=yes
4436fi
4437if test -z "$ac_cpp_err"; then
4438 ac_header_preproc=yes
4439else
4440 echo "$as_me: failed program was:" >&5
4441 cat conftest.$ac_ext >&5
4442 ac_header_preproc=no
4443fi
4444rm -f conftest.err conftest.$ac_ext
4445echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4446echo "${ECHO_T}$ac_header_preproc" >&6
4447
4448# So? What about this header?
4449case $ac_header_compiler:$ac_header_preproc in
4450 yes:no )
4451 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4452echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4453 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4454echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4455 no:yes )
4456 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4457echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4458 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4459echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4460 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4461echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4462esac
4463echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4464echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4465if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4466 echo $ECHO_N "(cached) $ECHO_C" >&6
4467else
4468 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4469fi
4470echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4471echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4472
4473fi
4474if test $ac_cv_header_sys_mkdev_h = yes; then
4475
4476cat >>confdefs.h <<\_ACEOF
4477#define MAJOR_IN_MKDEV 1
4478_ACEOF
4479
4480fi
4481
4482
4483
4484 if test $ac_cv_header_sys_mkdev_h = no; then
4485 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4486 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4487echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4488if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4489 echo $ECHO_N "(cached) $ECHO_C" >&6
4490fi
4491echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4492echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4493else
4494 # Is the header compilable?
4495echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4496echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4497cat >conftest.$ac_ext <<_ACEOF
4498#line $LINENO "configure"
4499#include "confdefs.h"
4500$ac_includes_default
4501#include <sys/sysmacros.h>
4502_ACEOF
4503rm -f conftest.$ac_objext
4504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4505 (eval $ac_compile) 2>&5
4506 ac_status=$?
4507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4508 (exit $ac_status); } &&
4509 { ac_try='test -s conftest.$ac_objext'
4510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4511 (eval $ac_try) 2>&5
4512 ac_status=$?
4513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4514 (exit $ac_status); }; }; then
4515 ac_header_compiler=yes
4516else
4517 echo "$as_me: failed program was:" >&5
4518cat conftest.$ac_ext >&5
4519ac_header_compiler=no
4520fi
4521rm -f conftest.$ac_objext conftest.$ac_ext
4522echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4523echo "${ECHO_T}$ac_header_compiler" >&6
4524
4525# Is the header present?
4526echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4527echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4528cat >conftest.$ac_ext <<_ACEOF
4529#line $LINENO "configure"
4530#include "confdefs.h"
4531#include <sys/sysmacros.h>
4532_ACEOF
4533if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4534 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4535 ac_status=$?
4536 egrep -v '^ *\+' conftest.er1 >conftest.err
4537 rm -f conftest.er1
4538 cat conftest.err >&5
4539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4540 (exit $ac_status); } >/dev/null; then
4541 if test -s conftest.err; then
4542 ac_cpp_err=$ac_c_preproc_warn_flag
4543 else
4544 ac_cpp_err=
4545 fi
4546else
4547 ac_cpp_err=yes
4548fi
4549if test -z "$ac_cpp_err"; then
4550 ac_header_preproc=yes
4551else
4552 echo "$as_me: failed program was:" >&5
4553 cat conftest.$ac_ext >&5
4554 ac_header_preproc=no
4555fi
4556rm -f conftest.err conftest.$ac_ext
4557echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4558echo "${ECHO_T}$ac_header_preproc" >&6
4559
4560# So? What about this header?
4561case $ac_header_compiler:$ac_header_preproc in
4562 yes:no )
4563 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4564echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4565 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4566echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4567 no:yes )
4568 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4569echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4570 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4571echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4572 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4573echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4574esac
4575echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4576echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4577if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4578 echo $ECHO_N "(cached) $ECHO_C" >&6
4579else
4580 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4581fi
4582echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4583echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4584
4585fi
4586if test $ac_cv_header_sys_sysmacros_h = yes; then
4587
4588cat >>confdefs.h <<\_ACEOF
4589#define MAJOR_IN_SYSMACROS 1
4590_ACEOF
4591
4592fi
4593
4594
4595 fi
4596fi
4597
Michael W. Hudson54241132001-12-07 15:38:26 +00004598
Guido van Rossum627b2d71993-12-24 10:39:16 +00004599# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004600was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004601echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4602echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4603cat >conftest.$ac_ext <<_ACEOF
4604#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004605#include "confdefs.h"
4606#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004607
4608_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4610 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004611 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004612else
Martin v. Löwis11437992002-04-12 09:54:03 +00004613
4614
4615cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004616#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004617_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004618
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004619
Guido van Rossum627b2d71993-12-24 10:39:16 +00004620fi
4621rm -f conftest*
4622
Martin v. Löwis11437992002-04-12 09:54:03 +00004623echo "$as_me:$LINENO: result: $was_it_defined" >&5
4624echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004625
Neal Norwitz11690112002-07-30 01:08:28 +00004626# Check whether using makedev requires defining _OSF_SOURCE
4627echo "$as_me:$LINENO: checking for makedev" >&5
4628echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4629cat >conftest.$ac_ext <<_ACEOF
4630#line $LINENO "configure"
4631#include "confdefs.h"
4632 #include <sys/types.h>
4633#ifdef F77_DUMMY_MAIN
4634# ifdef __cplusplus
4635 extern "C"
4636# endif
4637 int F77_DUMMY_MAIN() { return 1; }
4638#endif
4639int
4640main ()
4641{
4642 makedev(0, 0)
4643 ;
4644 return 0;
4645}
4646_ACEOF
4647rm -f conftest.$ac_objext conftest$ac_exeext
4648if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4649 (eval $ac_link) 2>&5
4650 ac_status=$?
4651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4652 (exit $ac_status); } &&
4653 { ac_try='test -s conftest$ac_exeext'
4654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4655 (eval $ac_try) 2>&5
4656 ac_status=$?
4657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4658 (exit $ac_status); }; }; then
4659 ac_cv_has_makedev=yes
4660else
4661 echo "$as_me: failed program was:" >&5
4662cat conftest.$ac_ext >&5
4663ac_cv_has_makedev=no
4664fi
4665rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4666if test "$ac_cv_has_makedev" = "no"; then
4667 # we didn't link, try if _OSF_SOURCE will allow us to link
4668 cat >conftest.$ac_ext <<_ACEOF
4669#line $LINENO "configure"
4670#include "confdefs.h"
4671
4672 #define _OSF_SOURCE 1
4673 #include <sys/types.h>
4674
4675#ifdef F77_DUMMY_MAIN
4676# ifdef __cplusplus
4677 extern "C"
4678# endif
4679 int F77_DUMMY_MAIN() { return 1; }
4680#endif
4681int
4682main ()
4683{
4684 makedev(0, 0)
4685 ;
4686 return 0;
4687}
4688_ACEOF
4689rm -f conftest.$ac_objext conftest$ac_exeext
4690if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4691 (eval $ac_link) 2>&5
4692 ac_status=$?
4693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4694 (exit $ac_status); } &&
4695 { ac_try='test -s conftest$ac_exeext'
4696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4697 (eval $ac_try) 2>&5
4698 ac_status=$?
4699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4700 (exit $ac_status); }; }; then
4701 ac_cv_has_makedev=yes
4702else
4703 echo "$as_me: failed program was:" >&5
4704cat conftest.$ac_ext >&5
4705ac_cv_has_makedev=no
4706fi
4707rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4708 if test "$ac_cv_has_makedev" = "yes"; then
4709
4710cat >>confdefs.h <<\_ACEOF
4711#define _OSF_SOURCE 1
4712_ACEOF
4713
4714 fi
4715fi
4716echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4717echo "${ECHO_T}$ac_cv_has_makedev" >&6
4718if test "$ac_cv_has_makedev" = "yes"; then
4719
4720cat >>confdefs.h <<\_ACEOF
4721#define HAVE_MAKEDEV 1
4722_ACEOF
4723
4724fi
4725
Martin v. Löwis399a6892002-10-04 10:22:02 +00004726# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4727# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4728# defined, but the compiler does not support pragma redefine_extname,
4729# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4730# structures (such as rlimit64) without declaring them. As a
4731# work-around, disable LFS on such configurations
4732
4733use_lfs=yes
4734echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4735echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4736cat >conftest.$ac_ext <<_ACEOF
4737#line $LINENO "configure"
4738#include "confdefs.h"
4739
4740#define _LARGEFILE_SOURCE 1
4741#define _FILE_OFFSET_BITS 64
4742#include <sys/resource.h>
4743
4744#ifdef F77_DUMMY_MAIN
4745# ifdef __cplusplus
4746 extern "C"
4747# endif
4748 int F77_DUMMY_MAIN() { return 1; }
4749#endif
4750int
4751main ()
4752{
4753struct rlimit foo;
4754 ;
4755 return 0;
4756}
4757_ACEOF
4758rm -f conftest.$ac_objext
4759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4760 (eval $ac_compile) 2>&5
4761 ac_status=$?
4762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4763 (exit $ac_status); } &&
4764 { ac_try='test -s conftest.$ac_objext'
4765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4766 (eval $ac_try) 2>&5
4767 ac_status=$?
4768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4769 (exit $ac_status); }; }; then
4770 sol_lfs_bug=no
4771else
4772 echo "$as_me: failed program was:" >&5
4773cat conftest.$ac_ext >&5
4774sol_lfs_bug=yes
4775fi
4776rm -f conftest.$ac_objext conftest.$ac_ext
4777echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4778echo "${ECHO_T}$sol_lfs_bug" >&6
4779if test "$sol_lfs_bug" = "yes"; then
4780 use_lfs=no
4781fi
4782
4783if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004784# Two defines needed to enable largefile support on various platforms
4785# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004786
Martin v. Löwis11437992002-04-12 09:54:03 +00004787cat >>confdefs.h <<\_ACEOF
4788#define _LARGEFILE_SOURCE 1
4789_ACEOF
4790
4791
4792cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004793#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004794_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004795
Martin v. Löwis399a6892002-10-04 10:22:02 +00004796fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004797
Guido van Rossum84e7b241996-08-19 21:59:00 +00004798# Add some code to confdefs.h so that the test for off_t works on SCO
4799cat >> confdefs.h <<\EOF
4800#if defined(SCO_DS)
4801#undef _OFF_T
4802#endif
4803EOF
4804
Guido van Rossumef2255b2000-03-10 22:30:29 +00004805# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004806echo "$as_me:$LINENO: checking for mode_t" >&5
4807echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4808if test "${ac_cv_type_mode_t+set}" = set; then
4809 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004810else
Martin v. Löwis11437992002-04-12 09:54:03 +00004811 cat >conftest.$ac_ext <<_ACEOF
4812#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004813#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004814$ac_includes_default
4815#ifdef F77_DUMMY_MAIN
4816# ifdef __cplusplus
4817 extern "C"
4818# endif
4819 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004820#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004821int
4822main ()
4823{
4824if ((mode_t *) 0)
4825 return 0;
4826if (sizeof (mode_t))
4827 return 0;
4828 ;
4829 return 0;
4830}
4831_ACEOF
4832rm -f conftest.$ac_objext
4833if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4834 (eval $ac_compile) 2>&5
4835 ac_status=$?
4836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4837 (exit $ac_status); } &&
4838 { ac_try='test -s conftest.$ac_objext'
4839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4840 (eval $ac_try) 2>&5
4841 ac_status=$?
4842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4843 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004844 ac_cv_type_mode_t=yes
4845else
Martin v. Löwis11437992002-04-12 09:54:03 +00004846 echo "$as_me: failed program was:" >&5
4847cat conftest.$ac_ext >&5
4848ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004849fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004850rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004851fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004852echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4853echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4854if test $ac_cv_type_mode_t = yes; then
4855 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004856else
Martin v. Löwis11437992002-04-12 09:54:03 +00004857
4858cat >>confdefs.h <<_ACEOF
4859#define mode_t int
4860_ACEOF
4861
4862fi
4863
4864echo "$as_me:$LINENO: checking for off_t" >&5
4865echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4866if test "${ac_cv_type_off_t+set}" = set; then
4867 echo $ECHO_N "(cached) $ECHO_C" >&6
4868else
4869 cat >conftest.$ac_ext <<_ACEOF
4870#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004871#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004872$ac_includes_default
4873#ifdef F77_DUMMY_MAIN
4874# ifdef __cplusplus
4875 extern "C"
4876# endif
4877 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004879int
4880main ()
4881{
4882if ((off_t *) 0)
4883 return 0;
4884if (sizeof (off_t))
4885 return 0;
4886 ;
4887 return 0;
4888}
4889_ACEOF
4890rm -f conftest.$ac_objext
4891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4892 (eval $ac_compile) 2>&5
4893 ac_status=$?
4894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4895 (exit $ac_status); } &&
4896 { ac_try='test -s conftest.$ac_objext'
4897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4898 (eval $ac_try) 2>&5
4899 ac_status=$?
4900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4901 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004902 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004903else
Martin v. Löwis11437992002-04-12 09:54:03 +00004904 echo "$as_me: failed program was:" >&5
4905cat conftest.$ac_ext >&5
4906ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004907fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004908rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004909fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004910echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4911echo "${ECHO_T}$ac_cv_type_off_t" >&6
4912if test $ac_cv_type_off_t = yes; then
4913 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004914else
Martin v. Löwis11437992002-04-12 09:54:03 +00004915
4916cat >>confdefs.h <<_ACEOF
4917#define off_t long
4918_ACEOF
4919
4920fi
4921
4922echo "$as_me:$LINENO: checking for pid_t" >&5
4923echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4924if test "${ac_cv_type_pid_t+set}" = set; then
4925 echo $ECHO_N "(cached) $ECHO_C" >&6
4926else
4927 cat >conftest.$ac_ext <<_ACEOF
4928#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004929#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004930$ac_includes_default
4931#ifdef F77_DUMMY_MAIN
4932# ifdef __cplusplus
4933 extern "C"
4934# endif
4935 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004936#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004937int
4938main ()
4939{
4940if ((pid_t *) 0)
4941 return 0;
4942if (sizeof (pid_t))
4943 return 0;
4944 ;
4945 return 0;
4946}
4947_ACEOF
4948rm -f conftest.$ac_objext
4949if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4950 (eval $ac_compile) 2>&5
4951 ac_status=$?
4952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4953 (exit $ac_status); } &&
4954 { ac_try='test -s conftest.$ac_objext'
4955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4956 (eval $ac_try) 2>&5
4957 ac_status=$?
4958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4959 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004960 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004961else
Martin v. Löwis11437992002-04-12 09:54:03 +00004962 echo "$as_me: failed program was:" >&5
4963cat conftest.$ac_ext >&5
4964ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004965fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004966rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004967fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004968echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4969echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4970if test $ac_cv_type_pid_t = yes; then
4971 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004972else
Martin v. Löwis11437992002-04-12 09:54:03 +00004973
4974cat >>confdefs.h <<_ACEOF
4975#define pid_t int
4976_ACEOF
4977
4978fi
4979
4980echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4981echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4982if test "${ac_cv_type_signal+set}" = set; then
4983 echo $ECHO_N "(cached) $ECHO_C" >&6
4984else
4985 cat >conftest.$ac_ext <<_ACEOF
4986#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004987#include "confdefs.h"
4988#include <sys/types.h>
4989#include <signal.h>
4990#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004991# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004992#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004993#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004994extern "C" void (*signal (int, void (*)(int)))(int);
4995#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004996void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004997#endif
4998
Martin v. Löwis11437992002-04-12 09:54:03 +00004999#ifdef F77_DUMMY_MAIN
5000# ifdef __cplusplus
5001 extern "C"
5002# endif
5003 int F77_DUMMY_MAIN() { return 1; }
5004#endif
5005int
5006main ()
5007{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005008int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005009 ;
5010 return 0;
5011}
5012_ACEOF
5013rm -f conftest.$ac_objext
5014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5015 (eval $ac_compile) 2>&5
5016 ac_status=$?
5017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5018 (exit $ac_status); } &&
5019 { ac_try='test -s conftest.$ac_objext'
5020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5021 (eval $ac_try) 2>&5
5022 ac_status=$?
5023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5024 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005025 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005026else
Martin v. Löwis11437992002-04-12 09:54:03 +00005027 echo "$as_me: failed program was:" >&5
5028cat conftest.$ac_ext >&5
5029ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005030fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005031rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005032fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005033echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5034echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005035
Martin v. Löwis11437992002-04-12 09:54:03 +00005036cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005037#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005038_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005039
Michael W. Hudson54241132001-12-07 15:38:26 +00005040
Martin v. Löwis11437992002-04-12 09:54:03 +00005041echo "$as_me:$LINENO: checking for size_t" >&5
5042echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5043if test "${ac_cv_type_size_t+set}" = set; then
5044 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005045else
Martin v. Löwis11437992002-04-12 09:54:03 +00005046 cat >conftest.$ac_ext <<_ACEOF
5047#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005048#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005049$ac_includes_default
5050#ifdef F77_DUMMY_MAIN
5051# ifdef __cplusplus
5052 extern "C"
5053# endif
5054 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005056int
5057main ()
5058{
5059if ((size_t *) 0)
5060 return 0;
5061if (sizeof (size_t))
5062 return 0;
5063 ;
5064 return 0;
5065}
5066_ACEOF
5067rm -f conftest.$ac_objext
5068if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5069 (eval $ac_compile) 2>&5
5070 ac_status=$?
5071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5072 (exit $ac_status); } &&
5073 { ac_try='test -s conftest.$ac_objext'
5074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5075 (eval $ac_try) 2>&5
5076 ac_status=$?
5077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5078 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005079 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005080else
Martin v. Löwis11437992002-04-12 09:54:03 +00005081 echo "$as_me: failed program was:" >&5
5082cat conftest.$ac_ext >&5
5083ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005084fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005085rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005086fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005087echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5088echo "${ECHO_T}$ac_cv_type_size_t" >&6
5089if test $ac_cv_type_size_t = yes; then
5090 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005091else
Martin v. Löwis11437992002-04-12 09:54:03 +00005092
5093cat >>confdefs.h <<_ACEOF
5094#define size_t unsigned
5095_ACEOF
5096
5097fi
5098
5099echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5100echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5101if test "${ac_cv_type_uid_t+set}" = set; then
5102 echo $ECHO_N "(cached) $ECHO_C" >&6
5103else
5104 cat >conftest.$ac_ext <<_ACEOF
5105#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005106#include "confdefs.h"
5107#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005108
5109_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5111 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005112 ac_cv_type_uid_t=yes
5113else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005114 ac_cv_type_uid_t=no
5115fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005116rm -f conftest*
5117
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005118fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005119echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5120echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005121if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005122
Martin v. Löwis11437992002-04-12 09:54:03 +00005123cat >>confdefs.h <<\_ACEOF
5124#define uid_t int
5125_ACEOF
5126
5127
5128cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005129#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005130_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005131
5132fi
5133
Jack Jansendd19cf82001-12-06 22:36:17 +00005134
Michael W. Hudson54241132001-12-07 15:38:26 +00005135# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005136echo "$as_me:$LINENO: checking for int" >&5
5137echo $ECHO_N "checking for int... $ECHO_C" >&6
5138if test "${ac_cv_type_int+set}" = set; then
5139 echo $ECHO_N "(cached) $ECHO_C" >&6
5140else
5141 cat >conftest.$ac_ext <<_ACEOF
5142#line $LINENO "configure"
5143#include "confdefs.h"
5144$ac_includes_default
5145#ifdef F77_DUMMY_MAIN
5146# ifdef __cplusplus
5147 extern "C"
5148# endif
5149 int F77_DUMMY_MAIN() { return 1; }
5150#endif
5151int
5152main ()
5153{
5154if ((int *) 0)
5155 return 0;
5156if (sizeof (int))
5157 return 0;
5158 ;
5159 return 0;
5160}
5161_ACEOF
5162rm -f conftest.$ac_objext
5163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5164 (eval $ac_compile) 2>&5
5165 ac_status=$?
5166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5167 (exit $ac_status); } &&
5168 { ac_try='test -s conftest.$ac_objext'
5169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5170 (eval $ac_try) 2>&5
5171 ac_status=$?
5172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5173 (exit $ac_status); }; }; then
5174 ac_cv_type_int=yes
5175else
5176 echo "$as_me: failed program was:" >&5
5177cat conftest.$ac_ext >&5
5178ac_cv_type_int=no
5179fi
5180rm -f conftest.$ac_objext conftest.$ac_ext
5181fi
5182echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5183echo "${ECHO_T}$ac_cv_type_int" >&6
5184
5185echo "$as_me:$LINENO: checking size of int" >&5
5186echo $ECHO_N "checking size of int... $ECHO_C" >&6
5187if test "${ac_cv_sizeof_int+set}" = set; then
5188 echo $ECHO_N "(cached) $ECHO_C" >&6
5189else
5190 if test "$ac_cv_type_int" = yes; then
5191 # The cast to unsigned long works around a bug in the HP C Compiler
5192 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5193 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5194 # This bug is HP SR number 8606223364.
5195 if test "$cross_compiling" = yes; then
5196 # Depending upon the size, compute the lo and hi bounds.
5197cat >conftest.$ac_ext <<_ACEOF
5198#line $LINENO "configure"
5199#include "confdefs.h"
5200$ac_includes_default
5201#ifdef F77_DUMMY_MAIN
5202# ifdef __cplusplus
5203 extern "C"
5204# endif
5205 int F77_DUMMY_MAIN() { return 1; }
5206#endif
5207int
5208main ()
5209{
5210static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5211test_array [0] = 0
5212
5213 ;
5214 return 0;
5215}
5216_ACEOF
5217rm -f conftest.$ac_objext
5218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5219 (eval $ac_compile) 2>&5
5220 ac_status=$?
5221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5222 (exit $ac_status); } &&
5223 { ac_try='test -s conftest.$ac_objext'
5224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5225 (eval $ac_try) 2>&5
5226 ac_status=$?
5227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5228 (exit $ac_status); }; }; then
5229 ac_lo=0 ac_mid=0
5230 while :; do
5231 cat >conftest.$ac_ext <<_ACEOF
5232#line $LINENO "configure"
5233#include "confdefs.h"
5234$ac_includes_default
5235#ifdef F77_DUMMY_MAIN
5236# ifdef __cplusplus
5237 extern "C"
5238# endif
5239 int F77_DUMMY_MAIN() { return 1; }
5240#endif
5241int
5242main ()
5243{
5244static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5245test_array [0] = 0
5246
5247 ;
5248 return 0;
5249}
5250_ACEOF
5251rm -f conftest.$ac_objext
5252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5253 (eval $ac_compile) 2>&5
5254 ac_status=$?
5255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5256 (exit $ac_status); } &&
5257 { ac_try='test -s conftest.$ac_objext'
5258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5259 (eval $ac_try) 2>&5
5260 ac_status=$?
5261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5262 (exit $ac_status); }; }; then
5263 ac_hi=$ac_mid; break
5264else
5265 echo "$as_me: failed program was:" >&5
5266cat conftest.$ac_ext >&5
5267ac_lo=`expr $ac_mid + 1`
5268 if test $ac_lo -le $ac_mid; then
5269 ac_lo= ac_hi=
5270 break
5271 fi
5272 ac_mid=`expr 2 '*' $ac_mid + 1`
5273fi
5274rm -f conftest.$ac_objext conftest.$ac_ext
5275 done
5276else
5277 echo "$as_me: failed program was:" >&5
5278cat conftest.$ac_ext >&5
5279cat >conftest.$ac_ext <<_ACEOF
5280#line $LINENO "configure"
5281#include "confdefs.h"
5282$ac_includes_default
5283#ifdef F77_DUMMY_MAIN
5284# ifdef __cplusplus
5285 extern "C"
5286# endif
5287 int F77_DUMMY_MAIN() { return 1; }
5288#endif
5289int
5290main ()
5291{
5292static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5293test_array [0] = 0
5294
5295 ;
5296 return 0;
5297}
5298_ACEOF
5299rm -f conftest.$ac_objext
5300if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5301 (eval $ac_compile) 2>&5
5302 ac_status=$?
5303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5304 (exit $ac_status); } &&
5305 { ac_try='test -s conftest.$ac_objext'
5306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5307 (eval $ac_try) 2>&5
5308 ac_status=$?
5309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5310 (exit $ac_status); }; }; then
5311 ac_hi=-1 ac_mid=-1
5312 while :; do
5313 cat >conftest.$ac_ext <<_ACEOF
5314#line $LINENO "configure"
5315#include "confdefs.h"
5316$ac_includes_default
5317#ifdef F77_DUMMY_MAIN
5318# ifdef __cplusplus
5319 extern "C"
5320# endif
5321 int F77_DUMMY_MAIN() { return 1; }
5322#endif
5323int
5324main ()
5325{
5326static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5327test_array [0] = 0
5328
5329 ;
5330 return 0;
5331}
5332_ACEOF
5333rm -f conftest.$ac_objext
5334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5335 (eval $ac_compile) 2>&5
5336 ac_status=$?
5337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5338 (exit $ac_status); } &&
5339 { ac_try='test -s conftest.$ac_objext'
5340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5341 (eval $ac_try) 2>&5
5342 ac_status=$?
5343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5344 (exit $ac_status); }; }; then
5345 ac_lo=$ac_mid; break
5346else
5347 echo "$as_me: failed program was:" >&5
5348cat conftest.$ac_ext >&5
5349ac_hi=`expr '(' $ac_mid ')' - 1`
5350 if test $ac_mid -le $ac_hi; then
5351 ac_lo= ac_hi=
5352 break
5353 fi
5354 ac_mid=`expr 2 '*' $ac_mid`
5355fi
5356rm -f conftest.$ac_objext conftest.$ac_ext
5357 done
5358else
5359 echo "$as_me: failed program was:" >&5
5360cat conftest.$ac_ext >&5
5361ac_lo= ac_hi=
5362fi
5363rm -f conftest.$ac_objext conftest.$ac_ext
5364fi
5365rm -f conftest.$ac_objext conftest.$ac_ext
5366# Binary search between lo and hi bounds.
5367while test "x$ac_lo" != "x$ac_hi"; do
5368 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5369 cat >conftest.$ac_ext <<_ACEOF
5370#line $LINENO "configure"
5371#include "confdefs.h"
5372$ac_includes_default
5373#ifdef F77_DUMMY_MAIN
5374# ifdef __cplusplus
5375 extern "C"
5376# endif
5377 int F77_DUMMY_MAIN() { return 1; }
5378#endif
5379int
5380main ()
5381{
5382static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5383test_array [0] = 0
5384
5385 ;
5386 return 0;
5387}
5388_ACEOF
5389rm -f conftest.$ac_objext
5390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5391 (eval $ac_compile) 2>&5
5392 ac_status=$?
5393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5394 (exit $ac_status); } &&
5395 { ac_try='test -s conftest.$ac_objext'
5396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5397 (eval $ac_try) 2>&5
5398 ac_status=$?
5399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5400 (exit $ac_status); }; }; then
5401 ac_hi=$ac_mid
5402else
5403 echo "$as_me: failed program was:" >&5
5404cat conftest.$ac_ext >&5
5405ac_lo=`expr '(' $ac_mid ')' + 1`
5406fi
5407rm -f conftest.$ac_objext conftest.$ac_ext
5408done
5409case $ac_lo in
5410?*) ac_cv_sizeof_int=$ac_lo;;
5411'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5412echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5413 { (exit 1); exit 1; }; } ;;
5414esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005415else
5416 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005417 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5418echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5419 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005420else
Martin v. Löwis11437992002-04-12 09:54:03 +00005421 cat >conftest.$ac_ext <<_ACEOF
5422#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005423#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005424$ac_includes_default
5425long longval () { return (long) (sizeof (int)); }
5426unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005427#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005428#include <stdlib.h>
5429#ifdef F77_DUMMY_MAIN
5430# ifdef __cplusplus
5431 extern "C"
5432# endif
5433 int F77_DUMMY_MAIN() { return 1; }
5434#endif
5435int
5436main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005437{
Martin v. Löwis11437992002-04-12 09:54:03 +00005438
5439 FILE *f = fopen ("conftest.val", "w");
5440 if (! f)
5441 exit (1);
5442 if (((long) (sizeof (int))) < 0)
5443 {
5444 long i = longval ();
5445 if (i != ((long) (sizeof (int))))
5446 exit (1);
5447 fprintf (f, "%ld\n", i);
5448 }
5449 else
5450 {
5451 unsigned long i = ulongval ();
5452 if (i != ((long) (sizeof (int))))
5453 exit (1);
5454 fprintf (f, "%lu\n", i);
5455 }
5456 exit (ferror (f) || fclose (f) != 0);
5457
5458 ;
5459 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005460}
Martin v. Löwis11437992002-04-12 09:54:03 +00005461_ACEOF
5462rm -f conftest$ac_exeext
5463if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5464 (eval $ac_link) 2>&5
5465 ac_status=$?
5466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5467 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5469 (eval $ac_try) 2>&5
5470 ac_status=$?
5471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5472 (exit $ac_status); }; }; then
5473 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005474else
Martin v. Löwis11437992002-04-12 09:54:03 +00005475 echo "$as_me: program exited with status $ac_status" >&5
5476echo "$as_me: failed program was:" >&5
5477cat conftest.$ac_ext >&5
5478( exit $ac_status )
5479{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5480echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5481 { (exit 1); exit 1; }; }
5482fi
5483rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5484fi
5485fi
5486rm -f conftest.val
5487else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005488 ac_cv_sizeof_int=0
5489fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005490fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005491echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5492echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5493cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005494#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005495_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005496
5497
Martin v. Löwis11437992002-04-12 09:54:03 +00005498echo "$as_me:$LINENO: checking for long" >&5
5499echo $ECHO_N "checking for long... $ECHO_C" >&6
5500if test "${ac_cv_type_long+set}" = set; then
5501 echo $ECHO_N "(cached) $ECHO_C" >&6
5502else
5503 cat >conftest.$ac_ext <<_ACEOF
5504#line $LINENO "configure"
5505#include "confdefs.h"
5506$ac_includes_default
5507#ifdef F77_DUMMY_MAIN
5508# ifdef __cplusplus
5509 extern "C"
5510# endif
5511 int F77_DUMMY_MAIN() { return 1; }
5512#endif
5513int
5514main ()
5515{
5516if ((long *) 0)
5517 return 0;
5518if (sizeof (long))
5519 return 0;
5520 ;
5521 return 0;
5522}
5523_ACEOF
5524rm -f conftest.$ac_objext
5525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5526 (eval $ac_compile) 2>&5
5527 ac_status=$?
5528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5529 (exit $ac_status); } &&
5530 { ac_try='test -s conftest.$ac_objext'
5531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5532 (eval $ac_try) 2>&5
5533 ac_status=$?
5534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5535 (exit $ac_status); }; }; then
5536 ac_cv_type_long=yes
5537else
5538 echo "$as_me: failed program was:" >&5
5539cat conftest.$ac_ext >&5
5540ac_cv_type_long=no
5541fi
5542rm -f conftest.$ac_objext conftest.$ac_ext
5543fi
5544echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5545echo "${ECHO_T}$ac_cv_type_long" >&6
5546
5547echo "$as_me:$LINENO: checking size of long" >&5
5548echo $ECHO_N "checking size of long... $ECHO_C" >&6
5549if test "${ac_cv_sizeof_long+set}" = set; then
5550 echo $ECHO_N "(cached) $ECHO_C" >&6
5551else
5552 if test "$ac_cv_type_long" = yes; then
5553 # The cast to unsigned long works around a bug in the HP C Compiler
5554 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5555 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5556 # This bug is HP SR number 8606223364.
5557 if test "$cross_compiling" = yes; then
5558 # Depending upon the size, compute the lo and hi bounds.
5559cat >conftest.$ac_ext <<_ACEOF
5560#line $LINENO "configure"
5561#include "confdefs.h"
5562$ac_includes_default
5563#ifdef F77_DUMMY_MAIN
5564# ifdef __cplusplus
5565 extern "C"
5566# endif
5567 int F77_DUMMY_MAIN() { return 1; }
5568#endif
5569int
5570main ()
5571{
5572static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5573test_array [0] = 0
5574
5575 ;
5576 return 0;
5577}
5578_ACEOF
5579rm -f conftest.$ac_objext
5580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5581 (eval $ac_compile) 2>&5
5582 ac_status=$?
5583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5584 (exit $ac_status); } &&
5585 { ac_try='test -s conftest.$ac_objext'
5586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5587 (eval $ac_try) 2>&5
5588 ac_status=$?
5589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5590 (exit $ac_status); }; }; then
5591 ac_lo=0 ac_mid=0
5592 while :; do
5593 cat >conftest.$ac_ext <<_ACEOF
5594#line $LINENO "configure"
5595#include "confdefs.h"
5596$ac_includes_default
5597#ifdef F77_DUMMY_MAIN
5598# ifdef __cplusplus
5599 extern "C"
5600# endif
5601 int F77_DUMMY_MAIN() { return 1; }
5602#endif
5603int
5604main ()
5605{
5606static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5607test_array [0] = 0
5608
5609 ;
5610 return 0;
5611}
5612_ACEOF
5613rm -f conftest.$ac_objext
5614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5615 (eval $ac_compile) 2>&5
5616 ac_status=$?
5617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5618 (exit $ac_status); } &&
5619 { ac_try='test -s conftest.$ac_objext'
5620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5621 (eval $ac_try) 2>&5
5622 ac_status=$?
5623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5624 (exit $ac_status); }; }; then
5625 ac_hi=$ac_mid; break
5626else
5627 echo "$as_me: failed program was:" >&5
5628cat conftest.$ac_ext >&5
5629ac_lo=`expr $ac_mid + 1`
5630 if test $ac_lo -le $ac_mid; then
5631 ac_lo= ac_hi=
5632 break
5633 fi
5634 ac_mid=`expr 2 '*' $ac_mid + 1`
5635fi
5636rm -f conftest.$ac_objext conftest.$ac_ext
5637 done
5638else
5639 echo "$as_me: failed program was:" >&5
5640cat conftest.$ac_ext >&5
5641cat >conftest.$ac_ext <<_ACEOF
5642#line $LINENO "configure"
5643#include "confdefs.h"
5644$ac_includes_default
5645#ifdef F77_DUMMY_MAIN
5646# ifdef __cplusplus
5647 extern "C"
5648# endif
5649 int F77_DUMMY_MAIN() { return 1; }
5650#endif
5651int
5652main ()
5653{
5654static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5655test_array [0] = 0
5656
5657 ;
5658 return 0;
5659}
5660_ACEOF
5661rm -f conftest.$ac_objext
5662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5663 (eval $ac_compile) 2>&5
5664 ac_status=$?
5665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5666 (exit $ac_status); } &&
5667 { ac_try='test -s conftest.$ac_objext'
5668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5669 (eval $ac_try) 2>&5
5670 ac_status=$?
5671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5672 (exit $ac_status); }; }; then
5673 ac_hi=-1 ac_mid=-1
5674 while :; do
5675 cat >conftest.$ac_ext <<_ACEOF
5676#line $LINENO "configure"
5677#include "confdefs.h"
5678$ac_includes_default
5679#ifdef F77_DUMMY_MAIN
5680# ifdef __cplusplus
5681 extern "C"
5682# endif
5683 int F77_DUMMY_MAIN() { return 1; }
5684#endif
5685int
5686main ()
5687{
5688static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5689test_array [0] = 0
5690
5691 ;
5692 return 0;
5693}
5694_ACEOF
5695rm -f conftest.$ac_objext
5696if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5697 (eval $ac_compile) 2>&5
5698 ac_status=$?
5699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5700 (exit $ac_status); } &&
5701 { ac_try='test -s conftest.$ac_objext'
5702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5703 (eval $ac_try) 2>&5
5704 ac_status=$?
5705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5706 (exit $ac_status); }; }; then
5707 ac_lo=$ac_mid; break
5708else
5709 echo "$as_me: failed program was:" >&5
5710cat conftest.$ac_ext >&5
5711ac_hi=`expr '(' $ac_mid ')' - 1`
5712 if test $ac_mid -le $ac_hi; then
5713 ac_lo= ac_hi=
5714 break
5715 fi
5716 ac_mid=`expr 2 '*' $ac_mid`
5717fi
5718rm -f conftest.$ac_objext conftest.$ac_ext
5719 done
5720else
5721 echo "$as_me: failed program was:" >&5
5722cat conftest.$ac_ext >&5
5723ac_lo= ac_hi=
5724fi
5725rm -f conftest.$ac_objext conftest.$ac_ext
5726fi
5727rm -f conftest.$ac_objext conftest.$ac_ext
5728# Binary search between lo and hi bounds.
5729while test "x$ac_lo" != "x$ac_hi"; do
5730 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5731 cat >conftest.$ac_ext <<_ACEOF
5732#line $LINENO "configure"
5733#include "confdefs.h"
5734$ac_includes_default
5735#ifdef F77_DUMMY_MAIN
5736# ifdef __cplusplus
5737 extern "C"
5738# endif
5739 int F77_DUMMY_MAIN() { return 1; }
5740#endif
5741int
5742main ()
5743{
5744static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5745test_array [0] = 0
5746
5747 ;
5748 return 0;
5749}
5750_ACEOF
5751rm -f conftest.$ac_objext
5752if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5753 (eval $ac_compile) 2>&5
5754 ac_status=$?
5755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5756 (exit $ac_status); } &&
5757 { ac_try='test -s conftest.$ac_objext'
5758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5759 (eval $ac_try) 2>&5
5760 ac_status=$?
5761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5762 (exit $ac_status); }; }; then
5763 ac_hi=$ac_mid
5764else
5765 echo "$as_me: failed program was:" >&5
5766cat conftest.$ac_ext >&5
5767ac_lo=`expr '(' $ac_mid ')' + 1`
5768fi
5769rm -f conftest.$ac_objext conftest.$ac_ext
5770done
5771case $ac_lo in
5772?*) ac_cv_sizeof_long=$ac_lo;;
5773'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5774echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5775 { (exit 1); exit 1; }; } ;;
5776esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005777else
5778 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005779 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5780echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5781 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005782else
Martin v. Löwis11437992002-04-12 09:54:03 +00005783 cat >conftest.$ac_ext <<_ACEOF
5784#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005785#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005786$ac_includes_default
5787long longval () { return (long) (sizeof (long)); }
5788unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005789#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005790#include <stdlib.h>
5791#ifdef F77_DUMMY_MAIN
5792# ifdef __cplusplus
5793 extern "C"
5794# endif
5795 int F77_DUMMY_MAIN() { return 1; }
5796#endif
5797int
5798main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005799{
Martin v. Löwis11437992002-04-12 09:54:03 +00005800
5801 FILE *f = fopen ("conftest.val", "w");
5802 if (! f)
5803 exit (1);
5804 if (((long) (sizeof (long))) < 0)
5805 {
5806 long i = longval ();
5807 if (i != ((long) (sizeof (long))))
5808 exit (1);
5809 fprintf (f, "%ld\n", i);
5810 }
5811 else
5812 {
5813 unsigned long i = ulongval ();
5814 if (i != ((long) (sizeof (long))))
5815 exit (1);
5816 fprintf (f, "%lu\n", i);
5817 }
5818 exit (ferror (f) || fclose (f) != 0);
5819
5820 ;
5821 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005822}
Martin v. Löwis11437992002-04-12 09:54:03 +00005823_ACEOF
5824rm -f conftest$ac_exeext
5825if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5826 (eval $ac_link) 2>&5
5827 ac_status=$?
5828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5829 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5831 (eval $ac_try) 2>&5
5832 ac_status=$?
5833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5834 (exit $ac_status); }; }; then
5835 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005836else
Martin v. Löwis11437992002-04-12 09:54:03 +00005837 echo "$as_me: program exited with status $ac_status" >&5
5838echo "$as_me: failed program was:" >&5
5839cat conftest.$ac_ext >&5
5840( exit $ac_status )
5841{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5842echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5843 { (exit 1); exit 1; }; }
5844fi
5845rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5846fi
5847fi
5848rm -f conftest.val
5849else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005850 ac_cv_sizeof_long=0
5851fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005852fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005853echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5854echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5855cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005856#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005857_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005858
5859
Martin v. Löwis11437992002-04-12 09:54:03 +00005860echo "$as_me:$LINENO: checking for void *" >&5
5861echo $ECHO_N "checking for void *... $ECHO_C" >&6
5862if test "${ac_cv_type_void_p+set}" = set; then
5863 echo $ECHO_N "(cached) $ECHO_C" >&6
5864else
5865 cat >conftest.$ac_ext <<_ACEOF
5866#line $LINENO "configure"
5867#include "confdefs.h"
5868$ac_includes_default
5869#ifdef F77_DUMMY_MAIN
5870# ifdef __cplusplus
5871 extern "C"
5872# endif
5873 int F77_DUMMY_MAIN() { return 1; }
5874#endif
5875int
5876main ()
5877{
5878if ((void * *) 0)
5879 return 0;
5880if (sizeof (void *))
5881 return 0;
5882 ;
5883 return 0;
5884}
5885_ACEOF
5886rm -f conftest.$ac_objext
5887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5888 (eval $ac_compile) 2>&5
5889 ac_status=$?
5890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5891 (exit $ac_status); } &&
5892 { ac_try='test -s conftest.$ac_objext'
5893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5894 (eval $ac_try) 2>&5
5895 ac_status=$?
5896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5897 (exit $ac_status); }; }; then
5898 ac_cv_type_void_p=yes
5899else
5900 echo "$as_me: failed program was:" >&5
5901cat conftest.$ac_ext >&5
5902ac_cv_type_void_p=no
5903fi
5904rm -f conftest.$ac_objext conftest.$ac_ext
5905fi
5906echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5907echo "${ECHO_T}$ac_cv_type_void_p" >&6
5908
5909echo "$as_me:$LINENO: checking size of void *" >&5
5910echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5911if test "${ac_cv_sizeof_void_p+set}" = set; then
5912 echo $ECHO_N "(cached) $ECHO_C" >&6
5913else
5914 if test "$ac_cv_type_void_p" = yes; then
5915 # The cast to unsigned long works around a bug in the HP C Compiler
5916 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5917 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5918 # This bug is HP SR number 8606223364.
5919 if test "$cross_compiling" = yes; then
5920 # Depending upon the size, compute the lo and hi bounds.
5921cat >conftest.$ac_ext <<_ACEOF
5922#line $LINENO "configure"
5923#include "confdefs.h"
5924$ac_includes_default
5925#ifdef F77_DUMMY_MAIN
5926# ifdef __cplusplus
5927 extern "C"
5928# endif
5929 int F77_DUMMY_MAIN() { return 1; }
5930#endif
5931int
5932main ()
5933{
5934static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5935test_array [0] = 0
5936
5937 ;
5938 return 0;
5939}
5940_ACEOF
5941rm -f conftest.$ac_objext
5942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5943 (eval $ac_compile) 2>&5
5944 ac_status=$?
5945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5946 (exit $ac_status); } &&
5947 { ac_try='test -s conftest.$ac_objext'
5948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5949 (eval $ac_try) 2>&5
5950 ac_status=$?
5951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5952 (exit $ac_status); }; }; then
5953 ac_lo=0 ac_mid=0
5954 while :; do
5955 cat >conftest.$ac_ext <<_ACEOF
5956#line $LINENO "configure"
5957#include "confdefs.h"
5958$ac_includes_default
5959#ifdef F77_DUMMY_MAIN
5960# ifdef __cplusplus
5961 extern "C"
5962# endif
5963 int F77_DUMMY_MAIN() { return 1; }
5964#endif
5965int
5966main ()
5967{
5968static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5969test_array [0] = 0
5970
5971 ;
5972 return 0;
5973}
5974_ACEOF
5975rm -f conftest.$ac_objext
5976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5977 (eval $ac_compile) 2>&5
5978 ac_status=$?
5979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5980 (exit $ac_status); } &&
5981 { ac_try='test -s conftest.$ac_objext'
5982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5983 (eval $ac_try) 2>&5
5984 ac_status=$?
5985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5986 (exit $ac_status); }; }; then
5987 ac_hi=$ac_mid; break
5988else
5989 echo "$as_me: failed program was:" >&5
5990cat conftest.$ac_ext >&5
5991ac_lo=`expr $ac_mid + 1`
5992 if test $ac_lo -le $ac_mid; then
5993 ac_lo= ac_hi=
5994 break
5995 fi
5996 ac_mid=`expr 2 '*' $ac_mid + 1`
5997fi
5998rm -f conftest.$ac_objext conftest.$ac_ext
5999 done
6000else
6001 echo "$as_me: failed program was:" >&5
6002cat conftest.$ac_ext >&5
6003cat >conftest.$ac_ext <<_ACEOF
6004#line $LINENO "configure"
6005#include "confdefs.h"
6006$ac_includes_default
6007#ifdef F77_DUMMY_MAIN
6008# ifdef __cplusplus
6009 extern "C"
6010# endif
6011 int F77_DUMMY_MAIN() { return 1; }
6012#endif
6013int
6014main ()
6015{
6016static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6017test_array [0] = 0
6018
6019 ;
6020 return 0;
6021}
6022_ACEOF
6023rm -f conftest.$ac_objext
6024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6025 (eval $ac_compile) 2>&5
6026 ac_status=$?
6027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6028 (exit $ac_status); } &&
6029 { ac_try='test -s conftest.$ac_objext'
6030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6031 (eval $ac_try) 2>&5
6032 ac_status=$?
6033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6034 (exit $ac_status); }; }; then
6035 ac_hi=-1 ac_mid=-1
6036 while :; do
6037 cat >conftest.$ac_ext <<_ACEOF
6038#line $LINENO "configure"
6039#include "confdefs.h"
6040$ac_includes_default
6041#ifdef F77_DUMMY_MAIN
6042# ifdef __cplusplus
6043 extern "C"
6044# endif
6045 int F77_DUMMY_MAIN() { return 1; }
6046#endif
6047int
6048main ()
6049{
6050static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6051test_array [0] = 0
6052
6053 ;
6054 return 0;
6055}
6056_ACEOF
6057rm -f conftest.$ac_objext
6058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6059 (eval $ac_compile) 2>&5
6060 ac_status=$?
6061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6062 (exit $ac_status); } &&
6063 { ac_try='test -s conftest.$ac_objext'
6064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6065 (eval $ac_try) 2>&5
6066 ac_status=$?
6067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6068 (exit $ac_status); }; }; then
6069 ac_lo=$ac_mid; break
6070else
6071 echo "$as_me: failed program was:" >&5
6072cat conftest.$ac_ext >&5
6073ac_hi=`expr '(' $ac_mid ')' - 1`
6074 if test $ac_mid -le $ac_hi; then
6075 ac_lo= ac_hi=
6076 break
6077 fi
6078 ac_mid=`expr 2 '*' $ac_mid`
6079fi
6080rm -f conftest.$ac_objext conftest.$ac_ext
6081 done
6082else
6083 echo "$as_me: failed program was:" >&5
6084cat conftest.$ac_ext >&5
6085ac_lo= ac_hi=
6086fi
6087rm -f conftest.$ac_objext conftest.$ac_ext
6088fi
6089rm -f conftest.$ac_objext conftest.$ac_ext
6090# Binary search between lo and hi bounds.
6091while test "x$ac_lo" != "x$ac_hi"; do
6092 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6093 cat >conftest.$ac_ext <<_ACEOF
6094#line $LINENO "configure"
6095#include "confdefs.h"
6096$ac_includes_default
6097#ifdef F77_DUMMY_MAIN
6098# ifdef __cplusplus
6099 extern "C"
6100# endif
6101 int F77_DUMMY_MAIN() { return 1; }
6102#endif
6103int
6104main ()
6105{
6106static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6107test_array [0] = 0
6108
6109 ;
6110 return 0;
6111}
6112_ACEOF
6113rm -f conftest.$ac_objext
6114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6115 (eval $ac_compile) 2>&5
6116 ac_status=$?
6117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6118 (exit $ac_status); } &&
6119 { ac_try='test -s conftest.$ac_objext'
6120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6121 (eval $ac_try) 2>&5
6122 ac_status=$?
6123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6124 (exit $ac_status); }; }; then
6125 ac_hi=$ac_mid
6126else
6127 echo "$as_me: failed program was:" >&5
6128cat conftest.$ac_ext >&5
6129ac_lo=`expr '(' $ac_mid ')' + 1`
6130fi
6131rm -f conftest.$ac_objext conftest.$ac_ext
6132done
6133case $ac_lo in
6134?*) ac_cv_sizeof_void_p=$ac_lo;;
6135'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6136echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6137 { (exit 1); exit 1; }; } ;;
6138esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006139else
6140 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006141 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6142echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6143 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006144else
Martin v. Löwis11437992002-04-12 09:54:03 +00006145 cat >conftest.$ac_ext <<_ACEOF
6146#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006147#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006148$ac_includes_default
6149long longval () { return (long) (sizeof (void *)); }
6150unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006151#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006152#include <stdlib.h>
6153#ifdef F77_DUMMY_MAIN
6154# ifdef __cplusplus
6155 extern "C"
6156# endif
6157 int F77_DUMMY_MAIN() { return 1; }
6158#endif
6159int
6160main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006161{
Martin v. Löwis11437992002-04-12 09:54:03 +00006162
6163 FILE *f = fopen ("conftest.val", "w");
6164 if (! f)
6165 exit (1);
6166 if (((long) (sizeof (void *))) < 0)
6167 {
6168 long i = longval ();
6169 if (i != ((long) (sizeof (void *))))
6170 exit (1);
6171 fprintf (f, "%ld\n", i);
6172 }
6173 else
6174 {
6175 unsigned long i = ulongval ();
6176 if (i != ((long) (sizeof (void *))))
6177 exit (1);
6178 fprintf (f, "%lu\n", i);
6179 }
6180 exit (ferror (f) || fclose (f) != 0);
6181
6182 ;
6183 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006184}
Martin v. Löwis11437992002-04-12 09:54:03 +00006185_ACEOF
6186rm -f conftest$ac_exeext
6187if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6188 (eval $ac_link) 2>&5
6189 ac_status=$?
6190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6191 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6193 (eval $ac_try) 2>&5
6194 ac_status=$?
6195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6196 (exit $ac_status); }; }; then
6197 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006198else
Martin v. Löwis11437992002-04-12 09:54:03 +00006199 echo "$as_me: program exited with status $ac_status" >&5
6200echo "$as_me: failed program was:" >&5
6201cat conftest.$ac_ext >&5
6202( exit $ac_status )
6203{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6204echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6205 { (exit 1); exit 1; }; }
6206fi
6207rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6208fi
6209fi
6210rm -f conftest.val
6211else
Guido van Rossumad678af1998-10-02 14:42:15 +00006212 ac_cv_sizeof_void_p=0
6213fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006214fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006215echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6216echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6217cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006218#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006219_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006220
6221
Martin v. Löwis11437992002-04-12 09:54:03 +00006222echo "$as_me:$LINENO: checking for char" >&5
6223echo $ECHO_N "checking for char... $ECHO_C" >&6
6224if test "${ac_cv_type_char+set}" = set; then
6225 echo $ECHO_N "(cached) $ECHO_C" >&6
6226else
6227 cat >conftest.$ac_ext <<_ACEOF
6228#line $LINENO "configure"
6229#include "confdefs.h"
6230$ac_includes_default
6231#ifdef F77_DUMMY_MAIN
6232# ifdef __cplusplus
6233 extern "C"
6234# endif
6235 int F77_DUMMY_MAIN() { return 1; }
6236#endif
6237int
6238main ()
6239{
6240if ((char *) 0)
6241 return 0;
6242if (sizeof (char))
6243 return 0;
6244 ;
6245 return 0;
6246}
6247_ACEOF
6248rm -f conftest.$ac_objext
6249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6250 (eval $ac_compile) 2>&5
6251 ac_status=$?
6252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6253 (exit $ac_status); } &&
6254 { ac_try='test -s conftest.$ac_objext'
6255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6256 (eval $ac_try) 2>&5
6257 ac_status=$?
6258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6259 (exit $ac_status); }; }; then
6260 ac_cv_type_char=yes
6261else
6262 echo "$as_me: failed program was:" >&5
6263cat conftest.$ac_ext >&5
6264ac_cv_type_char=no
6265fi
6266rm -f conftest.$ac_objext conftest.$ac_ext
6267fi
6268echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6269echo "${ECHO_T}$ac_cv_type_char" >&6
6270
6271echo "$as_me:$LINENO: checking size of char" >&5
6272echo $ECHO_N "checking size of char... $ECHO_C" >&6
6273if test "${ac_cv_sizeof_char+set}" = set; then
6274 echo $ECHO_N "(cached) $ECHO_C" >&6
6275else
6276 if test "$ac_cv_type_char" = yes; then
6277 # The cast to unsigned long works around a bug in the HP C Compiler
6278 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6279 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6280 # This bug is HP SR number 8606223364.
6281 if test "$cross_compiling" = yes; then
6282 # Depending upon the size, compute the lo and hi bounds.
6283cat >conftest.$ac_ext <<_ACEOF
6284#line $LINENO "configure"
6285#include "confdefs.h"
6286$ac_includes_default
6287#ifdef F77_DUMMY_MAIN
6288# ifdef __cplusplus
6289 extern "C"
6290# endif
6291 int F77_DUMMY_MAIN() { return 1; }
6292#endif
6293int
6294main ()
6295{
6296static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6297test_array [0] = 0
6298
6299 ;
6300 return 0;
6301}
6302_ACEOF
6303rm -f conftest.$ac_objext
6304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6305 (eval $ac_compile) 2>&5
6306 ac_status=$?
6307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6308 (exit $ac_status); } &&
6309 { ac_try='test -s conftest.$ac_objext'
6310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6311 (eval $ac_try) 2>&5
6312 ac_status=$?
6313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6314 (exit $ac_status); }; }; then
6315 ac_lo=0 ac_mid=0
6316 while :; do
6317 cat >conftest.$ac_ext <<_ACEOF
6318#line $LINENO "configure"
6319#include "confdefs.h"
6320$ac_includes_default
6321#ifdef F77_DUMMY_MAIN
6322# ifdef __cplusplus
6323 extern "C"
6324# endif
6325 int F77_DUMMY_MAIN() { return 1; }
6326#endif
6327int
6328main ()
6329{
6330static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6331test_array [0] = 0
6332
6333 ;
6334 return 0;
6335}
6336_ACEOF
6337rm -f conftest.$ac_objext
6338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6339 (eval $ac_compile) 2>&5
6340 ac_status=$?
6341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6342 (exit $ac_status); } &&
6343 { ac_try='test -s conftest.$ac_objext'
6344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6345 (eval $ac_try) 2>&5
6346 ac_status=$?
6347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6348 (exit $ac_status); }; }; then
6349 ac_hi=$ac_mid; break
6350else
6351 echo "$as_me: failed program was:" >&5
6352cat conftest.$ac_ext >&5
6353ac_lo=`expr $ac_mid + 1`
6354 if test $ac_lo -le $ac_mid; then
6355 ac_lo= ac_hi=
6356 break
6357 fi
6358 ac_mid=`expr 2 '*' $ac_mid + 1`
6359fi
6360rm -f conftest.$ac_objext conftest.$ac_ext
6361 done
6362else
6363 echo "$as_me: failed program was:" >&5
6364cat conftest.$ac_ext >&5
6365cat >conftest.$ac_ext <<_ACEOF
6366#line $LINENO "configure"
6367#include "confdefs.h"
6368$ac_includes_default
6369#ifdef F77_DUMMY_MAIN
6370# ifdef __cplusplus
6371 extern "C"
6372# endif
6373 int F77_DUMMY_MAIN() { return 1; }
6374#endif
6375int
6376main ()
6377{
6378static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6379test_array [0] = 0
6380
6381 ;
6382 return 0;
6383}
6384_ACEOF
6385rm -f conftest.$ac_objext
6386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6387 (eval $ac_compile) 2>&5
6388 ac_status=$?
6389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6390 (exit $ac_status); } &&
6391 { ac_try='test -s conftest.$ac_objext'
6392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6393 (eval $ac_try) 2>&5
6394 ac_status=$?
6395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6396 (exit $ac_status); }; }; then
6397 ac_hi=-1 ac_mid=-1
6398 while :; do
6399 cat >conftest.$ac_ext <<_ACEOF
6400#line $LINENO "configure"
6401#include "confdefs.h"
6402$ac_includes_default
6403#ifdef F77_DUMMY_MAIN
6404# ifdef __cplusplus
6405 extern "C"
6406# endif
6407 int F77_DUMMY_MAIN() { return 1; }
6408#endif
6409int
6410main ()
6411{
6412static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6413test_array [0] = 0
6414
6415 ;
6416 return 0;
6417}
6418_ACEOF
6419rm -f conftest.$ac_objext
6420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6421 (eval $ac_compile) 2>&5
6422 ac_status=$?
6423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6424 (exit $ac_status); } &&
6425 { ac_try='test -s conftest.$ac_objext'
6426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6427 (eval $ac_try) 2>&5
6428 ac_status=$?
6429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6430 (exit $ac_status); }; }; then
6431 ac_lo=$ac_mid; break
6432else
6433 echo "$as_me: failed program was:" >&5
6434cat conftest.$ac_ext >&5
6435ac_hi=`expr '(' $ac_mid ')' - 1`
6436 if test $ac_mid -le $ac_hi; then
6437 ac_lo= ac_hi=
6438 break
6439 fi
6440 ac_mid=`expr 2 '*' $ac_mid`
6441fi
6442rm -f conftest.$ac_objext conftest.$ac_ext
6443 done
6444else
6445 echo "$as_me: failed program was:" >&5
6446cat conftest.$ac_ext >&5
6447ac_lo= ac_hi=
6448fi
6449rm -f conftest.$ac_objext conftest.$ac_ext
6450fi
6451rm -f conftest.$ac_objext conftest.$ac_ext
6452# Binary search between lo and hi bounds.
6453while test "x$ac_lo" != "x$ac_hi"; do
6454 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6455 cat >conftest.$ac_ext <<_ACEOF
6456#line $LINENO "configure"
6457#include "confdefs.h"
6458$ac_includes_default
6459#ifdef F77_DUMMY_MAIN
6460# ifdef __cplusplus
6461 extern "C"
6462# endif
6463 int F77_DUMMY_MAIN() { return 1; }
6464#endif
6465int
6466main ()
6467{
6468static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6469test_array [0] = 0
6470
6471 ;
6472 return 0;
6473}
6474_ACEOF
6475rm -f conftest.$ac_objext
6476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6477 (eval $ac_compile) 2>&5
6478 ac_status=$?
6479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6480 (exit $ac_status); } &&
6481 { ac_try='test -s conftest.$ac_objext'
6482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6483 (eval $ac_try) 2>&5
6484 ac_status=$?
6485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6486 (exit $ac_status); }; }; then
6487 ac_hi=$ac_mid
6488else
6489 echo "$as_me: failed program was:" >&5
6490cat conftest.$ac_ext >&5
6491ac_lo=`expr '(' $ac_mid ')' + 1`
6492fi
6493rm -f conftest.$ac_objext conftest.$ac_ext
6494done
6495case $ac_lo in
6496?*) ac_cv_sizeof_char=$ac_lo;;
6497'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6498echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6499 { (exit 1); exit 1; }; } ;;
6500esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006501else
6502 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006503 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6504echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6505 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006506else
Martin v. Löwis11437992002-04-12 09:54:03 +00006507 cat >conftest.$ac_ext <<_ACEOF
6508#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006509#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006510$ac_includes_default
6511long longval () { return (long) (sizeof (char)); }
6512unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006513#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006514#include <stdlib.h>
6515#ifdef F77_DUMMY_MAIN
6516# ifdef __cplusplus
6517 extern "C"
6518# endif
6519 int F77_DUMMY_MAIN() { return 1; }
6520#endif
6521int
6522main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006523{
Martin v. Löwis11437992002-04-12 09:54:03 +00006524
6525 FILE *f = fopen ("conftest.val", "w");
6526 if (! f)
6527 exit (1);
6528 if (((long) (sizeof (char))) < 0)
6529 {
6530 long i = longval ();
6531 if (i != ((long) (sizeof (char))))
6532 exit (1);
6533 fprintf (f, "%ld\n", i);
6534 }
6535 else
6536 {
6537 unsigned long i = ulongval ();
6538 if (i != ((long) (sizeof (char))))
6539 exit (1);
6540 fprintf (f, "%lu\n", i);
6541 }
6542 exit (ferror (f) || fclose (f) != 0);
6543
6544 ;
6545 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006546}
Martin v. Löwis11437992002-04-12 09:54:03 +00006547_ACEOF
6548rm -f conftest$ac_exeext
6549if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6550 (eval $ac_link) 2>&5
6551 ac_status=$?
6552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6553 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6555 (eval $ac_try) 2>&5
6556 ac_status=$?
6557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6558 (exit $ac_status); }; }; then
6559 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006560else
Martin v. Löwis11437992002-04-12 09:54:03 +00006561 echo "$as_me: program exited with status $ac_status" >&5
6562echo "$as_me: failed program was:" >&5
6563cat conftest.$ac_ext >&5
6564( exit $ac_status )
6565{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6566echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6567 { (exit 1); exit 1; }; }
6568fi
6569rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6570fi
6571fi
6572rm -f conftest.val
6573else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006574 ac_cv_sizeof_char=0
6575fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006576fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006577echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6578echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6579cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006580#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006581_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006582
6583
Martin v. Löwis11437992002-04-12 09:54:03 +00006584echo "$as_me:$LINENO: checking for short" >&5
6585echo $ECHO_N "checking for short... $ECHO_C" >&6
6586if test "${ac_cv_type_short+set}" = set; then
6587 echo $ECHO_N "(cached) $ECHO_C" >&6
6588else
6589 cat >conftest.$ac_ext <<_ACEOF
6590#line $LINENO "configure"
6591#include "confdefs.h"
6592$ac_includes_default
6593#ifdef F77_DUMMY_MAIN
6594# ifdef __cplusplus
6595 extern "C"
6596# endif
6597 int F77_DUMMY_MAIN() { return 1; }
6598#endif
6599int
6600main ()
6601{
6602if ((short *) 0)
6603 return 0;
6604if (sizeof (short))
6605 return 0;
6606 ;
6607 return 0;
6608}
6609_ACEOF
6610rm -f conftest.$ac_objext
6611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6612 (eval $ac_compile) 2>&5
6613 ac_status=$?
6614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6615 (exit $ac_status); } &&
6616 { ac_try='test -s conftest.$ac_objext'
6617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6618 (eval $ac_try) 2>&5
6619 ac_status=$?
6620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6621 (exit $ac_status); }; }; then
6622 ac_cv_type_short=yes
6623else
6624 echo "$as_me: failed program was:" >&5
6625cat conftest.$ac_ext >&5
6626ac_cv_type_short=no
6627fi
6628rm -f conftest.$ac_objext conftest.$ac_ext
6629fi
6630echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6631echo "${ECHO_T}$ac_cv_type_short" >&6
6632
6633echo "$as_me:$LINENO: checking size of short" >&5
6634echo $ECHO_N "checking size of short... $ECHO_C" >&6
6635if test "${ac_cv_sizeof_short+set}" = set; then
6636 echo $ECHO_N "(cached) $ECHO_C" >&6
6637else
6638 if test "$ac_cv_type_short" = yes; then
6639 # The cast to unsigned long works around a bug in the HP C Compiler
6640 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6641 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6642 # This bug is HP SR number 8606223364.
6643 if test "$cross_compiling" = yes; then
6644 # Depending upon the size, compute the lo and hi bounds.
6645cat >conftest.$ac_ext <<_ACEOF
6646#line $LINENO "configure"
6647#include "confdefs.h"
6648$ac_includes_default
6649#ifdef F77_DUMMY_MAIN
6650# ifdef __cplusplus
6651 extern "C"
6652# endif
6653 int F77_DUMMY_MAIN() { return 1; }
6654#endif
6655int
6656main ()
6657{
6658static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6659test_array [0] = 0
6660
6661 ;
6662 return 0;
6663}
6664_ACEOF
6665rm -f conftest.$ac_objext
6666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6667 (eval $ac_compile) 2>&5
6668 ac_status=$?
6669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6670 (exit $ac_status); } &&
6671 { ac_try='test -s conftest.$ac_objext'
6672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6673 (eval $ac_try) 2>&5
6674 ac_status=$?
6675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6676 (exit $ac_status); }; }; then
6677 ac_lo=0 ac_mid=0
6678 while :; do
6679 cat >conftest.$ac_ext <<_ACEOF
6680#line $LINENO "configure"
6681#include "confdefs.h"
6682$ac_includes_default
6683#ifdef F77_DUMMY_MAIN
6684# ifdef __cplusplus
6685 extern "C"
6686# endif
6687 int F77_DUMMY_MAIN() { return 1; }
6688#endif
6689int
6690main ()
6691{
6692static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6693test_array [0] = 0
6694
6695 ;
6696 return 0;
6697}
6698_ACEOF
6699rm -f conftest.$ac_objext
6700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6701 (eval $ac_compile) 2>&5
6702 ac_status=$?
6703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6704 (exit $ac_status); } &&
6705 { ac_try='test -s conftest.$ac_objext'
6706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6707 (eval $ac_try) 2>&5
6708 ac_status=$?
6709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6710 (exit $ac_status); }; }; then
6711 ac_hi=$ac_mid; break
6712else
6713 echo "$as_me: failed program was:" >&5
6714cat conftest.$ac_ext >&5
6715ac_lo=`expr $ac_mid + 1`
6716 if test $ac_lo -le $ac_mid; then
6717 ac_lo= ac_hi=
6718 break
6719 fi
6720 ac_mid=`expr 2 '*' $ac_mid + 1`
6721fi
6722rm -f conftest.$ac_objext conftest.$ac_ext
6723 done
6724else
6725 echo "$as_me: failed program was:" >&5
6726cat conftest.$ac_ext >&5
6727cat >conftest.$ac_ext <<_ACEOF
6728#line $LINENO "configure"
6729#include "confdefs.h"
6730$ac_includes_default
6731#ifdef F77_DUMMY_MAIN
6732# ifdef __cplusplus
6733 extern "C"
6734# endif
6735 int F77_DUMMY_MAIN() { return 1; }
6736#endif
6737int
6738main ()
6739{
6740static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6741test_array [0] = 0
6742
6743 ;
6744 return 0;
6745}
6746_ACEOF
6747rm -f conftest.$ac_objext
6748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6749 (eval $ac_compile) 2>&5
6750 ac_status=$?
6751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6752 (exit $ac_status); } &&
6753 { ac_try='test -s conftest.$ac_objext'
6754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6755 (eval $ac_try) 2>&5
6756 ac_status=$?
6757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6758 (exit $ac_status); }; }; then
6759 ac_hi=-1 ac_mid=-1
6760 while :; do
6761 cat >conftest.$ac_ext <<_ACEOF
6762#line $LINENO "configure"
6763#include "confdefs.h"
6764$ac_includes_default
6765#ifdef F77_DUMMY_MAIN
6766# ifdef __cplusplus
6767 extern "C"
6768# endif
6769 int F77_DUMMY_MAIN() { return 1; }
6770#endif
6771int
6772main ()
6773{
6774static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6775test_array [0] = 0
6776
6777 ;
6778 return 0;
6779}
6780_ACEOF
6781rm -f conftest.$ac_objext
6782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6783 (eval $ac_compile) 2>&5
6784 ac_status=$?
6785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6786 (exit $ac_status); } &&
6787 { ac_try='test -s conftest.$ac_objext'
6788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6789 (eval $ac_try) 2>&5
6790 ac_status=$?
6791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6792 (exit $ac_status); }; }; then
6793 ac_lo=$ac_mid; break
6794else
6795 echo "$as_me: failed program was:" >&5
6796cat conftest.$ac_ext >&5
6797ac_hi=`expr '(' $ac_mid ')' - 1`
6798 if test $ac_mid -le $ac_hi; then
6799 ac_lo= ac_hi=
6800 break
6801 fi
6802 ac_mid=`expr 2 '*' $ac_mid`
6803fi
6804rm -f conftest.$ac_objext conftest.$ac_ext
6805 done
6806else
6807 echo "$as_me: failed program was:" >&5
6808cat conftest.$ac_ext >&5
6809ac_lo= ac_hi=
6810fi
6811rm -f conftest.$ac_objext conftest.$ac_ext
6812fi
6813rm -f conftest.$ac_objext conftest.$ac_ext
6814# Binary search between lo and hi bounds.
6815while test "x$ac_lo" != "x$ac_hi"; do
6816 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6817 cat >conftest.$ac_ext <<_ACEOF
6818#line $LINENO "configure"
6819#include "confdefs.h"
6820$ac_includes_default
6821#ifdef F77_DUMMY_MAIN
6822# ifdef __cplusplus
6823 extern "C"
6824# endif
6825 int F77_DUMMY_MAIN() { return 1; }
6826#endif
6827int
6828main ()
6829{
6830static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6831test_array [0] = 0
6832
6833 ;
6834 return 0;
6835}
6836_ACEOF
6837rm -f conftest.$ac_objext
6838if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6839 (eval $ac_compile) 2>&5
6840 ac_status=$?
6841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6842 (exit $ac_status); } &&
6843 { ac_try='test -s conftest.$ac_objext'
6844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6845 (eval $ac_try) 2>&5
6846 ac_status=$?
6847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6848 (exit $ac_status); }; }; then
6849 ac_hi=$ac_mid
6850else
6851 echo "$as_me: failed program was:" >&5
6852cat conftest.$ac_ext >&5
6853ac_lo=`expr '(' $ac_mid ')' + 1`
6854fi
6855rm -f conftest.$ac_objext conftest.$ac_ext
6856done
6857case $ac_lo in
6858?*) ac_cv_sizeof_short=$ac_lo;;
6859'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6860echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6861 { (exit 1); exit 1; }; } ;;
6862esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006863else
6864 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006865 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6866echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6867 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006868else
Martin v. Löwis11437992002-04-12 09:54:03 +00006869 cat >conftest.$ac_ext <<_ACEOF
6870#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006871#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006872$ac_includes_default
6873long longval () { return (long) (sizeof (short)); }
6874unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006875#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006876#include <stdlib.h>
6877#ifdef F77_DUMMY_MAIN
6878# ifdef __cplusplus
6879 extern "C"
6880# endif
6881 int F77_DUMMY_MAIN() { return 1; }
6882#endif
6883int
6884main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006885{
Martin v. Löwis11437992002-04-12 09:54:03 +00006886
6887 FILE *f = fopen ("conftest.val", "w");
6888 if (! f)
6889 exit (1);
6890 if (((long) (sizeof (short))) < 0)
6891 {
6892 long i = longval ();
6893 if (i != ((long) (sizeof (short))))
6894 exit (1);
6895 fprintf (f, "%ld\n", i);
6896 }
6897 else
6898 {
6899 unsigned long i = ulongval ();
6900 if (i != ((long) (sizeof (short))))
6901 exit (1);
6902 fprintf (f, "%lu\n", i);
6903 }
6904 exit (ferror (f) || fclose (f) != 0);
6905
6906 ;
6907 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006908}
Martin v. Löwis11437992002-04-12 09:54:03 +00006909_ACEOF
6910rm -f conftest$ac_exeext
6911if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6912 (eval $ac_link) 2>&5
6913 ac_status=$?
6914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6915 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6917 (eval $ac_try) 2>&5
6918 ac_status=$?
6919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6920 (exit $ac_status); }; }; then
6921 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006922else
Martin v. Löwis11437992002-04-12 09:54:03 +00006923 echo "$as_me: program exited with status $ac_status" >&5
6924echo "$as_me: failed program was:" >&5
6925cat conftest.$ac_ext >&5
6926( exit $ac_status )
6927{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6928echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6929 { (exit 1); exit 1; }; }
6930fi
6931rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6932fi
6933fi
6934rm -f conftest.val
6935else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006936 ac_cv_sizeof_short=0
6937fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006938fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006939echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6940echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6941cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006942#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006943_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006944
6945
Martin v. Löwis11437992002-04-12 09:54:03 +00006946echo "$as_me:$LINENO: checking for float" >&5
6947echo $ECHO_N "checking for float... $ECHO_C" >&6
6948if test "${ac_cv_type_float+set}" = set; then
6949 echo $ECHO_N "(cached) $ECHO_C" >&6
6950else
6951 cat >conftest.$ac_ext <<_ACEOF
6952#line $LINENO "configure"
6953#include "confdefs.h"
6954$ac_includes_default
6955#ifdef F77_DUMMY_MAIN
6956# ifdef __cplusplus
6957 extern "C"
6958# endif
6959 int F77_DUMMY_MAIN() { return 1; }
6960#endif
6961int
6962main ()
6963{
6964if ((float *) 0)
6965 return 0;
6966if (sizeof (float))
6967 return 0;
6968 ;
6969 return 0;
6970}
6971_ACEOF
6972rm -f conftest.$ac_objext
6973if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6974 (eval $ac_compile) 2>&5
6975 ac_status=$?
6976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6977 (exit $ac_status); } &&
6978 { ac_try='test -s conftest.$ac_objext'
6979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6980 (eval $ac_try) 2>&5
6981 ac_status=$?
6982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6983 (exit $ac_status); }; }; then
6984 ac_cv_type_float=yes
6985else
6986 echo "$as_me: failed program was:" >&5
6987cat conftest.$ac_ext >&5
6988ac_cv_type_float=no
6989fi
6990rm -f conftest.$ac_objext conftest.$ac_ext
6991fi
6992echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6993echo "${ECHO_T}$ac_cv_type_float" >&6
6994
6995echo "$as_me:$LINENO: checking size of float" >&5
6996echo $ECHO_N "checking size of float... $ECHO_C" >&6
6997if test "${ac_cv_sizeof_float+set}" = set; then
6998 echo $ECHO_N "(cached) $ECHO_C" >&6
6999else
7000 if test "$ac_cv_type_float" = yes; then
7001 # The cast to unsigned long works around a bug in the HP C Compiler
7002 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7003 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7004 # This bug is HP SR number 8606223364.
7005 if test "$cross_compiling" = yes; then
7006 # Depending upon the size, compute the lo and hi bounds.
7007cat >conftest.$ac_ext <<_ACEOF
7008#line $LINENO "configure"
7009#include "confdefs.h"
7010$ac_includes_default
7011#ifdef F77_DUMMY_MAIN
7012# ifdef __cplusplus
7013 extern "C"
7014# endif
7015 int F77_DUMMY_MAIN() { return 1; }
7016#endif
7017int
7018main ()
7019{
7020static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7021test_array [0] = 0
7022
7023 ;
7024 return 0;
7025}
7026_ACEOF
7027rm -f conftest.$ac_objext
7028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7029 (eval $ac_compile) 2>&5
7030 ac_status=$?
7031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7032 (exit $ac_status); } &&
7033 { ac_try='test -s conftest.$ac_objext'
7034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7035 (eval $ac_try) 2>&5
7036 ac_status=$?
7037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7038 (exit $ac_status); }; }; then
7039 ac_lo=0 ac_mid=0
7040 while :; do
7041 cat >conftest.$ac_ext <<_ACEOF
7042#line $LINENO "configure"
7043#include "confdefs.h"
7044$ac_includes_default
7045#ifdef F77_DUMMY_MAIN
7046# ifdef __cplusplus
7047 extern "C"
7048# endif
7049 int F77_DUMMY_MAIN() { return 1; }
7050#endif
7051int
7052main ()
7053{
7054static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7055test_array [0] = 0
7056
7057 ;
7058 return 0;
7059}
7060_ACEOF
7061rm -f conftest.$ac_objext
7062if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7063 (eval $ac_compile) 2>&5
7064 ac_status=$?
7065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7066 (exit $ac_status); } &&
7067 { ac_try='test -s conftest.$ac_objext'
7068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7069 (eval $ac_try) 2>&5
7070 ac_status=$?
7071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7072 (exit $ac_status); }; }; then
7073 ac_hi=$ac_mid; break
7074else
7075 echo "$as_me: failed program was:" >&5
7076cat conftest.$ac_ext >&5
7077ac_lo=`expr $ac_mid + 1`
7078 if test $ac_lo -le $ac_mid; then
7079 ac_lo= ac_hi=
7080 break
7081 fi
7082 ac_mid=`expr 2 '*' $ac_mid + 1`
7083fi
7084rm -f conftest.$ac_objext conftest.$ac_ext
7085 done
7086else
7087 echo "$as_me: failed program was:" >&5
7088cat conftest.$ac_ext >&5
7089cat >conftest.$ac_ext <<_ACEOF
7090#line $LINENO "configure"
7091#include "confdefs.h"
7092$ac_includes_default
7093#ifdef F77_DUMMY_MAIN
7094# ifdef __cplusplus
7095 extern "C"
7096# endif
7097 int F77_DUMMY_MAIN() { return 1; }
7098#endif
7099int
7100main ()
7101{
7102static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7103test_array [0] = 0
7104
7105 ;
7106 return 0;
7107}
7108_ACEOF
7109rm -f conftest.$ac_objext
7110if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7111 (eval $ac_compile) 2>&5
7112 ac_status=$?
7113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7114 (exit $ac_status); } &&
7115 { ac_try='test -s conftest.$ac_objext'
7116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7117 (eval $ac_try) 2>&5
7118 ac_status=$?
7119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7120 (exit $ac_status); }; }; then
7121 ac_hi=-1 ac_mid=-1
7122 while :; do
7123 cat >conftest.$ac_ext <<_ACEOF
7124#line $LINENO "configure"
7125#include "confdefs.h"
7126$ac_includes_default
7127#ifdef F77_DUMMY_MAIN
7128# ifdef __cplusplus
7129 extern "C"
7130# endif
7131 int F77_DUMMY_MAIN() { return 1; }
7132#endif
7133int
7134main ()
7135{
7136static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7137test_array [0] = 0
7138
7139 ;
7140 return 0;
7141}
7142_ACEOF
7143rm -f conftest.$ac_objext
7144if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7145 (eval $ac_compile) 2>&5
7146 ac_status=$?
7147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7148 (exit $ac_status); } &&
7149 { ac_try='test -s conftest.$ac_objext'
7150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7151 (eval $ac_try) 2>&5
7152 ac_status=$?
7153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7154 (exit $ac_status); }; }; then
7155 ac_lo=$ac_mid; break
7156else
7157 echo "$as_me: failed program was:" >&5
7158cat conftest.$ac_ext >&5
7159ac_hi=`expr '(' $ac_mid ')' - 1`
7160 if test $ac_mid -le $ac_hi; then
7161 ac_lo= ac_hi=
7162 break
7163 fi
7164 ac_mid=`expr 2 '*' $ac_mid`
7165fi
7166rm -f conftest.$ac_objext conftest.$ac_ext
7167 done
7168else
7169 echo "$as_me: failed program was:" >&5
7170cat conftest.$ac_ext >&5
7171ac_lo= ac_hi=
7172fi
7173rm -f conftest.$ac_objext conftest.$ac_ext
7174fi
7175rm -f conftest.$ac_objext conftest.$ac_ext
7176# Binary search between lo and hi bounds.
7177while test "x$ac_lo" != "x$ac_hi"; do
7178 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7179 cat >conftest.$ac_ext <<_ACEOF
7180#line $LINENO "configure"
7181#include "confdefs.h"
7182$ac_includes_default
7183#ifdef F77_DUMMY_MAIN
7184# ifdef __cplusplus
7185 extern "C"
7186# endif
7187 int F77_DUMMY_MAIN() { return 1; }
7188#endif
7189int
7190main ()
7191{
7192static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7193test_array [0] = 0
7194
7195 ;
7196 return 0;
7197}
7198_ACEOF
7199rm -f conftest.$ac_objext
7200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7201 (eval $ac_compile) 2>&5
7202 ac_status=$?
7203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7204 (exit $ac_status); } &&
7205 { ac_try='test -s conftest.$ac_objext'
7206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7207 (eval $ac_try) 2>&5
7208 ac_status=$?
7209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7210 (exit $ac_status); }; }; then
7211 ac_hi=$ac_mid
7212else
7213 echo "$as_me: failed program was:" >&5
7214cat conftest.$ac_ext >&5
7215ac_lo=`expr '(' $ac_mid ')' + 1`
7216fi
7217rm -f conftest.$ac_objext conftest.$ac_ext
7218done
7219case $ac_lo in
7220?*) ac_cv_sizeof_float=$ac_lo;;
7221'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7222echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7223 { (exit 1); exit 1; }; } ;;
7224esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007225else
7226 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007227 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7228echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7229 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007230else
Martin v. Löwis11437992002-04-12 09:54:03 +00007231 cat >conftest.$ac_ext <<_ACEOF
7232#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007233#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007234$ac_includes_default
7235long longval () { return (long) (sizeof (float)); }
7236unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007237#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007238#include <stdlib.h>
7239#ifdef F77_DUMMY_MAIN
7240# ifdef __cplusplus
7241 extern "C"
7242# endif
7243 int F77_DUMMY_MAIN() { return 1; }
7244#endif
7245int
7246main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007247{
Martin v. Löwis11437992002-04-12 09:54:03 +00007248
7249 FILE *f = fopen ("conftest.val", "w");
7250 if (! f)
7251 exit (1);
7252 if (((long) (sizeof (float))) < 0)
7253 {
7254 long i = longval ();
7255 if (i != ((long) (sizeof (float))))
7256 exit (1);
7257 fprintf (f, "%ld\n", i);
7258 }
7259 else
7260 {
7261 unsigned long i = ulongval ();
7262 if (i != ((long) (sizeof (float))))
7263 exit (1);
7264 fprintf (f, "%lu\n", i);
7265 }
7266 exit (ferror (f) || fclose (f) != 0);
7267
7268 ;
7269 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007270}
Martin v. Löwis11437992002-04-12 09:54:03 +00007271_ACEOF
7272rm -f conftest$ac_exeext
7273if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7274 (eval $ac_link) 2>&5
7275 ac_status=$?
7276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7277 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7279 (eval $ac_try) 2>&5
7280 ac_status=$?
7281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7282 (exit $ac_status); }; }; then
7283 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007284else
Martin v. Löwis11437992002-04-12 09:54:03 +00007285 echo "$as_me: program exited with status $ac_status" >&5
7286echo "$as_me: failed program was:" >&5
7287cat conftest.$ac_ext >&5
7288( exit $ac_status )
7289{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7290echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7291 { (exit 1); exit 1; }; }
7292fi
7293rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7294fi
7295fi
7296rm -f conftest.val
7297else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007298 ac_cv_sizeof_float=0
7299fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007300fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007301echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7302echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7303cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007304#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007305_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007306
7307
Martin v. Löwis11437992002-04-12 09:54:03 +00007308echo "$as_me:$LINENO: checking for double" >&5
7309echo $ECHO_N "checking for double... $ECHO_C" >&6
7310if test "${ac_cv_type_double+set}" = set; then
7311 echo $ECHO_N "(cached) $ECHO_C" >&6
7312else
7313 cat >conftest.$ac_ext <<_ACEOF
7314#line $LINENO "configure"
7315#include "confdefs.h"
7316$ac_includes_default
7317#ifdef F77_DUMMY_MAIN
7318# ifdef __cplusplus
7319 extern "C"
7320# endif
7321 int F77_DUMMY_MAIN() { return 1; }
7322#endif
7323int
7324main ()
7325{
7326if ((double *) 0)
7327 return 0;
7328if (sizeof (double))
7329 return 0;
7330 ;
7331 return 0;
7332}
7333_ACEOF
7334rm -f conftest.$ac_objext
7335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7336 (eval $ac_compile) 2>&5
7337 ac_status=$?
7338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7339 (exit $ac_status); } &&
7340 { ac_try='test -s conftest.$ac_objext'
7341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7342 (eval $ac_try) 2>&5
7343 ac_status=$?
7344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7345 (exit $ac_status); }; }; then
7346 ac_cv_type_double=yes
7347else
7348 echo "$as_me: failed program was:" >&5
7349cat conftest.$ac_ext >&5
7350ac_cv_type_double=no
7351fi
7352rm -f conftest.$ac_objext conftest.$ac_ext
7353fi
7354echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7355echo "${ECHO_T}$ac_cv_type_double" >&6
7356
7357echo "$as_me:$LINENO: checking size of double" >&5
7358echo $ECHO_N "checking size of double... $ECHO_C" >&6
7359if test "${ac_cv_sizeof_double+set}" = set; then
7360 echo $ECHO_N "(cached) $ECHO_C" >&6
7361else
7362 if test "$ac_cv_type_double" = yes; then
7363 # The cast to unsigned long works around a bug in the HP C Compiler
7364 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7365 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7366 # This bug is HP SR number 8606223364.
7367 if test "$cross_compiling" = yes; then
7368 # Depending upon the size, compute the lo and hi bounds.
7369cat >conftest.$ac_ext <<_ACEOF
7370#line $LINENO "configure"
7371#include "confdefs.h"
7372$ac_includes_default
7373#ifdef F77_DUMMY_MAIN
7374# ifdef __cplusplus
7375 extern "C"
7376# endif
7377 int F77_DUMMY_MAIN() { return 1; }
7378#endif
7379int
7380main ()
7381{
7382static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7383test_array [0] = 0
7384
7385 ;
7386 return 0;
7387}
7388_ACEOF
7389rm -f conftest.$ac_objext
7390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7391 (eval $ac_compile) 2>&5
7392 ac_status=$?
7393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7394 (exit $ac_status); } &&
7395 { ac_try='test -s conftest.$ac_objext'
7396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7397 (eval $ac_try) 2>&5
7398 ac_status=$?
7399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7400 (exit $ac_status); }; }; then
7401 ac_lo=0 ac_mid=0
7402 while :; do
7403 cat >conftest.$ac_ext <<_ACEOF
7404#line $LINENO "configure"
7405#include "confdefs.h"
7406$ac_includes_default
7407#ifdef F77_DUMMY_MAIN
7408# ifdef __cplusplus
7409 extern "C"
7410# endif
7411 int F77_DUMMY_MAIN() { return 1; }
7412#endif
7413int
7414main ()
7415{
7416static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7417test_array [0] = 0
7418
7419 ;
7420 return 0;
7421}
7422_ACEOF
7423rm -f conftest.$ac_objext
7424if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7425 (eval $ac_compile) 2>&5
7426 ac_status=$?
7427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7428 (exit $ac_status); } &&
7429 { ac_try='test -s conftest.$ac_objext'
7430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7431 (eval $ac_try) 2>&5
7432 ac_status=$?
7433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7434 (exit $ac_status); }; }; then
7435 ac_hi=$ac_mid; break
7436else
7437 echo "$as_me: failed program was:" >&5
7438cat conftest.$ac_ext >&5
7439ac_lo=`expr $ac_mid + 1`
7440 if test $ac_lo -le $ac_mid; then
7441 ac_lo= ac_hi=
7442 break
7443 fi
7444 ac_mid=`expr 2 '*' $ac_mid + 1`
7445fi
7446rm -f conftest.$ac_objext conftest.$ac_ext
7447 done
7448else
7449 echo "$as_me: failed program was:" >&5
7450cat conftest.$ac_ext >&5
7451cat >conftest.$ac_ext <<_ACEOF
7452#line $LINENO "configure"
7453#include "confdefs.h"
7454$ac_includes_default
7455#ifdef F77_DUMMY_MAIN
7456# ifdef __cplusplus
7457 extern "C"
7458# endif
7459 int F77_DUMMY_MAIN() { return 1; }
7460#endif
7461int
7462main ()
7463{
7464static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7465test_array [0] = 0
7466
7467 ;
7468 return 0;
7469}
7470_ACEOF
7471rm -f conftest.$ac_objext
7472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7473 (eval $ac_compile) 2>&5
7474 ac_status=$?
7475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7476 (exit $ac_status); } &&
7477 { ac_try='test -s conftest.$ac_objext'
7478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7479 (eval $ac_try) 2>&5
7480 ac_status=$?
7481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7482 (exit $ac_status); }; }; then
7483 ac_hi=-1 ac_mid=-1
7484 while :; do
7485 cat >conftest.$ac_ext <<_ACEOF
7486#line $LINENO "configure"
7487#include "confdefs.h"
7488$ac_includes_default
7489#ifdef F77_DUMMY_MAIN
7490# ifdef __cplusplus
7491 extern "C"
7492# endif
7493 int F77_DUMMY_MAIN() { return 1; }
7494#endif
7495int
7496main ()
7497{
7498static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7499test_array [0] = 0
7500
7501 ;
7502 return 0;
7503}
7504_ACEOF
7505rm -f conftest.$ac_objext
7506if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7507 (eval $ac_compile) 2>&5
7508 ac_status=$?
7509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7510 (exit $ac_status); } &&
7511 { ac_try='test -s conftest.$ac_objext'
7512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7513 (eval $ac_try) 2>&5
7514 ac_status=$?
7515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7516 (exit $ac_status); }; }; then
7517 ac_lo=$ac_mid; break
7518else
7519 echo "$as_me: failed program was:" >&5
7520cat conftest.$ac_ext >&5
7521ac_hi=`expr '(' $ac_mid ')' - 1`
7522 if test $ac_mid -le $ac_hi; then
7523 ac_lo= ac_hi=
7524 break
7525 fi
7526 ac_mid=`expr 2 '*' $ac_mid`
7527fi
7528rm -f conftest.$ac_objext conftest.$ac_ext
7529 done
7530else
7531 echo "$as_me: failed program was:" >&5
7532cat conftest.$ac_ext >&5
7533ac_lo= ac_hi=
7534fi
7535rm -f conftest.$ac_objext conftest.$ac_ext
7536fi
7537rm -f conftest.$ac_objext conftest.$ac_ext
7538# Binary search between lo and hi bounds.
7539while test "x$ac_lo" != "x$ac_hi"; do
7540 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7541 cat >conftest.$ac_ext <<_ACEOF
7542#line $LINENO "configure"
7543#include "confdefs.h"
7544$ac_includes_default
7545#ifdef F77_DUMMY_MAIN
7546# ifdef __cplusplus
7547 extern "C"
7548# endif
7549 int F77_DUMMY_MAIN() { return 1; }
7550#endif
7551int
7552main ()
7553{
7554static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7555test_array [0] = 0
7556
7557 ;
7558 return 0;
7559}
7560_ACEOF
7561rm -f conftest.$ac_objext
7562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7563 (eval $ac_compile) 2>&5
7564 ac_status=$?
7565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7566 (exit $ac_status); } &&
7567 { ac_try='test -s conftest.$ac_objext'
7568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7569 (eval $ac_try) 2>&5
7570 ac_status=$?
7571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7572 (exit $ac_status); }; }; then
7573 ac_hi=$ac_mid
7574else
7575 echo "$as_me: failed program was:" >&5
7576cat conftest.$ac_ext >&5
7577ac_lo=`expr '(' $ac_mid ')' + 1`
7578fi
7579rm -f conftest.$ac_objext conftest.$ac_ext
7580done
7581case $ac_lo in
7582?*) ac_cv_sizeof_double=$ac_lo;;
7583'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7584echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7585 { (exit 1); exit 1; }; } ;;
7586esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007587else
7588 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007589 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7590echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7591 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007592else
Martin v. Löwis11437992002-04-12 09:54:03 +00007593 cat >conftest.$ac_ext <<_ACEOF
7594#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007595#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007596$ac_includes_default
7597long longval () { return (long) (sizeof (double)); }
7598unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007599#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007600#include <stdlib.h>
7601#ifdef F77_DUMMY_MAIN
7602# ifdef __cplusplus
7603 extern "C"
7604# endif
7605 int F77_DUMMY_MAIN() { return 1; }
7606#endif
7607int
7608main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007609{
Martin v. Löwis11437992002-04-12 09:54:03 +00007610
7611 FILE *f = fopen ("conftest.val", "w");
7612 if (! f)
7613 exit (1);
7614 if (((long) (sizeof (double))) < 0)
7615 {
7616 long i = longval ();
7617 if (i != ((long) (sizeof (double))))
7618 exit (1);
7619 fprintf (f, "%ld\n", i);
7620 }
7621 else
7622 {
7623 unsigned long i = ulongval ();
7624 if (i != ((long) (sizeof (double))))
7625 exit (1);
7626 fprintf (f, "%lu\n", i);
7627 }
7628 exit (ferror (f) || fclose (f) != 0);
7629
7630 ;
7631 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007632}
Martin v. Löwis11437992002-04-12 09:54:03 +00007633_ACEOF
7634rm -f conftest$ac_exeext
7635if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7636 (eval $ac_link) 2>&5
7637 ac_status=$?
7638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7639 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7641 (eval $ac_try) 2>&5
7642 ac_status=$?
7643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7644 (exit $ac_status); }; }; then
7645 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007646else
Martin v. Löwis11437992002-04-12 09:54:03 +00007647 echo "$as_me: program exited with status $ac_status" >&5
7648echo "$as_me: failed program was:" >&5
7649cat conftest.$ac_ext >&5
7650( exit $ac_status )
7651{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7652echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7653 { (exit 1); exit 1; }; }
7654fi
7655rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7656fi
7657fi
7658rm -f conftest.val
7659else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007660 ac_cv_sizeof_double=0
7661fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007662fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007663echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7664echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7665cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007666#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007667_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007668
7669
Martin v. Löwis11437992002-04-12 09:54:03 +00007670echo "$as_me:$LINENO: checking for fpos_t" >&5
7671echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7672if test "${ac_cv_type_fpos_t+set}" = set; then
7673 echo $ECHO_N "(cached) $ECHO_C" >&6
7674else
7675 cat >conftest.$ac_ext <<_ACEOF
7676#line $LINENO "configure"
7677#include "confdefs.h"
7678$ac_includes_default
7679#ifdef F77_DUMMY_MAIN
7680# ifdef __cplusplus
7681 extern "C"
7682# endif
7683 int F77_DUMMY_MAIN() { return 1; }
7684#endif
7685int
7686main ()
7687{
7688if ((fpos_t *) 0)
7689 return 0;
7690if (sizeof (fpos_t))
7691 return 0;
7692 ;
7693 return 0;
7694}
7695_ACEOF
7696rm -f conftest.$ac_objext
7697if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7698 (eval $ac_compile) 2>&5
7699 ac_status=$?
7700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7701 (exit $ac_status); } &&
7702 { ac_try='test -s conftest.$ac_objext'
7703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7704 (eval $ac_try) 2>&5
7705 ac_status=$?
7706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7707 (exit $ac_status); }; }; then
7708 ac_cv_type_fpos_t=yes
7709else
7710 echo "$as_me: failed program was:" >&5
7711cat conftest.$ac_ext >&5
7712ac_cv_type_fpos_t=no
7713fi
7714rm -f conftest.$ac_objext conftest.$ac_ext
7715fi
7716echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7717echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7718
7719echo "$as_me:$LINENO: checking size of fpos_t" >&5
7720echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7721if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7722 echo $ECHO_N "(cached) $ECHO_C" >&6
7723else
7724 if test "$ac_cv_type_fpos_t" = yes; then
7725 # The cast to unsigned long works around a bug in the HP C Compiler
7726 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7727 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7728 # This bug is HP SR number 8606223364.
7729 if test "$cross_compiling" = yes; then
7730 # Depending upon the size, compute the lo and hi bounds.
7731cat >conftest.$ac_ext <<_ACEOF
7732#line $LINENO "configure"
7733#include "confdefs.h"
7734$ac_includes_default
7735#ifdef F77_DUMMY_MAIN
7736# ifdef __cplusplus
7737 extern "C"
7738# endif
7739 int F77_DUMMY_MAIN() { return 1; }
7740#endif
7741int
7742main ()
7743{
7744static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7745test_array [0] = 0
7746
7747 ;
7748 return 0;
7749}
7750_ACEOF
7751rm -f conftest.$ac_objext
7752if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7753 (eval $ac_compile) 2>&5
7754 ac_status=$?
7755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7756 (exit $ac_status); } &&
7757 { ac_try='test -s conftest.$ac_objext'
7758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7759 (eval $ac_try) 2>&5
7760 ac_status=$?
7761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7762 (exit $ac_status); }; }; then
7763 ac_lo=0 ac_mid=0
7764 while :; do
7765 cat >conftest.$ac_ext <<_ACEOF
7766#line $LINENO "configure"
7767#include "confdefs.h"
7768$ac_includes_default
7769#ifdef F77_DUMMY_MAIN
7770# ifdef __cplusplus
7771 extern "C"
7772# endif
7773 int F77_DUMMY_MAIN() { return 1; }
7774#endif
7775int
7776main ()
7777{
7778static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7779test_array [0] = 0
7780
7781 ;
7782 return 0;
7783}
7784_ACEOF
7785rm -f conftest.$ac_objext
7786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7787 (eval $ac_compile) 2>&5
7788 ac_status=$?
7789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7790 (exit $ac_status); } &&
7791 { ac_try='test -s conftest.$ac_objext'
7792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7793 (eval $ac_try) 2>&5
7794 ac_status=$?
7795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7796 (exit $ac_status); }; }; then
7797 ac_hi=$ac_mid; break
7798else
7799 echo "$as_me: failed program was:" >&5
7800cat conftest.$ac_ext >&5
7801ac_lo=`expr $ac_mid + 1`
7802 if test $ac_lo -le $ac_mid; then
7803 ac_lo= ac_hi=
7804 break
7805 fi
7806 ac_mid=`expr 2 '*' $ac_mid + 1`
7807fi
7808rm -f conftest.$ac_objext conftest.$ac_ext
7809 done
7810else
7811 echo "$as_me: failed program was:" >&5
7812cat conftest.$ac_ext >&5
7813cat >conftest.$ac_ext <<_ACEOF
7814#line $LINENO "configure"
7815#include "confdefs.h"
7816$ac_includes_default
7817#ifdef F77_DUMMY_MAIN
7818# ifdef __cplusplus
7819 extern "C"
7820# endif
7821 int F77_DUMMY_MAIN() { return 1; }
7822#endif
7823int
7824main ()
7825{
7826static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7827test_array [0] = 0
7828
7829 ;
7830 return 0;
7831}
7832_ACEOF
7833rm -f conftest.$ac_objext
7834if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7835 (eval $ac_compile) 2>&5
7836 ac_status=$?
7837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7838 (exit $ac_status); } &&
7839 { ac_try='test -s conftest.$ac_objext'
7840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7841 (eval $ac_try) 2>&5
7842 ac_status=$?
7843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7844 (exit $ac_status); }; }; then
7845 ac_hi=-1 ac_mid=-1
7846 while :; do
7847 cat >conftest.$ac_ext <<_ACEOF
7848#line $LINENO "configure"
7849#include "confdefs.h"
7850$ac_includes_default
7851#ifdef F77_DUMMY_MAIN
7852# ifdef __cplusplus
7853 extern "C"
7854# endif
7855 int F77_DUMMY_MAIN() { return 1; }
7856#endif
7857int
7858main ()
7859{
7860static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7861test_array [0] = 0
7862
7863 ;
7864 return 0;
7865}
7866_ACEOF
7867rm -f conftest.$ac_objext
7868if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7869 (eval $ac_compile) 2>&5
7870 ac_status=$?
7871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7872 (exit $ac_status); } &&
7873 { ac_try='test -s conftest.$ac_objext'
7874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7875 (eval $ac_try) 2>&5
7876 ac_status=$?
7877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7878 (exit $ac_status); }; }; then
7879 ac_lo=$ac_mid; break
7880else
7881 echo "$as_me: failed program was:" >&5
7882cat conftest.$ac_ext >&5
7883ac_hi=`expr '(' $ac_mid ')' - 1`
7884 if test $ac_mid -le $ac_hi; then
7885 ac_lo= ac_hi=
7886 break
7887 fi
7888 ac_mid=`expr 2 '*' $ac_mid`
7889fi
7890rm -f conftest.$ac_objext conftest.$ac_ext
7891 done
7892else
7893 echo "$as_me: failed program was:" >&5
7894cat conftest.$ac_ext >&5
7895ac_lo= ac_hi=
7896fi
7897rm -f conftest.$ac_objext conftest.$ac_ext
7898fi
7899rm -f conftest.$ac_objext conftest.$ac_ext
7900# Binary search between lo and hi bounds.
7901while test "x$ac_lo" != "x$ac_hi"; do
7902 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7903 cat >conftest.$ac_ext <<_ACEOF
7904#line $LINENO "configure"
7905#include "confdefs.h"
7906$ac_includes_default
7907#ifdef F77_DUMMY_MAIN
7908# ifdef __cplusplus
7909 extern "C"
7910# endif
7911 int F77_DUMMY_MAIN() { return 1; }
7912#endif
7913int
7914main ()
7915{
7916static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7917test_array [0] = 0
7918
7919 ;
7920 return 0;
7921}
7922_ACEOF
7923rm -f conftest.$ac_objext
7924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7925 (eval $ac_compile) 2>&5
7926 ac_status=$?
7927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7928 (exit $ac_status); } &&
7929 { ac_try='test -s conftest.$ac_objext'
7930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7931 (eval $ac_try) 2>&5
7932 ac_status=$?
7933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7934 (exit $ac_status); }; }; then
7935 ac_hi=$ac_mid
7936else
7937 echo "$as_me: failed program was:" >&5
7938cat conftest.$ac_ext >&5
7939ac_lo=`expr '(' $ac_mid ')' + 1`
7940fi
7941rm -f conftest.$ac_objext conftest.$ac_ext
7942done
7943case $ac_lo in
7944?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7945'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7946echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7947 { (exit 1); exit 1; }; } ;;
7948esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007949else
7950 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007951 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7952echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7953 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007954else
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 cat >conftest.$ac_ext <<_ACEOF
7956#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007957#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007958$ac_includes_default
7959long longval () { return (long) (sizeof (fpos_t)); }
7960unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007961#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007962#include <stdlib.h>
7963#ifdef F77_DUMMY_MAIN
7964# ifdef __cplusplus
7965 extern "C"
7966# endif
7967 int F77_DUMMY_MAIN() { return 1; }
7968#endif
7969int
7970main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007971{
Martin v. Löwis11437992002-04-12 09:54:03 +00007972
7973 FILE *f = fopen ("conftest.val", "w");
7974 if (! f)
7975 exit (1);
7976 if (((long) (sizeof (fpos_t))) < 0)
7977 {
7978 long i = longval ();
7979 if (i != ((long) (sizeof (fpos_t))))
7980 exit (1);
7981 fprintf (f, "%ld\n", i);
7982 }
7983 else
7984 {
7985 unsigned long i = ulongval ();
7986 if (i != ((long) (sizeof (fpos_t))))
7987 exit (1);
7988 fprintf (f, "%lu\n", i);
7989 }
7990 exit (ferror (f) || fclose (f) != 0);
7991
7992 ;
7993 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007994}
Martin v. Löwis11437992002-04-12 09:54:03 +00007995_ACEOF
7996rm -f conftest$ac_exeext
7997if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7998 (eval $ac_link) 2>&5
7999 ac_status=$?
8000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8001 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8003 (eval $ac_try) 2>&5
8004 ac_status=$?
8005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8006 (exit $ac_status); }; }; then
8007 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008008else
Martin v. Löwis11437992002-04-12 09:54:03 +00008009 echo "$as_me: program exited with status $ac_status" >&5
8010echo "$as_me: failed program was:" >&5
8011cat conftest.$ac_ext >&5
8012( exit $ac_status )
8013{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8014echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8015 { (exit 1); exit 1; }; }
8016fi
8017rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8018fi
8019fi
8020rm -f conftest.val
8021else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008022 ac_cv_sizeof_fpos_t=0
8023fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008024fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008025echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8026echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8027cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008028#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008029_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008030
Michael W. Hudson54241132001-12-07 15:38:26 +00008031
8032
Martin v. Löwis11437992002-04-12 09:54:03 +00008033echo "$as_me:$LINENO: checking for long long support" >&5
8034echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008035have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008036cat >conftest.$ac_ext <<_ACEOF
8037#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008038#include "confdefs.h"
8039
Martin v. Löwis11437992002-04-12 09:54:03 +00008040#ifdef F77_DUMMY_MAIN
8041# ifdef __cplusplus
8042 extern "C"
8043# endif
8044 int F77_DUMMY_MAIN() { return 1; }
8045#endif
8046int
8047main ()
8048{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008049long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008050 ;
8051 return 0;
8052}
8053_ACEOF
8054rm -f conftest.$ac_objext
8055if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8056 (eval $ac_compile) 2>&5
8057 ac_status=$?
8058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8059 (exit $ac_status); } &&
8060 { ac_try='test -s conftest.$ac_objext'
8061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8062 (eval $ac_try) 2>&5
8063 ac_status=$?
8064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8065 (exit $ac_status); }; }; then
8066
8067
8068cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008069#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008070_ACEOF
8071
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008072 have_long_long=yes
8073
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008074else
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 echo "$as_me: failed program was:" >&5
8076cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008077fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008078rm -f conftest.$ac_objext conftest.$ac_ext
8079echo "$as_me:$LINENO: result: $have_long_long" >&5
8080echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008081if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008082echo "$as_me:$LINENO: checking for long long" >&5
8083echo $ECHO_N "checking for long long... $ECHO_C" >&6
8084if test "${ac_cv_type_long_long+set}" = set; then
8085 echo $ECHO_N "(cached) $ECHO_C" >&6
8086else
8087 cat >conftest.$ac_ext <<_ACEOF
8088#line $LINENO "configure"
8089#include "confdefs.h"
8090$ac_includes_default
8091#ifdef F77_DUMMY_MAIN
8092# ifdef __cplusplus
8093 extern "C"
8094# endif
8095 int F77_DUMMY_MAIN() { return 1; }
8096#endif
8097int
8098main ()
8099{
8100if ((long long *) 0)
8101 return 0;
8102if (sizeof (long long))
8103 return 0;
8104 ;
8105 return 0;
8106}
8107_ACEOF
8108rm -f conftest.$ac_objext
8109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8110 (eval $ac_compile) 2>&5
8111 ac_status=$?
8112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8113 (exit $ac_status); } &&
8114 { ac_try='test -s conftest.$ac_objext'
8115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8116 (eval $ac_try) 2>&5
8117 ac_status=$?
8118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8119 (exit $ac_status); }; }; then
8120 ac_cv_type_long_long=yes
8121else
8122 echo "$as_me: failed program was:" >&5
8123cat conftest.$ac_ext >&5
8124ac_cv_type_long_long=no
8125fi
8126rm -f conftest.$ac_objext conftest.$ac_ext
8127fi
8128echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8129echo "${ECHO_T}$ac_cv_type_long_long" >&6
8130
8131echo "$as_me:$LINENO: checking size of long long" >&5
8132echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8133if test "${ac_cv_sizeof_long_long+set}" = set; then
8134 echo $ECHO_N "(cached) $ECHO_C" >&6
8135else
8136 if test "$ac_cv_type_long_long" = yes; then
8137 # The cast to unsigned long works around a bug in the HP C Compiler
8138 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8139 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8140 # This bug is HP SR number 8606223364.
8141 if test "$cross_compiling" = yes; then
8142 # Depending upon the size, compute the lo and hi bounds.
8143cat >conftest.$ac_ext <<_ACEOF
8144#line $LINENO "configure"
8145#include "confdefs.h"
8146$ac_includes_default
8147#ifdef F77_DUMMY_MAIN
8148# ifdef __cplusplus
8149 extern "C"
8150# endif
8151 int F77_DUMMY_MAIN() { return 1; }
8152#endif
8153int
8154main ()
8155{
8156static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8157test_array [0] = 0
8158
8159 ;
8160 return 0;
8161}
8162_ACEOF
8163rm -f conftest.$ac_objext
8164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8165 (eval $ac_compile) 2>&5
8166 ac_status=$?
8167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8168 (exit $ac_status); } &&
8169 { ac_try='test -s conftest.$ac_objext'
8170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8171 (eval $ac_try) 2>&5
8172 ac_status=$?
8173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8174 (exit $ac_status); }; }; then
8175 ac_lo=0 ac_mid=0
8176 while :; do
8177 cat >conftest.$ac_ext <<_ACEOF
8178#line $LINENO "configure"
8179#include "confdefs.h"
8180$ac_includes_default
8181#ifdef F77_DUMMY_MAIN
8182# ifdef __cplusplus
8183 extern "C"
8184# endif
8185 int F77_DUMMY_MAIN() { return 1; }
8186#endif
8187int
8188main ()
8189{
8190static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8191test_array [0] = 0
8192
8193 ;
8194 return 0;
8195}
8196_ACEOF
8197rm -f conftest.$ac_objext
8198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8199 (eval $ac_compile) 2>&5
8200 ac_status=$?
8201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8202 (exit $ac_status); } &&
8203 { ac_try='test -s conftest.$ac_objext'
8204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8205 (eval $ac_try) 2>&5
8206 ac_status=$?
8207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8208 (exit $ac_status); }; }; then
8209 ac_hi=$ac_mid; break
8210else
8211 echo "$as_me: failed program was:" >&5
8212cat conftest.$ac_ext >&5
8213ac_lo=`expr $ac_mid + 1`
8214 if test $ac_lo -le $ac_mid; then
8215 ac_lo= ac_hi=
8216 break
8217 fi
8218 ac_mid=`expr 2 '*' $ac_mid + 1`
8219fi
8220rm -f conftest.$ac_objext conftest.$ac_ext
8221 done
8222else
8223 echo "$as_me: failed program was:" >&5
8224cat conftest.$ac_ext >&5
8225cat >conftest.$ac_ext <<_ACEOF
8226#line $LINENO "configure"
8227#include "confdefs.h"
8228$ac_includes_default
8229#ifdef F77_DUMMY_MAIN
8230# ifdef __cplusplus
8231 extern "C"
8232# endif
8233 int F77_DUMMY_MAIN() { return 1; }
8234#endif
8235int
8236main ()
8237{
8238static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8239test_array [0] = 0
8240
8241 ;
8242 return 0;
8243}
8244_ACEOF
8245rm -f conftest.$ac_objext
8246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8247 (eval $ac_compile) 2>&5
8248 ac_status=$?
8249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8250 (exit $ac_status); } &&
8251 { ac_try='test -s conftest.$ac_objext'
8252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8253 (eval $ac_try) 2>&5
8254 ac_status=$?
8255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8256 (exit $ac_status); }; }; then
8257 ac_hi=-1 ac_mid=-1
8258 while :; do
8259 cat >conftest.$ac_ext <<_ACEOF
8260#line $LINENO "configure"
8261#include "confdefs.h"
8262$ac_includes_default
8263#ifdef F77_DUMMY_MAIN
8264# ifdef __cplusplus
8265 extern "C"
8266# endif
8267 int F77_DUMMY_MAIN() { return 1; }
8268#endif
8269int
8270main ()
8271{
8272static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8273test_array [0] = 0
8274
8275 ;
8276 return 0;
8277}
8278_ACEOF
8279rm -f conftest.$ac_objext
8280if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8281 (eval $ac_compile) 2>&5
8282 ac_status=$?
8283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8284 (exit $ac_status); } &&
8285 { ac_try='test -s conftest.$ac_objext'
8286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8287 (eval $ac_try) 2>&5
8288 ac_status=$?
8289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8290 (exit $ac_status); }; }; then
8291 ac_lo=$ac_mid; break
8292else
8293 echo "$as_me: failed program was:" >&5
8294cat conftest.$ac_ext >&5
8295ac_hi=`expr '(' $ac_mid ')' - 1`
8296 if test $ac_mid -le $ac_hi; then
8297 ac_lo= ac_hi=
8298 break
8299 fi
8300 ac_mid=`expr 2 '*' $ac_mid`
8301fi
8302rm -f conftest.$ac_objext conftest.$ac_ext
8303 done
8304else
8305 echo "$as_me: failed program was:" >&5
8306cat conftest.$ac_ext >&5
8307ac_lo= ac_hi=
8308fi
8309rm -f conftest.$ac_objext conftest.$ac_ext
8310fi
8311rm -f conftest.$ac_objext conftest.$ac_ext
8312# Binary search between lo and hi bounds.
8313while test "x$ac_lo" != "x$ac_hi"; do
8314 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8315 cat >conftest.$ac_ext <<_ACEOF
8316#line $LINENO "configure"
8317#include "confdefs.h"
8318$ac_includes_default
8319#ifdef F77_DUMMY_MAIN
8320# ifdef __cplusplus
8321 extern "C"
8322# endif
8323 int F77_DUMMY_MAIN() { return 1; }
8324#endif
8325int
8326main ()
8327{
8328static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8329test_array [0] = 0
8330
8331 ;
8332 return 0;
8333}
8334_ACEOF
8335rm -f conftest.$ac_objext
8336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8337 (eval $ac_compile) 2>&5
8338 ac_status=$?
8339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8340 (exit $ac_status); } &&
8341 { ac_try='test -s conftest.$ac_objext'
8342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8343 (eval $ac_try) 2>&5
8344 ac_status=$?
8345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8346 (exit $ac_status); }; }; then
8347 ac_hi=$ac_mid
8348else
8349 echo "$as_me: failed program was:" >&5
8350cat conftest.$ac_ext >&5
8351ac_lo=`expr '(' $ac_mid ')' + 1`
8352fi
8353rm -f conftest.$ac_objext conftest.$ac_ext
8354done
8355case $ac_lo in
8356?*) ac_cv_sizeof_long_long=$ac_lo;;
8357'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8358echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8359 { (exit 1); exit 1; }; } ;;
8360esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008361else
8362 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008363 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8364echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8365 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008366else
Martin v. Löwis11437992002-04-12 09:54:03 +00008367 cat >conftest.$ac_ext <<_ACEOF
8368#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008369#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008370$ac_includes_default
8371long longval () { return (long) (sizeof (long long)); }
8372unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008373#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008374#include <stdlib.h>
8375#ifdef F77_DUMMY_MAIN
8376# ifdef __cplusplus
8377 extern "C"
8378# endif
8379 int F77_DUMMY_MAIN() { return 1; }
8380#endif
8381int
8382main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008383{
Martin v. Löwis11437992002-04-12 09:54:03 +00008384
8385 FILE *f = fopen ("conftest.val", "w");
8386 if (! f)
8387 exit (1);
8388 if (((long) (sizeof (long long))) < 0)
8389 {
8390 long i = longval ();
8391 if (i != ((long) (sizeof (long long))))
8392 exit (1);
8393 fprintf (f, "%ld\n", i);
8394 }
8395 else
8396 {
8397 unsigned long i = ulongval ();
8398 if (i != ((long) (sizeof (long long))))
8399 exit (1);
8400 fprintf (f, "%lu\n", i);
8401 }
8402 exit (ferror (f) || fclose (f) != 0);
8403
8404 ;
8405 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008406}
Martin v. Löwis11437992002-04-12 09:54:03 +00008407_ACEOF
8408rm -f conftest$ac_exeext
8409if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8410 (eval $ac_link) 2>&5
8411 ac_status=$?
8412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8413 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8415 (eval $ac_try) 2>&5
8416 ac_status=$?
8417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8418 (exit $ac_status); }; }; then
8419 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008420else
Martin v. Löwis11437992002-04-12 09:54:03 +00008421 echo "$as_me: program exited with status $ac_status" >&5
8422echo "$as_me: failed program was:" >&5
8423cat conftest.$ac_ext >&5
8424( exit $ac_status )
8425{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8426echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8427 { (exit 1); exit 1; }; }
8428fi
8429rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8430fi
8431fi
8432rm -f conftest.val
8433else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008434 ac_cv_sizeof_long_long=0
8435fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008436fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008437echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8438echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8439cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008440#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008441_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008442
Michael W. Hudson54241132001-12-07 15:38:26 +00008443
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008444fi
8445
Martin v. Löwis11437992002-04-12 09:54:03 +00008446echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8447echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008448have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008449cat >conftest.$ac_ext <<_ACEOF
8450#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008451#include "confdefs.h"
8452
Martin v. Löwis11437992002-04-12 09:54:03 +00008453#ifdef F77_DUMMY_MAIN
8454# ifdef __cplusplus
8455 extern "C"
8456# endif
8457 int F77_DUMMY_MAIN() { return 1; }
8458#endif
8459int
8460main ()
8461{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008462uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008463 ;
8464 return 0;
8465}
8466_ACEOF
8467rm -f conftest.$ac_objext
8468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8469 (eval $ac_compile) 2>&5
8470 ac_status=$?
8471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8472 (exit $ac_status); } &&
8473 { ac_try='test -s conftest.$ac_objext'
8474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8475 (eval $ac_try) 2>&5
8476 ac_status=$?
8477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8478 (exit $ac_status); }; }; then
8479
8480
8481cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008482#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008483_ACEOF
8484
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008485 have_uintptr_t=yes
8486
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008487else
Martin v. Löwis11437992002-04-12 09:54:03 +00008488 echo "$as_me: failed program was:" >&5
8489cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008490fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008491rm -f conftest.$ac_objext conftest.$ac_ext
8492echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8493echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008494if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008495echo "$as_me:$LINENO: checking for uintptr_t" >&5
8496echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8497if test "${ac_cv_type_uintptr_t+set}" = set; then
8498 echo $ECHO_N "(cached) $ECHO_C" >&6
8499else
8500 cat >conftest.$ac_ext <<_ACEOF
8501#line $LINENO "configure"
8502#include "confdefs.h"
8503$ac_includes_default
8504#ifdef F77_DUMMY_MAIN
8505# ifdef __cplusplus
8506 extern "C"
8507# endif
8508 int F77_DUMMY_MAIN() { return 1; }
8509#endif
8510int
8511main ()
8512{
8513if ((uintptr_t *) 0)
8514 return 0;
8515if (sizeof (uintptr_t))
8516 return 0;
8517 ;
8518 return 0;
8519}
8520_ACEOF
8521rm -f conftest.$ac_objext
8522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8523 (eval $ac_compile) 2>&5
8524 ac_status=$?
8525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8526 (exit $ac_status); } &&
8527 { ac_try='test -s conftest.$ac_objext'
8528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8529 (eval $ac_try) 2>&5
8530 ac_status=$?
8531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8532 (exit $ac_status); }; }; then
8533 ac_cv_type_uintptr_t=yes
8534else
8535 echo "$as_me: failed program was:" >&5
8536cat conftest.$ac_ext >&5
8537ac_cv_type_uintptr_t=no
8538fi
8539rm -f conftest.$ac_objext conftest.$ac_ext
8540fi
8541echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8542echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8543
8544echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8545echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8546if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8547 echo $ECHO_N "(cached) $ECHO_C" >&6
8548else
8549 if test "$ac_cv_type_uintptr_t" = yes; then
8550 # The cast to unsigned long works around a bug in the HP C Compiler
8551 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8552 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8553 # This bug is HP SR number 8606223364.
8554 if test "$cross_compiling" = yes; then
8555 # Depending upon the size, compute the lo and hi bounds.
8556cat >conftest.$ac_ext <<_ACEOF
8557#line $LINENO "configure"
8558#include "confdefs.h"
8559$ac_includes_default
8560#ifdef F77_DUMMY_MAIN
8561# ifdef __cplusplus
8562 extern "C"
8563# endif
8564 int F77_DUMMY_MAIN() { return 1; }
8565#endif
8566int
8567main ()
8568{
8569static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8570test_array [0] = 0
8571
8572 ;
8573 return 0;
8574}
8575_ACEOF
8576rm -f conftest.$ac_objext
8577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8578 (eval $ac_compile) 2>&5
8579 ac_status=$?
8580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8581 (exit $ac_status); } &&
8582 { ac_try='test -s conftest.$ac_objext'
8583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8584 (eval $ac_try) 2>&5
8585 ac_status=$?
8586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8587 (exit $ac_status); }; }; then
8588 ac_lo=0 ac_mid=0
8589 while :; do
8590 cat >conftest.$ac_ext <<_ACEOF
8591#line $LINENO "configure"
8592#include "confdefs.h"
8593$ac_includes_default
8594#ifdef F77_DUMMY_MAIN
8595# ifdef __cplusplus
8596 extern "C"
8597# endif
8598 int F77_DUMMY_MAIN() { return 1; }
8599#endif
8600int
8601main ()
8602{
8603static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8604test_array [0] = 0
8605
8606 ;
8607 return 0;
8608}
8609_ACEOF
8610rm -f conftest.$ac_objext
8611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8612 (eval $ac_compile) 2>&5
8613 ac_status=$?
8614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8615 (exit $ac_status); } &&
8616 { ac_try='test -s conftest.$ac_objext'
8617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8618 (eval $ac_try) 2>&5
8619 ac_status=$?
8620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8621 (exit $ac_status); }; }; then
8622 ac_hi=$ac_mid; break
8623else
8624 echo "$as_me: failed program was:" >&5
8625cat conftest.$ac_ext >&5
8626ac_lo=`expr $ac_mid + 1`
8627 if test $ac_lo -le $ac_mid; then
8628 ac_lo= ac_hi=
8629 break
8630 fi
8631 ac_mid=`expr 2 '*' $ac_mid + 1`
8632fi
8633rm -f conftest.$ac_objext conftest.$ac_ext
8634 done
8635else
8636 echo "$as_me: failed program was:" >&5
8637cat conftest.$ac_ext >&5
8638cat >conftest.$ac_ext <<_ACEOF
8639#line $LINENO "configure"
8640#include "confdefs.h"
8641$ac_includes_default
8642#ifdef F77_DUMMY_MAIN
8643# ifdef __cplusplus
8644 extern "C"
8645# endif
8646 int F77_DUMMY_MAIN() { return 1; }
8647#endif
8648int
8649main ()
8650{
8651static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8652test_array [0] = 0
8653
8654 ;
8655 return 0;
8656}
8657_ACEOF
8658rm -f conftest.$ac_objext
8659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8660 (eval $ac_compile) 2>&5
8661 ac_status=$?
8662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8663 (exit $ac_status); } &&
8664 { ac_try='test -s conftest.$ac_objext'
8665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8666 (eval $ac_try) 2>&5
8667 ac_status=$?
8668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8669 (exit $ac_status); }; }; then
8670 ac_hi=-1 ac_mid=-1
8671 while :; do
8672 cat >conftest.$ac_ext <<_ACEOF
8673#line $LINENO "configure"
8674#include "confdefs.h"
8675$ac_includes_default
8676#ifdef F77_DUMMY_MAIN
8677# ifdef __cplusplus
8678 extern "C"
8679# endif
8680 int F77_DUMMY_MAIN() { return 1; }
8681#endif
8682int
8683main ()
8684{
8685static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8686test_array [0] = 0
8687
8688 ;
8689 return 0;
8690}
8691_ACEOF
8692rm -f conftest.$ac_objext
8693if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8694 (eval $ac_compile) 2>&5
8695 ac_status=$?
8696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8697 (exit $ac_status); } &&
8698 { ac_try='test -s conftest.$ac_objext'
8699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8700 (eval $ac_try) 2>&5
8701 ac_status=$?
8702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8703 (exit $ac_status); }; }; then
8704 ac_lo=$ac_mid; break
8705else
8706 echo "$as_me: failed program was:" >&5
8707cat conftest.$ac_ext >&5
8708ac_hi=`expr '(' $ac_mid ')' - 1`
8709 if test $ac_mid -le $ac_hi; then
8710 ac_lo= ac_hi=
8711 break
8712 fi
8713 ac_mid=`expr 2 '*' $ac_mid`
8714fi
8715rm -f conftest.$ac_objext conftest.$ac_ext
8716 done
8717else
8718 echo "$as_me: failed program was:" >&5
8719cat conftest.$ac_ext >&5
8720ac_lo= ac_hi=
8721fi
8722rm -f conftest.$ac_objext conftest.$ac_ext
8723fi
8724rm -f conftest.$ac_objext conftest.$ac_ext
8725# Binary search between lo and hi bounds.
8726while test "x$ac_lo" != "x$ac_hi"; do
8727 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8728 cat >conftest.$ac_ext <<_ACEOF
8729#line $LINENO "configure"
8730#include "confdefs.h"
8731$ac_includes_default
8732#ifdef F77_DUMMY_MAIN
8733# ifdef __cplusplus
8734 extern "C"
8735# endif
8736 int F77_DUMMY_MAIN() { return 1; }
8737#endif
8738int
8739main ()
8740{
8741static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8742test_array [0] = 0
8743
8744 ;
8745 return 0;
8746}
8747_ACEOF
8748rm -f conftest.$ac_objext
8749if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8750 (eval $ac_compile) 2>&5
8751 ac_status=$?
8752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8753 (exit $ac_status); } &&
8754 { ac_try='test -s conftest.$ac_objext'
8755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8756 (eval $ac_try) 2>&5
8757 ac_status=$?
8758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8759 (exit $ac_status); }; }; then
8760 ac_hi=$ac_mid
8761else
8762 echo "$as_me: failed program was:" >&5
8763cat conftest.$ac_ext >&5
8764ac_lo=`expr '(' $ac_mid ')' + 1`
8765fi
8766rm -f conftest.$ac_objext conftest.$ac_ext
8767done
8768case $ac_lo in
8769?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8770'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8771echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8772 { (exit 1); exit 1; }; } ;;
8773esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008774else
8775 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008776 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8777echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8778 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008779else
Martin v. Löwis11437992002-04-12 09:54:03 +00008780 cat >conftest.$ac_ext <<_ACEOF
8781#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008782#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008783$ac_includes_default
8784long longval () { return (long) (sizeof (uintptr_t)); }
8785unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008786#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008787#include <stdlib.h>
8788#ifdef F77_DUMMY_MAIN
8789# ifdef __cplusplus
8790 extern "C"
8791# endif
8792 int F77_DUMMY_MAIN() { return 1; }
8793#endif
8794int
8795main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008796{
Martin v. Löwis11437992002-04-12 09:54:03 +00008797
8798 FILE *f = fopen ("conftest.val", "w");
8799 if (! f)
8800 exit (1);
8801 if (((long) (sizeof (uintptr_t))) < 0)
8802 {
8803 long i = longval ();
8804 if (i != ((long) (sizeof (uintptr_t))))
8805 exit (1);
8806 fprintf (f, "%ld\n", i);
8807 }
8808 else
8809 {
8810 unsigned long i = ulongval ();
8811 if (i != ((long) (sizeof (uintptr_t))))
8812 exit (1);
8813 fprintf (f, "%lu\n", i);
8814 }
8815 exit (ferror (f) || fclose (f) != 0);
8816
8817 ;
8818 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008819}
Martin v. Löwis11437992002-04-12 09:54:03 +00008820_ACEOF
8821rm -f conftest$ac_exeext
8822if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8823 (eval $ac_link) 2>&5
8824 ac_status=$?
8825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8826 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8828 (eval $ac_try) 2>&5
8829 ac_status=$?
8830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8831 (exit $ac_status); }; }; then
8832 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008833else
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 echo "$as_me: program exited with status $ac_status" >&5
8835echo "$as_me: failed program was:" >&5
8836cat conftest.$ac_ext >&5
8837( exit $ac_status )
8838{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8839echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8840 { (exit 1); exit 1; }; }
8841fi
8842rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8843fi
8844fi
8845rm -f conftest.val
8846else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008847 ac_cv_sizeof_uintptr_t=0
8848fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008849fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008850echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8851echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8852cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008853#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008854_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008855
Michael W. Hudson54241132001-12-07 15:38:26 +00008856
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008857fi
8858
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008859# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008860echo "$as_me:$LINENO: checking size of off_t" >&5
8861echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8862if test "${ac_cv_sizeof_off_t+set}" = set; then
8863 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008864else
8865 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008866 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008867else
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 cat >conftest.$ac_ext <<_ACEOF
8869#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008870#include "confdefs.h"
8871#include <stdio.h>
8872#include <sys/types.h>
8873main()
8874{
8875 FILE *f=fopen("conftestval", "w");
8876 if (!f) exit(1);
8877 fprintf(f, "%d\n", sizeof(off_t));
8878 exit(0);
8879}
Martin v. Löwis11437992002-04-12 09:54:03 +00008880_ACEOF
8881rm -f conftest$ac_exeext
8882if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8883 (eval $ac_link) 2>&5
8884 ac_status=$?
8885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8886 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8888 (eval $ac_try) 2>&5
8889 ac_status=$?
8890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8891 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008892 ac_cv_sizeof_off_t=`cat conftestval`
8893else
Martin v. Löwis11437992002-04-12 09:54:03 +00008894 echo "$as_me: program exited with status $ac_status" >&5
8895echo "$as_me: failed program was:" >&5
8896cat conftest.$ac_ext >&5
8897( exit $ac_status )
8898ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008899fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008900rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008901fi
8902
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008903fi
8904
Martin v. Löwis11437992002-04-12 09:54:03 +00008905echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8906echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8907
8908cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008909#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008910_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008911
Michael W. Hudson54241132001-12-07 15:38:26 +00008912
Martin v. Löwis11437992002-04-12 09:54:03 +00008913echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8914echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008915if test "$have_long_long" = yes -a \
8916 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8917 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008918
Martin v. Löwis11437992002-04-12 09:54:03 +00008919cat >>confdefs.h <<\_ACEOF
8920#define HAVE_LARGEFILE_SUPPORT 1
8921_ACEOF
8922
8923 echo "$as_me:$LINENO: result: yes" >&5
8924echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008925else
Martin v. Löwis11437992002-04-12 09:54:03 +00008926 echo "$as_me:$LINENO: result: no" >&5
8927echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008928fi
8929
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008930# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008931echo "$as_me:$LINENO: checking size of time_t" >&5
8932echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8933if test "${ac_cv_sizeof_time_t+set}" = set; then
8934 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008935else
8936 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008937 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008938else
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 cat >conftest.$ac_ext <<_ACEOF
8940#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008941#include "confdefs.h"
8942#include <stdio.h>
8943#include <time.h>
8944main()
8945{
8946 FILE *f=fopen("conftestval", "w");
8947 if (!f) exit(1);
8948 fprintf(f, "%d\n", sizeof(time_t));
8949 exit(0);
8950}
Martin v. Löwis11437992002-04-12 09:54:03 +00008951_ACEOF
8952rm -f conftest$ac_exeext
8953if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8954 (eval $ac_link) 2>&5
8955 ac_status=$?
8956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8957 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8959 (eval $ac_try) 2>&5
8960 ac_status=$?
8961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8962 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008963 ac_cv_sizeof_time_t=`cat conftestval`
8964else
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 echo "$as_me: program exited with status $ac_status" >&5
8966echo "$as_me: failed program was:" >&5
8967cat conftest.$ac_ext >&5
8968( exit $ac_status )
8969ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008970fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008971rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008972fi
8973
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008974fi
8975
Martin v. Löwis11437992002-04-12 09:54:03 +00008976echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8977echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8978
8979cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008980#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008981_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008982
Michael W. Hudson54241132001-12-07 15:38:26 +00008983
8984
Trent Mick635f6fb2000-08-23 21:33:05 +00008985# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008986ac_save_cc="$CC"
8987if test "$ac_cv_kpthread" = "yes"
8988then CC="$CC -Kpthread"
8989fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008990echo "$as_me:$LINENO: checking for pthread_t" >&5
8991echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008992have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008993cat >conftest.$ac_ext <<_ACEOF
8994#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008995#include "confdefs.h"
8996#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008997#ifdef F77_DUMMY_MAIN
8998# ifdef __cplusplus
8999 extern "C"
9000# endif
9001 int F77_DUMMY_MAIN() { return 1; }
9002#endif
9003int
9004main ()
9005{
Guido van Rossum12580492000-09-24 16:47:19 +00009006pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009007 ;
9008 return 0;
9009}
9010_ACEOF
9011rm -f conftest.$ac_objext
9012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9013 (eval $ac_compile) 2>&5
9014 ac_status=$?
9015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9016 (exit $ac_status); } &&
9017 { ac_try='test -s conftest.$ac_objext'
9018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9019 (eval $ac_try) 2>&5
9020 ac_status=$?
9021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9022 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009023 have_pthread_t=yes
9024else
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 echo "$as_me: failed program was:" >&5
9026cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009027fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009028rm -f conftest.$ac_objext conftest.$ac_ext
9029echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9030echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009031if test "$have_pthread_t" = yes ; then
9032 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009033 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9034echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9035 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9036 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009037else
9038 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009039 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009040else
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 cat >conftest.$ac_ext <<_ACEOF
9042#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009043#include "confdefs.h"
9044#include <stdio.h>
9045 #include <pthread.h>
9046 main()
9047 {
9048 FILE *f=fopen("conftestval", "w");
9049 if (!f) exit(1);
9050 fprintf(f, "%d\n", sizeof(pthread_t));
9051 exit(0);
9052 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009053_ACEOF
9054rm -f conftest$ac_exeext
9055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9056 (eval $ac_link) 2>&5
9057 ac_status=$?
9058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9059 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9061 (eval $ac_try) 2>&5
9062 ac_status=$?
9063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9064 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009065 ac_cv_sizeof_pthread_t=`cat conftestval`
9066else
Martin v. Löwis11437992002-04-12 09:54:03 +00009067 echo "$as_me: program exited with status $ac_status" >&5
9068echo "$as_me: failed program was:" >&5
9069cat conftest.$ac_ext >&5
9070( exit $ac_status )
9071ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009072fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009073rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009074fi
9075
Trent Mick635f6fb2000-08-23 21:33:05 +00009076fi
9077
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9079echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9080
9081cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009082#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009083_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009084
9085fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009086CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009087
Martin v. Löwis11437992002-04-12 09:54:03 +00009088echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9089echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009090# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9091if test "${enable_toolbox_glue+set}" = set; then
9092 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009093
Martin v. Löwis11437992002-04-12 09:54:03 +00009094fi;
Jack Jansene578a632001-08-15 01:27:14 +00009095
9096if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009097then
Jack Jansene578a632001-08-15 01:27:14 +00009098 case $ac_sys_system/$ac_sys_release in
9099 Darwin/*)
9100 enable_toolbox_glue="yes";;
9101 *)
9102 enable_toolbox_glue="no";;
9103 esac
9104fi
9105case "$enable_toolbox_glue" in
9106yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009107 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009108 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009109 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009110
9111cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009112#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009113_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009114
9115 ;;
9116*)
9117 extra_frameworks=""
9118 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009119 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009120 ;;
9121esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009122echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9123echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009124
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009125
9126case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009127 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009128 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009129 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009130 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9131 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009132 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009133 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009134 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009135 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9136 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009137esac
9138
Martin v. Löwis11437992002-04-12 09:54:03 +00009139echo "$as_me:$LINENO: checking for --enable-framework" >&5
9140echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009141if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009142then
Jack Jansenca06bc62001-08-03 15:32:23 +00009143 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009144 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009145 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009146 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009147
Martin v. Löwis11437992002-04-12 09:54:03 +00009148cat >>confdefs.h <<\_ACEOF
9149#define WITH_NEXT_FRAMEWORK 1
9150_ACEOF
9151
9152 echo "$as_me:$LINENO: result: yes" >&5
9153echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009154else
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 echo "$as_me:$LINENO: result: no" >&5
9156echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009157fi
9158
Martin v. Löwis11437992002-04-12 09:54:03 +00009159echo "$as_me:$LINENO: checking for dyld" >&5
9160echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009161case $ac_sys_system/$ac_sys_release in
9162 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009163
Martin v. Löwis11437992002-04-12 09:54:03 +00009164cat >>confdefs.h <<\_ACEOF
9165#define WITH_DYLD 1
9166_ACEOF
9167
9168 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9169echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009170 ;;
9171 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009172 echo "$as_me:$LINENO: result: no" >&5
9173echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009174 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009175esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009176
Guido van Rossum0a516c91994-09-12 10:58:40 +00009177# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009178
Michael W. Hudson54241132001-12-07 15:38:26 +00009179
9180
9181
9182
Guido van Rossum0a516c91994-09-12 10:58:40 +00009183# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009184# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009185echo "$as_me:$LINENO: checking SO" >&5
9186echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009187if test -z "$SO"
9188then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009189 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009190 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009191 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009192 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009193 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009194fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009195echo "$as_me:$LINENO: result: $SO" >&5
9196echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009197# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009198# -- "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 +00009199# (Shared libraries in this instance are shared modules to be loaded into
9200# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009201echo "$as_me:$LINENO: checking LDSHARED" >&5
9202echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009203if test -z "$LDSHARED"
9204then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009205 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009206 AIX*)
9207 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009208 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009209 ;;
9210 BeOS*)
9211 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009212 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009213 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009214 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009215 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009216 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009218 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009219 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009220 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009221 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009222 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009223 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9224 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009225 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009226 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9227 if test "$enable_framework" ; then
9228 # Link against the framework. All externals should be defined.
9229 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9230 else
9231 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009232 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009233 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009234 Darwin/*)
9235 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9236 if test "$enable_framework" ; then
9237 # Link against the framework. All externals should be defined.
9238 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9239 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009240 # No framework, use the Python app as bundle-loader
9241 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9242 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009243 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009244 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009245 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009246 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009247 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009248 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009249 then
9250 LDSHARED="cc -shared ${LDFLAGS}"
9251 else
9252 LDSHARED="ld -Bshareable ${LDFLAGS}"
9253 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009254 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009255 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009256 if test "$GCC" = "yes"
9257 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009258 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009259 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009260 SCO_SV*) LDSHARED="$(CC) -Wl,-G,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00009261 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009262 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009263 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009264 *) LDSHARED="ld";;
9265 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009266fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009267echo "$as_me:$LINENO: result: $LDSHARED" >&5
9268echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009269BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009270# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009271# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009272echo "$as_me:$LINENO: checking CCSHARED" >&5
9273echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009274if test -z "$CCSHARED"
9275then
Guido van Rossum07397971997-04-29 21:49:50 +00009276 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009277 SunOS*) if test "$GCC" = yes;
9278 then CCSHARED="-fPIC";
9279 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009280 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009281 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009282 else CCSHARED="+z";
9283 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009284 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009285 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009286 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
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 CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009290 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009291 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009292 SCO_SV*)
9293 if test "$GCC" = "yes"
9294 then CCSHARED="-fPIC"
9295 else CCSHARED="-Kpic -belf"
9296 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009297 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009298 IRIX*/6*) case $CC in
9299 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009300 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009301 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009302 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009303 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009304fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009305echo "$as_me:$LINENO: result: $CCSHARED" >&5
9306echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009307# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009308# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009309echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9310echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009311if test -z "$LINKFORSHARED"
9312then
Guido van Rossum07397971997-04-29 21:49:50 +00009313 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009314 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009315 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009316 LINKFORSHARED="-Wl,-E -Wl,+s";;
9317# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009318 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009319 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009320 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009321 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009322 # -u __dummy makes the linker aware of the objc runtime
9323 # in System.framework; otherwise, __objcInit (referenced in
9324 # crt1.o) gets erroneously defined as common, which breaks dynamic
9325 # loading of any modules which reference it in System.framework.
9326 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9327 # not used by the core itself but which needs to be in the core so
9328 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009329 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009330 if test "$enable_framework"
9331 then
9332 LINKFORSHARED="$LINKFORSHARED -framework Python"
9333 fi
9334 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009335 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009336 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009337 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009338 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009339 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9340 then
9341 LINKFORSHARED="-Wl,--export-dynamic"
9342 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009343 SunOS/5*) case $CC in
9344 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009345 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009346 then
9347 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009348 fi;;
9349 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009350 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009351fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009352echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9353echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009354
Michael W. Hudson54241132001-12-07 15:38:26 +00009355
Martin v. Löwis11437992002-04-12 09:54:03 +00009356echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9357echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009358if test ! "$LIBRARY" = "$LDLIBRARY"
9359then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009360 case $ac_sys_system in
9361 CYGWIN*)
9362 # Cygwin needs CCSHARED when building extension DLLs
9363 # but not when building the interpreter DLL.
9364 CFLAGSFORSHARED='';;
9365 *)
9366 CFLAGSFORSHARED='$(CCSHARED)'
9367 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009368fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009369echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9370echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009371
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009372# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9373# library (with --enable-shared).
9374# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009375# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9376# if it is not required, since it creates a dependency of the shared library
9377# to LIBS. This, in turn, means that applications linking the shared libpython
9378# don't need to link LIBS explicitly. The default should be only changed
9379# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009380
9381echo "$as_me:$LINENO: checking SHLIBS" >&5
9382echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9383case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009384 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009385 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009386esac
9387echo "$as_me:$LINENO: result: $SHLIBS" >&5
9388echo "${ECHO_T}$SHLIBS" >&6
9389
9390
Guido van Rossum627b2d71993-12-24 10:39:16 +00009391# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009392
9393echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9394echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9395if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9396 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009397else
Martin v. Löwis11437992002-04-12 09:54:03 +00009398 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009399LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009400cat >conftest.$ac_ext <<_ACEOF
9401#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009402#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009403
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009404/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009405#ifdef __cplusplus
9406extern "C"
9407#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009408/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 builtin and then its argument prototype would still apply. */
9410char dlopen ();
9411#ifdef F77_DUMMY_MAIN
9412# ifdef __cplusplus
9413 extern "C"
9414# endif
9415 int F77_DUMMY_MAIN() { return 1; }
9416#endif
9417int
9418main ()
9419{
9420dlopen ();
9421 ;
9422 return 0;
9423}
9424_ACEOF
9425rm -f conftest.$ac_objext conftest$ac_exeext
9426if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9427 (eval $ac_link) 2>&5
9428 ac_status=$?
9429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9430 (exit $ac_status); } &&
9431 { ac_try='test -s conftest$ac_exeext'
9432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9433 (eval $ac_try) 2>&5
9434 ac_status=$?
9435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9436 (exit $ac_status); }; }; then
9437 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009438else
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 echo "$as_me: failed program was:" >&5
9440cat conftest.$ac_ext >&5
9441ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009442fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009443rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9444LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009445fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009446echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9447echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9448if test $ac_cv_lib_dl_dlopen = yes; then
9449 cat >>confdefs.h <<_ACEOF
9450#define HAVE_LIBDL 1
9451_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009452
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009453 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009454
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009455fi
9456 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009457
9458echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9459echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9460if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9461 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009462else
Martin v. Löwis11437992002-04-12 09:54:03 +00009463 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009464LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009465cat >conftest.$ac_ext <<_ACEOF
9466#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009467#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009468
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009469/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009470#ifdef __cplusplus
9471extern "C"
9472#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009473/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009474 builtin and then its argument prototype would still apply. */
9475char shl_load ();
9476#ifdef F77_DUMMY_MAIN
9477# ifdef __cplusplus
9478 extern "C"
9479# endif
9480 int F77_DUMMY_MAIN() { return 1; }
9481#endif
9482int
9483main ()
9484{
9485shl_load ();
9486 ;
9487 return 0;
9488}
9489_ACEOF
9490rm -f conftest.$ac_objext conftest$ac_exeext
9491if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9492 (eval $ac_link) 2>&5
9493 ac_status=$?
9494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9495 (exit $ac_status); } &&
9496 { ac_try='test -s conftest$ac_exeext'
9497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9498 (eval $ac_try) 2>&5
9499 ac_status=$?
9500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9501 (exit $ac_status); }; }; then
9502 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009503else
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 echo "$as_me: failed program was:" >&5
9505cat conftest.$ac_ext >&5
9506ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009507fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009508rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9509LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009510fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009511echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9512echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9513if test $ac_cv_lib_dld_shl_load = yes; then
9514 cat >>confdefs.h <<_ACEOF
9515#define HAVE_LIBDLD 1
9516_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009517
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009518 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009519
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009520fi
9521 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009522echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9523echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9524if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009526else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009527 ac_func_search_save_LIBS=$LIBS
9528ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009529cat >conftest.$ac_ext <<_ACEOF
9530#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009531#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009532
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009533/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009534#ifdef __cplusplus
9535extern "C"
9536#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009537/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009538 builtin and then its argument prototype would still apply. */
9539char sem_init ();
9540#ifdef F77_DUMMY_MAIN
9541# ifdef __cplusplus
9542 extern "C"
9543# endif
9544 int F77_DUMMY_MAIN() { return 1; }
9545#endif
9546int
9547main ()
9548{
9549sem_init ();
9550 ;
9551 return 0;
9552}
9553_ACEOF
9554rm -f conftest.$ac_objext conftest$ac_exeext
9555if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9556 (eval $ac_link) 2>&5
9557 ac_status=$?
9558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9559 (exit $ac_status); } &&
9560 { ac_try='test -s conftest$ac_exeext'
9561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9562 (eval $ac_try) 2>&5
9563 ac_status=$?
9564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9565 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009566 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009567else
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 echo "$as_me: failed program was:" >&5
9569cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009570fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009571rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009572if test "$ac_cv_search_sem_init" = no; then
9573 for ac_lib in rt posix4; do
9574 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9575 cat >conftest.$ac_ext <<_ACEOF
9576#line $LINENO "configure"
9577#include "confdefs.h"
9578
9579/* Override any gcc2 internal prototype to avoid an error. */
9580#ifdef __cplusplus
9581extern "C"
9582#endif
9583/* We use char because int might match the return type of a gcc2
9584 builtin and then its argument prototype would still apply. */
9585char sem_init ();
9586#ifdef F77_DUMMY_MAIN
9587# ifdef __cplusplus
9588 extern "C"
9589# endif
9590 int F77_DUMMY_MAIN() { return 1; }
9591#endif
9592int
9593main ()
9594{
9595sem_init ();
9596 ;
9597 return 0;
9598}
Martin v. Löwis11437992002-04-12 09:54:03 +00009599_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009600rm -f conftest.$ac_objext conftest$ac_exeext
9601if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9602 (eval $ac_link) 2>&5
9603 ac_status=$?
9604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9605 (exit $ac_status); } &&
9606 { ac_try='test -s conftest$ac_exeext'
9607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9608 (eval $ac_try) 2>&5
9609 ac_status=$?
9610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9611 (exit $ac_status); }; }; then
9612 ac_cv_search_sem_init="-l$ac_lib"
9613break
9614else
9615 echo "$as_me: failed program was:" >&5
9616cat conftest.$ac_ext >&5
9617fi
9618rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9619 done
9620fi
9621LIBS=$ac_func_search_save_LIBS
9622fi
9623echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9624echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9625if test "$ac_cv_search_sem_init" != no; then
9626 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009627
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009628fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009629 # 'Real Time' functions on Solaris,
9630 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009631
9632# checks for system dependent C++ extensions support
9633case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009634 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9635echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9636 cat >conftest.$ac_ext <<_ACEOF
9637#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009638#include "confdefs.h"
9639#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009640#ifdef F77_DUMMY_MAIN
9641# ifdef __cplusplus
9642 extern "C"
9643# endif
9644 int F77_DUMMY_MAIN() { return 1; }
9645#endif
9646int
9647main ()
9648{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009649loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009650 ;
9651 return 0;
9652}
9653_ACEOF
9654rm -f conftest.$ac_objext conftest$ac_exeext
9655if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9656 (eval $ac_link) 2>&5
9657 ac_status=$?
9658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9659 (exit $ac_status); } &&
9660 { ac_try='test -s conftest$ac_exeext'
9661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9662 (eval $ac_try) 2>&5
9663 ac_status=$?
9664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9665 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009666
Martin v. Löwis11437992002-04-12 09:54:03 +00009667cat >>confdefs.h <<\_ACEOF
9668#define AIX_GENUINE_CPLUSPLUS 1
9669_ACEOF
9670
9671 echo "$as_me:$LINENO: result: yes" >&5
9672echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009673else
Martin v. Löwis11437992002-04-12 09:54:03 +00009674 echo "$as_me: failed program was:" >&5
9675cat conftest.$ac_ext >&5
9676echo "$as_me:$LINENO: result: no" >&5
9677echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009678fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009679rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009680 *) ;;
9681esac
9682
Guido van Rossum70c7f481998-03-26 18:44:10 +00009683# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9684# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009685# BeOS' sockets are stashed in libnet.
9686case "$ac_sys_system" in
9687IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009688*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009689echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9690echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9691if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9692 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009693else
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009695LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009696cat >conftest.$ac_ext <<_ACEOF
9697#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009698#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009699
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009700/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009701#ifdef __cplusplus
9702extern "C"
9703#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009704/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009705 builtin and then its argument prototype would still apply. */
9706char t_open ();
9707#ifdef F77_DUMMY_MAIN
9708# ifdef __cplusplus
9709 extern "C"
9710# endif
9711 int F77_DUMMY_MAIN() { return 1; }
9712#endif
9713int
9714main ()
9715{
9716t_open ();
9717 ;
9718 return 0;
9719}
9720_ACEOF
9721rm -f conftest.$ac_objext conftest$ac_exeext
9722if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9723 (eval $ac_link) 2>&5
9724 ac_status=$?
9725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9726 (exit $ac_status); } &&
9727 { ac_try='test -s conftest$ac_exeext'
9728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9729 (eval $ac_try) 2>&5
9730 ac_status=$?
9731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9732 (exit $ac_status); }; }; then
9733 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009734else
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 echo "$as_me: failed program was:" >&5
9736cat conftest.$ac_ext >&5
9737ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009738fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009739rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9740LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009741fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009742echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9743echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9744if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009745 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009746fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009747 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009748echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9749echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9750if test "${ac_cv_lib_socket_socket+set}" = set; then
9751 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009752else
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009754LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009755cat >conftest.$ac_ext <<_ACEOF
9756#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009757#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009758
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009759/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009760#ifdef __cplusplus
9761extern "C"
9762#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009763/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 builtin and then its argument prototype would still apply. */
9765char socket ();
9766#ifdef F77_DUMMY_MAIN
9767# ifdef __cplusplus
9768 extern "C"
9769# endif
9770 int F77_DUMMY_MAIN() { return 1; }
9771#endif
9772int
9773main ()
9774{
9775socket ();
9776 ;
9777 return 0;
9778}
9779_ACEOF
9780rm -f conftest.$ac_objext conftest$ac_exeext
9781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9782 (eval $ac_link) 2>&5
9783 ac_status=$?
9784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9785 (exit $ac_status); } &&
9786 { ac_try='test -s conftest$ac_exeext'
9787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9788 (eval $ac_try) 2>&5
9789 ac_status=$?
9790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9791 (exit $ac_status); }; }; then
9792 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009793else
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 echo "$as_me: failed program was:" >&5
9795cat conftest.$ac_ext >&5
9796ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009797fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009798rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9799LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009800fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009801echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9802echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9803if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009804 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009805fi
9806 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009807;;
9808esac
9809case "$ac_sys_system" in
9810BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009811echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9812echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9813if test "${ac_cv_lib_net_socket+set}" = set; then
9814 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009815else
Martin v. Löwis11437992002-04-12 09:54:03 +00009816 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009817LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009818cat >conftest.$ac_ext <<_ACEOF
9819#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009820#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009821
Guido van Rossumad678af1998-10-02 14:42:15 +00009822/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009823#ifdef __cplusplus
9824extern "C"
9825#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009826/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 builtin and then its argument prototype would still apply. */
9828char socket ();
9829#ifdef F77_DUMMY_MAIN
9830# ifdef __cplusplus
9831 extern "C"
9832# endif
9833 int F77_DUMMY_MAIN() { return 1; }
9834#endif
9835int
9836main ()
9837{
9838socket ();
9839 ;
9840 return 0;
9841}
9842_ACEOF
9843rm -f conftest.$ac_objext conftest$ac_exeext
9844if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9845 (eval $ac_link) 2>&5
9846 ac_status=$?
9847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9848 (exit $ac_status); } &&
9849 { ac_try='test -s conftest$ac_exeext'
9850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9851 (eval $ac_try) 2>&5
9852 ac_status=$?
9853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9854 (exit $ac_status); }; }; then
9855 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009856else
Martin v. Löwis11437992002-04-12 09:54:03 +00009857 echo "$as_me: failed program was:" >&5
9858cat conftest.$ac_ext >&5
9859ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009860fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009861rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9862LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009863fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009864echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9865echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9866if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009867 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009868fi
9869 # BeOS
9870;;
9871esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009872
Martin v. Löwis11437992002-04-12 09:54:03 +00009873echo "$as_me:$LINENO: checking for --with-libs" >&5
9874echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9875
Guido van Rossuma68acba1996-07-31 17:36:39 +00009876# Check whether --with-libs or --without-libs was given.
9877if test "${with_libs+set}" = set; then
9878 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009879
9880echo "$as_me:$LINENO: result: $withval" >&5
9881echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009882LIBS="$withval $LIBS"
9883
9884else
Martin v. Löwis11437992002-04-12 09:54:03 +00009885 echo "$as_me:$LINENO: result: no" >&5
9886echo "${ECHO_T}no" >&6
9887fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009888
Martin v. Löwis88afe662002-10-26 13:47:44 +00009889# Determine isignalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009890
9891
Martin v. Löwis11437992002-04-12 09:54:03 +00009892echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9893echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9894
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009895# Check whether --with-signal-module or --without-signal-module was given.
9896if test "${with_signal_module+set}" = set; then
9897 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009898
Martin v. Löwis11437992002-04-12 09:54:03 +00009899fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009900
9901if test -z "$with_signal_module"
9902then with_signal_module="yes"
9903fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009904echo "$as_me:$LINENO: result: $with_signal_module" >&5
9905echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009906
9907if test "${with_signal_module}" = "yes"; then
9908 USE_SIGNAL_MODULE=""
9909 SIGNAL_OBJS=""
9910else
9911 USE_SIGNAL_MODULE="#"
9912 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9913fi
9914
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009915# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009916
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009917USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009918
Martin v. Löwis11437992002-04-12 09:54:03 +00009919echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9920echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9921
Guido van Rossumec2f0731997-01-22 20:54:01 +00009922
9923# Check whether --with-dec-threads or --without-dec-threads was given.
9924if test "${with_dec_threads+set}" = set; then
9925 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009926
9927echo "$as_me:$LINENO: result: $withval" >&5
9928echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009929LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009930if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009931 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009932fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009933else
Martin v. Löwis11437992002-04-12 09:54:03 +00009934 echo "$as_me:$LINENO: result: no" >&5
9935echo "${ECHO_T}no" >&6
9936fi;
9937
9938# Templates for things AC_DEFINEd more than once.
9939# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009940
9941
Martin v. Löwis11437992002-04-12 09:54:03 +00009942
9943
9944
9945
9946
9947echo "$as_me:$LINENO: checking for --with-threads" >&5
9948echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9949
Guido van Rossumec2f0731997-01-22 20:54:01 +00009950# Check whether --with-threads or --without-threads was given.
9951if test "${with_threads+set}" = set; then
9952 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009953
Martin v. Löwis11437992002-04-12 09:54:03 +00009954fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009955
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009956# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009957
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009958# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009959if test "${with_thread+set}" = set; then
9960 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009961
Martin v. Löwis11437992002-04-12 09:54:03 +00009962with_threads=$with_thread
9963fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009964
9965if test -z "$with_threads"
9966then with_threads="yes"
9967fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009968echo "$as_me:$LINENO: result: $with_threads" >&5
9969echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009970
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009971
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009972if test "$with_threads" = "no"
9973then
9974 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009975elif test "$ac_cv_pthread_is_default" = yes
9976then
Martin v. Löwis11437992002-04-12 09:54:03 +00009977 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009978#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009979_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009980
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009981 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009982 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009983#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009984_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009985
9986 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009987 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009988elif test "$ac_cv_kpthread" = "yes"
9989then
9990 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009992#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009993_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009994
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009995 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009996 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009997else
9998 if test ! -z "$with_threads" -a -d "$with_threads"
9999 then LDFLAGS="$LDFLAGS -L$with_threads"
10000 fi
10001 if test ! -z "$withval" -a -d "$withval"
10002 then LDFLAGS="$LDFLAGS -L$withval"
10003 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010004
10005 # According to the POSIX spec, a pthreads implementation must
10006 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010007 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10008echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10009 cat >conftest.$ac_ext <<_ACEOF
10010#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010011#include "confdefs.h"
10012#include <unistd.h>
10013 #ifdef _POSIX_THREADS
10014 yes
10015 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010016
10017_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10019 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010020 unistd_defines_pthreads=yes
10021else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010022 unistd_defines_pthreads=no
10023fi
10024rm -f conftest*
10025
Martin v. Löwis11437992002-04-12 09:54:03 +000010026 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10027echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010028
Martin v. Löwis11437992002-04-12 09:54:03 +000010029 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010030#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010031_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010032
Martin v. Löwis11437992002-04-12 09:54:03 +000010033 if test "${ac_cv_header_cthreads_h+set}" = set; then
10034 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10035echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10036if test "${ac_cv_header_cthreads_h+set}" = set; then
10037 echo $ECHO_N "(cached) $ECHO_C" >&6
10038fi
10039echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10040echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010041else
Martin v. Löwis11437992002-04-12 09:54:03 +000010042 # Is the header compilable?
10043echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10044echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10045cat >conftest.$ac_ext <<_ACEOF
10046#line $LINENO "configure"
10047#include "confdefs.h"
10048$ac_includes_default
10049#include <cthreads.h>
10050_ACEOF
10051rm -f conftest.$ac_objext
10052if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10053 (eval $ac_compile) 2>&5
10054 ac_status=$?
10055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10056 (exit $ac_status); } &&
10057 { ac_try='test -s conftest.$ac_objext'
10058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10059 (eval $ac_try) 2>&5
10060 ac_status=$?
10061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10062 (exit $ac_status); }; }; then
10063 ac_header_compiler=yes
10064else
10065 echo "$as_me: failed program was:" >&5
10066cat conftest.$ac_ext >&5
10067ac_header_compiler=no
10068fi
10069rm -f conftest.$ac_objext conftest.$ac_ext
10070echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10071echo "${ECHO_T}$ac_header_compiler" >&6
10072
10073# Is the header present?
10074echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10075echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10076cat >conftest.$ac_ext <<_ACEOF
10077#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010078#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010079#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010080_ACEOF
10081if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10082 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10083 ac_status=$?
10084 egrep -v '^ *\+' conftest.er1 >conftest.err
10085 rm -f conftest.er1
10086 cat conftest.err >&5
10087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10088 (exit $ac_status); } >/dev/null; then
10089 if test -s conftest.err; then
10090 ac_cpp_err=$ac_c_preproc_warn_flag
10091 else
10092 ac_cpp_err=
10093 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010094else
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 ac_cpp_err=yes
10096fi
10097if test -z "$ac_cpp_err"; then
10098 ac_header_preproc=yes
10099else
10100 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010101 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010102 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010103fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010104rm -f conftest.err conftest.$ac_ext
10105echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10106echo "${ECHO_T}$ac_header_preproc" >&6
10107
10108# So? What about this header?
10109case $ac_header_compiler:$ac_header_preproc in
10110 yes:no )
10111 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10112echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10113 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10114echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10115 no:yes )
10116 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10117echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10118 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10119echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10120 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10121echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10122esac
10123echo "$as_me:$LINENO: checking for cthreads.h" >&5
10124echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10125if test "${ac_cv_header_cthreads_h+set}" = set; then
10126 echo $ECHO_N "(cached) $ECHO_C" >&6
10127else
10128 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010129fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010130echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10131echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10132
10133fi
10134if test $ac_cv_header_cthreads_h = yes; then
10135 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010136#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010137_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010138
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010140#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010141_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010142
Martin v. Löwis11437992002-04-12 09:54:03 +000010143
10144cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010145#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010146_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010147
10148 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010149 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010150else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010151
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10153 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10154echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10155if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10156 echo $ECHO_N "(cached) $ECHO_C" >&6
10157fi
10158echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10159echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010160else
Martin v. Löwis11437992002-04-12 09:54:03 +000010161 # Is the header compilable?
10162echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10163echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10164cat >conftest.$ac_ext <<_ACEOF
10165#line $LINENO "configure"
10166#include "confdefs.h"
10167$ac_includes_default
10168#include <mach/cthreads.h>
10169_ACEOF
10170rm -f conftest.$ac_objext
10171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10172 (eval $ac_compile) 2>&5
10173 ac_status=$?
10174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10175 (exit $ac_status); } &&
10176 { ac_try='test -s conftest.$ac_objext'
10177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10178 (eval $ac_try) 2>&5
10179 ac_status=$?
10180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10181 (exit $ac_status); }; }; then
10182 ac_header_compiler=yes
10183else
10184 echo "$as_me: failed program was:" >&5
10185cat conftest.$ac_ext >&5
10186ac_header_compiler=no
10187fi
10188rm -f conftest.$ac_objext conftest.$ac_ext
10189echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10190echo "${ECHO_T}$ac_header_compiler" >&6
10191
10192# Is the header present?
10193echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10194echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10195cat >conftest.$ac_ext <<_ACEOF
10196#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010197#include "confdefs.h"
10198#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010199_ACEOF
10200if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10201 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10202 ac_status=$?
10203 egrep -v '^ *\+' conftest.er1 >conftest.err
10204 rm -f conftest.er1
10205 cat conftest.err >&5
10206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10207 (exit $ac_status); } >/dev/null; then
10208 if test -s conftest.err; then
10209 ac_cpp_err=$ac_c_preproc_warn_flag
10210 else
10211 ac_cpp_err=
10212 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010213else
Martin v. Löwis11437992002-04-12 09:54:03 +000010214 ac_cpp_err=yes
10215fi
10216if test -z "$ac_cpp_err"; then
10217 ac_header_preproc=yes
10218else
10219 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010220 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010223rm -f conftest.err conftest.$ac_ext
10224echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10225echo "${ECHO_T}$ac_header_preproc" >&6
10226
10227# So? What about this header?
10228case $ac_header_compiler:$ac_header_preproc in
10229 yes:no )
10230 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10231echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10232 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10233echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10234 no:yes )
10235 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10236echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10237 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10238echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10239 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10240echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10241esac
10242echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10243echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10244if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10245 echo $ECHO_N "(cached) $ECHO_C" >&6
10246else
10247 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010248fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010249echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10250echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10251
10252fi
10253if test $ac_cv_header_mach_cthreads_h = yes; then
10254 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010255#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010256_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010257
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010259#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010260_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010261
Martin v. Löwis11437992002-04-12 09:54:03 +000010262
10263cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010264#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010265_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010266
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010267 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010268else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010269
Martin v. Löwis11437992002-04-12 09:54:03 +000010270 echo "$as_me:$LINENO: checking for --with-pth" >&5
10271echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10272
10273# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010274if test "${with_pth+set}" = set; then
10275 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010276
Martin v. Löwis11437992002-04-12 09:54:03 +000010277 echo "$as_me:$LINENO: result: $withval" >&5
10278echo "${ECHO_T}$withval" >&6
10279 cat >>confdefs.h <<\_ACEOF
10280#define WITH_THREAD 1
10281_ACEOF
10282
10283
10284cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010285#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010286_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010287
Martin v. Löwis130fb172001-07-19 11:00:41 +000010288 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010289 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010290else
Martin v. Löwis11437992002-04-12 09:54:03 +000010291
10292 echo "$as_me:$LINENO: result: no" >&5
10293echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010294
10295 # Just looking for pthread_create in libpthread is not enough:
10296 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10297 # So we really have to include pthread.h, and then link.
10298 _libs=$LIBS
10299 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10301echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10302 cat >conftest.$ac_ext <<_ACEOF
10303#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010304#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010305#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010306
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010307void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010308#ifdef F77_DUMMY_MAIN
10309# ifdef __cplusplus
10310 extern "C"
10311# endif
10312 int F77_DUMMY_MAIN() { return 1; }
10313#endif
10314int
10315main ()
10316{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010317
10318pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 ;
10320 return 0;
10321}
10322_ACEOF
10323rm -f conftest.$ac_objext conftest$ac_exeext
10324if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10325 (eval $ac_link) 2>&5
10326 ac_status=$?
10327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10328 (exit $ac_status); } &&
10329 { ac_try='test -s conftest$ac_exeext'
10330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10331 (eval $ac_try) 2>&5
10332 ac_status=$?
10333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10334 (exit $ac_status); }; }; then
10335
10336 echo "$as_me:$LINENO: result: yes" >&5
10337echo "${ECHO_T}yes" >&6
10338 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010339#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010340_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010341
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010342 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010343 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010344else
Martin v. Löwis11437992002-04-12 09:54:03 +000010345 echo "$as_me: failed program was:" >&5
10346cat conftest.$ac_ext >&5
10347
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010348 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10350echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10351if test "${ac_cv_func_pthread_detach+set}" = set; then
10352 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010353else
Martin v. Löwis11437992002-04-12 09:54:03 +000010354 cat >conftest.$ac_ext <<_ACEOF
10355#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010356#include "confdefs.h"
10357/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010358 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010359#include <assert.h>
10360/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010361#ifdef __cplusplus
10362extern "C"
10363#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010364/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010365 builtin and then its argument prototype would still apply. */
10366char pthread_detach ();
10367char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010368
Martin v. Löwis11437992002-04-12 09:54:03 +000010369#ifdef F77_DUMMY_MAIN
10370# ifdef __cplusplus
10371 extern "C"
10372# endif
10373 int F77_DUMMY_MAIN() { return 1; }
10374#endif
10375int
10376main ()
10377{
Guido van Rossumad678af1998-10-02 14:42:15 +000010378/* The GNU C library defines this for functions which it implements
10379 to always fail with ENOSYS. Some functions are actually named
10380 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010381#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010382choke me
10383#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010384f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010385#endif
10386
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 ;
10388 return 0;
10389}
10390_ACEOF
10391rm -f conftest.$ac_objext conftest$ac_exeext
10392if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10393 (eval $ac_link) 2>&5
10394 ac_status=$?
10395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10396 (exit $ac_status); } &&
10397 { ac_try='test -s conftest$ac_exeext'
10398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10399 (eval $ac_try) 2>&5
10400 ac_status=$?
10401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10402 (exit $ac_status); }; }; then
10403 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010404else
Martin v. Löwis11437992002-04-12 09:54:03 +000010405 echo "$as_me: failed program was:" >&5
10406cat conftest.$ac_ext >&5
10407ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010408fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010409rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010410fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010411echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10412echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10413if test $ac_cv_func_pthread_detach = yes; then
10414 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010415#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010416_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010417
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010418 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010419 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010420else
Guido van Rossumad678af1998-10-02 14:42:15 +000010421
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010422 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10423 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10424echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10425if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10426 echo $ECHO_N "(cached) $ECHO_C" >&6
10427fi
10428echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10429echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10430else
10431 # Is the header compilable?
10432echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10433echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10434cat >conftest.$ac_ext <<_ACEOF
10435#line $LINENO "configure"
10436#include "confdefs.h"
10437$ac_includes_default
10438#include <atheos/threads.h>
10439_ACEOF
10440rm -f conftest.$ac_objext
10441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10442 (eval $ac_compile) 2>&5
10443 ac_status=$?
10444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10445 (exit $ac_status); } &&
10446 { ac_try='test -s conftest.$ac_objext'
10447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10448 (eval $ac_try) 2>&5
10449 ac_status=$?
10450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10451 (exit $ac_status); }; }; then
10452 ac_header_compiler=yes
10453else
10454 echo "$as_me: failed program was:" >&5
10455cat conftest.$ac_ext >&5
10456ac_header_compiler=no
10457fi
10458rm -f conftest.$ac_objext conftest.$ac_ext
10459echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10460echo "${ECHO_T}$ac_header_compiler" >&6
10461
10462# Is the header present?
10463echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10464echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10465cat >conftest.$ac_ext <<_ACEOF
10466#line $LINENO "configure"
10467#include "confdefs.h"
10468#include <atheos/threads.h>
10469_ACEOF
10470if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10471 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10472 ac_status=$?
10473 egrep -v '^ *\+' conftest.er1 >conftest.err
10474 rm -f conftest.er1
10475 cat conftest.err >&5
10476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10477 (exit $ac_status); } >/dev/null; then
10478 if test -s conftest.err; then
10479 ac_cpp_err=$ac_c_preproc_warn_flag
10480 else
10481 ac_cpp_err=
10482 fi
10483else
10484 ac_cpp_err=yes
10485fi
10486if test -z "$ac_cpp_err"; then
10487 ac_header_preproc=yes
10488else
10489 echo "$as_me: failed program was:" >&5
10490 cat conftest.$ac_ext >&5
10491 ac_header_preproc=no
10492fi
10493rm -f conftest.err conftest.$ac_ext
10494echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10495echo "${ECHO_T}$ac_header_preproc" >&6
10496
10497# So? What about this header?
10498case $ac_header_compiler:$ac_header_preproc in
10499 yes:no )
10500 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10501echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10502 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10503echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10504 no:yes )
10505 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10506echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10507 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10508echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10509 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10510echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10511esac
10512echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10513echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10514if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10515 echo $ECHO_N "(cached) $ECHO_C" >&6
10516else
10517 ac_cv_header_atheos_threads_h=$ac_header_preproc
10518fi
10519echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10520echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10521
10522fi
10523if test $ac_cv_header_atheos_threads_h = yes; then
10524 cat >>confdefs.h <<\_ACEOF
10525#define WITH_THREAD 1
10526_ACEOF
10527
10528
10529cat >>confdefs.h <<\_ACEOF
10530#define ATHEOS_THREADS 1
10531_ACEOF
10532
10533 THREADOBJ="Python/thread.o"
10534else
10535
Martin v. Löwis11437992002-04-12 09:54:03 +000010536 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10537 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10538echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10539if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10540 echo $ECHO_N "(cached) $ECHO_C" >&6
10541fi
10542echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10543echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010544else
Martin v. Löwis11437992002-04-12 09:54:03 +000010545 # Is the header compilable?
10546echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10547echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10548cat >conftest.$ac_ext <<_ACEOF
10549#line $LINENO "configure"
10550#include "confdefs.h"
10551$ac_includes_default
10552#include <kernel/OS.h>
10553_ACEOF
10554rm -f conftest.$ac_objext
10555if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10556 (eval $ac_compile) 2>&5
10557 ac_status=$?
10558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10559 (exit $ac_status); } &&
10560 { ac_try='test -s conftest.$ac_objext'
10561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10562 (eval $ac_try) 2>&5
10563 ac_status=$?
10564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10565 (exit $ac_status); }; }; then
10566 ac_header_compiler=yes
10567else
10568 echo "$as_me: failed program was:" >&5
10569cat conftest.$ac_ext >&5
10570ac_header_compiler=no
10571fi
10572rm -f conftest.$ac_objext conftest.$ac_ext
10573echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10574echo "${ECHO_T}$ac_header_compiler" >&6
10575
10576# Is the header present?
10577echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10578echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10579cat >conftest.$ac_ext <<_ACEOF
10580#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010581#include "confdefs.h"
10582#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010583_ACEOF
10584if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10585 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10586 ac_status=$?
10587 egrep -v '^ *\+' conftest.er1 >conftest.err
10588 rm -f conftest.er1
10589 cat conftest.err >&5
10590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10591 (exit $ac_status); } >/dev/null; then
10592 if test -s conftest.err; then
10593 ac_cpp_err=$ac_c_preproc_warn_flag
10594 else
10595 ac_cpp_err=
10596 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010597else
Martin v. Löwis11437992002-04-12 09:54:03 +000010598 ac_cpp_err=yes
10599fi
10600if test -z "$ac_cpp_err"; then
10601 ac_header_preproc=yes
10602else
10603 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010604 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010606fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010607rm -f conftest.err conftest.$ac_ext
10608echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10609echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010610
Martin v. Löwis11437992002-04-12 09:54:03 +000010611# So? What about this header?
10612case $ac_header_compiler:$ac_header_preproc in
10613 yes:no )
10614 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10615echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10616 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10617echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10618 no:yes )
10619 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10620echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10621 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10622echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10623 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10624echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10625esac
10626echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10627echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10628if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10629 echo $ECHO_N "(cached) $ECHO_C" >&6
10630else
10631 ac_cv_header_kernel_OS_h=$ac_header_preproc
10632fi
10633echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10634echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10635
10636fi
10637if test $ac_cv_header_kernel_OS_h = yes; then
10638 cat >>confdefs.h <<\_ACEOF
10639#define WITH_THREAD 1
10640_ACEOF
10641
10642
10643cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010644#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010645_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010646
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010647 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010648else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010649
Martin v. Löwis11437992002-04-12 09:54:03 +000010650 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10651echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10652if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10653 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010654else
Martin v. Löwis11437992002-04-12 09:54:03 +000010655 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010656LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010657cat >conftest.$ac_ext <<_ACEOF
10658#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010659#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010660
Greg Steinadf63d62000-07-05 10:38:09 +000010661/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010662#ifdef __cplusplus
10663extern "C"
10664#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010665/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 builtin and then its argument prototype would still apply. */
10667char pthread_create ();
10668#ifdef F77_DUMMY_MAIN
10669# ifdef __cplusplus
10670 extern "C"
10671# endif
10672 int F77_DUMMY_MAIN() { return 1; }
10673#endif
10674int
10675main ()
10676{
10677pthread_create ();
10678 ;
10679 return 0;
10680}
10681_ACEOF
10682rm -f conftest.$ac_objext conftest$ac_exeext
10683if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10684 (eval $ac_link) 2>&5
10685 ac_status=$?
10686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10687 (exit $ac_status); } &&
10688 { ac_try='test -s conftest$ac_exeext'
10689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10690 (eval $ac_try) 2>&5
10691 ac_status=$?
10692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10693 (exit $ac_status); }; }; then
10694 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010695else
Martin v. Löwis11437992002-04-12 09:54:03 +000010696 echo "$as_me: failed program was:" >&5
10697cat conftest.$ac_ext >&5
10698ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010699fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010700rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10701LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010702fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010703echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10704echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10705if test $ac_cv_lib_pthreads_pthread_create = yes; then
10706 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010707#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010708_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010709
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010710 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010711 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010712 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010713else
Greg Steinadf63d62000-07-05 10:38:09 +000010714
Martin v. Löwis11437992002-04-12 09:54:03 +000010715 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10716echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10717if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10718 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010719else
Martin v. Löwis11437992002-04-12 09:54:03 +000010720 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010721LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010722cat >conftest.$ac_ext <<_ACEOF
10723#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010724#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010725
Guido van Rossum49545951997-12-02 19:28:29 +000010726/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010727#ifdef __cplusplus
10728extern "C"
10729#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010730/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010731 builtin and then its argument prototype would still apply. */
10732char pthread_create ();
10733#ifdef F77_DUMMY_MAIN
10734# ifdef __cplusplus
10735 extern "C"
10736# endif
10737 int F77_DUMMY_MAIN() { return 1; }
10738#endif
10739int
10740main ()
10741{
10742pthread_create ();
10743 ;
10744 return 0;
10745}
10746_ACEOF
10747rm -f conftest.$ac_objext conftest$ac_exeext
10748if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10749 (eval $ac_link) 2>&5
10750 ac_status=$?
10751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10752 (exit $ac_status); } &&
10753 { ac_try='test -s conftest$ac_exeext'
10754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10755 (eval $ac_try) 2>&5
10756 ac_status=$?
10757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10758 (exit $ac_status); }; }; then
10759 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010760else
Martin v. Löwis11437992002-04-12 09:54:03 +000010761 echo "$as_me: failed program was:" >&5
10762cat conftest.$ac_ext >&5
10763ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010764fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010765rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10766LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010767fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010768echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10769echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10770if test $ac_cv_lib_c_r_pthread_create = yes; then
10771 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010772#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010773_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010774
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010775 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010776 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010777 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010778else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010779
Martin v. Löwis11437992002-04-12 09:54:03 +000010780 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10781echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10782if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010784else
Martin v. Löwis11437992002-04-12 09:54:03 +000010785 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010786LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010787cat >conftest.$ac_ext <<_ACEOF
10788#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010789#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010790
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010791/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010792#ifdef __cplusplus
10793extern "C"
10794#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010795/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010796 builtin and then its argument prototype would still apply. */
10797char __d6_pthread_create ();
10798#ifdef F77_DUMMY_MAIN
10799# ifdef __cplusplus
10800 extern "C"
10801# endif
10802 int F77_DUMMY_MAIN() { return 1; }
10803#endif
10804int
10805main ()
10806{
10807__d6_pthread_create ();
10808 ;
10809 return 0;
10810}
10811_ACEOF
10812rm -f conftest.$ac_objext conftest$ac_exeext
10813if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10814 (eval $ac_link) 2>&5
10815 ac_status=$?
10816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10817 (exit $ac_status); } &&
10818 { ac_try='test -s conftest$ac_exeext'
10819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10820 (eval $ac_try) 2>&5
10821 ac_status=$?
10822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10823 (exit $ac_status); }; }; then
10824 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010825else
Martin v. Löwis11437992002-04-12 09:54:03 +000010826 echo "$as_me: failed program was:" >&5
10827cat conftest.$ac_ext >&5
10828ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010829fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010830rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10831LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010833echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10834echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10835if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10836 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010837#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010838_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010839
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010840 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010841 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010842 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010843else
Guido van Rossum49545951997-12-02 19:28:29 +000010844
Martin v. Löwis11437992002-04-12 09:54:03 +000010845 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10846echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10847if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10848 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010849else
Martin v. Löwis11437992002-04-12 09:54:03 +000010850 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010851LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010852cat >conftest.$ac_ext <<_ACEOF
10853#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010854#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010855
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010856/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010857#ifdef __cplusplus
10858extern "C"
10859#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010860/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010861 builtin and then its argument prototype would still apply. */
10862char __pthread_create_system ();
10863#ifdef F77_DUMMY_MAIN
10864# ifdef __cplusplus
10865 extern "C"
10866# endif
10867 int F77_DUMMY_MAIN() { return 1; }
10868#endif
10869int
10870main ()
10871{
10872__pthread_create_system ();
10873 ;
10874 return 0;
10875}
10876_ACEOF
10877rm -f conftest.$ac_objext conftest$ac_exeext
10878if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10879 (eval $ac_link) 2>&5
10880 ac_status=$?
10881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10882 (exit $ac_status); } &&
10883 { ac_try='test -s conftest$ac_exeext'
10884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10885 (eval $ac_try) 2>&5
10886 ac_status=$?
10887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10888 (exit $ac_status); }; }; then
10889 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010890else
Martin v. Löwis11437992002-04-12 09:54:03 +000010891 echo "$as_me: failed program was:" >&5
10892cat conftest.$ac_ext >&5
10893ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010894fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010895rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10896LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010897fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010898echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10899echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10900if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10901 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010902#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010903_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010904
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010905 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010906 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010907 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010908else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010909
Martin v. Löwis11437992002-04-12 09:54:03 +000010910 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10911echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10912if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10913 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010914else
Martin v. Löwis11437992002-04-12 09:54:03 +000010915 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010916LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010917cat >conftest.$ac_ext <<_ACEOF
10918#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010919#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010920
Guido van Rossumb93a8621998-05-07 13:27:32 +000010921/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010922#ifdef __cplusplus
10923extern "C"
10924#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010925/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010926 builtin and then its argument prototype would still apply. */
10927char pthread_create ();
10928#ifdef F77_DUMMY_MAIN
10929# ifdef __cplusplus
10930 extern "C"
10931# endif
10932 int F77_DUMMY_MAIN() { return 1; }
10933#endif
10934int
10935main ()
10936{
10937pthread_create ();
10938 ;
10939 return 0;
10940}
10941_ACEOF
10942rm -f conftest.$ac_objext conftest$ac_exeext
10943if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10944 (eval $ac_link) 2>&5
10945 ac_status=$?
10946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10947 (exit $ac_status); } &&
10948 { ac_try='test -s conftest$ac_exeext'
10949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10950 (eval $ac_try) 2>&5
10951 ac_status=$?
10952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10953 (exit $ac_status); }; }; then
10954 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010955else
Martin v. Löwis11437992002-04-12 09:54:03 +000010956 echo "$as_me: failed program was:" >&5
10957cat conftest.$ac_ext >&5
10958ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010959fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010960rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10961LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010962fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010963echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10964echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10965if test $ac_cv_lib_cma_pthread_create = yes; then
10966 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010967#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010968_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010969
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010970 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010971 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010972 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010973else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010974
Martin v. Löwis130fb172001-07-19 11:00:41 +000010975 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010976fi
10977
Guido van Rossum627b2d71993-12-24 10:39:16 +000010978
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010979fi
10980
Guido van Rossum0be3e491997-05-22 20:33:33 +000010981fi
10982
Guido van Rossum49545951997-12-02 19:28:29 +000010983fi
10984
Guido van Rossumb93a8621998-05-07 13:27:32 +000010985fi
10986
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010987fi
10988
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010989
Michael W. Hudson54241132001-12-07 15:38:26 +000010990fi
10991
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010992
10993fi
10994
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010995fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010996rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10997fi;
10998fi
10999
11000
11001fi
11002
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011003
Michael W. Hudson54241132001-12-07 15:38:26 +000011004
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011005 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011006 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011007
11008cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011009#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011010_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011011
11012 fi
11013
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11015echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11016 if test "${ac_cv_pthread_system_supported+set}" = set; then
11017 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011018else
11019 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011020 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011021else
Martin v. Löwis11437992002-04-12 09:54:03 +000011022 cat >conftest.$ac_ext <<_ACEOF
11023#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011024#include "confdefs.h"
11025#include <pthread.h>
11026 void *foo(void *parm) {
11027 return NULL;
11028 }
11029 main() {
11030 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011031 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011032 if (pthread_attr_init(&attr)) exit(-1);
11033 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011034 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011035 exit(0);
11036 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011037_ACEOF
11038rm -f conftest$ac_exeext
11039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11040 (eval $ac_link) 2>&5
11041 ac_status=$?
11042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11045 (eval $ac_try) 2>&5
11046 ac_status=$?
11047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11048 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011049 ac_cv_pthread_system_supported=yes
11050else
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 echo "$as_me: program exited with status $ac_status" >&5
11052echo "$as_me: failed program was:" >&5
11053cat conftest.$ac_ext >&5
11054( exit $ac_status )
11055ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011056fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011057rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011058fi
11059
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011060fi
11061
Martin v. Löwis11437992002-04-12 09:54:03 +000011062 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11063echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011064 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011065
11066cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011067#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011068_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011069
11070 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011071
11072for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011073do
Martin v. Löwis11437992002-04-12 09:54:03 +000011074as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11075echo "$as_me:$LINENO: checking for $ac_func" >&5
11076echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11077if eval "test \"\${$as_ac_var+set}\" = set"; then
11078 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011079else
Martin v. Löwis11437992002-04-12 09:54:03 +000011080 cat >conftest.$ac_ext <<_ACEOF
11081#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011082#include "confdefs.h"
11083/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011085#include <assert.h>
11086/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011087#ifdef __cplusplus
11088extern "C"
11089#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011090/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011091 builtin and then its argument prototype would still apply. */
11092char $ac_func ();
11093char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011094
Martin v. Löwis11437992002-04-12 09:54:03 +000011095#ifdef F77_DUMMY_MAIN
11096# ifdef __cplusplus
11097 extern "C"
11098# endif
11099 int F77_DUMMY_MAIN() { return 1; }
11100#endif
11101int
11102main ()
11103{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011104/* The GNU C library defines this for functions which it implements
11105 to always fail with ENOSYS. Some functions are actually named
11106 something starting with __ and the normal name is an alias. */
11107#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11108choke me
11109#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011110f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011111#endif
11112
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 ;
11114 return 0;
11115}
11116_ACEOF
11117rm -f conftest.$ac_objext conftest$ac_exeext
11118if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11119 (eval $ac_link) 2>&5
11120 ac_status=$?
11121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11122 (exit $ac_status); } &&
11123 { ac_try='test -s conftest$ac_exeext'
11124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11125 (eval $ac_try) 2>&5
11126 ac_status=$?
11127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11128 (exit $ac_status); }; }; then
11129 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011130else
Martin v. Löwis11437992002-04-12 09:54:03 +000011131 echo "$as_me: failed program was:" >&5
11132cat conftest.$ac_ext >&5
11133eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011135rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011137echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11138echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11139if test `eval echo '${'$as_ac_var'}'` = yes; then
11140 cat >>confdefs.h <<_ACEOF
11141#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11142_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011143
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011144fi
11145done
11146
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011147 fi
11148
Martin v. Löwis11437992002-04-12 09:54:03 +000011149 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11150echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11151if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11152 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011153else
Martin v. Löwis11437992002-04-12 09:54:03 +000011154 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011155LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011156cat >conftest.$ac_ext <<_ACEOF
11157#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011158#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011159
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011160/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011161#ifdef __cplusplus
11162extern "C"
11163#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011164/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011165 builtin and then its argument prototype would still apply. */
11166char usconfig ();
11167#ifdef F77_DUMMY_MAIN
11168# ifdef __cplusplus
11169 extern "C"
11170# endif
11171 int F77_DUMMY_MAIN() { return 1; }
11172#endif
11173int
11174main ()
11175{
11176usconfig ();
11177 ;
11178 return 0;
11179}
11180_ACEOF
11181rm -f conftest.$ac_objext conftest$ac_exeext
11182if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11183 (eval $ac_link) 2>&5
11184 ac_status=$?
11185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11186 (exit $ac_status); } &&
11187 { ac_try='test -s conftest$ac_exeext'
11188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11189 (eval $ac_try) 2>&5
11190 ac_status=$?
11191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11192 (exit $ac_status); }; }; then
11193 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011194else
Martin v. Löwis11437992002-04-12 09:54:03 +000011195 echo "$as_me: failed program was:" >&5
11196cat conftest.$ac_ext >&5
11197ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011198fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011199rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11200LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011201fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011202echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11203echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11204if test $ac_cv_lib_mpc_usconfig = yes; then
11205 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011206#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011207_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011208
Martin v. Löwis130fb172001-07-19 11:00:41 +000011209 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011210 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011211 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011212fi
11213
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011214
Martin v. Löwis11437992002-04-12 09:54:03 +000011215 if test $posix_threads != "yes"; then
11216 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11217echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11218if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11219 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011220else
Martin v. Löwis11437992002-04-12 09:54:03 +000011221 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011222LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011223cat >conftest.$ac_ext <<_ACEOF
11224#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011225#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011226
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011227/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011228#ifdef __cplusplus
11229extern "C"
11230#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011231/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011232 builtin and then its argument prototype would still apply. */
11233char thr_create ();
11234#ifdef F77_DUMMY_MAIN
11235# ifdef __cplusplus
11236 extern "C"
11237# endif
11238 int F77_DUMMY_MAIN() { return 1; }
11239#endif
11240int
11241main ()
11242{
11243thr_create ();
11244 ;
11245 return 0;
11246}
11247_ACEOF
11248rm -f conftest.$ac_objext conftest$ac_exeext
11249if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11250 (eval $ac_link) 2>&5
11251 ac_status=$?
11252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11253 (exit $ac_status); } &&
11254 { ac_try='test -s conftest$ac_exeext'
11255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11256 (eval $ac_try) 2>&5
11257 ac_status=$?
11258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11259 (exit $ac_status); }; }; then
11260 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011261else
Martin v. Löwis11437992002-04-12 09:54:03 +000011262 echo "$as_me: failed program was:" >&5
11263cat conftest.$ac_ext >&5
11264ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011266rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11267LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011268fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011269echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11270echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11271if test $ac_cv_lib_thread_thr_create = yes; then
11272 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011273#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011274_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011275
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011276 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011277 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011278 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011279fi
11280
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011281 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011282
Martin v. Löwis130fb172001-07-19 11:00:41 +000011283 if test "$USE_THREAD_MODULE" != "#"
11284 then
11285 # If the above checks didn't disable threads, (at least) OSF1
11286 # needs this '-threads' argument during linking.
11287 case $ac_sys_system in
11288 OSF1) LDLAST=-threads;;
11289 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011290 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011291
11292 if test "$posix_threads" = yes -a \
11293 "$ac_sys_system" = "SunOS" -a \
11294 "$ac_sys_release" = "5.6"; then
11295
11296cat >>confdefs.h <<\_ACEOF
11297#define HAVE_PTHREAD_DESTRUCTOR 1
11298_ACEOF
11299
11300 fi
11301
Guido van Rossum627b2d71993-12-24 10:39:16 +000011302fi
11303
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011304# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011305
11306
11307echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11308echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011309# Check whether --enable-ipv6 or --disable-ipv6 was given.
11310if test "${enable_ipv6+set}" = set; then
11311 enableval="$enable_ipv6"
11312 case "$enableval" in
11313 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011314 echo "$as_me:$LINENO: result: no" >&5
11315echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011316 ipv6=no
11317 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 *) echo "$as_me:$LINENO: result: yes" >&5
11319echo "${ECHO_T}yes" >&6
11320 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011321#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011322_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011323
11324 ipv6=yes
11325 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011326 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011327else
Martin v. Löwis11437992002-04-12 09:54:03 +000011328
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011329 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011330 echo "$as_me:$LINENO: result: no" >&5
11331echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011332 ipv6=no
11333
11334else
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 cat >conftest.$ac_ext <<_ACEOF
11336#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011337#include "confdefs.h"
11338 /* AF_INET6 available check */
11339#include <sys/types.h>
11340#include <sys/socket.h>
11341main()
11342{
11343 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11344 exit(1);
11345 else
11346 exit(0);
11347}
11348
Martin v. Löwis11437992002-04-12 09:54:03 +000011349_ACEOF
11350rm -f conftest$ac_exeext
11351if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11352 (eval $ac_link) 2>&5
11353 ac_status=$?
11354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11355 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11357 (eval $ac_try) 2>&5
11358 ac_status=$?
11359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11360 (exit $ac_status); }; }; then
11361 echo "$as_me:$LINENO: result: yes" >&5
11362echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011363 ipv6=yes
11364else
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 echo "$as_me: program exited with status $ac_status" >&5
11366echo "$as_me: failed program was:" >&5
11367cat conftest.$ac_ext >&5
11368( exit $ac_status )
11369echo "$as_me:$LINENO: result: no" >&5
11370echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011371 ipv6=no
11372fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011373rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011374fi
11375
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011376if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11378echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11379 cat >conftest.$ac_ext <<_ACEOF
11380#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011381#include "confdefs.h"
11382#include <sys/types.h>
11383#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011384#ifdef F77_DUMMY_MAIN
11385# ifdef __cplusplus
11386 extern "C"
11387# endif
11388 int F77_DUMMY_MAIN() { return 1; }
11389#endif
11390int
11391main ()
11392{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011393struct sockaddr_in6 x;
11394x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 ;
11396 return 0;
11397}
11398_ACEOF
11399rm -f conftest.$ac_objext
11400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11401 (eval $ac_compile) 2>&5
11402 ac_status=$?
11403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11404 (exit $ac_status); } &&
11405 { ac_try='test -s conftest.$ac_objext'
11406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11407 (eval $ac_try) 2>&5
11408 ac_status=$?
11409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11410 (exit $ac_status); }; }; then
11411 echo "$as_me:$LINENO: result: yes" >&5
11412echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011413 ipv6=yes
11414else
Martin v. Löwis11437992002-04-12 09:54:03 +000011415 echo "$as_me: failed program was:" >&5
11416cat conftest.$ac_ext >&5
11417echo "$as_me:$LINENO: result: no" >&5
11418echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011419 ipv6=no
11420fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011421rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011422fi
11423
11424if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011425 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011426#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011427_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011428
11429fi
11430
Martin v. Löwis11437992002-04-12 09:54:03 +000011431fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011432
11433ipv6type=unknown
11434ipv6lib=none
11435ipv6trylibc=no
11436
11437if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011438 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11439echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011440 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11441 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011442 case $i in
11443 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011444 cat >conftest.$ac_ext <<_ACEOF
11445#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011446#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011447
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011448#include <netinet/in.h>
11449#ifdef IPV6_INRIA_VERSION
11450yes
11451#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011452_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11454 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011455 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011456fi
11457rm -f conftest*
11458
11459 ;;
11460 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011461 cat >conftest.$ac_ext <<_ACEOF
11462#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011463#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011464
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011465#include <netinet/in.h>
11466#ifdef __KAME__
11467yes
11468#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011469_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11471 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011472 ipv6type=$i;
11473 ipv6lib=inet6
11474 ipv6libdir=/usr/local/v6/lib
11475 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011476fi
11477rm -f conftest*
11478
11479 ;;
11480 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011481 cat >conftest.$ac_ext <<_ACEOF
11482#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011483#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011484
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011485#include <features.h>
11486#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11487yes
11488#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011489_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011490if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11491 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011492 ipv6type=$i;
11493 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011494fi
11495rm -f conftest*
11496
11497 ;;
11498 linux-inet6)
11499 if test -d /usr/inet6; then
11500 ipv6type=$i
11501 ipv6lib=inet6
11502 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011503 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011504 fi
11505 ;;
11506 solaris)
11507 if test -f /etc/netconfig; then
11508 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11509 ipv6type=$i
11510 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011511 fi
11512 fi
11513 ;;
11514 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011515 cat >conftest.$ac_ext <<_ACEOF
11516#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011517#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011518
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011519#include <sys/param.h>
11520#ifdef _TOSHIBA_INET6
11521yes
11522#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011523_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011524if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11525 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011526 ipv6type=$i;
11527 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011528 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011529fi
11530rm -f conftest*
11531
11532 ;;
11533 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011534 cat >conftest.$ac_ext <<_ACEOF
11535#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011536#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011537
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011538#include </usr/local/v6/include/sys/v6config.h>
11539#ifdef __V6D__
11540yes
11541#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011542_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011543if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11544 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011545 ipv6type=$i;
11546 ipv6lib=v6;
11547 ipv6libdir=/usr/local/v6/lib;
11548 OPT="-I/usr/local/v6/include $OPT"
11549fi
11550rm -f conftest*
11551
11552 ;;
11553 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011554 cat >conftest.$ac_ext <<_ACEOF
11555#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011556#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011557
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011558#include <sys/param.h>
11559#ifdef _ZETA_MINAMI_INET6
11560yes
11561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011562_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11564 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011565 ipv6type=$i;
11566 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011567 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011568fi
11569rm -f conftest*
11570
11571 ;;
11572 esac
11573 if test "$ipv6type" != "unknown"; then
11574 break
11575 fi
11576 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011577 echo "$as_me:$LINENO: result: $ipv6type" >&5
11578echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011579fi
11580
11581if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11582 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11583 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11584 echo "using lib$ipv6lib"
11585 else
11586 if test $ipv6trylibc = "yes"; then
11587 echo "using libc"
11588 else
11589 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11590 echo "You need to fetch lib$ipv6lib.a from appropriate"
11591 echo 'ipv6 kit and compile beforehand.'
11592 exit 1
11593 fi
11594 fi
11595fi
11596
Jack Jansen7b8c7542002-04-14 20:12:41 +000011597# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011598echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11599echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011600
11601# Check whether --with-universal-newlines or --without-universal-newlines was given.
11602if test "${with_universal_newlines+set}" = set; then
11603 withval="$with_universal_newlines"
11604
11605fi;
11606
11607if test -z "$with_universal_newlines"
11608then with_universal_newlines="yes"
11609fi
11610if test "$with_universal_newlines" != "no"
11611then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011612
11613cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011614#define WITH_UNIVERSAL_NEWLINES 1
11615_ACEOF
11616
11617fi
11618echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11619echo "${ECHO_T}$with_universal_newlines" >&6
11620
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011621# Check for --with-doc-strings
11622echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11623echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11624
11625# Check whether --with-doc-strings or --without-doc-strings was given.
11626if test "${with_doc_strings+set}" = set; then
11627 withval="$with_doc_strings"
11628
11629fi;
11630
11631if test -z "$with_doc_strings"
11632then with_doc_strings="yes"
11633fi
11634if test "$with_doc_strings" != "no"
11635then
11636
11637cat >>confdefs.h <<\_ACEOF
11638#define WITH_DOC_STRINGS 1
11639_ACEOF
11640
11641fi
11642echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11643echo "${ECHO_T}$with_doc_strings" >&6
11644
Neil Schemenauera35c6882001-02-27 04:45:05 +000011645# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011646echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11647echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11648
Neil Schemenauera35c6882001-02-27 04:45:05 +000011649# Check whether --with-pymalloc or --without-pymalloc was given.
11650if test "${with_pymalloc+set}" = set; then
11651 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011652
Martin v. Löwis11437992002-04-12 09:54:03 +000011653fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011654
Neil Schemenauer16c22972002-03-22 15:34:49 +000011655if test -z "$with_pymalloc"
11656then with_pymalloc="yes"
11657fi
11658if test "$with_pymalloc" != "no"
11659then
Martin v. Löwis11437992002-04-12 09:54:03 +000011660
11661cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011662#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011663_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011664
11665fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011666echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11667echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011668
Barry Warsawef82cd72000-06-30 16:21:01 +000011669# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011670echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11671echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11672
Barry Warsawef82cd72000-06-30 16:21:01 +000011673# Check whether --with-wctype-functions or --without-wctype-functions was given.
11674if test "${with_wctype_functions+set}" = set; then
11675 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011676
Barry Warsawef82cd72000-06-30 16:21:01 +000011677if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011678then
11679
11680cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011681#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011682_ACEOF
11683
11684 echo "$as_me:$LINENO: result: yes" >&5
11685echo "${ECHO_T}yes" >&6
11686else echo "$as_me:$LINENO: result: no" >&5
11687echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011688fi
11689else
Martin v. Löwis11437992002-04-12 09:54:03 +000011690 echo "$as_me:$LINENO: result: no" >&5
11691echo "${ECHO_T}no" >&6
11692fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011693
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011694# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011695
Guido van Rossum98935bf2001-09-05 19:13:16 +000011696DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011697
Martin v. Löwis11437992002-04-12 09:54:03 +000011698echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11699echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11700
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011701# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011702if test "${with_sgi_dl+set}" = set; then
11703 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011704
11705echo "$as_me:$LINENO: result: $withval" >&5
11706echo "${ECHO_T}$withval" >&6
11707
11708cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011709#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011710_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011711
Guido van Rossume97ee181999-12-20 21:27:22 +000011712DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011713dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011714if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011715then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011716else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11717echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11718 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011719fi
11720DLINCLDIR=${dldir}
11721LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011722else
Martin v. Löwis11437992002-04-12 09:54:03 +000011723 echo "$as_me:$LINENO: result: no" >&5
11724echo "${ECHO_T}no" >&6
11725fi;
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-dl-dld" >&5
11728echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011729
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011730# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011731if test "${with_dl_dld+set}" = set; then
11732 withval="$with_dl_dld"
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_DL_DLD 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=`echo "$withval" | sed 's/,.*//'`
11743dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011744if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011745then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011746else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11747echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11748 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011749fi
11750DLINCLDIR=${dldir}
11751LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011752else
Martin v. Löwis11437992002-04-12 09:54:03 +000011753 echo "$as_me:$LINENO: result: no" >&5
11754echo "${ECHO_T}no" >&6
11755fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011756
Guido van Rossume97ee181999-12-20 21:27:22 +000011757# the dlopen() function means we might want to use dynload_shlib.o. some
11758# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011759
Thomas Wouters3a584202000-08-05 23:28:51 +000011760for ac_func in dlopen
11761do
Martin v. Löwis11437992002-04-12 09:54:03 +000011762as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11763echo "$as_me:$LINENO: checking for $ac_func" >&5
11764echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11765if eval "test \"\${$as_ac_var+set}\" = set"; then
11766 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011767else
Martin v. Löwis11437992002-04-12 09:54:03 +000011768 cat >conftest.$ac_ext <<_ACEOF
11769#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011770#include "confdefs.h"
11771/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011772 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011773#include <assert.h>
11774/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011775#ifdef __cplusplus
11776extern "C"
11777#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011778/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 builtin and then its argument prototype would still apply. */
11780char $ac_func ();
11781char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011782
Martin v. Löwis11437992002-04-12 09:54:03 +000011783#ifdef F77_DUMMY_MAIN
11784# ifdef __cplusplus
11785 extern "C"
11786# endif
11787 int F77_DUMMY_MAIN() { return 1; }
11788#endif
11789int
11790main ()
11791{
Guido van Rossume97ee181999-12-20 21:27:22 +000011792/* The GNU C library defines this for functions which it implements
11793 to always fail with ENOSYS. Some functions are actually named
11794 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011795#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011796choke me
11797#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011798f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011799#endif
11800
Martin v. Löwis11437992002-04-12 09:54:03 +000011801 ;
11802 return 0;
11803}
11804_ACEOF
11805rm -f conftest.$ac_objext conftest$ac_exeext
11806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11807 (eval $ac_link) 2>&5
11808 ac_status=$?
11809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11810 (exit $ac_status); } &&
11811 { ac_try='test -s conftest$ac_exeext'
11812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11813 (eval $ac_try) 2>&5
11814 ac_status=$?
11815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11816 (exit $ac_status); }; }; then
11817 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011818else
Martin v. Löwis11437992002-04-12 09:54:03 +000011819 echo "$as_me: failed program was:" >&5
11820cat conftest.$ac_ext >&5
11821eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011822fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011823rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011824fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011825echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11826echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11827if test `eval echo '${'$as_ac_var'}'` = yes; then
11828 cat >>confdefs.h <<_ACEOF
11829#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11830_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011831
Guido van Rossume97ee181999-12-20 21:27:22 +000011832fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011833done
Guido van Rossume97ee181999-12-20 21:27:22 +000011834
Michael W. Hudson54241132001-12-07 15:38:26 +000011835
Guido van Rossume97ee181999-12-20 21:27:22 +000011836# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11837# loading of modules.
11838
Martin v. Löwis11437992002-04-12 09:54:03 +000011839echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11840echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011841if test -z "$DYNLOADFILE"
11842then
11843 case $ac_sys_system/$ac_sys_release in
11844 AIX*) DYNLOADFILE="dynload_aix.o";;
11845 BeOS*) DYNLOADFILE="dynload_beos.o";;
11846 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011847 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011848 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011849 *)
11850 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11851 # out any dynamic loading
11852 if test "$ac_cv_func_dlopen" = yes
11853 then DYNLOADFILE="dynload_shlib.o"
11854 else DYNLOADFILE="dynload_stub.o"
11855 fi
11856 ;;
11857 esac
11858fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011859echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11860echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011861if test "$DYNLOADFILE" != "dynload_stub.o"
11862then
Martin v. Löwis11437992002-04-12 09:54:03 +000011863
11864cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011865#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011866_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011867
11868fi
11869
Neil Schemenauer4e425612001-06-19 15:44:15 +000011870# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11871
Michael W. Hudson54241132001-12-07 15:38:26 +000011872
Martin v. Löwis11437992002-04-12 09:54:03 +000011873echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11874echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011875if test -z "$MACHDEP_OBJS"
11876then
Jack Jansene578a632001-08-15 01:27:14 +000011877 MACHDEP_OBJS=$extra_machdep_objs
11878else
11879 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011880fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011881echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11882echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011883
Guido van Rossum627b2d71993-12-24 10:39:16 +000011884# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
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
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011958
Fred Drake6b3cc522002-04-15 19:20:27 +000011959
Jack Jansen0b06be72002-06-21 14:48:38 +000011960
Martin v. Löwis0cec0ff2002-07-28 16:33:45 +000011961
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011962
Martin v. Löwis244edc82001-10-04 22:44:26 +000011963for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011964 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011965 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000011966 hstrerror inet_pton kill killpg lchown link lstat mkfifo mknod mktime \
11967 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011968 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011969 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011970 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011971 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011972 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011973 truncate uname unsetenv utimes waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011974do
Martin v. Löwis11437992002-04-12 09:54:03 +000011975as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11976echo "$as_me:$LINENO: checking for $ac_func" >&5
11977echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11978if eval "test \"\${$as_ac_var+set}\" = set"; then
11979 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011980else
Martin v. Löwis11437992002-04-12 09:54:03 +000011981 cat >conftest.$ac_ext <<_ACEOF
11982#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011983#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011984/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011985 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011986#include <assert.h>
11987/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011988#ifdef __cplusplus
11989extern "C"
11990#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011991/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011992 builtin and then its argument prototype would still apply. */
11993char $ac_func ();
11994char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011995
Martin v. Löwis11437992002-04-12 09:54:03 +000011996#ifdef F77_DUMMY_MAIN
11997# ifdef __cplusplus
11998 extern "C"
11999# endif
12000 int F77_DUMMY_MAIN() { return 1; }
12001#endif
12002int
12003main ()
12004{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012005/* The GNU C library defines this for functions which it implements
12006 to always fail with ENOSYS. Some functions are actually named
12007 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012008#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012009choke me
12010#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012011f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012012#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012013
Martin v. Löwis11437992002-04-12 09:54:03 +000012014 ;
12015 return 0;
12016}
12017_ACEOF
12018rm -f conftest.$ac_objext conftest$ac_exeext
12019if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12020 (eval $ac_link) 2>&5
12021 ac_status=$?
12022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12023 (exit $ac_status); } &&
12024 { ac_try='test -s conftest$ac_exeext'
12025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12026 (eval $ac_try) 2>&5
12027 ac_status=$?
12028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12029 (exit $ac_status); }; }; then
12030 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012031else
Martin v. Löwis11437992002-04-12 09:54:03 +000012032 echo "$as_me: failed program was:" >&5
12033cat conftest.$ac_ext >&5
12034eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012036rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012037fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012038echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12039echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12040if test `eval echo '${'$as_ac_var'}'` = yes; then
12041 cat >>confdefs.h <<_ACEOF
12042#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12043_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012044
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012045fi
12046done
12047
Michael W. Hudson54241132001-12-07 15:38:26 +000012048
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012049# check for openpty and forkpty
12050
Martin v. Löwis11437992002-04-12 09:54:03 +000012051
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012052for ac_func in openpty
12053do
Martin v. Löwis11437992002-04-12 09:54:03 +000012054as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12055echo "$as_me:$LINENO: checking for $ac_func" >&5
12056echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12057if eval "test \"\${$as_ac_var+set}\" = set"; then
12058 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012059else
Martin v. Löwis11437992002-04-12 09:54:03 +000012060 cat >conftest.$ac_ext <<_ACEOF
12061#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012062#include "confdefs.h"
12063/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012064 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012065#include <assert.h>
12066/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012067#ifdef __cplusplus
12068extern "C"
12069#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012070/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012071 builtin and then its argument prototype would still apply. */
12072char $ac_func ();
12073char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012074
Martin v. Löwis11437992002-04-12 09:54:03 +000012075#ifdef F77_DUMMY_MAIN
12076# ifdef __cplusplus
12077 extern "C"
12078# endif
12079 int F77_DUMMY_MAIN() { return 1; }
12080#endif
12081int
12082main ()
12083{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012084/* The GNU C library defines this for functions which it implements
12085 to always fail with ENOSYS. Some functions are actually named
12086 something starting with __ and the normal name is an alias. */
12087#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12088choke me
12089#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012090f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012091#endif
12092
Martin v. Löwis11437992002-04-12 09:54:03 +000012093 ;
12094 return 0;
12095}
12096_ACEOF
12097rm -f conftest.$ac_objext conftest$ac_exeext
12098if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12099 (eval $ac_link) 2>&5
12100 ac_status=$?
12101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12102 (exit $ac_status); } &&
12103 { ac_try='test -s conftest$ac_exeext'
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 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012110else
Martin v. Löwis11437992002-04-12 09:54:03 +000012111 echo "$as_me: failed program was:" >&5
12112cat conftest.$ac_ext >&5
12113eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012114fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012115rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012116fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012117echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12118echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12119if test `eval echo '${'$as_ac_var'}'` = yes; then
12120 cat >>confdefs.h <<_ACEOF
12121#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12122_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012123
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012124else
Martin v. Löwis11437992002-04-12 09:54:03 +000012125 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12126echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12127if test "${ac_cv_lib_util_openpty+set}" = set; then
12128 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012129else
Martin v. Löwis11437992002-04-12 09:54:03 +000012130 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012131LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012132cat >conftest.$ac_ext <<_ACEOF
12133#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012134#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012135
Fred Drake8cef4cf2000-06-28 16:40:38 +000012136/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012137#ifdef __cplusplus
12138extern "C"
12139#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012140/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012141 builtin and then its argument prototype would still apply. */
12142char openpty ();
12143#ifdef F77_DUMMY_MAIN
12144# ifdef __cplusplus
12145 extern "C"
12146# endif
12147 int F77_DUMMY_MAIN() { return 1; }
12148#endif
12149int
12150main ()
12151{
12152openpty ();
12153 ;
12154 return 0;
12155}
12156_ACEOF
12157rm -f conftest.$ac_objext conftest$ac_exeext
12158if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12159 (eval $ac_link) 2>&5
12160 ac_status=$?
12161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12162 (exit $ac_status); } &&
12163 { ac_try='test -s conftest$ac_exeext'
12164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12165 (eval $ac_try) 2>&5
12166 ac_status=$?
12167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12168 (exit $ac_status); }; }; then
12169 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012170else
Martin v. Löwis11437992002-04-12 09:54:03 +000012171 echo "$as_me: failed program was:" >&5
12172cat conftest.$ac_ext >&5
12173ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012175rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12176LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012177fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012178echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12179echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12180if test $ac_cv_lib_util_openpty = yes; then
12181 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012182#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012183_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012184 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012185fi
12186
12187fi
12188done
12189
Martin v. Löwis11437992002-04-12 09:54:03 +000012190
Fred Drake8cef4cf2000-06-28 16:40:38 +000012191for ac_func in forkpty
12192do
Martin v. Löwis11437992002-04-12 09:54:03 +000012193as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12194echo "$as_me:$LINENO: checking for $ac_func" >&5
12195echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12196if eval "test \"\${$as_ac_var+set}\" = set"; then
12197 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012198else
Martin v. Löwis11437992002-04-12 09:54:03 +000012199 cat >conftest.$ac_ext <<_ACEOF
12200#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012201#include "confdefs.h"
12202/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012203 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000012204#include <assert.h>
12205/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012206#ifdef __cplusplus
12207extern "C"
12208#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012209/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 builtin and then its argument prototype would still apply. */
12211char $ac_func ();
12212char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012213
Martin v. Löwis11437992002-04-12 09:54:03 +000012214#ifdef F77_DUMMY_MAIN
12215# ifdef __cplusplus
12216 extern "C"
12217# endif
12218 int F77_DUMMY_MAIN() { return 1; }
12219#endif
12220int
12221main ()
12222{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012223/* The GNU C library defines this for functions which it implements
12224 to always fail with ENOSYS. Some functions are actually named
12225 something starting with __ and the normal name is an alias. */
12226#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12227choke me
12228#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012229f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012230#endif
12231
Martin v. Löwis11437992002-04-12 09:54:03 +000012232 ;
12233 return 0;
12234}
12235_ACEOF
12236rm -f conftest.$ac_objext conftest$ac_exeext
12237if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12238 (eval $ac_link) 2>&5
12239 ac_status=$?
12240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12241 (exit $ac_status); } &&
12242 { ac_try='test -s conftest$ac_exeext'
12243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12244 (eval $ac_try) 2>&5
12245 ac_status=$?
12246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12247 (exit $ac_status); }; }; then
12248 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012249else
Martin v. Löwis11437992002-04-12 09:54:03 +000012250 echo "$as_me: failed program was:" >&5
12251cat conftest.$ac_ext >&5
12252eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012253fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012254rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012255fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012256echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12257echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12258if test `eval echo '${'$as_ac_var'}'` = yes; then
12259 cat >>confdefs.h <<_ACEOF
12260#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12261_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012262
Fred Drake8cef4cf2000-06-28 16:40:38 +000012263else
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12265echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12266if test "${ac_cv_lib_util_forkpty+set}" = set; then
12267 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012268else
Martin v. Löwis11437992002-04-12 09:54:03 +000012269 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012270LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012271cat >conftest.$ac_ext <<_ACEOF
12272#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012273#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012274
Fred Drake8cef4cf2000-06-28 16:40:38 +000012275/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012276#ifdef __cplusplus
12277extern "C"
12278#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012279/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012280 builtin and then its argument prototype would still apply. */
12281char forkpty ();
12282#ifdef F77_DUMMY_MAIN
12283# ifdef __cplusplus
12284 extern "C"
12285# endif
12286 int F77_DUMMY_MAIN() { return 1; }
12287#endif
12288int
12289main ()
12290{
12291forkpty ();
12292 ;
12293 return 0;
12294}
12295_ACEOF
12296rm -f conftest.$ac_objext conftest$ac_exeext
12297if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12298 (eval $ac_link) 2>&5
12299 ac_status=$?
12300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12301 (exit $ac_status); } &&
12302 { ac_try='test -s conftest$ac_exeext'
12303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12304 (eval $ac_try) 2>&5
12305 ac_status=$?
12306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12307 (exit $ac_status); }; }; then
12308 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012309else
Martin v. Löwis11437992002-04-12 09:54:03 +000012310 echo "$as_me: failed program was:" >&5
12311cat conftest.$ac_ext >&5
12312ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012313fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012314rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12315LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012316fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012317echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12318echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12319if test $ac_cv_lib_util_forkpty = yes; then
12320 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012321#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012322_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012323 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012324fi
12325
12326fi
12327done
12328
Jack Jansendd19cf82001-12-06 22:36:17 +000012329
Michael W. Hudson54241132001-12-07 15:38:26 +000012330# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012331
12332
12333
12334
12335
12336
Fred Drake8cef4cf2000-06-28 16:40:38 +000012337for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12338do
Martin v. Löwis11437992002-04-12 09:54:03 +000012339as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12340echo "$as_me:$LINENO: checking for $ac_func" >&5
12341echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12342if eval "test \"\${$as_ac_var+set}\" = set"; then
12343 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012344else
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 cat >conftest.$ac_ext <<_ACEOF
12346#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012347#include "confdefs.h"
12348/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012349 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012350#include <assert.h>
12351/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012352#ifdef __cplusplus
12353extern "C"
12354#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012355/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012356 builtin and then its argument prototype would still apply. */
12357char $ac_func ();
12358char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012359
Martin v. Löwis11437992002-04-12 09:54:03 +000012360#ifdef F77_DUMMY_MAIN
12361# ifdef __cplusplus
12362 extern "C"
12363# endif
12364 int F77_DUMMY_MAIN() { return 1; }
12365#endif
12366int
12367main ()
12368{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012369/* The GNU C library defines this for functions which it implements
12370 to always fail with ENOSYS. Some functions are actually named
12371 something starting with __ and the normal name is an alias. */
12372#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12373choke me
12374#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012375f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012376#endif
12377
Martin v. Löwis11437992002-04-12 09:54:03 +000012378 ;
12379 return 0;
12380}
12381_ACEOF
12382rm -f conftest.$ac_objext conftest$ac_exeext
12383if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12384 (eval $ac_link) 2>&5
12385 ac_status=$?
12386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12387 (exit $ac_status); } &&
12388 { ac_try='test -s conftest$ac_exeext'
12389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12390 (eval $ac_try) 2>&5
12391 ac_status=$?
12392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12393 (exit $ac_status); }; }; then
12394 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012395else
Martin v. Löwis11437992002-04-12 09:54:03 +000012396 echo "$as_me: failed program was:" >&5
12397cat conftest.$ac_ext >&5
12398eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012399fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012400rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012401fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012402echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12403echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12404if test `eval echo '${'$as_ac_var'}'` = yes; then
12405 cat >>confdefs.h <<_ACEOF
12406#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12407_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012408
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012409fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012410done
12411
Michael W. Hudson54241132001-12-07 15:38:26 +000012412
Martin v. Löwis11437992002-04-12 09:54:03 +000012413
12414
12415
12416
12417
Martin v. Löwis1142de32002-03-29 16:28:31 +000012418for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012419do
Martin v. Löwis11437992002-04-12 09:54:03 +000012420as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12421echo "$as_me:$LINENO: checking for $ac_func" >&5
12422echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12423if eval "test \"\${$as_ac_var+set}\" = set"; then
12424 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012425else
Martin v. Löwis11437992002-04-12 09:54:03 +000012426 cat >conftest.$ac_ext <<_ACEOF
12427#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012428#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012429/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012430 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012431#include <assert.h>
12432/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012433#ifdef __cplusplus
12434extern "C"
12435#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012436/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012437 builtin and then its argument prototype would still apply. */
12438char $ac_func ();
12439char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012440
Martin v. Löwis11437992002-04-12 09:54:03 +000012441#ifdef F77_DUMMY_MAIN
12442# ifdef __cplusplus
12443 extern "C"
12444# endif
12445 int F77_DUMMY_MAIN() { return 1; }
12446#endif
12447int
12448main ()
12449{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012450/* The GNU C library defines this for functions which it implements
12451 to always fail with ENOSYS. Some functions are actually named
12452 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012453#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012454choke me
12455#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012456f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012457#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012458
Martin v. Löwis11437992002-04-12 09:54:03 +000012459 ;
12460 return 0;
12461}
12462_ACEOF
12463rm -f conftest.$ac_objext conftest$ac_exeext
12464if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12465 (eval $ac_link) 2>&5
12466 ac_status=$?
12467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12468 (exit $ac_status); } &&
12469 { ac_try='test -s conftest$ac_exeext'
12470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12471 (eval $ac_try) 2>&5
12472 ac_status=$?
12473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12474 (exit $ac_status); }; }; then
12475 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012476else
Martin v. Löwis11437992002-04-12 09:54:03 +000012477 echo "$as_me: failed program was:" >&5
12478cat conftest.$ac_ext >&5
12479eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012480fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012481rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012482fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012483echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12484echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12485if test `eval echo '${'$as_ac_var'}'` = yes; then
12486 cat >>confdefs.h <<_ACEOF
12487#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12488_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012489
Martin v. Löwis1142de32002-03-29 16:28:31 +000012490else
Martin v. Löwis11437992002-04-12 09:54:03 +000012491 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012492fi
12493done
12494
12495
Martin v. Löwis11437992002-04-12 09:54:03 +000012496
Martin v. Löwis1142de32002-03-29 16:28:31 +000012497for ac_func in getpgrp
12498do
Martin v. Löwis11437992002-04-12 09:54:03 +000012499as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12500echo "$as_me:$LINENO: checking for $ac_func" >&5
12501echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12502if eval "test \"\${$as_ac_var+set}\" = set"; then
12503 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012504else
Martin v. Löwis11437992002-04-12 09:54:03 +000012505 cat >conftest.$ac_ext <<_ACEOF
12506#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012507#include "confdefs.h"
12508/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012510#include <assert.h>
12511/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012512#ifdef __cplusplus
12513extern "C"
12514#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012515/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012516 builtin and then its argument prototype would still apply. */
12517char $ac_func ();
12518char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012519
Martin v. Löwis11437992002-04-12 09:54:03 +000012520#ifdef F77_DUMMY_MAIN
12521# ifdef __cplusplus
12522 extern "C"
12523# endif
12524 int F77_DUMMY_MAIN() { return 1; }
12525#endif
12526int
12527main ()
12528{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012529/* The GNU C library defines this for functions which it implements
12530 to always fail with ENOSYS. Some functions are actually named
12531 something starting with __ and the normal name is an alias. */
12532#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12533choke me
12534#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012535f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012536#endif
12537
Martin v. Löwis11437992002-04-12 09:54:03 +000012538 ;
12539 return 0;
12540}
12541_ACEOF
12542rm -f conftest.$ac_objext conftest$ac_exeext
12543if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12544 (eval $ac_link) 2>&5
12545 ac_status=$?
12546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12547 (exit $ac_status); } &&
12548 { ac_try='test -s conftest$ac_exeext'
12549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12550 (eval $ac_try) 2>&5
12551 ac_status=$?
12552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12553 (exit $ac_status); }; }; then
12554 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012555else
Martin v. Löwis11437992002-04-12 09:54:03 +000012556 echo "$as_me: failed program was:" >&5
12557cat conftest.$ac_ext >&5
12558eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012559fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012560rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012561fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012562echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12563echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12564if test `eval echo '${'$as_ac_var'}'` = yes; then
12565 cat >>confdefs.h <<_ACEOF
12566#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12567_ACEOF
12568 cat >conftest.$ac_ext <<_ACEOF
12569#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012570#include "confdefs.h"
12571#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012572#ifdef F77_DUMMY_MAIN
12573# ifdef __cplusplus
12574 extern "C"
12575# endif
12576 int F77_DUMMY_MAIN() { return 1; }
12577#endif
12578int
12579main ()
12580{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012581getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012582 ;
12583 return 0;
12584}
12585_ACEOF
12586rm -f conftest.$ac_objext
12587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12588 (eval $ac_compile) 2>&5
12589 ac_status=$?
12590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12591 (exit $ac_status); } &&
12592 { ac_try='test -s conftest.$ac_objext'
12593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12594 (eval $ac_try) 2>&5
12595 ac_status=$?
12596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12597 (exit $ac_status); }; }; then
12598
12599cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012600#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012601_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012602
Martin v. Löwis11437992002-04-12 09:54:03 +000012603
Guido van Rossumf78abae1997-01-21 22:02:36 +000012604else
Martin v. Löwis11437992002-04-12 09:54:03 +000012605 echo "$as_me: failed program was:" >&5
12606cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012607fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012608rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012609
Guido van Rossum627b2d71993-12-24 10:39:16 +000012610fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012611done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012612
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012613echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12614echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12615if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012616 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012617else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012618 if test "$cross_compiling" = yes; then
12619 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12620echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12621 { (exit 1); exit 1; }; }
12622else
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 cat >conftest.$ac_ext <<_ACEOF
12624#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012625#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012626#if HAVE_UNISTD_H
12627# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012628#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012629
Martin v. Löwis11437992002-04-12 09:54:03 +000012630#ifdef F77_DUMMY_MAIN
12631# ifdef __cplusplus
12632 extern "C"
12633# endif
12634 int F77_DUMMY_MAIN() { return 1; }
12635#endif
12636int
12637main ()
12638{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012639/* If this system has a BSD-style setpgrp which takes arguments,
12640 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12641 exit successfully. */
12642 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012643 ;
12644 return 0;
12645}
12646_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012647rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012648if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12649 (eval $ac_link) 2>&5
12650 ac_status=$?
12651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012652 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12654 (eval $ac_try) 2>&5
12655 ac_status=$?
12656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12657 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012658 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012659else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012660 echo "$as_me: program exited with status $ac_status" >&5
12661echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012662cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012663( exit $ac_status )
12664ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012665fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012666rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012667fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012668fi
12669echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12670echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12671if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012672
12673cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012674#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012675_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012676
12677fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012678
Martin v. Löwis11437992002-04-12 09:54:03 +000012679
Thomas Wouters3a584202000-08-05 23:28:51 +000012680for ac_func in gettimeofday
12681do
Martin v. Löwis11437992002-04-12 09:54:03 +000012682as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12683echo "$as_me:$LINENO: checking for $ac_func" >&5
12684echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12685if eval "test \"\${$as_ac_var+set}\" = set"; then
12686 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012687else
Martin v. Löwis11437992002-04-12 09:54:03 +000012688 cat >conftest.$ac_ext <<_ACEOF
12689#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012690#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012691/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012692 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012693#include <assert.h>
12694/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012695#ifdef __cplusplus
12696extern "C"
12697#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012698/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 builtin and then its argument prototype would still apply. */
12700char $ac_func ();
12701char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012702
Martin v. Löwis11437992002-04-12 09:54:03 +000012703#ifdef F77_DUMMY_MAIN
12704# ifdef __cplusplus
12705 extern "C"
12706# endif
12707 int F77_DUMMY_MAIN() { return 1; }
12708#endif
12709int
12710main ()
12711{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012712/* The GNU C library defines this for functions which it implements
12713 to always fail with ENOSYS. Some functions are actually named
12714 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012715#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012716choke me
12717#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012718f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012719#endif
12720
Martin v. Löwis11437992002-04-12 09:54:03 +000012721 ;
12722 return 0;
12723}
12724_ACEOF
12725rm -f conftest.$ac_objext conftest$ac_exeext
12726if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12727 (eval $ac_link) 2>&5
12728 ac_status=$?
12729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12730 (exit $ac_status); } &&
12731 { ac_try='test -s conftest$ac_exeext'
12732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12733 (eval $ac_try) 2>&5
12734 ac_status=$?
12735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12736 (exit $ac_status); }; }; then
12737 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012738else
Martin v. Löwis11437992002-04-12 09:54:03 +000012739 echo "$as_me: failed program was:" >&5
12740cat conftest.$ac_ext >&5
12741eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012743rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012744fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012745echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12746echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12747if test `eval echo '${'$as_ac_var'}'` = yes; then
12748 cat >>confdefs.h <<_ACEOF
12749#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12750_ACEOF
12751 cat >conftest.$ac_ext <<_ACEOF
12752#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012753#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012754#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012755#ifdef F77_DUMMY_MAIN
12756# ifdef __cplusplus
12757 extern "C"
12758# endif
12759 int F77_DUMMY_MAIN() { return 1; }
12760#endif
12761int
12762main ()
12763{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012764gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012765 ;
12766 return 0;
12767}
12768_ACEOF
12769rm -f conftest.$ac_objext
12770if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12771 (eval $ac_compile) 2>&5
12772 ac_status=$?
12773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12774 (exit $ac_status); } &&
12775 { ac_try='test -s conftest.$ac_objext'
12776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12777 (eval $ac_try) 2>&5
12778 ac_status=$?
12779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12780 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012781 :
12782else
Martin v. Löwis11437992002-04-12 09:54:03 +000012783 echo "$as_me: failed program was:" >&5
12784cat conftest.$ac_ext >&5
12785
12786cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012787#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012788_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012789
Martin v. Löwis11437992002-04-12 09:54:03 +000012790
Guido van Rossum627b2d71993-12-24 10:39:16 +000012791fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012792rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012793
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012794fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012795done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012796
Michael W. Hudson54241132001-12-07 15:38:26 +000012797
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012798echo "$as_me:$LINENO: checking for major" >&5
12799echo $ECHO_N "checking for major... $ECHO_C" >&6
12800cat >conftest.$ac_ext <<_ACEOF
12801#line $LINENO "configure"
12802#include "confdefs.h"
12803
12804 #if defined(MAJOR_IN_MKDEV)
12805 #include <sys/mkdev.h>
12806 #elif defined(MAJOR_IN_SYSMACROS)
12807 #include <sys/sysmacros.h>
12808 #else
12809 #include <sys/types.h>
12810 #endif
12811
12812#ifdef F77_DUMMY_MAIN
12813# ifdef __cplusplus
12814 extern "C"
12815# endif
12816 int F77_DUMMY_MAIN() { return 1; }
12817#endif
12818int
12819main ()
12820{
12821
12822 makedev(major(0),minor(0));
12823
12824 ;
12825 return 0;
12826}
12827_ACEOF
12828rm -f conftest.$ac_objext
12829if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12830 (eval $ac_compile) 2>&5
12831 ac_status=$?
12832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12833 (exit $ac_status); } &&
12834 { ac_try='test -s conftest.$ac_objext'
12835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12836 (eval $ac_try) 2>&5
12837 ac_status=$?
12838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12839 (exit $ac_status); }; }; then
12840
12841
12842cat >>confdefs.h <<\_ACEOF
12843#define HAVE_DEVICE_MACROS 1
12844_ACEOF
12845
12846 echo "$as_me:$LINENO: result: yes" >&5
12847echo "${ECHO_T}yes" >&6
12848
12849else
12850 echo "$as_me: failed program was:" >&5
12851cat conftest.$ac_ext >&5
12852
12853 echo "$as_me:$LINENO: result: no" >&5
12854echo "${ECHO_T}no" >&6
12855
12856fi
12857rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012858
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012859# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012860# for [no]getaddrinfo in netdb.h.
12861echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12862echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12863cat >conftest.$ac_ext <<_ACEOF
12864#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012865#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012866
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012867#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012868#include <sys/socket.h>
12869#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012870#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012871
Martin v. Löwis11437992002-04-12 09:54:03 +000012872#ifdef F77_DUMMY_MAIN
12873# ifdef __cplusplus
12874 extern "C"
12875# endif
12876 int F77_DUMMY_MAIN() { return 1; }
12877#endif
12878int
12879main ()
12880{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012881
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012882getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012883
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 ;
12885 return 0;
12886}
12887_ACEOF
12888rm -f conftest.$ac_objext conftest$ac_exeext
12889if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12890 (eval $ac_link) 2>&5
12891 ac_status=$?
12892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12893 (exit $ac_status); } &&
12894 { ac_try='test -s conftest$ac_exeext'
12895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12896 (eval $ac_try) 2>&5
12897 ac_status=$?
12898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12899 (exit $ac_status); }; }; then
12900
12901echo "$as_me:$LINENO: result: yes" >&5
12902echo "${ECHO_T}yes" >&6
12903echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12904echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012905if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 echo "$as_me:$LINENO: result: buggy" >&5
12907echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012908buggygetaddrinfo=yes
12909else
Martin v. Löwis11437992002-04-12 09:54:03 +000012910 cat >conftest.$ac_ext <<_ACEOF
12911#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012912#include "confdefs.h"
12913
12914#include <sys/types.h>
12915#include <netdb.h>
12916#include <string.h>
12917#include <sys/socket.h>
12918#include <netinet/in.h>
12919
12920main()
12921{
12922 int passive, gaierr, inet4 = 0, inet6 = 0;
12923 struct addrinfo hints, *ai, *aitop;
12924 char straddr[INET6_ADDRSTRLEN], strport[16];
12925
12926 for (passive = 0; passive <= 1; passive++) {
12927 memset(&hints, 0, sizeof(hints));
12928 hints.ai_family = AF_UNSPEC;
12929 hints.ai_flags = passive ? AI_PASSIVE : 0;
12930 hints.ai_socktype = SOCK_STREAM;
12931 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12932 (void)gai_strerror(gaierr);
12933 goto bad;
12934 }
12935 for (ai = aitop; ai; ai = ai->ai_next) {
12936 if (ai->ai_addr == NULL ||
12937 ai->ai_addrlen == 0 ||
12938 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12939 straddr, sizeof(straddr), strport, sizeof(strport),
12940 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12941 goto bad;
12942 }
12943 switch (ai->ai_family) {
12944 case AF_INET:
12945 if (strcmp(strport, "54321") != 0) {
12946 goto bad;
12947 }
12948 if (passive) {
12949 if (strcmp(straddr, "0.0.0.0") != 0) {
12950 goto bad;
12951 }
12952 } else {
12953 if (strcmp(straddr, "127.0.0.1") != 0) {
12954 goto bad;
12955 }
12956 }
12957 inet4++;
12958 break;
12959 case AF_INET6:
12960 if (strcmp(strport, "54321") != 0) {
12961 goto bad;
12962 }
12963 if (passive) {
12964 if (strcmp(straddr, "::") != 0) {
12965 goto bad;
12966 }
12967 } else {
12968 if (strcmp(straddr, "::1") != 0) {
12969 goto bad;
12970 }
12971 }
12972 inet6++;
12973 break;
12974 case AF_UNSPEC:
12975 goto bad;
12976 break;
12977 default:
12978 /* another family support? */
12979 break;
12980 }
12981 }
12982 }
12983
12984 if (!(inet4 == 0 || inet4 == 2))
12985 goto bad;
12986 if (!(inet6 == 0 || inet6 == 2))
12987 goto bad;
12988
12989 if (aitop)
12990 freeaddrinfo(aitop);
12991 exit(0);
12992
12993 bad:
12994 if (aitop)
12995 freeaddrinfo(aitop);
12996 exit(1);
12997}
12998
Martin v. Löwis11437992002-04-12 09:54:03 +000012999_ACEOF
13000rm -f conftest$ac_exeext
13001if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13002 (eval $ac_link) 2>&5
13003 ac_status=$?
13004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13005 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13007 (eval $ac_try) 2>&5
13008 ac_status=$?
13009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13010 (exit $ac_status); }; }; then
13011 echo "$as_me:$LINENO: result: good" >&5
13012echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013013buggygetaddrinfo=no
13014else
Martin v. Löwis11437992002-04-12 09:54:03 +000013015 echo "$as_me: program exited with status $ac_status" >&5
13016echo "$as_me: failed program was:" >&5
13017cat conftest.$ac_ext >&5
13018( exit $ac_status )
13019echo "$as_me:$LINENO: result: buggy" >&5
13020echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013021buggygetaddrinfo=yes
13022fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013023rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013024fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013025else
Martin v. Löwis11437992002-04-12 09:54:03 +000013026 echo "$as_me: failed program was:" >&5
13027cat conftest.$ac_ext >&5
13028
13029echo "$as_me:$LINENO: result: no" >&5
13030echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013031buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013032
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013034rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013035
13036if test "$buggygetaddrinfo" = "yes"; then
13037 if test "$ipv6" = "yes"; then
13038 echo 'Fatal: You must get working getaddrinfo() function.'
13039 echo ' or you can specify "--disable-ipv6"'.
13040 exit 1
13041 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013042else
Martin v. Löwis11437992002-04-12 09:54:03 +000013043
13044cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013045#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013046_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013047
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013048fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013049
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013050for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013051do
Martin v. Löwis11437992002-04-12 09:54:03 +000013052as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13053echo "$as_me:$LINENO: checking for $ac_func" >&5
13054echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13055if eval "test \"\${$as_ac_var+set}\" = set"; then
13056 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013057else
Martin v. Löwis11437992002-04-12 09:54:03 +000013058 cat >conftest.$ac_ext <<_ACEOF
13059#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013060#include "confdefs.h"
13061/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013062 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013063#include <assert.h>
13064/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013065#ifdef __cplusplus
13066extern "C"
13067#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013068/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 builtin and then its argument prototype would still apply. */
13070char $ac_func ();
13071char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013072
Martin v. Löwis11437992002-04-12 09:54:03 +000013073#ifdef F77_DUMMY_MAIN
13074# ifdef __cplusplus
13075 extern "C"
13076# endif
13077 int F77_DUMMY_MAIN() { return 1; }
13078#endif
13079int
13080main ()
13081{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013082/* The GNU C library defines this for functions which it implements
13083 to always fail with ENOSYS. Some functions are actually named
13084 something starting with __ and the normal name is an alias. */
13085#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13086choke me
13087#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013088f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013089#endif
13090
Martin v. Löwis11437992002-04-12 09:54:03 +000013091 ;
13092 return 0;
13093}
13094_ACEOF
13095rm -f conftest.$ac_objext conftest$ac_exeext
13096if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13097 (eval $ac_link) 2>&5
13098 ac_status=$?
13099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13100 (exit $ac_status); } &&
13101 { ac_try='test -s conftest$ac_exeext'
13102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13103 (eval $ac_try) 2>&5
13104 ac_status=$?
13105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13106 (exit $ac_status); }; }; then
13107 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013108else
Martin v. Löwis11437992002-04-12 09:54:03 +000013109 echo "$as_me: failed program was:" >&5
13110cat conftest.$ac_ext >&5
13111eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013112fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013113rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013114fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013115echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13116echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13117if test `eval echo '${'$as_ac_var'}'` = yes; then
13118 cat >>confdefs.h <<_ACEOF
13119#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13120_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013121
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013122fi
13123done
13124
Michael W. Hudson54241132001-12-07 15:38:26 +000013125
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013126# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013127echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13128echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13129if test "${ac_cv_header_time+set}" = set; then
13130 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013131else
Martin v. Löwis11437992002-04-12 09:54:03 +000013132 cat >conftest.$ac_ext <<_ACEOF
13133#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013134#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013135#include <sys/types.h>
13136#include <sys/time.h>
13137#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013138
13139#ifdef F77_DUMMY_MAIN
13140# ifdef __cplusplus
13141 extern "C"
13142# endif
13143 int F77_DUMMY_MAIN() { return 1; }
13144#endif
13145int
13146main ()
13147{
13148if ((struct tm *) 0)
13149return 0;
13150 ;
13151 return 0;
13152}
13153_ACEOF
13154rm -f conftest.$ac_objext
13155if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13156 (eval $ac_compile) 2>&5
13157 ac_status=$?
13158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13159 (exit $ac_status); } &&
13160 { ac_try='test -s conftest.$ac_objext'
13161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13162 (eval $ac_try) 2>&5
13163 ac_status=$?
13164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13165 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013166 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013167else
Martin v. Löwis11437992002-04-12 09:54:03 +000013168 echo "$as_me: failed program was:" >&5
13169cat conftest.$ac_ext >&5
13170ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013171fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013172rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013173fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013174echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13175echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013176if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013177
13178cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013179#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013180_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013181
13182fi
13183
Martin v. Löwis11437992002-04-12 09:54:03 +000013184echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13185echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13186if test "${ac_cv_struct_tm+set}" = set; then
13187 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013188else
Martin v. Löwis11437992002-04-12 09:54:03 +000013189 cat >conftest.$ac_ext <<_ACEOF
13190#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013191#include "confdefs.h"
13192#include <sys/types.h>
13193#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013194
13195#ifdef F77_DUMMY_MAIN
13196# ifdef __cplusplus
13197 extern "C"
13198# endif
13199 int F77_DUMMY_MAIN() { return 1; }
13200#endif
13201int
13202main ()
13203{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013204struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000013205 ;
13206 return 0;
13207}
13208_ACEOF
13209rm -f conftest.$ac_objext
13210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13211 (eval $ac_compile) 2>&5
13212 ac_status=$?
13213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13214 (exit $ac_status); } &&
13215 { ac_try='test -s conftest.$ac_objext'
13216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13217 (eval $ac_try) 2>&5
13218 ac_status=$?
13219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13220 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013221 ac_cv_struct_tm=time.h
13222else
Martin v. Löwis11437992002-04-12 09:54:03 +000013223 echo "$as_me: failed program was:" >&5
13224cat conftest.$ac_ext >&5
13225ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013226fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013227rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013228fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013229echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13230echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013231if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013232
13233cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013234#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013235_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013236
13237fi
13238
Martin v. Löwis11437992002-04-12 09:54:03 +000013239echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13240echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13241if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13242 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013243else
Martin v. Löwis11437992002-04-12 09:54:03 +000013244 cat >conftest.$ac_ext <<_ACEOF
13245#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013246#include "confdefs.h"
13247#include <sys/types.h>
13248#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013249
13250
13251#ifdef F77_DUMMY_MAIN
13252# ifdef __cplusplus
13253 extern "C"
13254# endif
13255 int F77_DUMMY_MAIN() { return 1; }
13256#endif
13257int
13258main ()
13259{
13260static struct tm ac_aggr;
13261if (ac_aggr.tm_zone)
13262return 0;
13263 ;
13264 return 0;
13265}
13266_ACEOF
13267rm -f conftest.$ac_objext
13268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13269 (eval $ac_compile) 2>&5
13270 ac_status=$?
13271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13272 (exit $ac_status); } &&
13273 { ac_try='test -s conftest.$ac_objext'
13274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13275 (eval $ac_try) 2>&5
13276 ac_status=$?
13277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13278 (exit $ac_status); }; }; then
13279 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013280else
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 echo "$as_me: failed program was:" >&5
13282cat conftest.$ac_ext >&5
13283ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013284fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013285rm -f conftest.$ac_objext conftest.$ac_ext
13286fi
13287echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13288echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13289if test $ac_cv_member_struct_tm_tm_zone = yes; then
13290
13291cat >>confdefs.h <<_ACEOF
13292#define HAVE_STRUCT_TM_TM_ZONE 1
13293_ACEOF
13294
13295
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013296fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013297
Martin v. Löwis11437992002-04-12 09:54:03 +000013298if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13299
13300cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013301#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013302_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013303
13304else
Martin v. Löwis11437992002-04-12 09:54:03 +000013305 echo "$as_me:$LINENO: checking for tzname" >&5
13306echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13307if test "${ac_cv_var_tzname+set}" = set; then
13308 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013309else
Martin v. Löwis11437992002-04-12 09:54:03 +000013310 cat >conftest.$ac_ext <<_ACEOF
13311#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013312#include "confdefs.h"
13313#include <time.h>
13314#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013315extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013316#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
13318#ifdef F77_DUMMY_MAIN
13319# ifdef __cplusplus
13320 extern "C"
13321# endif
13322 int F77_DUMMY_MAIN() { return 1; }
13323#endif
13324int
13325main ()
13326{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013327atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013328 ;
13329 return 0;
13330}
13331_ACEOF
13332rm -f conftest.$ac_objext conftest$ac_exeext
13333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13334 (eval $ac_link) 2>&5
13335 ac_status=$?
13336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13337 (exit $ac_status); } &&
13338 { ac_try='test -s conftest$ac_exeext'
13339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13340 (eval $ac_try) 2>&5
13341 ac_status=$?
13342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13343 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013344 ac_cv_var_tzname=yes
13345else
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 echo "$as_me: failed program was:" >&5
13347cat conftest.$ac_ext >&5
13348ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013349fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013350rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013351fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013352echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13353echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013354 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
13356cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013357#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013358_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013359
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013360 fi
13361fi
13362
Martin v. Löwis11437992002-04-12 09:54:03 +000013363echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13364echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13365if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13366 echo $ECHO_N "(cached) $ECHO_C" >&6
13367else
13368 cat >conftest.$ac_ext <<_ACEOF
13369#line $LINENO "configure"
13370#include "confdefs.h"
13371$ac_includes_default
13372#ifdef F77_DUMMY_MAIN
13373# ifdef __cplusplus
13374 extern "C"
13375# endif
13376 int F77_DUMMY_MAIN() { return 1; }
13377#endif
13378int
13379main ()
13380{
13381static struct stat ac_aggr;
13382if (ac_aggr.st_rdev)
13383return 0;
13384 ;
13385 return 0;
13386}
13387_ACEOF
13388rm -f conftest.$ac_objext
13389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13390 (eval $ac_compile) 2>&5
13391 ac_status=$?
13392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13393 (exit $ac_status); } &&
13394 { ac_try='test -s conftest.$ac_objext'
13395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13396 (eval $ac_try) 2>&5
13397 ac_status=$?
13398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13399 (exit $ac_status); }; }; then
13400 ac_cv_member_struct_stat_st_rdev=yes
13401else
13402 echo "$as_me: failed program was:" >&5
13403cat conftest.$ac_ext >&5
13404ac_cv_member_struct_stat_st_rdev=no
13405fi
13406rm -f conftest.$ac_objext conftest.$ac_ext
13407fi
13408echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13409echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13410if test $ac_cv_member_struct_stat_st_rdev = yes; then
13411
13412cat >>confdefs.h <<_ACEOF
13413#define HAVE_STRUCT_STAT_ST_RDEV 1
13414_ACEOF
13415
13416
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013417fi
13418
Martin v. Löwis11437992002-04-12 09:54:03 +000013419echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13420echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13421if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13422 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013423else
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 cat >conftest.$ac_ext <<_ACEOF
13425#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013426#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013427$ac_includes_default
13428#ifdef F77_DUMMY_MAIN
13429# ifdef __cplusplus
13430 extern "C"
13431# endif
13432 int F77_DUMMY_MAIN() { return 1; }
13433#endif
13434int
13435main ()
13436{
13437static struct stat ac_aggr;
13438if (ac_aggr.st_blksize)
13439return 0;
13440 ;
13441 return 0;
13442}
13443_ACEOF
13444rm -f conftest.$ac_objext
13445if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13446 (eval $ac_compile) 2>&5
13447 ac_status=$?
13448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13449 (exit $ac_status); } &&
13450 { ac_try='test -s conftest.$ac_objext'
13451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13452 (eval $ac_try) 2>&5
13453 ac_status=$?
13454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13455 (exit $ac_status); }; }; then
13456 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013457else
Martin v. Löwis11437992002-04-12 09:54:03 +000013458 echo "$as_me: failed program was:" >&5
13459cat conftest.$ac_ext >&5
13460ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013461fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013462rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013463fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013464echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13465echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13466if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013467
Martin v. Löwis11437992002-04-12 09:54:03 +000013468cat >>confdefs.h <<_ACEOF
13469#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13470_ACEOF
13471
13472
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013473fi
13474
Martin v. Löwis11437992002-04-12 09:54:03 +000013475echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13476echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13477if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13478 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013479else
Martin v. Löwis11437992002-04-12 09:54:03 +000013480 cat >conftest.$ac_ext <<_ACEOF
13481#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013482#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013483$ac_includes_default
13484#ifdef F77_DUMMY_MAIN
13485# ifdef __cplusplus
13486 extern "C"
13487# endif
13488 int F77_DUMMY_MAIN() { return 1; }
13489#endif
13490int
13491main ()
13492{
13493static struct stat ac_aggr;
13494if (ac_aggr.st_blocks)
13495return 0;
13496 ;
13497 return 0;
13498}
13499_ACEOF
13500rm -f conftest.$ac_objext
13501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13502 (eval $ac_compile) 2>&5
13503 ac_status=$?
13504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13505 (exit $ac_status); } &&
13506 { ac_try='test -s conftest.$ac_objext'
13507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13508 (eval $ac_try) 2>&5
13509 ac_status=$?
13510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13511 (exit $ac_status); }; }; then
13512 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013513else
Martin v. Löwis11437992002-04-12 09:54:03 +000013514 echo "$as_me: failed program was:" >&5
13515cat conftest.$ac_ext >&5
13516ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013517fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013518rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013519fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013520echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13521echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13522if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013523
Martin v. Löwis11437992002-04-12 09:54:03 +000013524cat >>confdefs.h <<_ACEOF
13525#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13526_ACEOF
13527
13528
13529cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013530#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013531_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013532
13533else
Martin v. Löwis11437992002-04-12 09:54:03 +000013534 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013535fi
13536
Michael W. Hudson54241132001-12-07 15:38:26 +000013537
Martin v. Löwis11437992002-04-12 09:54:03 +000013538
13539echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13540echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13541if test "${ac_cv_header_time_altzone+set}" = set; then
13542 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013543else
Martin v. Löwis11437992002-04-12 09:54:03 +000013544 cat >conftest.$ac_ext <<_ACEOF
13545#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013546#include "confdefs.h"
13547#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013548#ifdef F77_DUMMY_MAIN
13549# ifdef __cplusplus
13550 extern "C"
13551# endif
13552 int F77_DUMMY_MAIN() { return 1; }
13553#endif
13554int
13555main ()
13556{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013557return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013558 ;
13559 return 0;
13560}
13561_ACEOF
13562rm -f conftest.$ac_objext
13563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13564 (eval $ac_compile) 2>&5
13565 ac_status=$?
13566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13567 (exit $ac_status); } &&
13568 { ac_try='test -s conftest.$ac_objext'
13569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13570 (eval $ac_try) 2>&5
13571 ac_status=$?
13572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13573 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013574 ac_cv_header_time_altzone=yes
13575else
Martin v. Löwis11437992002-04-12 09:54:03 +000013576 echo "$as_me: failed program was:" >&5
13577cat conftest.$ac_ext >&5
13578ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013579fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013580rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013581fi
13582
Martin v. Löwis11437992002-04-12 09:54:03 +000013583echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13584echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013585if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013586
13587cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013588#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013589_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013590
13591fi
13592
Guido van Rossumda88dad1995-01-26 00:46:29 +000013593was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013594echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13595echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13596cat >conftest.$ac_ext <<_ACEOF
13597#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013598#include "confdefs.h"
13599
13600#include <sys/types.h>
13601#include <sys/select.h>
13602#include <sys/time.h>
13603
Martin v. Löwis11437992002-04-12 09:54:03 +000013604#ifdef F77_DUMMY_MAIN
13605# ifdef __cplusplus
13606 extern "C"
13607# endif
13608 int F77_DUMMY_MAIN() { return 1; }
13609#endif
13610int
13611main ()
13612{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013613;
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 ;
13615 return 0;
13616}
13617_ACEOF
13618rm -f conftest.$ac_objext
13619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13620 (eval $ac_compile) 2>&5
13621 ac_status=$?
13622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13623 (exit $ac_status); } &&
13624 { ac_try='test -s conftest.$ac_objext'
13625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13626 (eval $ac_try) 2>&5
13627 ac_status=$?
13628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13629 (exit $ac_status); }; }; then
13630
13631
13632cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013633#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013634_ACEOF
13635
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013636 was_it_defined=yes
13637
Guido van Rossumf78abae1997-01-21 22:02:36 +000013638else
Martin v. Löwis11437992002-04-12 09:54:03 +000013639 echo "$as_me: failed program was:" >&5
13640cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013641fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013642rm -f conftest.$ac_objext conftest.$ac_ext
13643echo "$as_me:$LINENO: result: $was_it_defined" >&5
13644echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013645
Martin v. Löwis11437992002-04-12 09:54:03 +000013646echo "$as_me:$LINENO: checking for addrinfo" >&5
13647echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13648if test "${ac_cv_struct_addrinfo+set}" = set; then
13649 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013650else
Martin v. Löwis11437992002-04-12 09:54:03 +000013651 cat >conftest.$ac_ext <<_ACEOF
13652#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013653#include "confdefs.h"
13654
13655# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013656#ifdef F77_DUMMY_MAIN
13657# ifdef __cplusplus
13658 extern "C"
13659# endif
13660 int F77_DUMMY_MAIN() { return 1; }
13661#endif
13662int
13663main ()
13664{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013665struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013666 ;
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
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013682 ac_cv_struct_addrinfo=yes
13683else
Martin v. Löwis11437992002-04-12 09:54:03 +000013684 echo "$as_me: failed program was:" >&5
13685cat conftest.$ac_ext >&5
13686ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013687fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013688rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013689fi
13690
Martin v. Löwis11437992002-04-12 09:54:03 +000013691echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13692echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013693if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013694
13695cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013696#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013697_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013698
13699fi
13700
Martin v. Löwis11437992002-04-12 09:54:03 +000013701echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13702echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13703if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13704 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013705else
Martin v. Löwis11437992002-04-12 09:54:03 +000013706 cat >conftest.$ac_ext <<_ACEOF
13707#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013708#include "confdefs.h"
13709
13710# include <sys/types.h>
13711# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013712#ifdef F77_DUMMY_MAIN
13713# ifdef __cplusplus
13714 extern "C"
13715# endif
13716 int F77_DUMMY_MAIN() { return 1; }
13717#endif
13718int
13719main ()
13720{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013721struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013722 ;
13723 return 0;
13724}
13725_ACEOF
13726rm -f conftest.$ac_objext
13727if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13728 (eval $ac_compile) 2>&5
13729 ac_status=$?
13730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13731 (exit $ac_status); } &&
13732 { ac_try='test -s conftest.$ac_objext'
13733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13734 (eval $ac_try) 2>&5
13735 ac_status=$?
13736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13737 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013738 ac_cv_struct_sockaddr_storage=yes
13739else
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 echo "$as_me: failed program was:" >&5
13741cat conftest.$ac_ext >&5
13742ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013743fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013744rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013745fi
13746
Martin v. Löwis11437992002-04-12 09:54:03 +000013747echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13748echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013749if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013750
13751cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013752#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013753_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013754
13755fi
13756
Guido van Rossum627b2d71993-12-24 10:39:16 +000013757# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013758
Michael W. Hudson54241132001-12-07 15:38:26 +000013759
Martin v. Löwis11437992002-04-12 09:54:03 +000013760echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13761echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13762if test "${ac_cv_c_char_unsigned+set}" = set; then
13763 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013764else
Martin v. Löwis11437992002-04-12 09:54:03 +000013765 cat >conftest.$ac_ext <<_ACEOF
13766#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013767#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013768$ac_includes_default
13769#ifdef F77_DUMMY_MAIN
13770# ifdef __cplusplus
13771 extern "C"
13772# endif
13773 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013775int
13776main ()
13777{
13778static int test_array [1 - 2 * !(((char) -1) < 0)];
13779test_array [0] = 0
13780
13781 ;
13782 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013783}
Martin v. Löwis11437992002-04-12 09:54:03 +000013784_ACEOF
13785rm -f conftest.$ac_objext
13786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13787 (eval $ac_compile) 2>&5
13788 ac_status=$?
13789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13790 (exit $ac_status); } &&
13791 { ac_try='test -s conftest.$ac_objext'
13792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13793 (eval $ac_try) 2>&5
13794 ac_status=$?
13795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13796 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013797 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013798else
13799 echo "$as_me: failed program was:" >&5
13800cat conftest.$ac_ext >&5
13801ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013803rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013804fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013805echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13806echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013807if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013808 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013809#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013810_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013811
13812fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013813
Martin v. Löwis11437992002-04-12 09:54:03 +000013814echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13815echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13816if test "${ac_cv_prog_cc_stdc+set}" = set; then
13817 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013818else
Martin v. Löwis11437992002-04-12 09:54:03 +000013819 ac_cv_prog_cc_stdc=no
13820ac_save_CC=$CC
13821cat >conftest.$ac_ext <<_ACEOF
13822#line $LINENO "configure"
13823#include "confdefs.h"
13824#include <stdarg.h>
13825#include <stdio.h>
13826#include <sys/types.h>
13827#include <sys/stat.h>
13828/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13829struct buf { int x; };
13830FILE * (*rcsopen) (struct buf *, struct stat *, int);
13831static char *e (p, i)
13832 char **p;
13833 int i;
13834{
13835 return p[i];
13836}
13837static char *f (char * (*g) (char **, int), char **p, ...)
13838{
13839 char *s;
13840 va_list v;
13841 va_start (v,p);
13842 s = g (p, va_arg (v,int));
13843 va_end (v);
13844 return s;
13845}
13846int test (int i, double x);
13847struct s1 {int (*f) (int a);};
13848struct s2 {int (*f) (double a);};
13849int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13850int argc;
13851char **argv;
13852#ifdef F77_DUMMY_MAIN
13853# ifdef __cplusplus
13854 extern "C"
13855# endif
13856 int F77_DUMMY_MAIN() { return 1; }
13857#endif
13858int
13859main ()
13860{
13861return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13862 ;
13863 return 0;
13864}
13865_ACEOF
13866# Don't try gcc -ansi; that turns off useful extensions and
13867# breaks some systems' header files.
13868# AIX -qlanglvl=ansi
13869# Ultrix and OSF/1 -std1
13870# HP-UX 10.20 and later -Ae
13871# HP-UX older versions -Aa -D_HPUX_SOURCE
13872# SVR4 -Xc -D__EXTENSIONS__
13873for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13874do
13875 CC="$ac_save_CC $ac_arg"
13876 rm -f conftest.$ac_objext
13877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13878 (eval $ac_compile) 2>&5
13879 ac_status=$?
13880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13881 (exit $ac_status); } &&
13882 { ac_try='test -s conftest.$ac_objext'
13883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13884 (eval $ac_try) 2>&5
13885 ac_status=$?
13886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13887 (exit $ac_status); }; }; then
13888 ac_cv_prog_cc_stdc=$ac_arg
13889break
13890else
13891 echo "$as_me: failed program was:" >&5
13892cat conftest.$ac_ext >&5
13893fi
13894rm -f conftest.$ac_objext
13895done
13896rm -f conftest.$ac_ext conftest.$ac_objext
13897CC=$ac_save_CC
13898
13899fi
13900
13901case "x$ac_cv_prog_cc_stdc" in
13902 x|xno)
13903 echo "$as_me:$LINENO: result: none needed" >&5
13904echo "${ECHO_T}none needed" >&6 ;;
13905 *)
13906 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13907echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13908 CC="$CC $ac_cv_prog_cc_stdc" ;;
13909esac
13910
13911echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13912echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13913if test "${ac_cv_c_const+set}" = set; then
13914 echo $ECHO_N "(cached) $ECHO_C" >&6
13915else
13916 cat >conftest.$ac_ext <<_ACEOF
13917#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013918#include "confdefs.h"
13919
Martin v. Löwis11437992002-04-12 09:54:03 +000013920#ifdef F77_DUMMY_MAIN
13921# ifdef __cplusplus
13922 extern "C"
13923# endif
13924 int F77_DUMMY_MAIN() { return 1; }
13925#endif
13926int
13927main ()
13928{
13929/* FIXME: Include the comments suggested by Paul. */
13930#ifndef __cplusplus
13931 /* Ultrix mips cc rejects this. */
13932 typedef int charset[2];
13933 const charset x;
13934 /* SunOS 4.1.1 cc rejects this. */
13935 char const *const *ccp;
13936 char **p;
13937 /* NEC SVR4.0.2 mips cc rejects this. */
13938 struct point {int x, y;};
13939 static struct point const zero = {0,0};
13940 /* AIX XL C 1.02.0.0 rejects this.
13941 It does not let you subtract one const X* pointer from another in
13942 an arm of an if-expression whose if-part is not a constant
13943 expression */
13944 const char *g = "string";
13945 ccp = &g + (g ? g-g : 0);
13946 /* HPUX 7.0 cc rejects these. */
13947 ++ccp;
13948 p = (char**) ccp;
13949 ccp = (char const *const *) p;
13950 { /* SCO 3.2v4 cc rejects this. */
13951 char *t;
13952 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013953
Martin v. Löwis11437992002-04-12 09:54:03 +000013954 *t++ = 0;
13955 }
13956 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13957 int x[] = {25, 17};
13958 const int *foo = &x[0];
13959 ++foo;
13960 }
13961 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13962 typedef const int *iptr;
13963 iptr p = 0;
13964 ++p;
13965 }
13966 { /* AIX XL C 1.02.0.0 rejects this saying
13967 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13968 struct s { int j; const int *ap[3]; };
13969 struct s *b; b->j = 5;
13970 }
13971 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13972 const int foo = 10;
13973 }
13974#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013975
Martin v. Löwis11437992002-04-12 09:54:03 +000013976 ;
13977 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013978}
Martin v. Löwis11437992002-04-12 09:54:03 +000013979_ACEOF
13980rm -f conftest.$ac_objext
13981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13982 (eval $ac_compile) 2>&5
13983 ac_status=$?
13984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13985 (exit $ac_status); } &&
13986 { ac_try='test -s conftest.$ac_objext'
13987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13988 (eval $ac_try) 2>&5
13989 ac_status=$?
13990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13991 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013992 ac_cv_c_const=yes
13993else
Martin v. Löwis11437992002-04-12 09:54:03 +000013994 echo "$as_me: failed program was:" >&5
13995cat conftest.$ac_ext >&5
13996ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013997fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013998rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013999fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014000echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14001echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014002if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014003
14004cat >>confdefs.h <<\_ACEOF
14005#define const
14006_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014007
14008fi
14009
Michael W. Hudson54241132001-12-07 15:38:26 +000014010
Guido van Rossumda88dad1995-01-26 00:46:29 +000014011works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014012echo "$as_me:$LINENO: checking for working volatile" >&5
14013echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14014cat >conftest.$ac_ext <<_ACEOF
14015#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014016#include "confdefs.h"
14017
Martin v. Löwis11437992002-04-12 09:54:03 +000014018#ifdef F77_DUMMY_MAIN
14019# ifdef __cplusplus
14020 extern "C"
14021# endif
14022 int F77_DUMMY_MAIN() { return 1; }
14023#endif
14024int
14025main ()
14026{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014027volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014028 ;
14029 return 0;
14030}
14031_ACEOF
14032rm -f conftest.$ac_objext
14033if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14034 (eval $ac_compile) 2>&5
14035 ac_status=$?
14036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14037 (exit $ac_status); } &&
14038 { ac_try='test -s conftest.$ac_objext'
14039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14040 (eval $ac_try) 2>&5
14041 ac_status=$?
14042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14043 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014044 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014045else
Martin v. Löwis11437992002-04-12 09:54:03 +000014046 echo "$as_me: failed program was:" >&5
14047cat conftest.$ac_ext >&5
14048
14049cat >>confdefs.h <<\_ACEOF
14050#define volatile
14051_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014052
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014053
Guido van Rossum627b2d71993-12-24 10:39:16 +000014054fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014055rm -f conftest.$ac_objext conftest.$ac_ext
14056echo "$as_me:$LINENO: result: $works" >&5
14057echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014058
Guido van Rossumda88dad1995-01-26 00:46:29 +000014059works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014060echo "$as_me:$LINENO: checking for working signed char" >&5
14061echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14062cat >conftest.$ac_ext <<_ACEOF
14063#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014064#include "confdefs.h"
14065
Martin v. Löwis11437992002-04-12 09:54:03 +000014066#ifdef F77_DUMMY_MAIN
14067# ifdef __cplusplus
14068 extern "C"
14069# endif
14070 int F77_DUMMY_MAIN() { return 1; }
14071#endif
14072int
14073main ()
14074{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014075signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014076 ;
14077 return 0;
14078}
14079_ACEOF
14080rm -f conftest.$ac_objext
14081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14082 (eval $ac_compile) 2>&5
14083 ac_status=$?
14084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14085 (exit $ac_status); } &&
14086 { ac_try='test -s conftest.$ac_objext'
14087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14088 (eval $ac_try) 2>&5
14089 ac_status=$?
14090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14091 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014092 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014093else
Martin v. Löwis11437992002-04-12 09:54:03 +000014094 echo "$as_me: failed program was:" >&5
14095cat conftest.$ac_ext >&5
14096
14097cat >>confdefs.h <<\_ACEOF
14098#define signed
14099_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014100
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014101
Guido van Rossum7f43da71994-08-01 12:15:30 +000014102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014103rm -f conftest.$ac_objext conftest.$ac_ext
14104echo "$as_me:$LINENO: result: $works" >&5
14105echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014106
Guido van Rossumda88dad1995-01-26 00:46:29 +000014107have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014108echo "$as_me:$LINENO: checking for prototypes" >&5
14109echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14110cat >conftest.$ac_ext <<_ACEOF
14111#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014112#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014113int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014114#ifdef F77_DUMMY_MAIN
14115# ifdef __cplusplus
14116 extern "C"
14117# endif
14118 int F77_DUMMY_MAIN() { return 1; }
14119#endif
14120int
14121main ()
14122{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014123return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014124 ;
14125 return 0;
14126}
14127_ACEOF
14128rm -f conftest.$ac_objext
14129if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14130 (eval $ac_compile) 2>&5
14131 ac_status=$?
14132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14133 (exit $ac_status); } &&
14134 { ac_try='test -s conftest.$ac_objext'
14135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14136 (eval $ac_try) 2>&5
14137 ac_status=$?
14138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14139 (exit $ac_status); }; }; then
14140
14141
14142cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014143#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014144_ACEOF
14145
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014146 have_prototypes=yes
14147
Guido van Rossumf78abae1997-01-21 22:02:36 +000014148else
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 echo "$as_me: failed program was:" >&5
14150cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014151fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014152rm -f conftest.$ac_objext conftest.$ac_ext
14153echo "$as_me:$LINENO: result: $have_prototypes" >&5
14154echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014155
Guido van Rossumda88dad1995-01-26 00:46:29 +000014156works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014157echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
14158echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
14159cat >conftest.$ac_ext <<_ACEOF
14160#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014161#include "confdefs.h"
14162
14163#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014164int foo(int x, ...) {
14165 va_list va;
14166 va_start(va, x);
14167 va_arg(va, int);
14168 va_arg(va, char *);
14169 va_arg(va, double);
14170 return 0;
14171}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014172
Martin v. Löwis11437992002-04-12 09:54:03 +000014173#ifdef F77_DUMMY_MAIN
14174# ifdef __cplusplus
14175 extern "C"
14176# endif
14177 int F77_DUMMY_MAIN() { return 1; }
14178#endif
14179int
14180main ()
14181{
Guido van Rossum90eea071996-08-30 20:58:57 +000014182return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014183 ;
14184 return 0;
14185}
14186_ACEOF
14187rm -f conftest.$ac_objext
14188if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14189 (eval $ac_compile) 2>&5
14190 ac_status=$?
14191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14192 (exit $ac_status); } &&
14193 { ac_try='test -s conftest.$ac_objext'
14194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14195 (eval $ac_try) 2>&5
14196 ac_status=$?
14197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14198 (exit $ac_status); }; }; then
14199
14200
14201cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014202#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014203_ACEOF
14204
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014205 works=yes
14206
Guido van Rossumf78abae1997-01-21 22:02:36 +000014207else
Martin v. Löwis11437992002-04-12 09:54:03 +000014208 echo "$as_me: failed program was:" >&5
14209cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000014210fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014211rm -f conftest.$ac_objext conftest.$ac_ext
14212echo "$as_me:$LINENO: result: $works" >&5
14213echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014214
Guido van Rossumda88dad1995-01-26 00:46:29 +000014215if test "$have_prototypes" = yes; then
14216bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014217echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
14218echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
14219cat >conftest.$ac_ext <<_ACEOF
14220#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014221#include "confdefs.h"
14222#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014223#ifdef F77_DUMMY_MAIN
14224# ifdef __cplusplus
14225 extern "C"
14226# endif
14227 int F77_DUMMY_MAIN() { return 1; }
14228#endif
14229int
14230main ()
14231{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014232char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000014233 ;
14234 return 0;
14235}
14236_ACEOF
14237rm -f conftest.$ac_objext
14238if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14239 (eval $ac_compile) 2>&5
14240 ac_status=$?
14241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14242 (exit $ac_status); } &&
14243 { ac_try='test -s conftest.$ac_objext'
14244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14245 (eval $ac_try) 2>&5
14246 ac_status=$?
14247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14248 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014249 :
14250else
Martin v. Löwis11437992002-04-12 09:54:03 +000014251 echo "$as_me: failed program was:" >&5
14252cat conftest.$ac_ext >&5
14253
14254cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014255#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014256_ACEOF
14257
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014258 bad_prototypes=yes
14259
Guido van Rossum627b2d71993-12-24 10:39:16 +000014260fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014261rm -f conftest.$ac_objext conftest.$ac_ext
14262echo "$as_me:$LINENO: result: $bad_prototypes" >&5
14263echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014264fi
14265
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014266# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000014267echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
14268echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
14269cat >conftest.$ac_ext <<_ACEOF
14270#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014271#include "confdefs.h"
14272#include <sys/types.h>
14273#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014274#ifdef F77_DUMMY_MAIN
14275# ifdef __cplusplus
14276 extern "C"
14277# endif
14278 int F77_DUMMY_MAIN() { return 1; }
14279#endif
14280int
14281main ()
14282{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014283struct sockaddr x;
14284x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 ;
14286 return 0;
14287}
14288_ACEOF
14289rm -f conftest.$ac_objext
14290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14291 (eval $ac_compile) 2>&5
14292 ac_status=$?
14293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14294 (exit $ac_status); } &&
14295 { ac_try='test -s conftest.$ac_objext'
14296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14297 (eval $ac_try) 2>&5
14298 ac_status=$?
14299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14300 (exit $ac_status); }; }; then
14301 echo "$as_me:$LINENO: result: yes" >&5
14302echo "${ECHO_T}yes" >&6
14303
14304cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014305#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014306_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014307
14308else
Martin v. Löwis11437992002-04-12 09:54:03 +000014309 echo "$as_me: failed program was:" >&5
14310cat conftest.$ac_ext >&5
14311echo "$as_me:$LINENO: result: no" >&5
14312echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014313fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014314rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014315
Guido van Rossumda88dad1995-01-26 00:46:29 +000014316va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014317echo "$as_me:$LINENO: checking whether va_list is an array" >&5
14318echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
14319cat >conftest.$ac_ext <<_ACEOF
14320#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014321#include "confdefs.h"
14322
14323#ifdef HAVE_STDARG_PROTOTYPES
14324#include <stdarg.h>
14325#else
14326#include <varargs.h>
14327#endif
14328
Martin v. Löwis11437992002-04-12 09:54:03 +000014329#ifdef F77_DUMMY_MAIN
14330# ifdef __cplusplus
14331 extern "C"
14332# endif
14333 int F77_DUMMY_MAIN() { return 1; }
14334#endif
14335int
14336main ()
14337{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014338va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000014339 ;
14340 return 0;
14341}
14342_ACEOF
14343rm -f conftest.$ac_objext
14344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14345 (eval $ac_compile) 2>&5
14346 ac_status=$?
14347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14348 (exit $ac_status); } &&
14349 { ac_try='test -s conftest.$ac_objext'
14350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14351 (eval $ac_try) 2>&5
14352 ac_status=$?
14353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14354 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014355 :
14356else
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 echo "$as_me: failed program was:" >&5
14358cat conftest.$ac_ext >&5
14359
14360
14361cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014362#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014363_ACEOF
14364
Guido van Rossumda88dad1995-01-26 00:46:29 +000014365 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014366
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014368rm -f conftest.$ac_objext conftest.$ac_ext
14369echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14370echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014371
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014372# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014373
14374
14375
14376echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14377echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14378if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14379 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014380else
Martin v. Löwis11437992002-04-12 09:54:03 +000014381 cat >conftest.$ac_ext <<_ACEOF
14382#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014383#include "confdefs.h"
14384/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014385 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014386#include <assert.h>
14387/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014388#ifdef __cplusplus
14389extern "C"
14390#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014391/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014392 builtin and then its argument prototype would still apply. */
14393char gethostbyname_r ();
14394char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014395
Martin v. Löwis11437992002-04-12 09:54:03 +000014396#ifdef F77_DUMMY_MAIN
14397# ifdef __cplusplus
14398 extern "C"
14399# endif
14400 int F77_DUMMY_MAIN() { return 1; }
14401#endif
14402int
14403main ()
14404{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014405/* The GNU C library defines this for functions which it implements
14406 to always fail with ENOSYS. Some functions are actually named
14407 something starting with __ and the normal name is an alias. */
14408#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14409choke me
14410#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014411f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014412#endif
14413
Martin v. Löwis11437992002-04-12 09:54:03 +000014414 ;
14415 return 0;
14416}
14417_ACEOF
14418rm -f conftest.$ac_objext conftest$ac_exeext
14419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14420 (eval $ac_link) 2>&5
14421 ac_status=$?
14422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14423 (exit $ac_status); } &&
14424 { ac_try='test -s conftest$ac_exeext'
14425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14426 (eval $ac_try) 2>&5
14427 ac_status=$?
14428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14429 (exit $ac_status); }; }; then
14430 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014431else
Martin v. Löwis11437992002-04-12 09:54:03 +000014432 echo "$as_me: failed program was:" >&5
14433cat conftest.$ac_ext >&5
14434ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014435fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014436rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014438echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14439echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14440if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014441
Martin v. Löwis11437992002-04-12 09:54:03 +000014442 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014443#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014444_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014445
Martin v. Löwis11437992002-04-12 09:54:03 +000014446 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14447echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014448 OLD_CFLAGS=$CFLAGS
14449 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014450 cat >conftest.$ac_ext <<_ACEOF
14451#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014452#include "confdefs.h"
14453
14454# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014455
14456#ifdef F77_DUMMY_MAIN
14457# ifdef __cplusplus
14458 extern "C"
14459# endif
14460 int F77_DUMMY_MAIN() { return 1; }
14461#endif
14462int
14463main ()
14464{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014465
14466 char *name;
14467 struct hostent *he, *res;
14468 char buffer[2048];
14469 int buflen = 2048;
14470 int h_errnop;
14471
14472 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014473
14474 ;
14475 return 0;
14476}
14477_ACEOF
14478rm -f conftest.$ac_objext
14479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14480 (eval $ac_compile) 2>&5
14481 ac_status=$?
14482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14483 (exit $ac_status); } &&
14484 { ac_try='test -s conftest.$ac_objext'
14485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14486 (eval $ac_try) 2>&5
14487 ac_status=$?
14488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14489 (exit $ac_status); }; }; then
14490
14491 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014492#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014493_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014494
Martin v. Löwis11437992002-04-12 09:54:03 +000014495
14496cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014497#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014498_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014499
Martin v. Löwis11437992002-04-12 09:54:03 +000014500 echo "$as_me:$LINENO: result: yes" >&5
14501echo "${ECHO_T}yes" >&6
14502
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014503else
Martin v. Löwis11437992002-04-12 09:54:03 +000014504 echo "$as_me: failed program was:" >&5
14505cat conftest.$ac_ext >&5
14506
14507 echo "$as_me:$LINENO: result: no" >&5
14508echo "${ECHO_T}no" >&6
14509 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14510echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14511 cat >conftest.$ac_ext <<_ACEOF
14512#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014513#include "confdefs.h"
14514
14515# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014516
14517#ifdef F77_DUMMY_MAIN
14518# ifdef __cplusplus
14519 extern "C"
14520# endif
14521 int F77_DUMMY_MAIN() { return 1; }
14522#endif
14523int
14524main ()
14525{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014526
14527 char *name;
14528 struct hostent *he;
14529 char buffer[2048];
14530 int buflen = 2048;
14531 int h_errnop;
14532
14533 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014534
14535 ;
14536 return 0;
14537}
14538_ACEOF
14539rm -f conftest.$ac_objext
14540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14541 (eval $ac_compile) 2>&5
14542 ac_status=$?
14543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14544 (exit $ac_status); } &&
14545 { ac_try='test -s conftest.$ac_objext'
14546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14547 (eval $ac_try) 2>&5
14548 ac_status=$?
14549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14550 (exit $ac_status); }; }; then
14551
14552 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014553#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014554_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014555
Martin v. Löwis11437992002-04-12 09:54:03 +000014556
14557cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014558#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014559_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014560
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 echo "$as_me:$LINENO: result: yes" >&5
14562echo "${ECHO_T}yes" >&6
14563
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014564else
Martin v. Löwis11437992002-04-12 09:54:03 +000014565 echo "$as_me: failed program was:" >&5
14566cat conftest.$ac_ext >&5
14567
14568 echo "$as_me:$LINENO: result: no" >&5
14569echo "${ECHO_T}no" >&6
14570 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14571echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14572 cat >conftest.$ac_ext <<_ACEOF
14573#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014574#include "confdefs.h"
14575
14576# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014577
14578#ifdef F77_DUMMY_MAIN
14579# ifdef __cplusplus
14580 extern "C"
14581# endif
14582 int F77_DUMMY_MAIN() { return 1; }
14583#endif
14584int
14585main ()
14586{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014587
14588 char *name;
14589 struct hostent *he;
14590 struct hostent_data data;
14591
14592 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014593
14594 ;
14595 return 0;
14596}
14597_ACEOF
14598rm -f conftest.$ac_objext
14599if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14600 (eval $ac_compile) 2>&5
14601 ac_status=$?
14602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14603 (exit $ac_status); } &&
14604 { ac_try='test -s conftest.$ac_objext'
14605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14606 (eval $ac_try) 2>&5
14607 ac_status=$?
14608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14609 (exit $ac_status); }; }; then
14610
14611 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014612#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014613_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014614
Martin v. Löwis11437992002-04-12 09:54:03 +000014615
14616cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014617#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014618_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014619
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 echo "$as_me:$LINENO: result: yes" >&5
14621echo "${ECHO_T}yes" >&6
14622
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014623else
Martin v. Löwis11437992002-04-12 09:54:03 +000014624 echo "$as_me: failed program was:" >&5
14625cat conftest.$ac_ext >&5
14626
14627 echo "$as_me:$LINENO: result: no" >&5
14628echo "${ECHO_T}no" >&6
14629
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014630fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014631rm -f conftest.$ac_objext conftest.$ac_ext
14632
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014633fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014634rm -f conftest.$ac_objext conftest.$ac_ext
14635
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014636fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014637rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014638 CFLAGS=$OLD_CFLAGS
14639
14640else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014641
Martin v. Löwis11437992002-04-12 09:54:03 +000014642
14643for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014644do
Martin v. Löwis11437992002-04-12 09:54:03 +000014645as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14646echo "$as_me:$LINENO: checking for $ac_func" >&5
14647echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14648if eval "test \"\${$as_ac_var+set}\" = set"; then
14649 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014650else
Martin v. Löwis11437992002-04-12 09:54:03 +000014651 cat >conftest.$ac_ext <<_ACEOF
14652#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014653#include "confdefs.h"
14654/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014655 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014656#include <assert.h>
14657/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014658#ifdef __cplusplus
14659extern "C"
14660#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014661/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014662 builtin and then its argument prototype would still apply. */
14663char $ac_func ();
14664char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014665
Martin v. Löwis11437992002-04-12 09:54:03 +000014666#ifdef F77_DUMMY_MAIN
14667# ifdef __cplusplus
14668 extern "C"
14669# endif
14670 int F77_DUMMY_MAIN() { return 1; }
14671#endif
14672int
14673main ()
14674{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014675/* The GNU C library defines this for functions which it implements
14676 to always fail with ENOSYS. Some functions are actually named
14677 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014678#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014679choke me
14680#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014681f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014682#endif
14683
Martin v. Löwis11437992002-04-12 09:54:03 +000014684 ;
14685 return 0;
14686}
14687_ACEOF
14688rm -f conftest.$ac_objext conftest$ac_exeext
14689if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14690 (eval $ac_link) 2>&5
14691 ac_status=$?
14692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14693 (exit $ac_status); } &&
14694 { ac_try='test -s conftest$ac_exeext'
14695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14696 (eval $ac_try) 2>&5
14697 ac_status=$?
14698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14699 (exit $ac_status); }; }; then
14700 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014701else
Martin v. Löwis11437992002-04-12 09:54:03 +000014702 echo "$as_me: failed program was:" >&5
14703cat conftest.$ac_ext >&5
14704eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014705fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014706rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014707fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014708echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14709echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14710if test `eval echo '${'$as_ac_var'}'` = yes; then
14711 cat >>confdefs.h <<_ACEOF
14712#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14713_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014714
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014715fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014716done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014717
Michael W. Hudson54241132001-12-07 15:38:26 +000014718
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014719fi
14720
Michael W. Hudson54241132001-12-07 15:38:26 +000014721
14722
14723
14724
14725
14726
Guido van Rossum627b2d71993-12-24 10:39:16 +000014727# checks for system services
14728# (none yet)
14729
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014730# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014731echo "$as_me:$LINENO: checking for __fpu_control" >&5
14732echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14733if test "${ac_cv_func___fpu_control+set}" = set; then
14734 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014735else
Martin v. Löwis11437992002-04-12 09:54:03 +000014736 cat >conftest.$ac_ext <<_ACEOF
14737#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014738#include "confdefs.h"
14739/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014740 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014741#include <assert.h>
14742/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014743#ifdef __cplusplus
14744extern "C"
14745#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014746/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014747 builtin and then its argument prototype would still apply. */
14748char __fpu_control ();
14749char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014750
Martin v. Löwis11437992002-04-12 09:54:03 +000014751#ifdef F77_DUMMY_MAIN
14752# ifdef __cplusplus
14753 extern "C"
14754# endif
14755 int F77_DUMMY_MAIN() { return 1; }
14756#endif
14757int
14758main ()
14759{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014760/* The GNU C library defines this for functions which it implements
14761 to always fail with ENOSYS. Some functions are actually named
14762 something starting with __ and the normal name is an alias. */
14763#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14764choke me
14765#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014766f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014767#endif
14768
Martin v. Löwis11437992002-04-12 09:54:03 +000014769 ;
14770 return 0;
14771}
14772_ACEOF
14773rm -f conftest.$ac_objext conftest$ac_exeext
14774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14775 (eval $ac_link) 2>&5
14776 ac_status=$?
14777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14778 (exit $ac_status); } &&
14779 { ac_try='test -s conftest$ac_exeext'
14780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14781 (eval $ac_try) 2>&5
14782 ac_status=$?
14783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14784 (exit $ac_status); }; }; then
14785 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014786else
Martin v. Löwis11437992002-04-12 09:54:03 +000014787 echo "$as_me: failed program was:" >&5
14788cat conftest.$ac_ext >&5
14789ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014790fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014791rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014792fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014793echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14794echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14795if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014796 :
14797else
Martin v. Löwis11437992002-04-12 09:54:03 +000014798
14799echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14800echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14801if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14802 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014803else
Martin v. Löwis11437992002-04-12 09:54:03 +000014804 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014805LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014806cat >conftest.$ac_ext <<_ACEOF
14807#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014808#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014809
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014810/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014811#ifdef __cplusplus
14812extern "C"
14813#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014814/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014815 builtin and then its argument prototype would still apply. */
14816char __fpu_control ();
14817#ifdef F77_DUMMY_MAIN
14818# ifdef __cplusplus
14819 extern "C"
14820# endif
14821 int F77_DUMMY_MAIN() { return 1; }
14822#endif
14823int
14824main ()
14825{
14826__fpu_control ();
14827 ;
14828 return 0;
14829}
14830_ACEOF
14831rm -f conftest.$ac_objext conftest$ac_exeext
14832if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14833 (eval $ac_link) 2>&5
14834 ac_status=$?
14835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14836 (exit $ac_status); } &&
14837 { ac_try='test -s conftest$ac_exeext'
14838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14839 (eval $ac_try) 2>&5
14840 ac_status=$?
14841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14842 (exit $ac_status); }; }; then
14843 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014844else
Martin v. Löwis11437992002-04-12 09:54:03 +000014845 echo "$as_me: failed program was:" >&5
14846cat conftest.$ac_ext >&5
14847ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014848fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014849rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14850LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014851fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014852echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14853echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14854if test $ac_cv_lib_ieee___fpu_control = yes; then
14855 cat >>confdefs.h <<_ACEOF
14856#define HAVE_LIBIEEE 1
14857_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014858
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014859 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014860
Guido van Rossum627b2d71993-12-24 10:39:16 +000014861fi
14862
Michael W. Hudson54241132001-12-07 15:38:26 +000014863
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014864fi
14865
Michael W. Hudson54241132001-12-07 15:38:26 +000014866
Guido van Rossum7f253911997-05-09 02:42:48 +000014867# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014868echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14869echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14870
Guido van Rossum7f253911997-05-09 02:42:48 +000014871# Check whether --with-fpectl or --without-fpectl was given.
14872if test "${with_fpectl+set}" = set; then
14873 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014874
Guido van Rossum7f253911997-05-09 02:42:48 +000014875if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014876then
14877
14878cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014879#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014880_ACEOF
14881
14882 echo "$as_me:$LINENO: result: yes" >&5
14883echo "${ECHO_T}yes" >&6
14884else echo "$as_me:$LINENO: result: no" >&5
14885echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014886fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014887else
Martin v. Löwis11437992002-04-12 09:54:03 +000014888 echo "$as_me:$LINENO: result: no" >&5
14889echo "${ECHO_T}no" >&6
14890fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014891
Guido van Rossum7f43da71994-08-01 12:15:30 +000014892# check for --with-libm=...
14893
Guido van Rossum563e7081996-09-10 18:20:48 +000014894case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014895Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014896BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014897*) LIBM=-lm
14898esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014899echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14900echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14901
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014902# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014903if test "${with_libm+set}" = set; then
14904 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014905
Guido van Rossum7f253911997-05-09 02:42:48 +000014906if test "$withval" = no
14907then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014908 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14909echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014910elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014911then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014912 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14913echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14914else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14915echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14916 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014917fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014918else
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14920echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14921fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014922
14923# check for --with-libc=...
14924
Martin v. Löwis11437992002-04-12 09:54:03 +000014925echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14926echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14927
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014928# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014929if test "${with_libc+set}" = set; then
14930 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014931
Guido van Rossum7f253911997-05-09 02:42:48 +000014932if test "$withval" = no
14933then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014934 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14935echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014936elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014937then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014938 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14939echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14940else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14941echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14942 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014943fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014944else
Martin v. Löwis11437992002-04-12 09:54:03 +000014945 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14946echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14947fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014948
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014949# check for hypot() in math library
14950LIBS_SAVE=$LIBS
14951LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014952
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014953for ac_func in hypot
14954do
Martin v. Löwis11437992002-04-12 09:54:03 +000014955as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14956echo "$as_me:$LINENO: checking for $ac_func" >&5
14957echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14958if eval "test \"\${$as_ac_var+set}\" = set"; then
14959 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014960else
Martin v. Löwis11437992002-04-12 09:54:03 +000014961 cat >conftest.$ac_ext <<_ACEOF
14962#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014963#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014964/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014966#include <assert.h>
14967/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014968#ifdef __cplusplus
14969extern "C"
14970#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014971/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 builtin and then its argument prototype would still apply. */
14973char $ac_func ();
14974char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014975
Martin v. Löwis11437992002-04-12 09:54:03 +000014976#ifdef F77_DUMMY_MAIN
14977# ifdef __cplusplus
14978 extern "C"
14979# endif
14980 int F77_DUMMY_MAIN() { return 1; }
14981#endif
14982int
14983main ()
14984{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014985/* The GNU C library defines this for functions which it implements
14986 to always fail with ENOSYS. Some functions are actually named
14987 something starting with __ and the normal name is an alias. */
14988#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14989choke me
14990#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014991f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014992#endif
14993
Martin v. Löwis11437992002-04-12 09:54:03 +000014994 ;
14995 return 0;
14996}
14997_ACEOF
14998rm -f conftest.$ac_objext conftest$ac_exeext
14999if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15000 (eval $ac_link) 2>&5
15001 ac_status=$?
15002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15003 (exit $ac_status); } &&
15004 { ac_try='test -s conftest$ac_exeext'
15005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15006 (eval $ac_try) 2>&5
15007 ac_status=$?
15008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15009 (exit $ac_status); }; }; then
15010 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015011else
Martin v. Löwis11437992002-04-12 09:54:03 +000015012 echo "$as_me: failed program was:" >&5
15013cat conftest.$ac_ext >&5
15014eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015015fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015016rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015017fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015018echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15019echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15020if test `eval echo '${'$as_ac_var'}'` = yes; then
15021 cat >>confdefs.h <<_ACEOF
15022#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15023_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015024
Michael W. Hudson54241132001-12-07 15:38:26 +000015025else
Martin v. Löwis11437992002-04-12 09:54:03 +000015026 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015027fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015028done
15029
Michael W. Hudson54241132001-12-07 15:38:26 +000015030
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015031LIBS=$LIBS_SAVE
15032
Guido van Rossumad713701997-07-10 22:42:38 +000015033# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000015034echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
15035echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
15036if test "${ac_cv_malloc_zero+set}" = set; then
15037 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015038else
15039 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015040 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000015041else
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 cat >conftest.$ac_ext <<_ACEOF
15043#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000015044#include "confdefs.h"
15045#include <stdio.h>
15046#ifdef HAVE_STDLIB
15047#include <stdlib.h>
15048#else
15049char *malloc(), *realloc();
15050int *free();
15051#endif
15052main() {
15053 char *p;
15054 p = malloc(0);
15055 if (p == NULL) exit(1);
15056 p = realloc(p, 0);
15057 if (p == NULL) exit(1);
15058 free(p);
15059 exit(0);
15060}
Martin v. Löwis11437992002-04-12 09:54:03 +000015061_ACEOF
15062rm -f conftest$ac_exeext
15063if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15064 (eval $ac_link) 2>&5
15065 ac_status=$?
15066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15067 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15069 (eval $ac_try) 2>&5
15070 ac_status=$?
15071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15072 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000015073 ac_cv_malloc_zero=nonnull
15074else
Martin v. Löwis11437992002-04-12 09:54:03 +000015075 echo "$as_me: program exited with status $ac_status" >&5
15076echo "$as_me: failed program was:" >&5
15077cat conftest.$ac_ext >&5
15078( exit $ac_status )
15079ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000015080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015081rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000015082fi
Guido van Rossumad713701997-07-10 22:42:38 +000015083fi
Guido van Rossum3065c942001-09-17 04:03:14 +000015084 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000015085echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
15086echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015087if test "$ac_cv_malloc_zero" = null
15088then
Martin v. Löwis11437992002-04-12 09:54:03 +000015089
15090cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015091#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015092_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015093
15094fi
15095
Guido van Rossumef2255b2000-03-10 22:30:29 +000015096# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015097if test "${ac_cv_header_wchar_h+set}" = set; then
15098 echo "$as_me:$LINENO: checking for wchar.h" >&5
15099echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15100if test "${ac_cv_header_wchar_h+set}" = set; then
15101 echo $ECHO_N "(cached) $ECHO_C" >&6
15102fi
15103echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15104echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015105else
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 # Is the header compilable?
15107echo "$as_me:$LINENO: checking wchar.h usability" >&5
15108echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15109cat >conftest.$ac_ext <<_ACEOF
15110#line $LINENO "configure"
15111#include "confdefs.h"
15112$ac_includes_default
15113#include <wchar.h>
15114_ACEOF
15115rm -f conftest.$ac_objext
15116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15117 (eval $ac_compile) 2>&5
15118 ac_status=$?
15119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15120 (exit $ac_status); } &&
15121 { ac_try='test -s conftest.$ac_objext'
15122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15123 (eval $ac_try) 2>&5
15124 ac_status=$?
15125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15126 (exit $ac_status); }; }; then
15127 ac_header_compiler=yes
15128else
15129 echo "$as_me: failed program was:" >&5
15130cat conftest.$ac_ext >&5
15131ac_header_compiler=no
15132fi
15133rm -f conftest.$ac_objext conftest.$ac_ext
15134echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15135echo "${ECHO_T}$ac_header_compiler" >&6
15136
15137# Is the header present?
15138echo "$as_me:$LINENO: checking wchar.h presence" >&5
15139echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15140cat >conftest.$ac_ext <<_ACEOF
15141#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015142#include "confdefs.h"
15143#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015144_ACEOF
15145if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15146 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15147 ac_status=$?
15148 egrep -v '^ *\+' conftest.er1 >conftest.err
15149 rm -f conftest.er1
15150 cat conftest.err >&5
15151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15152 (exit $ac_status); } >/dev/null; then
15153 if test -s conftest.err; then
15154 ac_cpp_err=$ac_c_preproc_warn_flag
15155 else
15156 ac_cpp_err=
15157 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015158else
Martin v. Löwis11437992002-04-12 09:54:03 +000015159 ac_cpp_err=yes
15160fi
15161if test -z "$ac_cpp_err"; then
15162 ac_header_preproc=yes
15163else
15164 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015165 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015167fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015168rm -f conftest.err conftest.$ac_ext
15169echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15170echo "${ECHO_T}$ac_header_preproc" >&6
15171
15172# So? What about this header?
15173case $ac_header_compiler:$ac_header_preproc in
15174 yes:no )
15175 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15176echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15177 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15178echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15179 no:yes )
15180 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15181echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15182 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15183echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15184 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15185echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15186esac
15187echo "$as_me:$LINENO: checking for wchar.h" >&5
15188echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15189if test "${ac_cv_header_wchar_h+set}" = set; then
15190 echo $ECHO_N "(cached) $ECHO_C" >&6
15191else
15192 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015193fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015194echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15195echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15196
15197fi
15198if test $ac_cv_header_wchar_h = yes; then
15199
15200
15201cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015202#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015203_ACEOF
15204
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015205 wchar_h="yes"
15206
Guido van Rossumef2255b2000-03-10 22:30:29 +000015207else
Martin v. Löwis11437992002-04-12 09:54:03 +000015208 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015209
15210fi
15211
Michael W. Hudson54241132001-12-07 15:38:26 +000015212
Martin v. Löwis11437992002-04-12 09:54:03 +000015213
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015214# determine wchar_t size
15215if test "$wchar_h" = yes
15216then
Martin v. Löwis11437992002-04-12 09:54:03 +000015217 echo "$as_me:$LINENO: checking for wchar_t" >&5
15218echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
15219if test "${ac_cv_type_wchar_t+set}" = set; then
15220 echo $ECHO_N "(cached) $ECHO_C" >&6
15221else
15222 cat >conftest.$ac_ext <<_ACEOF
15223#line $LINENO "configure"
15224#include "confdefs.h"
15225#include <wchar.h>
15226
15227#ifdef F77_DUMMY_MAIN
15228# ifdef __cplusplus
15229 extern "C"
15230# endif
15231 int F77_DUMMY_MAIN() { return 1; }
15232#endif
15233int
15234main ()
15235{
15236if ((wchar_t *) 0)
15237 return 0;
15238if (sizeof (wchar_t))
15239 return 0;
15240 ;
15241 return 0;
15242}
15243_ACEOF
15244rm -f conftest.$ac_objext
15245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15246 (eval $ac_compile) 2>&5
15247 ac_status=$?
15248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15249 (exit $ac_status); } &&
15250 { ac_try='test -s conftest.$ac_objext'
15251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15252 (eval $ac_try) 2>&5
15253 ac_status=$?
15254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15255 (exit $ac_status); }; }; then
15256 ac_cv_type_wchar_t=yes
15257else
15258 echo "$as_me: failed program was:" >&5
15259cat conftest.$ac_ext >&5
15260ac_cv_type_wchar_t=no
15261fi
15262rm -f conftest.$ac_objext conftest.$ac_ext
15263fi
15264echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
15265echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
15266
15267echo "$as_me:$LINENO: checking size of wchar_t" >&5
15268echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
15269if test "${ac_cv_sizeof_wchar_t+set}" = set; then
15270 echo $ECHO_N "(cached) $ECHO_C" >&6
15271else
15272 if test "$ac_cv_type_wchar_t" = yes; then
15273 # The cast to unsigned long works around a bug in the HP C Compiler
15274 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15275 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15276 # This bug is HP SR number 8606223364.
15277 if test "$cross_compiling" = yes; then
15278 # Depending upon the size, compute the lo and hi bounds.
15279cat >conftest.$ac_ext <<_ACEOF
15280#line $LINENO "configure"
15281#include "confdefs.h"
15282#include <wchar.h>
15283
15284#ifdef F77_DUMMY_MAIN
15285# ifdef __cplusplus
15286 extern "C"
15287# endif
15288 int F77_DUMMY_MAIN() { return 1; }
15289#endif
15290int
15291main ()
15292{
15293static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
15294test_array [0] = 0
15295
15296 ;
15297 return 0;
15298}
15299_ACEOF
15300rm -f conftest.$ac_objext
15301if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15302 (eval $ac_compile) 2>&5
15303 ac_status=$?
15304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15305 (exit $ac_status); } &&
15306 { ac_try='test -s conftest.$ac_objext'
15307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15308 (eval $ac_try) 2>&5
15309 ac_status=$?
15310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15311 (exit $ac_status); }; }; then
15312 ac_lo=0 ac_mid=0
15313 while :; do
15314 cat >conftest.$ac_ext <<_ACEOF
15315#line $LINENO "configure"
15316#include "confdefs.h"
15317#include <wchar.h>
15318
15319#ifdef F77_DUMMY_MAIN
15320# ifdef __cplusplus
15321 extern "C"
15322# endif
15323 int F77_DUMMY_MAIN() { return 1; }
15324#endif
15325int
15326main ()
15327{
15328static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15329test_array [0] = 0
15330
15331 ;
15332 return 0;
15333}
15334_ACEOF
15335rm -f conftest.$ac_objext
15336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15337 (eval $ac_compile) 2>&5
15338 ac_status=$?
15339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15340 (exit $ac_status); } &&
15341 { ac_try='test -s conftest.$ac_objext'
15342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15343 (eval $ac_try) 2>&5
15344 ac_status=$?
15345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15346 (exit $ac_status); }; }; then
15347 ac_hi=$ac_mid; break
15348else
15349 echo "$as_me: failed program was:" >&5
15350cat conftest.$ac_ext >&5
15351ac_lo=`expr $ac_mid + 1`
15352 if test $ac_lo -le $ac_mid; then
15353 ac_lo= ac_hi=
15354 break
15355 fi
15356 ac_mid=`expr 2 '*' $ac_mid + 1`
15357fi
15358rm -f conftest.$ac_objext conftest.$ac_ext
15359 done
15360else
15361 echo "$as_me: failed program was:" >&5
15362cat conftest.$ac_ext >&5
15363cat >conftest.$ac_ext <<_ACEOF
15364#line $LINENO "configure"
15365#include "confdefs.h"
15366#include <wchar.h>
15367
15368#ifdef F77_DUMMY_MAIN
15369# ifdef __cplusplus
15370 extern "C"
15371# endif
15372 int F77_DUMMY_MAIN() { return 1; }
15373#endif
15374int
15375main ()
15376{
15377static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
15378test_array [0] = 0
15379
15380 ;
15381 return 0;
15382}
15383_ACEOF
15384rm -f conftest.$ac_objext
15385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15386 (eval $ac_compile) 2>&5
15387 ac_status=$?
15388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15389 (exit $ac_status); } &&
15390 { ac_try='test -s conftest.$ac_objext'
15391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15392 (eval $ac_try) 2>&5
15393 ac_status=$?
15394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15395 (exit $ac_status); }; }; then
15396 ac_hi=-1 ac_mid=-1
15397 while :; do
15398 cat >conftest.$ac_ext <<_ACEOF
15399#line $LINENO "configure"
15400#include "confdefs.h"
15401#include <wchar.h>
15402
15403#ifdef F77_DUMMY_MAIN
15404# ifdef __cplusplus
15405 extern "C"
15406# endif
15407 int F77_DUMMY_MAIN() { return 1; }
15408#endif
15409int
15410main ()
15411{
15412static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15413test_array [0] = 0
15414
15415 ;
15416 return 0;
15417}
15418_ACEOF
15419rm -f conftest.$ac_objext
15420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15421 (eval $ac_compile) 2>&5
15422 ac_status=$?
15423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15424 (exit $ac_status); } &&
15425 { ac_try='test -s conftest.$ac_objext'
15426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15427 (eval $ac_try) 2>&5
15428 ac_status=$?
15429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15430 (exit $ac_status); }; }; then
15431 ac_lo=$ac_mid; break
15432else
15433 echo "$as_me: failed program was:" >&5
15434cat conftest.$ac_ext >&5
15435ac_hi=`expr '(' $ac_mid ')' - 1`
15436 if test $ac_mid -le $ac_hi; then
15437 ac_lo= ac_hi=
15438 break
15439 fi
15440 ac_mid=`expr 2 '*' $ac_mid`
15441fi
15442rm -f conftest.$ac_objext conftest.$ac_ext
15443 done
15444else
15445 echo "$as_me: failed program was:" >&5
15446cat conftest.$ac_ext >&5
15447ac_lo= ac_hi=
15448fi
15449rm -f conftest.$ac_objext conftest.$ac_ext
15450fi
15451rm -f conftest.$ac_objext conftest.$ac_ext
15452# Binary search between lo and hi bounds.
15453while test "x$ac_lo" != "x$ac_hi"; do
15454 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15455 cat >conftest.$ac_ext <<_ACEOF
15456#line $LINENO "configure"
15457#include "confdefs.h"
15458#include <wchar.h>
15459
15460#ifdef F77_DUMMY_MAIN
15461# ifdef __cplusplus
15462 extern "C"
15463# endif
15464 int F77_DUMMY_MAIN() { return 1; }
15465#endif
15466int
15467main ()
15468{
15469static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15470test_array [0] = 0
15471
15472 ;
15473 return 0;
15474}
15475_ACEOF
15476rm -f conftest.$ac_objext
15477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15478 (eval $ac_compile) 2>&5
15479 ac_status=$?
15480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15481 (exit $ac_status); } &&
15482 { ac_try='test -s conftest.$ac_objext'
15483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15484 (eval $ac_try) 2>&5
15485 ac_status=$?
15486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15487 (exit $ac_status); }; }; then
15488 ac_hi=$ac_mid
15489else
15490 echo "$as_me: failed program was:" >&5
15491cat conftest.$ac_ext >&5
15492ac_lo=`expr '(' $ac_mid ')' + 1`
15493fi
15494rm -f conftest.$ac_objext conftest.$ac_ext
15495done
15496case $ac_lo in
15497?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15498'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15499echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15500 { (exit 1); exit 1; }; } ;;
15501esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015502else
15503 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015504 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15505echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15506 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015507else
Martin v. Löwis11437992002-04-12 09:54:03 +000015508 cat >conftest.$ac_ext <<_ACEOF
15509#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015510#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015511#include <wchar.h>
15512
15513long longval () { return (long) (sizeof (wchar_t)); }
15514unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015515#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015516#include <stdlib.h>
15517#ifdef F77_DUMMY_MAIN
15518# ifdef __cplusplus
15519 extern "C"
15520# endif
15521 int F77_DUMMY_MAIN() { return 1; }
15522#endif
15523int
15524main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015525{
Martin v. Löwis11437992002-04-12 09:54:03 +000015526
15527 FILE *f = fopen ("conftest.val", "w");
15528 if (! f)
15529 exit (1);
15530 if (((long) (sizeof (wchar_t))) < 0)
15531 {
15532 long i = longval ();
15533 if (i != ((long) (sizeof (wchar_t))))
15534 exit (1);
15535 fprintf (f, "%ld\n", i);
15536 }
15537 else
15538 {
15539 unsigned long i = ulongval ();
15540 if (i != ((long) (sizeof (wchar_t))))
15541 exit (1);
15542 fprintf (f, "%lu\n", i);
15543 }
15544 exit (ferror (f) || fclose (f) != 0);
15545
15546 ;
15547 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015548}
Martin v. Löwis11437992002-04-12 09:54:03 +000015549_ACEOF
15550rm -f conftest$ac_exeext
15551if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15552 (eval $ac_link) 2>&5
15553 ac_status=$?
15554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15555 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15557 (eval $ac_try) 2>&5
15558 ac_status=$?
15559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15560 (exit $ac_status); }; }; then
15561 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015562else
Martin v. Löwis11437992002-04-12 09:54:03 +000015563 echo "$as_me: program exited with status $ac_status" >&5
15564echo "$as_me: failed program was:" >&5
15565cat conftest.$ac_ext >&5
15566( exit $ac_status )
15567{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15568echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15569 { (exit 1); exit 1; }; }
15570fi
15571rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15572fi
15573fi
15574rm -f conftest.val
15575else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015576 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015577fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015578fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015579echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15580echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15581cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015582#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015583_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015584
Michael W. Hudson54241132001-12-07 15:38:26 +000015585
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015586fi
15587
Martin v. Löwis11437992002-04-12 09:54:03 +000015588echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15589echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015590# Check whether --enable-unicode or --disable-unicode was given.
15591if test "${enable_unicode+set}" = set; then
15592 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015593
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015594else
15595 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015596fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015597
15598if test $enable_unicode = yes
15599then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015600 # Without any arguments, Py_UNICODE defaults to two-byte mode
15601 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015602fi
15603
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015604
15605
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015606case "$enable_unicode" in
15607ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015608 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015609#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015610_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015611
15612 ;;
15613ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015614 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015615#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015616_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015617
15618 ;;
15619esac
15620
Michael W. Hudson54241132001-12-07 15:38:26 +000015621
Martin v. Löwis11437992002-04-12 09:54:03 +000015622
15623
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015624
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015625if test "$enable_unicode" = "no"
15626then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015627 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015628 echo "$as_me:$LINENO: result: not used" >&5
15629echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015630else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015631 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015632
15633cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015634#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015635_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015636
15637 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15638 then
15639 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015640
Martin v. Löwis11437992002-04-12 09:54:03 +000015641cat >>confdefs.h <<\_ACEOF
15642#define HAVE_USABLE_WCHAR_T 1
15643_ACEOF
15644
15645 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015646#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015647_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015648
15649 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15650 then
15651 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015652 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015653#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015654_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015655
15656 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15657 then
15658 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015659 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015660#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015661_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015662
15663 else
15664 PY_UNICODE_TYPE="no type found"
15665 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015666 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15667echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015668fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015669
15670# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015671echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15672echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15673if test "${ac_cv_c_bigendian+set}" = set; then
15674 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015675else
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 # See if sys/param.h defines the BYTE_ORDER macro.
15677cat >conftest.$ac_ext <<_ACEOF
15678#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015679#include "confdefs.h"
15680#include <sys/types.h>
15681#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015682
Martin v. Löwis11437992002-04-12 09:54:03 +000015683#ifdef F77_DUMMY_MAIN
15684# ifdef __cplusplus
15685 extern "C"
15686# endif
15687 int F77_DUMMY_MAIN() { return 1; }
15688#endif
15689int
15690main ()
15691{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015692#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15693 bogus endian macros
15694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015695
15696 ;
15697 return 0;
15698}
15699_ACEOF
15700rm -f conftest.$ac_objext
15701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15702 (eval $ac_compile) 2>&5
15703 ac_status=$?
15704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15705 (exit $ac_status); } &&
15706 { ac_try='test -s conftest.$ac_objext'
15707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15708 (eval $ac_try) 2>&5
15709 ac_status=$?
15710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15711 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015712 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015713cat >conftest.$ac_ext <<_ACEOF
15714#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015715#include "confdefs.h"
15716#include <sys/types.h>
15717#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015718
Martin v. Löwis11437992002-04-12 09:54:03 +000015719#ifdef F77_DUMMY_MAIN
15720# ifdef __cplusplus
15721 extern "C"
15722# endif
15723 int F77_DUMMY_MAIN() { return 1; }
15724#endif
15725int
15726main ()
15727{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015728#if BYTE_ORDER != BIG_ENDIAN
15729 not big endian
15730#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015731
15732 ;
15733 return 0;
15734}
15735_ACEOF
15736rm -f conftest.$ac_objext
15737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15738 (eval $ac_compile) 2>&5
15739 ac_status=$?
15740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15741 (exit $ac_status); } &&
15742 { ac_try='test -s conftest.$ac_objext'
15743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15744 (eval $ac_try) 2>&5
15745 ac_status=$?
15746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15747 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015748 ac_cv_c_bigendian=yes
15749else
Martin v. Löwis11437992002-04-12 09:54:03 +000015750 echo "$as_me: failed program was:" >&5
15751cat conftest.$ac_ext >&5
15752ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015753fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015754rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015755else
Martin v. Löwis11437992002-04-12 09:54:03 +000015756 echo "$as_me: failed program was:" >&5
15757cat conftest.$ac_ext >&5
15758# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015759if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015760 # try to guess the endianess by grep'ing values into an object file
15761 ac_cv_c_bigendian=unknown
15762 cat >conftest.$ac_ext <<_ACEOF
15763#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015764#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015765short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15766short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15767void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15768short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15769short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15770void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15771#ifdef F77_DUMMY_MAIN
15772# ifdef __cplusplus
15773 extern "C"
15774# endif
15775 int F77_DUMMY_MAIN() { return 1; }
15776#endif
15777int
15778main ()
15779{
15780 _ascii (); _ebcdic ();
15781 ;
15782 return 0;
15783}
15784_ACEOF
15785rm -f conftest.$ac_objext
15786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15787 (eval $ac_compile) 2>&5
15788 ac_status=$?
15789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15790 (exit $ac_status); } &&
15791 { ac_try='test -s conftest.$ac_objext'
15792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15793 (eval $ac_try) 2>&5
15794 ac_status=$?
15795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15796 (exit $ac_status); }; }; then
15797 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15798 ac_cv_c_bigendian=yes
15799fi
15800if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15801 if test "$ac_cv_c_bigendian" = unknown; then
15802 ac_cv_c_bigendian=no
15803 else
15804 # finding both strings is unlikely to happen, but who knows?
15805 ac_cv_c_bigendian=unknown
15806 fi
15807fi
15808else
15809 echo "$as_me: failed program was:" >&5
15810cat conftest.$ac_ext >&5
15811fi
15812rm -f conftest.$ac_objext conftest.$ac_ext
15813else
15814 cat >conftest.$ac_ext <<_ACEOF
15815#line $LINENO "configure"
15816#include "confdefs.h"
15817int
15818main ()
15819{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015820 /* Are we little or big endian? From Harbison&Steele. */
15821 union
15822 {
15823 long l;
15824 char c[sizeof (long)];
15825 } u;
15826 u.l = 1;
15827 exit (u.c[sizeof (long) - 1] == 1);
15828}
Martin v. Löwis11437992002-04-12 09:54:03 +000015829_ACEOF
15830rm -f conftest$ac_exeext
15831if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15832 (eval $ac_link) 2>&5
15833 ac_status=$?
15834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15835 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15837 (eval $ac_try) 2>&5
15838 ac_status=$?
15839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15840 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015841 ac_cv_c_bigendian=no
15842else
Martin v. Löwis11437992002-04-12 09:54:03 +000015843 echo "$as_me: program exited with status $ac_status" >&5
15844echo "$as_me: failed program was:" >&5
15845cat conftest.$ac_ext >&5
15846( exit $ac_status )
15847ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015848fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015849rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015850fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015851fi
15852rm -f conftest.$ac_objext conftest.$ac_ext
15853fi
15854echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15855echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15856case $ac_cv_c_bigendian in
15857 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015858
Martin v. Löwis11437992002-04-12 09:54:03 +000015859cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015860#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015861_ACEOF
15862 ;;
15863 no)
15864 ;;
15865 *)
15866 { { echo "$as_me:$LINENO: error: unknown endianess
15867presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15868echo "$as_me: error: unknown endianess
15869presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15870 { (exit 1); exit 1; }; } ;;
15871esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015872
Michael W. Hudson54241132001-12-07 15:38:26 +000015873
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015874# Check whether right shifting a negative integer extends the sign bit
15875# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015876echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15877echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15878if test "${ac_cv_rshift_extends_sign+set}" = set; then
15879 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015880else
Martin v. Löwis11437992002-04-12 09:54:03 +000015881
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015882if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015883 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015884else
Martin v. Löwis11437992002-04-12 09:54:03 +000015885 cat >conftest.$ac_ext <<_ACEOF
15886#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015887#include "confdefs.h"
15888
15889int main()
15890{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015891 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015892}
15893
Martin v. Löwis11437992002-04-12 09:54:03 +000015894_ACEOF
15895rm -f conftest$ac_exeext
15896if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15897 (eval $ac_link) 2>&5
15898 ac_status=$?
15899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15900 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15902 (eval $ac_try) 2>&5
15903 ac_status=$?
15904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15905 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015906 ac_cv_rshift_extends_sign=yes
15907else
Martin v. Löwis11437992002-04-12 09:54:03 +000015908 echo "$as_me: program exited with status $ac_status" >&5
15909echo "$as_me: failed program was:" >&5
15910cat conftest.$ac_ext >&5
15911( exit $ac_status )
15912ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015913fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015914rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15915fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015916fi
15917
Martin v. Löwis11437992002-04-12 09:54:03 +000015918echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15919echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015920if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015921then
Martin v. Löwis11437992002-04-12 09:54:03 +000015922
15923cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015924#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015925_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015926
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015927fi
15928
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015929# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015930echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15931echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15932if test "${ac_cv_have_getc_unlocked+set}" = set; then
15933 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015934else
Martin v. Löwis11437992002-04-12 09:54:03 +000015935
15936cat >conftest.$ac_ext <<_ACEOF
15937#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015938#include "confdefs.h"
15939#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015940#ifdef F77_DUMMY_MAIN
15941# ifdef __cplusplus
15942 extern "C"
15943# endif
15944 int F77_DUMMY_MAIN() { return 1; }
15945#endif
15946int
15947main ()
15948{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015949
15950 FILE *f = fopen("/dev/null", "r");
15951 flockfile(f);
15952 getc_unlocked(f);
15953 funlockfile(f);
15954
Martin v. Löwis11437992002-04-12 09:54:03 +000015955 ;
15956 return 0;
15957}
15958_ACEOF
15959rm -f conftest.$ac_objext conftest$ac_exeext
15960if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15961 (eval $ac_link) 2>&5
15962 ac_status=$?
15963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15964 (exit $ac_status); } &&
15965 { ac_try='test -s conftest$ac_exeext'
15966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15967 (eval $ac_try) 2>&5
15968 ac_status=$?
15969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15970 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015971 ac_cv_have_getc_unlocked=yes
15972else
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 echo "$as_me: failed program was:" >&5
15974cat conftest.$ac_ext >&5
15975ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015976fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015977rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015978fi
15979
Martin v. Löwis11437992002-04-12 09:54:03 +000015980echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15981echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015982if test "$ac_cv_have_getc_unlocked" = yes
15983then
Martin v. Löwis11437992002-04-12 09:54:03 +000015984
15985cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015986#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015987_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015988
15989fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015990
Martin v. Löwis0daad592001-09-30 21:09:59 +000015991# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015992echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15993echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15994if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15995 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015996else
Martin v. Löwis11437992002-04-12 09:54:03 +000015997 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015998LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015999cat >conftest.$ac_ext <<_ACEOF
16000#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016001#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016002
Guido van Rossum353ae582001-07-10 16:45:32 +000016003/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016004#ifdef __cplusplus
16005extern "C"
16006#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016007/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016008 builtin and then its argument prototype would still apply. */
16009char rl_pre_input_hook ();
16010#ifdef F77_DUMMY_MAIN
16011# ifdef __cplusplus
16012 extern "C"
16013# endif
16014 int F77_DUMMY_MAIN() { return 1; }
16015#endif
16016int
16017main ()
16018{
16019rl_pre_input_hook ();
16020 ;
16021 return 0;
16022}
16023_ACEOF
16024rm -f conftest.$ac_objext conftest$ac_exeext
16025if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16026 (eval $ac_link) 2>&5
16027 ac_status=$?
16028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16029 (exit $ac_status); } &&
16030 { ac_try='test -s conftest$ac_exeext'
16031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16032 (eval $ac_try) 2>&5
16033 ac_status=$?
16034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16035 (exit $ac_status); }; }; then
16036 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016037else
Martin v. Löwis11437992002-04-12 09:54:03 +000016038 echo "$as_me: failed program was:" >&5
16039cat conftest.$ac_ext >&5
16040ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016041fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016042rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16043LIBS=$ac_check_lib_save_LIBS
16044fi
16045echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16046echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16047if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016048
Martin v. Löwis11437992002-04-12 09:54:03 +000016049cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016050#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016051_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016052
Martin v. Löwis0daad592001-09-30 21:09:59 +000016053fi
16054
Michael W. Hudson54241132001-12-07 15:38:26 +000016055
Martin v. Löwis0daad592001-09-30 21:09:59 +000016056# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016057echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16058echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16059if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16060 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016061else
Martin v. Löwis11437992002-04-12 09:54:03 +000016062 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016063LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016064cat >conftest.$ac_ext <<_ACEOF
16065#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016066#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016067
Martin v. Löwis0daad592001-09-30 21:09:59 +000016068/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016069#ifdef __cplusplus
16070extern "C"
16071#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016072/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016073 builtin and then its argument prototype would still apply. */
16074char rl_completion_matches ();
16075#ifdef F77_DUMMY_MAIN
16076# ifdef __cplusplus
16077 extern "C"
16078# endif
16079 int F77_DUMMY_MAIN() { return 1; }
16080#endif
16081int
16082main ()
16083{
16084rl_completion_matches ();
16085 ;
16086 return 0;
16087}
16088_ACEOF
16089rm -f conftest.$ac_objext conftest$ac_exeext
16090if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16091 (eval $ac_link) 2>&5
16092 ac_status=$?
16093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16094 (exit $ac_status); } &&
16095 { ac_try='test -s conftest$ac_exeext'
16096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16097 (eval $ac_try) 2>&5
16098 ac_status=$?
16099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16100 (exit $ac_status); }; }; then
16101 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016102else
Martin v. Löwis11437992002-04-12 09:54:03 +000016103 echo "$as_me: failed program was:" >&5
16104cat conftest.$ac_ext >&5
16105ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016106fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016107rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16108LIBS=$ac_check_lib_save_LIBS
16109fi
16110echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16111echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16112if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016113
Martin v. Löwis11437992002-04-12 09:54:03 +000016114cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016115#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016116_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016117
Guido van Rossum353ae582001-07-10 16:45:32 +000016118fi
16119
Jack Jansendd19cf82001-12-06 22:36:17 +000016120
Martin v. Löwis11437992002-04-12 09:54:03 +000016121echo "$as_me:$LINENO: checking for broken nice()" >&5
16122echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16123if test "${ac_cv_broken_nice+set}" = set; then
16124 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016125else
Martin v. Löwis11437992002-04-12 09:54:03 +000016126
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016127if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016128 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016129else
Martin v. Löwis11437992002-04-12 09:54:03 +000016130 cat >conftest.$ac_ext <<_ACEOF
16131#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016132#include "confdefs.h"
16133
16134int main()
16135{
16136 int val1 = nice(1);
16137 if (val1 != -1 && val1 == nice(2))
16138 exit(0);
16139 exit(1);
16140}
16141
Martin v. Löwis11437992002-04-12 09:54:03 +000016142_ACEOF
16143rm -f conftest$ac_exeext
16144if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16145 (eval $ac_link) 2>&5
16146 ac_status=$?
16147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16148 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16150 (eval $ac_try) 2>&5
16151 ac_status=$?
16152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16153 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016154 ac_cv_broken_nice=yes
16155else
Martin v. Löwis11437992002-04-12 09:54:03 +000016156 echo "$as_me: program exited with status $ac_status" >&5
16157echo "$as_me: failed program was:" >&5
16158cat conftest.$ac_ext >&5
16159( exit $ac_status )
16160ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016161fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016162rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16163fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016164fi
16165
Martin v. Löwis11437992002-04-12 09:54:03 +000016166echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
16167echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016168if test "$ac_cv_broken_nice" = yes
16169then
Martin v. Löwis11437992002-04-12 09:54:03 +000016170
16171cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016172#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016173_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016174
16175fi
16176
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016177# Look for subsecond timestamps in struct stat
16178echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
16179echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
16180if test "${ac_cv_stat_tv_nsec+set}" = set; then
16181 echo $ECHO_N "(cached) $ECHO_C" >&6
16182else
16183 cat >conftest.$ac_ext <<_ACEOF
16184#line $LINENO "configure"
16185#include "confdefs.h"
16186#include <sys/stat.h>
16187#ifdef F77_DUMMY_MAIN
16188# ifdef __cplusplus
16189 extern "C"
16190# endif
16191 int F77_DUMMY_MAIN() { return 1; }
16192#endif
16193int
16194main ()
16195{
16196
16197struct stat st;
16198st.st_mtim.tv_nsec = 1;
16199
16200 ;
16201 return 0;
16202}
16203_ACEOF
16204rm -f conftest.$ac_objext
16205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16206 (eval $ac_compile) 2>&5
16207 ac_status=$?
16208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16209 (exit $ac_status); } &&
16210 { ac_try='test -s conftest.$ac_objext'
16211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16212 (eval $ac_try) 2>&5
16213 ac_status=$?
16214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16215 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016216 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016217else
16218 echo "$as_me: failed program was:" >&5
16219cat conftest.$ac_ext >&5
16220ac_cv_stat_tv_nsec=no
16221fi
16222rm -f conftest.$ac_objext conftest.$ac_ext
16223fi
16224
16225echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
16226echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
16227if test "$ac_cv_stat_tv_nsec" = yes
16228then
16229
16230cat >>confdefs.h <<\_ACEOF
16231#define HAVE_STAT_TV_NSEC 1
16232_ACEOF
16233
16234fi
16235
Jack Jansen666b1e72001-10-31 12:11:48 +000016236# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000016237echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
16238echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
16239if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
16240 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016241else
Martin v. Löwis11437992002-04-12 09:54:03 +000016242 cat >conftest.$ac_ext <<_ACEOF
16243#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016244#include "confdefs.h"
16245#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016246#ifdef F77_DUMMY_MAIN
16247# ifdef __cplusplus
16248 extern "C"
16249# endif
16250 int F77_DUMMY_MAIN() { return 1; }
16251#endif
16252int
16253main ()
16254{
Jack Jansen666b1e72001-10-31 12:11:48 +000016255
16256 int rtn;
16257 rtn = mvwdelch(0,0,0);
16258
Martin v. Löwis11437992002-04-12 09:54:03 +000016259 ;
16260 return 0;
16261}
16262_ACEOF
16263rm -f conftest.$ac_objext
16264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16265 (eval $ac_compile) 2>&5
16266 ac_status=$?
16267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16268 (exit $ac_status); } &&
16269 { ac_try='test -s conftest.$ac_objext'
16270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16271 (eval $ac_try) 2>&5
16272 ac_status=$?
16273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16274 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016275 ac_cv_mvwdelch_is_expression=yes
16276else
Martin v. Löwis11437992002-04-12 09:54:03 +000016277 echo "$as_me: failed program was:" >&5
16278cat conftest.$ac_ext >&5
16279ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016280fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016281rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016282fi
16283
Martin v. Löwis11437992002-04-12 09:54:03 +000016284echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
16285echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016286
16287if test "$ac_cv_mvwdelch_is_expression" = yes
16288then
Martin v. Löwis11437992002-04-12 09:54:03 +000016289
16290cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016291#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016292_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016293
16294fi
16295
Martin v. Löwis11437992002-04-12 09:54:03 +000016296echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
16297echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
16298if test "${ac_cv_window_has_flags+set}" = set; then
16299 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016300else
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 cat >conftest.$ac_ext <<_ACEOF
16302#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016303#include "confdefs.h"
16304#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016305#ifdef F77_DUMMY_MAIN
16306# ifdef __cplusplus
16307 extern "C"
16308# endif
16309 int F77_DUMMY_MAIN() { return 1; }
16310#endif
16311int
16312main ()
16313{
Jack Jansen666b1e72001-10-31 12:11:48 +000016314
16315 WINDOW *w;
16316 w->_flags = 0;
16317
Martin v. Löwis11437992002-04-12 09:54:03 +000016318 ;
16319 return 0;
16320}
16321_ACEOF
16322rm -f conftest.$ac_objext
16323if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16324 (eval $ac_compile) 2>&5
16325 ac_status=$?
16326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16327 (exit $ac_status); } &&
16328 { ac_try='test -s conftest.$ac_objext'
16329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16330 (eval $ac_try) 2>&5
16331 ac_status=$?
16332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16333 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016334 ac_cv_window_has_flags=yes
16335else
Martin v. Löwis11437992002-04-12 09:54:03 +000016336 echo "$as_me: failed program was:" >&5
16337cat conftest.$ac_ext >&5
16338ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016339fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016340rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016341fi
16342
Martin v. Löwis11437992002-04-12 09:54:03 +000016343echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
16344echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016345
Jack Jansen666b1e72001-10-31 12:11:48 +000016346
16347if test "$ac_cv_window_has_flags" = yes
16348then
Martin v. Löwis11437992002-04-12 09:54:03 +000016349
16350cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016351#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016352_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016353
16354fi
16355
Guido van Rossum95713eb2000-05-18 20:53:31 +000016356# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
16357# Add sys/socket.h to confdefs.h
16358cat >> confdefs.h <<\EOF
16359#ifdef HAVE_SYS_SOCKET_H
16360#include <sys/socket.h>
16361#endif
16362EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016363echo "$as_me:$LINENO: checking for socklen_t" >&5
16364echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
16365if test "${ac_cv_type_socklen_t+set}" = set; then
16366 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000016367else
Martin v. Löwis11437992002-04-12 09:54:03 +000016368 cat >conftest.$ac_ext <<_ACEOF
16369#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000016370#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016371$ac_includes_default
16372#ifdef F77_DUMMY_MAIN
16373# ifdef __cplusplus
16374 extern "C"
16375# endif
16376 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016377#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016378int
16379main ()
16380{
16381if ((socklen_t *) 0)
16382 return 0;
16383if (sizeof (socklen_t))
16384 return 0;
16385 ;
16386 return 0;
16387}
16388_ACEOF
16389rm -f conftest.$ac_objext
16390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16391 (eval $ac_compile) 2>&5
16392 ac_status=$?
16393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16394 (exit $ac_status); } &&
16395 { ac_try='test -s conftest.$ac_objext'
16396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16397 (eval $ac_try) 2>&5
16398 ac_status=$?
16399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16400 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016401 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000016402else
Martin v. Löwis11437992002-04-12 09:54:03 +000016403 echo "$as_me: failed program was:" >&5
16404cat conftest.$ac_ext >&5
16405ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000016406fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016407rm -f conftest.$ac_objext conftest.$ac_ext
16408fi
16409echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
16410echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
16411if test $ac_cv_type_socklen_t = yes; then
16412 :
16413else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016414
Martin v. Löwis11437992002-04-12 09:54:03 +000016415cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016416#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000016417_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016418
16419fi
16420
Michael W. Hudson54241132001-12-07 15:38:26 +000016421
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016422#AC_MSG_CHECKING(for Modules/Setup)
16423#if test ! -f Modules/Setup ; then
16424# if test ! -d Modules ; then
16425# mkdir Modules
16426# fi
16427# cp "$srcdir/Modules/Setup.dist" Modules/Setup
16428# AC_MSG_RESULT(creating)
16429#else
16430# AC_MSG_RESULT(already exists)
16431#fi
16432
Michael W. Hudson54241132001-12-07 15:38:26 +000016433
16434
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016435for h in `(cd $srcdir;echo Python/thread_*.h)`
16436do
16437 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16438done
16439
Michael W. Hudson54241132001-12-07 15:38:26 +000016440
Jack Jansen0b06be72002-06-21 14:48:38 +000016441SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000016442echo "$as_me:$LINENO: checking for build directories" >&5
16443echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016444for dir in $SRCDIRS; do
16445 if test ! -d $dir; then
16446 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016447 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016448done
Martin v. Löwis11437992002-04-12 09:54:03 +000016449echo "$as_me:$LINENO: result: done" >&5
16450echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016451
Guido van Rossum627b2d71993-12-24 10:39:16 +000016452# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016453ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016454
Martin v. Löwis11437992002-04-12 09:54:03 +000016455cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016456# This file is a shell script that caches the results of configure
16457# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016458# scripts and configure runs, see configure's option --config-cache.
16459# It is not useful on other systems. If it contains results you don't
16460# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016461#
Martin v. Löwis11437992002-04-12 09:54:03 +000016462# config.status only pays attention to the cache file if you give it
16463# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016464#
Martin v. Löwis11437992002-04-12 09:54:03 +000016465# `ac_cv_env_foo' variables (set or unset) will be overriden when
16466# loading this file, other *unset* `ac_cv_foo' will be assigned the
16467# following values.
16468
16469_ACEOF
16470
Guido van Rossumf78abae1997-01-21 22:02:36 +000016471# The following way of writing the cache mishandles newlines in values,
16472# but we know of no workaround that is simple, portable, and efficient.
16473# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016474# Ultrix sh set writes to stderr and can't be redirected directly,
16475# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016476{
16477 (set) 2>&1 |
16478 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16479 *ac_space=\ *)
16480 # `set' does not quote correctly, so add quotes (double-quote
16481 # substitution turns \\\\ into \\, and sed turns \\ into \).
16482 sed -n \
16483 "s/'/'\\\\''/g;
16484 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16485 ;;
16486 *)
16487 # `set' quotes correctly as required by POSIX, so do not add quotes.
16488 sed -n \
16489 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16490 ;;
16491 esac;
16492} |
16493 sed '
16494 t clear
16495 : clear
16496 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16497 t end
16498 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16499 : end' >>confcache
16500if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016501 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016502 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16503 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016504 else
16505 echo "not updating unwritable cache $cache_file"
16506 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016507fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016508rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016509
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016510test "x$prefix" = xNONE && prefix=$ac_default_prefix
16511# Let make expand exec_prefix.
16512test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016513
Martin v. Löwis11437992002-04-12 09:54:03 +000016514# VPATH may cause trouble with some makes, so we remove $(srcdir),
16515# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16516# trailing colons and then remove the whole line if VPATH becomes empty
16517# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016518if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016519 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16520s/:*\$(srcdir):*/:/;
16521s/:*\${srcdir}:*/:/;
16522s/:*@srcdir@:*/:/;
16523s/^\([^=]*=[ ]*\):*/\1/;
16524s/:*$//;
16525s/^[^=]*=[ ]*$//;
16526}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016527fi
16528
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016529DEFS=-DHAVE_CONFIG_H
16530
Martin v. Löwis11437992002-04-12 09:54:03 +000016531
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016532: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016533ac_clean_files_save=$ac_clean_files
16534ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16535{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16536echo "$as_me: creating $CONFIG_STATUS" >&6;}
16537cat >$CONFIG_STATUS <<_ACEOF
16538#! $SHELL
16539# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016540# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016541# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016542# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016543
Martin v. Löwis11437992002-04-12 09:54:03 +000016544debug=false
16545SHELL=\${CONFIG_SHELL-$SHELL}
16546_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016547
Martin v. Löwis11437992002-04-12 09:54:03 +000016548cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016549
Martin v. Löwis11437992002-04-12 09:54:03 +000016550## --------------------- ##
16551## M4sh Initialization. ##
16552## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016553
Martin v. Löwis11437992002-04-12 09:54:03 +000016554# Be Bourne compatible
16555if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16556 emulate sh
16557 NULLCMD=:
16558elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16559 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016560fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016561
Martin v. Löwis11437992002-04-12 09:54:03 +000016562# NLS nuisances.
16563# Support unset when possible.
16564if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16565 as_unset=unset
16566else
16567 as_unset=false
16568fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016569
Martin v. Löwis11437992002-04-12 09:54:03 +000016570(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16571 { $as_unset LANG || test "${LANG+set}" != set; } ||
16572 { LANG=C; export LANG; }
16573(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16574 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16575 { LC_ALL=C; export LC_ALL; }
16576(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16577 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16578 { LC_TIME=C; export LC_TIME; }
16579(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16580 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16581 { LC_CTYPE=C; export LC_CTYPE; }
16582(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16583 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16584 { LANGUAGE=C; export LANGUAGE; }
16585(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16586 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16587 { LC_COLLATE=C; export LC_COLLATE; }
16588(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16589 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16590 { LC_NUMERIC=C; export LC_NUMERIC; }
16591(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16592 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16593 { LC_MESSAGES=C; export LC_MESSAGES; }
16594
16595
16596# Name of the executable.
16597as_me=`(basename "$0") 2>/dev/null ||
16598$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16599 X"$0" : 'X\(//\)$' \| \
16600 X"$0" : 'X\(/\)$' \| \
16601 . : '\(.\)' 2>/dev/null ||
16602echo X/"$0" |
16603 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16604 /^X\/\(\/\/\)$/{ s//\1/; q; }
16605 /^X\/\(\/\).*/{ s//\1/; q; }
16606 s/.*/./; q'`
16607
16608# PATH needs CR, and LINENO needs CR and PATH.
16609# Avoid depending upon Character Ranges.
16610as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16611as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16612as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16613as_cr_digits='0123456789'
16614as_cr_alnum=$as_cr_Letters$as_cr_digits
16615
16616# The user is always right.
16617if test "${PATH_SEPARATOR+set}" != set; then
16618 echo "#! /bin/sh" >conftest.sh
16619 echo "exit 0" >>conftest.sh
16620 chmod +x conftest.sh
16621 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16622 PATH_SEPARATOR=';'
16623 else
16624 PATH_SEPARATOR=:
16625 fi
16626 rm -f conftest.sh
16627fi
16628
16629
16630 as_lineno_1=$LINENO
16631 as_lineno_2=$LINENO
16632 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16633 test "x$as_lineno_1" != "x$as_lineno_2" &&
16634 test "x$as_lineno_3" = "x$as_lineno_2" || {
16635 # Find who we are. Look in the path if we contain no path at all
16636 # relative or not.
16637 case $0 in
16638 *[\\/]* ) as_myself=$0 ;;
16639 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16640for as_dir in $PATH
16641do
16642 IFS=$as_save_IFS
16643 test -z "$as_dir" && as_dir=.
16644 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16645done
16646
16647 ;;
16648 esac
16649 # We did not find ourselves, most probably we were run as `sh COMMAND'
16650 # in which case we are not to be found in the path.
16651 if test "x$as_myself" = x; then
16652 as_myself=$0
16653 fi
16654 if test ! -f "$as_myself"; then
16655 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16656echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16657 { (exit 1); exit 1; }; }
16658 fi
16659 case $CONFIG_SHELL in
16660 '')
16661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16662for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16663do
16664 IFS=$as_save_IFS
16665 test -z "$as_dir" && as_dir=.
16666 for as_base in sh bash ksh sh5; do
16667 case $as_dir in
16668 /*)
16669 if ("$as_dir/$as_base" -c '
16670 as_lineno_1=$LINENO
16671 as_lineno_2=$LINENO
16672 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16673 test "x$as_lineno_1" != "x$as_lineno_2" &&
16674 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16675 CONFIG_SHELL=$as_dir/$as_base
16676 export CONFIG_SHELL
16677 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16678 fi;;
16679 esac
16680 done
16681done
16682;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016683 esac
16684
Martin v. Löwis11437992002-04-12 09:54:03 +000016685 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16686 # uniformly replaced by the line number. The first 'sed' inserts a
16687 # line-number line before each line; the second 'sed' does the real
16688 # work. The second script uses 'N' to pair each line-number line
16689 # with the numbered line, and appends trailing '-' during
16690 # substitution so that $LINENO is not a special case at line end.
16691 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16692 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16693 sed '=' <$as_myself |
16694 sed '
16695 N
16696 s,$,-,
16697 : loop
16698 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16699 t loop
16700 s,-$,,
16701 s,^['$as_cr_digits']*\n,,
16702 ' >$as_me.lineno &&
16703 chmod +x $as_me.lineno ||
16704 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16705echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16706 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016707
Martin v. Löwis11437992002-04-12 09:54:03 +000016708 # Don't try to exec as it changes $[0], causing all sort of problems
16709 # (the dirname of $[0] is not the place where we might find the
16710 # original and so on. Autoconf is especially sensible to this).
16711 . ./$as_me.lineno
16712 # Exit status is that of the last command.
16713 exit
16714}
16715
16716
16717case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16718 *c*,-n*) ECHO_N= ECHO_C='
16719' ECHO_T=' ' ;;
16720 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16721 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16722esac
16723
16724if expr a : '\(a\)' >/dev/null 2>&1; then
16725 as_expr=expr
16726else
16727 as_expr=false
16728fi
16729
16730rm -f conf$$ conf$$.exe conf$$.file
16731echo >conf$$.file
16732if ln -s conf$$.file conf$$ 2>/dev/null; then
16733 # We could just check for DJGPP; but this test a) works b) is more generic
16734 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16735 if test -f conf$$.exe; then
16736 # Don't use ln at all; we don't have any links
16737 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016738 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016739 as_ln_s='ln -s'
16740 fi
16741elif ln conf$$.file conf$$ 2>/dev/null; then
16742 as_ln_s=ln
16743else
16744 as_ln_s='cp -p'
16745fi
16746rm -f conf$$ conf$$.exe conf$$.file
16747
16748as_executable_p="test -f"
16749
16750# Sed expression to map a string onto a valid CPP name.
16751as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16752
16753# Sed expression to map a string onto a valid variable name.
16754as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16755
16756
16757# IFS
16758# We need space, tab and new line, in precisely that order.
16759as_nl='
16760'
16761IFS=" $as_nl"
16762
16763# CDPATH.
16764$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16765
16766exec 6>&1
16767
16768# Open the log real soon, to keep \$[0] and so on meaningful, and to
16769# report actual input values of CONFIG_FILES etc. instead of their
16770# values after options handling. Logging --version etc. is OK.
16771exec 5>>config.log
16772{
16773 echo
16774 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16775## Running $as_me. ##
16776_ASBOX
16777} >&5
16778cat >&5 <<_CSEOF
16779
Martin v. Löwis88afe662002-10-26 13:47:44 +000016780This file was extended by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +000016781generated by GNU Autoconf 2.53. Invocation command line was
16782
16783 CONFIG_FILES = $CONFIG_FILES
16784 CONFIG_HEADERS = $CONFIG_HEADERS
16785 CONFIG_LINKS = $CONFIG_LINKS
16786 CONFIG_COMMANDS = $CONFIG_COMMANDS
16787 $ $0 $@
16788
16789_CSEOF
16790echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16791echo >&5
16792_ACEOF
16793
16794# Files that config.status was made for.
16795if test -n "$ac_config_files"; then
16796 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16797fi
16798
16799if test -n "$ac_config_headers"; then
16800 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16801fi
16802
16803if test -n "$ac_config_links"; then
16804 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16805fi
16806
16807if test -n "$ac_config_commands"; then
16808 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16809fi
16810
16811cat >>$CONFIG_STATUS <<\_ACEOF
16812
16813ac_cs_usage="\
16814\`$as_me' instantiates files from templates according to the
16815current configuration.
16816
16817Usage: $0 [OPTIONS] [FILE]...
16818
16819 -h, --help print this help, then exit
16820 -V, --version print version number, then exit
16821 -d, --debug don't remove temporary files
16822 --recheck update $as_me by reconfiguring in the same conditions
16823 --file=FILE[:TEMPLATE]
16824 instantiate the configuration file FILE
16825 --header=FILE[:TEMPLATE]
16826 instantiate the configuration header FILE
16827
16828Configuration files:
16829$config_files
16830
16831Configuration headers:
16832$config_headers
16833
16834Report bugs to <bug-autoconf@gnu.org>."
16835_ACEOF
16836
16837cat >>$CONFIG_STATUS <<_ACEOF
16838ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000016839python config.status 2.3
Martin v. Löwis11437992002-04-12 09:54:03 +000016840configured by $0, generated by GNU Autoconf 2.53,
16841 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16842
16843Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16844Free Software Foundation, Inc.
16845This config.status script is free software; the Free Software Foundation
16846gives unlimited permission to copy, distribute and modify it."
16847srcdir=$srcdir
16848INSTALL="$INSTALL"
16849_ACEOF
16850
16851cat >>$CONFIG_STATUS <<\_ACEOF
16852# If no file are specified by the user, then we need to provide default
16853# value. By we need to know if files were specified by the user.
16854ac_need_defaults=:
16855while test $# != 0
16856do
16857 case $1 in
16858 --*=*)
16859 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16860 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16861 shift
16862 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16863 shift
16864 ;;
16865 -*);;
16866 *) # This is not an option, so the user has probably given explicit
16867 # arguments.
16868 ac_need_defaults=false;;
16869 esac
16870
16871 case $1 in
16872 # Handling of the options.
16873_ACEOF
16874cat >>$CONFIG_STATUS <<_ACEOF
16875 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16876 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16877 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16878_ACEOF
16879cat >>$CONFIG_STATUS <<\_ACEOF
16880 --version | --vers* | -V )
16881 echo "$ac_cs_version"; exit 0 ;;
16882 --he | --h)
16883 # Conflict between --help and --header
16884 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16885Try \`$0 --help' for more information." >&5
16886echo "$as_me: error: ambiguous option: $1
16887Try \`$0 --help' for more information." >&2;}
16888 { (exit 1); exit 1; }; };;
16889 --help | --hel | -h )
16890 echo "$ac_cs_usage"; exit 0 ;;
16891 --debug | --d* | -d )
16892 debug=: ;;
16893 --file | --fil | --fi | --f )
16894 shift
16895 CONFIG_FILES="$CONFIG_FILES $1"
16896 ac_need_defaults=false;;
16897 --header | --heade | --head | --hea )
16898 shift
16899 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16900 ac_need_defaults=false;;
16901
16902 # This is an error.
16903 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16904Try \`$0 --help' for more information." >&5
16905echo "$as_me: error: unrecognized option: $1
16906Try \`$0 --help' for more information." >&2;}
16907 { (exit 1); exit 1; }; } ;;
16908
16909 *) ac_config_targets="$ac_config_targets $1" ;;
16910
16911 esac
16912 shift
16913done
16914
16915_ACEOF
16916
16917
16918
16919
16920
16921cat >>$CONFIG_STATUS <<\_ACEOF
16922for ac_config_target in $ac_config_targets
16923do
16924 case "$ac_config_target" in
16925 # Handling of arguments.
16926 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16927 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16928 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16929 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16930echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16931 { (exit 1); exit 1; }; };;
16932 esac
16933done
16934
16935# If the user did not use the arguments to specify the items to instantiate,
16936# then the envvar interface is used. Set only those that are not.
16937# We use the long form for the default assignment because of an extremely
16938# bizarre bug on SunOS 4.1.3.
16939if $ac_need_defaults; then
16940 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16941 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16942fi
16943
16944# Create a temporary directory, and hook for its removal unless debugging.
16945$debug ||
16946{
16947 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16948 trap '{ (exit 1); exit 1; }' 1 2 13 15
16949}
16950
16951# Create a (secure) tmp directory for tmp files.
16952: ${TMPDIR=/tmp}
16953{
16954 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16955 test -n "$tmp" && test -d "$tmp"
16956} ||
16957{
16958 tmp=$TMPDIR/cs$$-$RANDOM
16959 (umask 077 && mkdir $tmp)
16960} ||
16961{
16962 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16963 { (exit 1); exit 1; }
16964}
16965
16966_ACEOF
16967
16968cat >>$CONFIG_STATUS <<_ACEOF
16969
16970#
16971# CONFIG_FILES section.
16972#
16973
16974# No need to generate the scripts if there are no CONFIG_FILES.
16975# This happens for instance when ./config.status config.h
16976if test -n "\$CONFIG_FILES"; then
16977 # Protect against being on the right side of a sed subst in config.status.
16978 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16979 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16980s,@SHELL@,$SHELL,;t t
16981s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16982s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16983s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16984s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16985s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16986s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16987s,@exec_prefix@,$exec_prefix,;t t
16988s,@prefix@,$prefix,;t t
16989s,@program_transform_name@,$program_transform_name,;t t
16990s,@bindir@,$bindir,;t t
16991s,@sbindir@,$sbindir,;t t
16992s,@libexecdir@,$libexecdir,;t t
16993s,@datadir@,$datadir,;t t
16994s,@sysconfdir@,$sysconfdir,;t t
16995s,@sharedstatedir@,$sharedstatedir,;t t
16996s,@localstatedir@,$localstatedir,;t t
16997s,@libdir@,$libdir,;t t
16998s,@includedir@,$includedir,;t t
16999s,@oldincludedir@,$oldincludedir,;t t
17000s,@infodir@,$infodir,;t t
17001s,@mandir@,$mandir,;t t
17002s,@build_alias@,$build_alias,;t t
17003s,@host_alias@,$host_alias,;t t
17004s,@target_alias@,$target_alias,;t t
17005s,@DEFS@,$DEFS,;t t
17006s,@ECHO_C@,$ECHO_C,;t t
17007s,@ECHO_N@,$ECHO_N,;t t
17008s,@ECHO_T@,$ECHO_T,;t t
17009s,@LIBS@,$LIBS,;t t
17010s,@VERSION@,$VERSION,;t t
17011s,@SOVERSION@,$SOVERSION,;t t
17012s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
17013s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
17014s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
17015s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17016s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17017s,@MACHDEP@,$MACHDEP,;t t
17018s,@SGI_ABI@,$SGI_ABI,;t t
17019s,@CXX@,$CXX,;t t
17020s,@MAINOBJ@,$MAINOBJ,;t t
17021s,@EXEEXT@,$EXEEXT,;t t
17022s,@CC@,$CC,;t t
17023s,@CFLAGS@,$CFLAGS,;t t
17024s,@LDFLAGS@,$LDFLAGS,;t t
17025s,@CPPFLAGS@,$CPPFLAGS,;t t
17026s,@ac_ct_CC@,$ac_ct_CC,;t t
17027s,@OBJEXT@,$OBJEXT,;t t
17028s,@CPP@,$CPP,;t t
17029s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17030s,@LIBRARY@,$LIBRARY,;t t
17031s,@LDLIBRARY@,$LDLIBRARY,;t t
17032s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17033s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17034s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17035s,@INSTSONAME@,$INSTSONAME,;t t
17036s,@RUNSHARED@,$RUNSHARED,;t t
17037s,@LINKCC@,$LINKCC,;t t
17038s,@RANLIB@,$RANLIB,;t t
17039s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17040s,@AR@,$AR,;t t
17041s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17042s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17043s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17044s,@LN@,$LN,;t t
17045s,@OPT@,$OPT,;t t
17046s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17047s,@SO@,$SO,;t t
17048s,@LDSHARED@,$LDSHARED,;t t
17049s,@BLDSHARED@,$BLDSHARED,;t t
17050s,@CCSHARED@,$CCSHARED,;t t
17051s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17052s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017053s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017054s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17055s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17056s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17057s,@LDLAST@,$LDLAST,;t t
17058s,@THREADOBJ@,$THREADOBJ,;t t
17059s,@DLINCLDIR@,$DLINCLDIR,;t t
17060s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17061s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17062s,@LIBOBJS@,$LIBOBJS,;t t
17063s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17064s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17065s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17066s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17067s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17068s,@LIBM@,$LIBM,;t t
17069s,@LIBC@,$LIBC,;t t
17070s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
17071s,@THREADHEADERS@,$THREADHEADERS,;t t
17072s,@SRCDIRS@,$SRCDIRS,;t t
17073CEOF
17074
17075_ACEOF
17076
17077 cat >>$CONFIG_STATUS <<\_ACEOF
17078 # Split the substitutions into bite-sized pieces for seds with
17079 # small command number limits, like on Digital OSF/1 and HP-UX.
17080 ac_max_sed_lines=48
17081 ac_sed_frag=1 # Number of current file.
17082 ac_beg=1 # First line for current file.
17083 ac_end=$ac_max_sed_lines # Line after last line for current file.
17084 ac_more_lines=:
17085 ac_sed_cmds=
17086 while $ac_more_lines; do
17087 if test $ac_beg -gt 1; then
17088 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17089 else
17090 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17091 fi
17092 if test ! -s $tmp/subs.frag; then
17093 ac_more_lines=false
17094 else
17095 # The purpose of the label and of the branching condition is to
17096 # speed up the sed processing (if there are no `@' at all, there
17097 # is no need to browse any of the substitutions).
17098 # These are the two extra sed commands mentioned above.
17099 (echo ':t
17100 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17101 if test -z "$ac_sed_cmds"; then
17102 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17103 else
17104 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17105 fi
17106 ac_sed_frag=`expr $ac_sed_frag + 1`
17107 ac_beg=$ac_end
17108 ac_end=`expr $ac_end + $ac_max_sed_lines`
17109 fi
17110 done
17111 if test -z "$ac_sed_cmds"; then
17112 ac_sed_cmds=cat
17113 fi
17114fi # test -n "$CONFIG_FILES"
17115
17116_ACEOF
17117cat >>$CONFIG_STATUS <<\_ACEOF
17118for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17119 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17120 case $ac_file in
17121 - | *:- | *:-:* ) # input from stdin
17122 cat >$tmp/stdin
17123 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17124 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17125 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17126 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17127 * ) ac_file_in=$ac_file.in ;;
17128 esac
17129
17130 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17131 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17132$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17133 X"$ac_file" : 'X\(//\)[^/]' \| \
17134 X"$ac_file" : 'X\(//\)$' \| \
17135 X"$ac_file" : 'X\(/\)' \| \
17136 . : '\(.\)' 2>/dev/null ||
17137echo X"$ac_file" |
17138 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17139 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17140 /^X\(\/\/\)$/{ s//\1/; q; }
17141 /^X\(\/\).*/{ s//\1/; q; }
17142 s/.*/./; q'`
17143 { case "$ac_dir" in
17144 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17145 *) as_incr_dir=.;;
17146esac
17147as_dummy="$ac_dir"
17148for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17149 case $as_mkdir_dir in
17150 # Skip DOS drivespec
17151 ?:) as_incr_dir=$as_mkdir_dir ;;
17152 *)
17153 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17154 test -d "$as_incr_dir" ||
17155 mkdir "$as_incr_dir" ||
17156 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17157echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17158 { (exit 1); exit 1; }; }
17159 ;;
17160 esac
17161done; }
17162
17163 ac_builddir=.
17164
17165if test "$ac_dir" != .; then
17166 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17167 # A "../" for each directory in $ac_dir_suffix.
17168 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17169else
17170 ac_dir_suffix= ac_top_builddir=
17171fi
17172
17173case $srcdir in
17174 .) # No --srcdir option. We are building in place.
17175 ac_srcdir=.
17176 if test -z "$ac_top_builddir"; then
17177 ac_top_srcdir=.
17178 else
17179 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17180 fi ;;
17181 [\\/]* | ?:[\\/]* ) # Absolute path.
17182 ac_srcdir=$srcdir$ac_dir_suffix;
17183 ac_top_srcdir=$srcdir ;;
17184 *) # Relative path.
17185 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17186 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17187esac
17188# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17189# absolute.
17190ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise4826582002-10-26 13:33:00 +000017191ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000017192ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17193ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17194
17195
17196 case $INSTALL in
17197 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17198 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17199 esac
17200
17201 if test x"$ac_file" != x-; then
17202 { echo "$as_me:$LINENO: creating $ac_file" >&5
17203echo "$as_me: creating $ac_file" >&6;}
17204 rm -f "$ac_file"
17205 fi
17206 # Let's still pretend it is `configure' which instantiates (i.e., don't
17207 # use $as_me), people would be surprised to read:
17208 # /* config.h. Generated by config.status. */
17209 if test x"$ac_file" = x-; then
17210 configure_input=
17211 else
17212 configure_input="$ac_file. "
17213 fi
17214 configure_input=$configure_input"Generated from `echo $ac_file_in |
17215 sed 's,.*/,,'` by configure."
17216
17217 # First look for the input files in the build tree, otherwise in the
17218 # src tree.
17219 ac_file_inputs=`IFS=:
17220 for f in $ac_file_in; do
17221 case $f in
17222 -) echo $tmp/stdin ;;
17223 [\\/$]*)
17224 # Absolute (can't be DOS-style, as IFS=:)
17225 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17226echo "$as_me: error: cannot find input file: $f" >&2;}
17227 { (exit 1); exit 1; }; }
17228 echo $f;;
17229 *) # Relative
17230 if test -f "$f"; then
17231 # Build tree
17232 echo $f
17233 elif test -f "$srcdir/$f"; then
17234 # Source tree
17235 echo $srcdir/$f
17236 else
17237 # /dev/null tree
17238 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17239echo "$as_me: error: cannot find input file: $f" >&2;}
17240 { (exit 1); exit 1; }; }
17241 fi;;
17242 esac
17243 done` || { (exit 1); exit 1; }
17244_ACEOF
17245cat >>$CONFIG_STATUS <<_ACEOF
17246 sed "$ac_vpsub
17247$extrasub
17248_ACEOF
17249cat >>$CONFIG_STATUS <<\_ACEOF
17250:t
17251/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17252s,@configure_input@,$configure_input,;t t
17253s,@srcdir@,$ac_srcdir,;t t
17254s,@abs_srcdir@,$ac_abs_srcdir,;t t
17255s,@top_srcdir@,$ac_top_srcdir,;t t
17256s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17257s,@builddir@,$ac_builddir,;t t
17258s,@abs_builddir@,$ac_abs_builddir,;t t
17259s,@top_builddir@,$ac_top_builddir,;t t
17260s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17261s,@INSTALL@,$ac_INSTALL,;t t
17262" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17263 rm -f $tmp/stdin
17264 if test x"$ac_file" != x-; then
17265 mv $tmp/out $ac_file
17266 else
17267 cat $tmp/out
17268 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017269 fi
17270
Martin v. Löwis11437992002-04-12 09:54:03 +000017271done
17272_ACEOF
17273cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017274
Martin v. Löwis11437992002-04-12 09:54:03 +000017275#
17276# CONFIG_HEADER section.
17277#
Guido van Rossum627b2d71993-12-24 10:39:16 +000017278
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017279# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17280# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017281#
17282# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000017283ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17284ac_dB='[ ].*$,\1#\2'
17285ac_dC=' '
17286ac_dD=',;t'
17287# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17288ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17289ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017290ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000017291ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017292
Martin v. Löwis11437992002-04-12 09:54:03 +000017293for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000017294 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000017295 case $ac_file in
17296 - | *:- | *:-:* ) # input from stdin
17297 cat >$tmp/stdin
17298 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17299 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17300 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17301 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17302 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017303 esac
17304
Martin v. Löwis11437992002-04-12 09:54:03 +000017305 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17306echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017307
Martin v. Löwis11437992002-04-12 09:54:03 +000017308 # First look for the input files in the build tree, otherwise in the
17309 # src tree.
17310 ac_file_inputs=`IFS=:
17311 for f in $ac_file_in; do
17312 case $f in
17313 -) echo $tmp/stdin ;;
17314 [\\/$]*)
17315 # Absolute (can't be DOS-style, as IFS=:)
17316 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17317echo "$as_me: error: cannot find input file: $f" >&2;}
17318 { (exit 1); exit 1; }; }
17319 echo $f;;
17320 *) # Relative
17321 if test -f "$f"; then
17322 # Build tree
17323 echo $f
17324 elif test -f "$srcdir/$f"; then
17325 # Source tree
17326 echo $srcdir/$f
17327 else
17328 # /dev/null tree
17329 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17330echo "$as_me: error: cannot find input file: $f" >&2;}
17331 { (exit 1); exit 1; }; }
17332 fi;;
17333 esac
17334 done` || { (exit 1); exit 1; }
17335 # Remove the trailing spaces.
17336 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017337
Martin v. Löwis11437992002-04-12 09:54:03 +000017338_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017339
Martin v. Löwis11437992002-04-12 09:54:03 +000017340# Transform confdefs.h into two sed scripts, `conftest.defines' and
17341# `conftest.undefs', that substitutes the proper values into
17342# config.h.in to produce config.h. The first handles `#define'
17343# templates, and the second `#undef' templates.
17344# And first: Protect against being on the right side of a sed subst in
17345# config.status. Protect against being in an unquoted here document
17346# in config.status.
17347rm -f conftest.defines conftest.undefs
17348# Using a here document instead of a string reduces the quoting nightmare.
17349# Putting comments in sed scripts is not portable.
17350#
17351# `end' is used to avoid that the second main sed command (meant for
17352# 0-ary CPP macros) applies to n-ary macro definitions.
17353# See the Autoconf documentation for `clear'.
17354cat >confdef2sed.sed <<\_ACEOF
17355s/[\\&,]/\\&/g
17356s,[\\$`],\\&,g
17357t clear
17358: clear
17359s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17360t end
17361s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17362: end
17363_ACEOF
17364# If some macros were called several times there might be several times
17365# the same #defines, which is useless. Nevertheless, we may not want to
17366# sort them, since we want the *last* AC-DEFINE to be honored.
17367uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17368sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17369rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017370
17371# This sed command replaces #undef with comments. This is necessary, for
17372# example, in the case of _POSIX_SOURCE, which is predefined and required
17373# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017374cat >>conftest.undefs <<\_ACEOF
17375s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17376_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017377
Martin v. Löwis11437992002-04-12 09:54:03 +000017378# Break up conftest.defines because some shells have a limit on the size
17379# of here documents, and old seds have small limits too (100 cmds).
17380echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17381echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17382echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17383echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017384rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000017385while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000017386do
Martin v. Löwis11437992002-04-12 09:54:03 +000017387 # Write a limited-size here document to $tmp/defines.sed.
17388 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17389 # Speed up: don't consider the non `#define' lines.
17390 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
17391 # Work around the forget-to-reset-the-flag bug.
17392 echo 't clr' >>$CONFIG_STATUS
17393 echo ': clr' >>$CONFIG_STATUS
17394 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017395 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017396 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17397 rm -f $tmp/in
17398 mv $tmp/out $tmp/in
17399' >>$CONFIG_STATUS
17400 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17401 rm -f conftest.defines
17402 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000017403done
Martin v. Löwis11437992002-04-12 09:54:03 +000017404rm -f conftest.defines
17405echo ' fi # egrep' >>$CONFIG_STATUS
17406echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017407
Martin v. Löwis11437992002-04-12 09:54:03 +000017408# Break up conftest.undefs because some shells have a limit on the size
17409# of here documents, and old seds have small limits too (100 cmds).
17410echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17411rm -f conftest.tail
17412while grep . conftest.undefs >/dev/null
17413do
17414 # Write a limited-size here document to $tmp/undefs.sed.
17415 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17416 # Speed up: don't consider the non `#undef'
17417 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17418 # Work around the forget-to-reset-the-flag bug.
17419 echo 't clr' >>$CONFIG_STATUS
17420 echo ': clr' >>$CONFIG_STATUS
17421 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17422 echo 'CEOF
17423 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17424 rm -f $tmp/in
17425 mv $tmp/out $tmp/in
17426' >>$CONFIG_STATUS
17427 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17428 rm -f conftest.undefs
17429 mv conftest.tail conftest.undefs
17430done
17431rm -f conftest.undefs
17432
17433cat >>$CONFIG_STATUS <<\_ACEOF
17434 # Let's still pretend it is `configure' which instantiates (i.e., don't
17435 # use $as_me), people would be surprised to read:
17436 # /* config.h. Generated by config.status. */
17437 if test x"$ac_file" = x-; then
17438 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000017439 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017440 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000017441 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017442 cat $tmp/in >>$tmp/config.h
17443 rm -f $tmp/in
17444 if test x"$ac_file" != x-; then
17445 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17446 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17447echo "$as_me: $ac_file is unchanged" >&6;}
17448 else
17449 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17450$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17451 X"$ac_file" : 'X\(//\)[^/]' \| \
17452 X"$ac_file" : 'X\(//\)$' \| \
17453 X"$ac_file" : 'X\(/\)' \| \
17454 . : '\(.\)' 2>/dev/null ||
17455echo X"$ac_file" |
17456 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17457 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17458 /^X\(\/\/\)$/{ s//\1/; q; }
17459 /^X\(\/\).*/{ s//\1/; q; }
17460 s/.*/./; q'`
17461 { case "$ac_dir" in
17462 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17463 *) as_incr_dir=.;;
17464esac
17465as_dummy="$ac_dir"
17466for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17467 case $as_mkdir_dir in
17468 # Skip DOS drivespec
17469 ?:) as_incr_dir=$as_mkdir_dir ;;
17470 *)
17471 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17472 test -d "$as_incr_dir" ||
17473 mkdir "$as_incr_dir" ||
17474 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17475echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17476 { (exit 1); exit 1; }; }
17477 ;;
17478 esac
17479done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017480
Martin v. Löwis11437992002-04-12 09:54:03 +000017481 rm -f $ac_file
17482 mv $tmp/config.h $ac_file
17483 fi
17484 else
17485 cat $tmp/config.h
17486 rm -f $tmp/config.h
17487 fi
17488done
17489_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017490
Martin v. Löwis11437992002-04-12 09:54:03 +000017491cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017492
Martin v. Löwis11437992002-04-12 09:54:03 +000017493{ (exit 0); exit 0; }
17494_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017495chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017496ac_clean_files=$ac_clean_files_save
17497
17498
17499# configure is writing to config.log, and then calls config.status.
17500# config.status does its own redirection, appending to config.log.
17501# Unfortunately, on DOS this fails, as config.log is still kept open
17502# by configure, so config.status won't be able to write to it; its
17503# output is simply discarded. So we exec the FD to /dev/null,
17504# effectively closing config.log, so it can be properly (re)opened and
17505# appended to by config.status. When coming back to configure, we
17506# need to make the FD available again.
17507if test "$no_create" != yes; then
17508 ac_cs_success=:
17509 exec 5>/dev/null
17510 $SHELL $CONFIG_STATUS || ac_cs_success=false
17511 exec 5>>config.log
17512 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17513 # would make configure fail if this is the last instruction.
17514 $ac_cs_success || { (exit 1); exit 1; }
17515fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017516
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017517
17518echo "creating Setup"
17519if test ! -f Modules/Setup
17520then
17521 cp $srcdir/Modules/Setup.dist Modules/Setup
17522fi
17523
17524echo "creating Setup.local"
17525if test ! -f Modules/Setup.local
17526then
17527 echo "# Edit this file for local setup changes" >Modules/Setup.local
17528fi
17529
17530echo "creating Makefile"
17531$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17532 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017533 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017534mv config.c Modules