blob: 87f3dc343898c52a49e29dbe8b6c89cbea0cc016 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002# From configure.in Revision: 1.360 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis88afe662002-10-26 13:47:44 +00004# Generated by GNU Autoconf 2.53 for python 2.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000010
Martin v. Löwis11437992002-04-12 09:54:03 +000011if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
18## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
30# NLS nuisances.
31# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
38(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
62
63
64# Name of the executable.
65as_me=`(basename "$0") 2>/dev/null ||
66$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
89 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
90 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000256PACKAGE_NAME='python'
257PACKAGE_TARNAME='python'
258PACKAGE_VERSION='2.3'
259PACKAGE_STRING='python 2.3'
260PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000764\`configure' configures python 2.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000820 case $ac_init_help in
821 short | recursive ) echo "Configuration of python 2.3:";;
822 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 cat <<\_ACEOF
824
825Optional Features:
826 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
827 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000828 --enable-framework[=INSTALLDIR]
829 Build (MacOSX|Darwin) framework
830 --enable-shared disable/enable building shared python library
831 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
832 --enable-ipv6 Enable ipv6 (with ipv4) support
833 --disable-ipv6 Disable ipv6 support
834 --enable-unicode[=ucs[24]]
835 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836
837Optional Packages:
838 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
839 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000840 --without-gcc never use gcc
841 --with-cxx=<compiler> enable C++ support
842 --with-suffix=.exe set executable suffix
843 --with-pydebug build with Py_DEBUG defined
844 --with-libs='lib1 ...' link against additional libs
845 --with-signal-module disable/enable signal module
846 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
847 --with(out)-threads[=DIRECTORY]
848 disable/enable thread support
849 --with(out)-thread[=DIRECTORY]
850 deprecated; use --with(out)-threads
851 --with-pth use GNU pth threading libraries
852 --with(out)-universal-newlines
853 disable/enable foreign newlines
854 --with(out)-doc-strings disable/enable documentation strings
855 --with(out)-pymalloc disable/enable specialized mallocs
856 --with-wctype-functions use wctype.h functions
857 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
858 --with-dl-dld=DL_DIR GNU dynamic linking
859 --with-fpectl enable SIGFPE catching
860 --with-libm=STRING math library
861 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000862
863Some influential environment variables:
864 CC C compiler command
865 CFLAGS C compiler flags
866 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
867 nonstandard directory <lib dir>
868 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
869 headers in a nonstandard directory <include dir>
870 CPP C preprocessor
871
872Use these variables to override the choices made by `configure' or to help
873it to find libraries and programs with nonstandard names/locations.
874
875_ACEOF
876fi
877
878if test "$ac_init_help" = "recursive"; then
879 # If there are subdirs, report their specific --help.
880 ac_popdir=`pwd`
881 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
882 test -d $ac_dir || continue
883 ac_builddir=.
884
885if test "$ac_dir" != .; then
886 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
887 # A "../" for each directory in $ac_dir_suffix.
888 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
889else
890 ac_dir_suffix= ac_top_builddir=
891fi
892
893case $srcdir in
894 .) # No --srcdir option. We are building in place.
895 ac_srcdir=.
896 if test -z "$ac_top_builddir"; then
897 ac_top_srcdir=.
898 else
899 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
900 fi ;;
901 [\\/]* | ?:[\\/]* ) # Absolute path.
902 ac_srcdir=$srcdir$ac_dir_suffix;
903 ac_top_srcdir=$srcdir ;;
904 *) # Relative path.
905 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
906 ac_top_srcdir=$ac_top_builddir$srcdir ;;
907esac
908# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
909# absolute.
910ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise4826582002-10-26 13:33:00 +0000911ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000912ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
913ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
914
915 cd $ac_dir
916 # Check for guested configure; otherwise get Cygnus style configure.
917 if test -f $ac_srcdir/configure.gnu; then
918 echo
919 $SHELL $ac_srcdir/configure.gnu --help=recursive
920 elif test -f $ac_srcdir/configure; then
921 echo
922 $SHELL $ac_srcdir/configure --help=recursive
923 elif test -f $ac_srcdir/configure.ac ||
924 test -f $ac_srcdir/configure.in; then
925 echo
926 $ac_configure --help
927 else
928 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
929 fi
930 cd $ac_popdir
931 done
932fi
933
934test -n "$ac_init_help" && exit 0
935if $ac_init_version; then
936 cat <<\_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000937python configure 2.3
938generated by GNU Autoconf 2.53
Martin v. Löwis11437992002-04-12 09:54:03 +0000939
940Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
941Free Software Foundation, Inc.
942This configure script is free software; the Free Software Foundation
943gives unlimited permission to copy, distribute and modify it.
944_ACEOF
945 exit 0
946fi
947exec 5>config.log
948cat >&5 <<_ACEOF
949This file contains any messages produced by compilers while
950running configure, to aid debugging if configure makes a mistake.
951
Martin v. Löwis88afe662002-10-26 13:47:44 +0000952It was created by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +0000953generated by GNU Autoconf 2.53. Invocation command line was
954
955 $ $0 $@
956
957_ACEOF
958{
959cat <<_ASUNAME
960## --------- ##
961## Platform. ##
962## --------- ##
963
964hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
965uname -m = `(uname -m) 2>/dev/null || echo unknown`
966uname -r = `(uname -r) 2>/dev/null || echo unknown`
967uname -s = `(uname -s) 2>/dev/null || echo unknown`
968uname -v = `(uname -v) 2>/dev/null || echo unknown`
969
970/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
971/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
972
973/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
974/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
975/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
976hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
977/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
978/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
979/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
980
981_ASUNAME
982
983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
984for as_dir in $PATH
985do
986 IFS=$as_save_IFS
987 test -z "$as_dir" && as_dir=.
988 echo "PATH: $as_dir"
989done
990
991} >&5
992
993cat >&5 <<_ACEOF
994
995
996## ----------- ##
997## Core tests. ##
998## ----------- ##
999
1000_ACEOF
1001
1002
1003# Keep a trace of the command line.
1004# Strip out --no-create and --no-recursion so they do not pile up.
1005# Also quote any args containing shell meta-characters.
1006ac_configure_args=
1007ac_sep=
1008for ac_arg
1009do
1010 case $ac_arg in
1011 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1012 | --no-cr | --no-c | -n ) continue ;;
1013 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1014 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1015 continue ;;
1016 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1017 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1018 esac
1019 case " $ac_configure_args " in
1020 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1021 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1022 ac_sep=" " ;;
1023 esac
1024 # Get rid of the leading space.
1025done
1026
1027# When interrupted or exit'd, cleanup temporary files, and complete
1028# config.log. We remove comments because anyway the quotes in there
1029# would cause problems or look ugly.
1030# WARNING: Be sure not to use single quotes in there, as some shells,
1031# such as our DU 5.0 friend, will then `close' the trap.
1032trap 'exit_status=$?
1033 # Save into config.log some information that might help in debugging.
1034 {
1035 echo
1036 cat <<\_ASBOX
1037## ---------------- ##
1038## Cache variables. ##
1039## ---------------- ##
1040_ASBOX
1041 echo
1042 # The following way of writing the cache mishandles newlines in values,
1043{
1044 (set) 2>&1 |
1045 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1046 *ac_space=\ *)
1047 sed -n \
1048 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1049 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1050 ;;
1051 *)
1052 sed -n \
1053 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1054 ;;
1055 esac;
1056}
1057 echo
1058 if test -s confdefs.h; then
1059 cat <<\_ASBOX
1060## ----------- ##
1061## confdefs.h. ##
1062## ----------- ##
1063_ASBOX
1064 echo
1065 sed "/^$/d" confdefs.h
1066 echo
1067 fi
1068 test "$ac_signal" != 0 &&
1069 echo "$as_me: caught signal $ac_signal"
1070 echo "$as_me: exit $exit_status"
1071 } >&5
1072 rm -f core core.* *.core &&
1073 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1074 exit $exit_status
1075 ' 0
1076for ac_signal in 1 2 13 15; do
1077 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1078done
1079ac_signal=0
1080
1081# confdefs.h avoids OS command line length limits that DEFS can exceed.
1082rm -rf conftest* confdefs.h
1083# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1084echo >confdefs.h
1085
1086# Predefined preprocessor variables.
1087
1088cat >>confdefs.h <<_ACEOF
1089#define PACKAGE_NAME "$PACKAGE_NAME"
1090_ACEOF
1091
1092
1093cat >>confdefs.h <<_ACEOF
1094#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1095_ACEOF
1096
1097
1098cat >>confdefs.h <<_ACEOF
1099#define PACKAGE_VERSION "$PACKAGE_VERSION"
1100_ACEOF
1101
1102
1103cat >>confdefs.h <<_ACEOF
1104#define PACKAGE_STRING "$PACKAGE_STRING"
1105_ACEOF
1106
1107
1108cat >>confdefs.h <<_ACEOF
1109#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1110_ACEOF
1111
1112
1113# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114# Prefer explicitly selected file to automatically selected ones.
1115if test -z "$CONFIG_SITE"; then
1116 if test "x$prefix" != xNONE; then
1117 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1118 else
1119 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1120 fi
1121fi
1122for ac_site_file in $CONFIG_SITE; do
1123 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1125echo "$as_me: loading site script $ac_site_file" >&6;}
1126 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 . "$ac_site_file"
1128 fi
1129done
1130
1131if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 # Some versions of bash will fail to source /dev/null (special
1133 # files actually), so we avoid doing that.
1134 if test -f "$cache_file"; then
1135 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1136echo "$as_me: loading cache $cache_file" >&6;}
1137 case $cache_file in
1138 [\\/]* | ?:[\\/]* ) . $cache_file;;
1139 *) . ./$cache_file;;
1140 esac
1141 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142else
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1144echo "$as_me: creating cache $cache_file" >&6;}
1145 >$cache_file
1146fi
1147
1148# Check that the precious variables saved in the cache have kept the same
1149# value.
1150ac_cache_corrupted=false
1151for ac_var in `(set) 2>&1 |
1152 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1153 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1154 eval ac_new_set=\$ac_env_${ac_var}_set
1155 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1156 eval ac_new_val="\$ac_env_${ac_var}_value"
1157 case $ac_old_set,$ac_new_set in
1158 set,)
1159 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1160echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1161 ac_cache_corrupted=: ;;
1162 ,set)
1163 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1164echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1165 ac_cache_corrupted=: ;;
1166 ,);;
1167 *)
1168 if test "x$ac_old_val" != "x$ac_new_val"; then
1169 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1170echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1171 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1172echo "$as_me: former value: $ac_old_val" >&2;}
1173 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1174echo "$as_me: current value: $ac_new_val" >&2;}
1175 ac_cache_corrupted=:
1176 fi;;
1177 esac
1178 # Pass precious variables to config.status.
1179 if test "$ac_new_set" = set; then
1180 case $ac_new_val in
1181 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1182 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1183 *) ac_arg=$ac_var=$ac_new_val ;;
1184 esac
1185 case " $ac_configure_args " in
1186 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1187 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1188 esac
1189 fi
1190done
1191if $ac_cache_corrupted; then
1192 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1193echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1194 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1195echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1196 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197fi
1198
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1203ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204
Guido van Rossum627b2d71993-12-24 10:39:16 +00001205
Michael W. Hudson54241132001-12-07 15:38:26 +00001206
1207
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
Martin v. Löwis88afe662002-10-26 13:47:44 +00001222
1223
1224
1225
1226
1227
1228
1229
1230
Martin v. Löwis11437992002-04-12 09:54:03 +00001231ac_config_headers="$ac_config_headers pyconfig.h"
1232
1233
1234# This is for stuff that absolutely must end up in pyconfig.h.
1235# Please use pyport.h instead, if possible.
1236
1237
1238
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001239
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001240VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001241
Martin v. Löwis1142de32002-03-29 16:28:31 +00001242
1243SOVERSION=1.0
1244
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001245# The later defininition of _XOPEN_SOURCE disables certain features
1246# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1247
1248cat >>confdefs.h <<\_ACEOF
1249#define _GNU_SOURCE 1
1250_ACEOF
1251
1252
1253# The definition of _GNU_SOURCE potentially causes a change of the value
1254# of _XOPEN_SOURCE. So define it only conditionally.
1255
1256
1257cat >>confdefs.h <<\_ACEOF
1258#define _XOPEN_SOURCE 500
1259_ACEOF
1260
1261
Martin v. Löwise4826582002-10-26 13:33:00 +00001262# On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition
1263# of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else several APIs
1264# are not declared. Since this is also needed in some cases for HP-UX,
1265# we define it globally.
1266
1267cat >>confdefs.h <<\_ACEOF
1268#define _XOPEN_SOURCE_EXTENDED 1
1269_ACEOF
1270
1271
1272cat >>confdefs.h <<\_ACEOF
1273#define _POSIX_C_SOURCE 199506L
1274_ACEOF
1275
1276
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001277# Arguments passed to configure.
1278
1279CONFIG_ARGS="$ac_configure_args"
1280
Jack Jansene578a632001-08-15 01:27:14 +00001281# Check whether --enable-framework or --disable-framework was given.
1282if test "${enable_framework+set}" = set; then
1283 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001284
Jack Jansene578a632001-08-15 01:27:14 +00001285 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001286 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001287 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001288 esac
1289 case $enableval in
1290 no)
1291 PYTHONFRAMEWORK=
1292 PYTHONFRAMEWORKDIR=no-framework
1293 PYTHONFRAMEWORKPREFIX=
1294 PYTHONFRAMEWORKINSTALLDIR=
1295 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001296 ;;
1297 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001298 PYTHONFRAMEWORK=Python
1299 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001300 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001301 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1302 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001303 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001304
Guido van Rossum563e7081996-09-10 18:20:48 +00001305else
Martin v. Löwis11437992002-04-12 09:54:03 +00001306
Jack Jansene578a632001-08-15 01:27:14 +00001307 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001308 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001309 PYTHONFRAMEWORKPREFIX=
1310 PYTHONFRAMEWORKINSTALLDIR=
1311 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001314
1315
1316
1317
Jack Jansene578a632001-08-15 01:27:14 +00001318
1319##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001320## AC_HELP_STRING(--with-dyld,
1321## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001322##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001323# Set name for machine-dependent library files
1324
Martin v. Löwis11437992002-04-12 09:54:03 +00001325echo "$as_me:$LINENO: checking MACHDEP" >&5
1326echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001327if test -z "$MACHDEP"
1328then
Guido van Rossum563e7081996-09-10 18:20:48 +00001329 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001330 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1331 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001332 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001333 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001334 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001335 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001336 ac_md_system=`echo $ac_sys_system |
1337 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1338 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001339 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001340 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001341
Guido van Rossum07397971997-04-29 21:49:50 +00001342 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001343 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001344 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001345 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001346 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001347 esac
1348fi
Guido van Rossum91922671997-10-09 20:24:13 +00001349
1350#
1351# SGI compilers allow the specification of the both the ABI and the
1352# ISA on the command line. Depending on the values of these switches,
1353# different and often incompatable code will be generated.
1354#
1355# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1356# thus supply support for various ABI/ISA combinations. The MACHDEP
1357# variable is also adjusted.
1358#
1359
1360if test ! -z "$SGI_ABI"
1361then
1362 CC="cc $SGI_ABI"
1363 LDFLAGS="$SGI_ABI $LDFLAGS"
1364 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001366echo "$as_me:$LINENO: result: $MACHDEP" >&5
1367echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001368
Guido van Rossum627b2d71993-12-24 10:39:16 +00001369# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001370echo "$as_me:$LINENO: checking for --without-gcc" >&5
1371echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1372
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001373# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001374if test "${with_gcc+set}" = set; then
1375 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001376
Guido van Rossum7f43da71994-08-01 12:15:30 +00001377 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001378 no) CC=cc
1379 without_gcc=yes;;
1380 yes) CC=gcc
1381 without_gcc=no;;
1382 *) CC=$withval
1383 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001384 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001385else
Martin v. Löwis11437992002-04-12 09:54:03 +00001386
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001387 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001388 AIX*) CC=cc_r
1389 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001390 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001391 case $BE_HOST_CPU in
1392 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001393 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001394 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001395 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001396 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001397 ;;
1398 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001399 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001400 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001401 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001402 ;;
1403 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1405echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1406 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001407 ;;
1408 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001409 AR="\$(srcdir)/Modules/ar_beos"
1410 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001411 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001412 Monterey*)
1413 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001414 without_gcc=;;
1415 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001416 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001417fi;
1418echo "$as_me:$LINENO: result: $without_gcc" >&5
1419echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001420
1421
Guido van Rossum95012191999-12-16 17:50:52 +00001422
Fred Drakea1a84e72001-03-06 05:52:16 +00001423MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001424echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1425echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1426
Guido van Rossum95012191999-12-16 17:50:52 +00001427# Check whether --with-cxx or --without-cxx was given.
1428if test "${with_cxx+set}" = set; then
1429 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001430
Martin v. Löwis22352952000-12-13 17:37:02 +00001431 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001432 case $withval in
1433 no) CXX=
1434 with_cxx=no;;
1435 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001436 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001437 with_cxx=$withval;;
1438 esac
1439else
Martin v. Löwis11437992002-04-12 09:54:03 +00001440
Guido van Rossum95012191999-12-16 17:50:52 +00001441 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001442 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001443
Martin v. Löwis11437992002-04-12 09:54:03 +00001444fi;
1445echo "$as_me:$LINENO: result: $with_cxx" >&5
1446echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001447
1448if test "$with_cxx" = "yes"
1449then
Martin v. Löwis11437992002-04-12 09:54:03 +00001450 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1451echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1452 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001453fi
1454
1455
1456
1457
Martin v. Löwis11437992002-04-12 09:54:03 +00001458if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001459then
1460 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1461do
Martin v. Löwis11437992002-04-12 09:54:03 +00001462 # 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 +00001463set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001464echo "$as_me:$LINENO: checking for $ac_word" >&5
1465echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1466if test "${ac_cv_prog_CXX+set}" = set; then
1467 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001468else
1469 if test -n "$CXX"; then
1470 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1471else
Martin v. Löwis11437992002-04-12 09:54:03 +00001472as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1473for as_dir in $PATH
1474do
1475 IFS=$as_save_IFS
1476 test -z "$as_dir" && as_dir=.
1477 for ac_exec_ext in '' $ac_executable_extensions; do
1478 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1479 ac_cv_prog_CXX="$ac_prog"
1480 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1481 break 2
1482 fi
1483done
1484done
1485
Martin v. Löwis22352952000-12-13 17:37:02 +00001486fi
1487fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001488CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001489if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 echo "$as_me:$LINENO: result: $CXX" >&5
1491echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001492else
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 echo "$as_me:$LINENO: result: no" >&5
1494echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001495fi
1496
Martin v. Löwis11437992002-04-12 09:54:03 +00001497 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001498done
1499test -n "$CXX" || CXX="notfound"
1500
1501 if test "$CXX" = "notfound"
1502 then
1503 CXX=
1504 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001505 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001506ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1510 cat >conftest.$ac_ext <<_ACEOF
1511#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001512#include "confdefs.h"
1513
Martin v. Löwis11437992002-04-12 09:54:03 +00001514#ifdef F77_DUMMY_MAIN
1515# ifdef __cplusplus
1516 extern "C"
1517# endif
1518 int F77_DUMMY_MAIN() { return 1; }
1519#endif
1520int
1521main ()
1522{
Michael W. Hudson54241132001-12-07 15:38:26 +00001523
Martin v. Löwis11437992002-04-12 09:54:03 +00001524 ;
1525 return 0;
1526}
1527_ACEOF
1528ac_clean_files_save=$ac_clean_files
1529ac_clean_files="$ac_clean_files a.out a.exe"
1530# Try to create an executable without -o first, disregard a.out.
1531# It will help us diagnose broken compilers, and finding out an intuition
1532# of exeext.
1533echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1534echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1535ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1536if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1537 (eval $ac_link_default) 2>&5
1538 ac_status=$?
1539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1540 (exit $ac_status); }; then
1541 # Find the output, starting from the most likely. This scheme is
1542# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1543# resort.
1544
1545# Be careful to initialize this variable, since it used to be cached.
1546# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1547ac_cv_exeext=
1548for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1549 ls a.out conftest 2>/dev/null;
1550 ls a.* conftest.* 2>/dev/null`; do
1551 case $ac_file in
1552 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1553 a.out ) # We found the default executable, but exeext='' is most
1554 # certainly right.
1555 break;;
1556 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1557 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1558 export ac_cv_exeext
1559 break;;
1560 * ) break;;
1561 esac
1562done
1563else
1564 echo "$as_me: failed program was:" >&5
1565cat conftest.$ac_ext >&5
1566{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1567echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1568 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001569fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001570
1571ac_exeext=$ac_cv_exeext
1572echo "$as_me:$LINENO: result: $ac_file" >&5
1573echo "${ECHO_T}$ac_file" >&6
1574
1575# Check the compiler produces executables we can run. If not, either
1576# the compiler is broken, or we cross compile.
1577echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1578echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1579# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1580# If not cross compiling, check that we can run a simple program.
1581if test "$cross_compiling" != yes; then
1582 if { ac_try='./$ac_file'
1583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1584 (eval $ac_try) 2>&5
1585 ac_status=$?
1586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1587 (exit $ac_status); }; }; then
1588 cross_compiling=no
1589 else
1590 if test "$cross_compiling" = maybe; then
1591 cross_compiling=yes
1592 else
1593 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1594If you meant to cross compile, use \`--host'." >&5
1595echo "$as_me: error: cannot run C++ compiled programs.
1596If you meant to cross compile, use \`--host'." >&2;}
1597 { (exit 1); exit 1; }; }
1598 fi
1599 fi
1600fi
1601echo "$as_me:$LINENO: result: yes" >&5
1602echo "${ECHO_T}yes" >&6
1603
1604rm -f a.out a.exe conftest$ac_cv_exeext
1605ac_clean_files=$ac_clean_files_save
1606# Check the compiler produces executables we can run. If not, either
1607# the compiler is broken, or we cross compile.
1608echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1609echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1610echo "$as_me:$LINENO: result: $cross_compiling" >&5
1611echo "${ECHO_T}$cross_compiling" >&6
1612
1613echo "$as_me:$LINENO: checking for suffix of executables" >&5
1614echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1615if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1616 (eval $ac_link) 2>&5
1617 ac_status=$?
1618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1619 (exit $ac_status); }; then
1620 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1621# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1622# work properly (i.e., refer to `conftest.exe'), while it won't with
1623# `rm'.
1624for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1625 case $ac_file in
1626 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1627 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1628 export ac_cv_exeext
1629 break;;
1630 * ) break;;
1631 esac
1632done
1633else
1634 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1635echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1636 { (exit 1); exit 1; }; }
1637fi
1638
1639rm -f conftest$ac_cv_exeext
1640echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1641echo "${ECHO_T}$ac_cv_exeext" >&6
1642
1643rm -f conftest.$ac_ext
1644EXEEXT=$ac_cv_exeext
1645ac_exeext=$EXEEXT
1646
1647 ac_ext=c
1648ac_cpp='$CPP $CPPFLAGS'
1649ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1650ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1651ac_compiler_gnu=$ac_cv_c_compiler_gnu
1652
1653
Martin v. Löwis22352952000-12-13 17:37:02 +00001654
1655 fi
1656fi
1657
Guido van Rossum8b131c51995-03-09 14:10:13 +00001658# If the user switches compilers, we can't believe the cache
1659if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1660then
Martin v. Löwis11437992002-04-12 09:54:03 +00001661 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1662(it is also a good idea to do 'make clean' before compiling)" >&5
1663echo "$as_me: error: cached CC is different -- throw away $cache_file
1664(it is also a good idea to do 'make clean' before compiling)" >&2;}
1665 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001666fi
1667
Martin v. Löwis11437992002-04-12 09:54:03 +00001668ac_ext=c
1669ac_cpp='$CPP $CPPFLAGS'
1670ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1671ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1672ac_compiler_gnu=$ac_cv_c_compiler_gnu
1673if test -n "$ac_tool_prefix"; then
1674 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1675set dummy ${ac_tool_prefix}gcc; ac_word=$2
1676echo "$as_me:$LINENO: checking for $ac_word" >&5
1677echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1678if test "${ac_cv_prog_CC+set}" = set; then
1679 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001680else
1681 if test -n "$CC"; then
1682 ac_cv_prog_CC="$CC" # Let the user override the test.
1683else
Martin v. Löwis11437992002-04-12 09:54:03 +00001684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1685for as_dir in $PATH
1686do
1687 IFS=$as_save_IFS
1688 test -z "$as_dir" && as_dir=.
1689 for ac_exec_ext in '' $ac_executable_extensions; do
1690 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1691 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1692 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1693 break 2
1694 fi
1695done
1696done
1697
Jack Jansendd19cf82001-12-06 22:36:17 +00001698fi
1699fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001700CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001701if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001702 echo "$as_me:$LINENO: result: $CC" >&5
1703echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001704else
Martin v. Löwis11437992002-04-12 09:54:03 +00001705 echo "$as_me:$LINENO: result: no" >&5
1706echo "${ECHO_T}no" >&6
1707fi
1708
1709fi
1710if test -z "$ac_cv_prog_CC"; then
1711 ac_ct_CC=$CC
1712 # Extract the first word of "gcc", so it can be a program name with args.
1713set dummy gcc; ac_word=$2
1714echo "$as_me:$LINENO: checking for $ac_word" >&5
1715echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1716if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1717 echo $ECHO_N "(cached) $ECHO_C" >&6
1718else
1719 if test -n "$ac_ct_CC"; then
1720 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1721else
1722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1723for as_dir in $PATH
1724do
1725 IFS=$as_save_IFS
1726 test -z "$as_dir" && as_dir=.
1727 for ac_exec_ext in '' $ac_executable_extensions; do
1728 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1729 ac_cv_prog_ac_ct_CC="gcc"
1730 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1731 break 2
1732 fi
1733done
1734done
1735
1736fi
1737fi
1738ac_ct_CC=$ac_cv_prog_ac_ct_CC
1739if test -n "$ac_ct_CC"; then
1740 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1741echo "${ECHO_T}$ac_ct_CC" >&6
1742else
1743 echo "$as_me:$LINENO: result: no" >&5
1744echo "${ECHO_T}no" >&6
1745fi
1746
1747 CC=$ac_ct_CC
1748else
1749 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001750fi
1751
Jack Jansendd19cf82001-12-06 22:36:17 +00001752if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001753 if test -n "$ac_tool_prefix"; then
1754 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1755set dummy ${ac_tool_prefix}cc; ac_word=$2
1756echo "$as_me:$LINENO: checking for $ac_word" >&5
1757echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1758if test "${ac_cv_prog_CC+set}" = set; then
1759 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001760else
1761 if test -n "$CC"; then
1762 ac_cv_prog_CC="$CC" # Let the user override the test.
1763else
Martin v. Löwis11437992002-04-12 09:54:03 +00001764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1765for as_dir in $PATH
1766do
1767 IFS=$as_save_IFS
1768 test -z "$as_dir" && as_dir=.
1769 for ac_exec_ext in '' $ac_executable_extensions; do
1770 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1771 ac_cv_prog_CC="${ac_tool_prefix}cc"
1772 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1773 break 2
1774 fi
1775done
1776done
1777
1778fi
1779fi
1780CC=$ac_cv_prog_CC
1781if test -n "$CC"; then
1782 echo "$as_me:$LINENO: result: $CC" >&5
1783echo "${ECHO_T}$CC" >&6
1784else
1785 echo "$as_me:$LINENO: result: no" >&5
1786echo "${ECHO_T}no" >&6
1787fi
1788
1789fi
1790if test -z "$ac_cv_prog_CC"; then
1791 ac_ct_CC=$CC
1792 # Extract the first word of "cc", so it can be a program name with args.
1793set dummy cc; ac_word=$2
1794echo "$as_me:$LINENO: checking for $ac_word" >&5
1795echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1796if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1797 echo $ECHO_N "(cached) $ECHO_C" >&6
1798else
1799 if test -n "$ac_ct_CC"; then
1800 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1801else
1802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1803for as_dir in $PATH
1804do
1805 IFS=$as_save_IFS
1806 test -z "$as_dir" && as_dir=.
1807 for ac_exec_ext in '' $ac_executable_extensions; do
1808 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1809 ac_cv_prog_ac_ct_CC="cc"
1810 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1811 break 2
1812 fi
1813done
1814done
1815
1816fi
1817fi
1818ac_ct_CC=$ac_cv_prog_ac_ct_CC
1819if test -n "$ac_ct_CC"; then
1820 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1821echo "${ECHO_T}$ac_ct_CC" >&6
1822else
1823 echo "$as_me:$LINENO: result: no" >&5
1824echo "${ECHO_T}no" >&6
1825fi
1826
1827 CC=$ac_ct_CC
1828else
1829 CC="$ac_cv_prog_CC"
1830fi
1831
1832fi
1833if test -z "$CC"; then
1834 # Extract the first word of "cc", so it can be a program name with args.
1835set dummy cc; ac_word=$2
1836echo "$as_me:$LINENO: checking for $ac_word" >&5
1837echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1838if test "${ac_cv_prog_CC+set}" = set; then
1839 echo $ECHO_N "(cached) $ECHO_C" >&6
1840else
1841 if test -n "$CC"; then
1842 ac_cv_prog_CC="$CC" # Let the user override the test.
1843else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001844 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001845as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1846for as_dir in $PATH
1847do
1848 IFS=$as_save_IFS
1849 test -z "$as_dir" && as_dir=.
1850 for ac_exec_ext in '' $ac_executable_extensions; do
1851 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1852 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1853 ac_prog_rejected=yes
1854 continue
1855 fi
1856 ac_cv_prog_CC="cc"
1857 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1858 break 2
1859 fi
1860done
1861done
1862
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001863if test $ac_prog_rejected = yes; then
1864 # We found a bogon in the path, so make sure we never use it.
1865 set dummy $ac_cv_prog_CC
1866 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001867 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001868 # We chose a different compiler from the bogus one.
1869 # However, it has the same basename, so the bogon will be chosen
1870 # first if we set CC to just the basename; use the full file name.
1871 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001872 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001873 shift
1874 ac_cv_prog_CC="$@"
1875 fi
1876fi
1877fi
1878fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001879CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001880if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001881 echo "$as_me:$LINENO: result: $CC" >&5
1882echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001883else
Martin v. Löwis11437992002-04-12 09:54:03 +00001884 echo "$as_me:$LINENO: result: no" >&5
1885echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001886fi
1887
Martin v. Löwis11437992002-04-12 09:54:03 +00001888fi
1889if test -z "$CC"; then
1890 if test -n "$ac_tool_prefix"; then
1891 for ac_prog in cl
1892 do
1893 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1894set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1895echo "$as_me:$LINENO: checking for $ac_word" >&5
1896echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1897if test "${ac_cv_prog_CC+set}" = set; then
1898 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001899else
1900 if test -n "$CC"; then
1901 ac_cv_prog_CC="$CC" # Let the user override the test.
1902else
Martin v. Löwis11437992002-04-12 09:54:03 +00001903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1904for as_dir in $PATH
1905do
1906 IFS=$as_save_IFS
1907 test -z "$as_dir" && as_dir=.
1908 for ac_exec_ext in '' $ac_executable_extensions; do
1909 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1910 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1911 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1912 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001913 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001914done
1915done
1916
1917fi
1918fi
1919CC=$ac_cv_prog_CC
1920if test -n "$CC"; then
1921 echo "$as_me:$LINENO: result: $CC" >&5
1922echo "${ECHO_T}$CC" >&6
1923else
1924 echo "$as_me:$LINENO: result: no" >&5
1925echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001926fi
1927
Martin v. Löwis11437992002-04-12 09:54:03 +00001928 test -n "$CC" && break
1929 done
1930fi
1931if test -z "$CC"; then
1932 ac_ct_CC=$CC
1933 for ac_prog in cl
1934do
1935 # Extract the first word of "$ac_prog", so it can be a program name with args.
1936set dummy $ac_prog; ac_word=$2
1937echo "$as_me:$LINENO: checking for $ac_word" >&5
1938echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1939if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1940 echo $ECHO_N "(cached) $ECHO_C" >&6
1941else
1942 if test -n "$ac_ct_CC"; then
1943 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1944else
1945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1946for as_dir in $PATH
1947do
1948 IFS=$as_save_IFS
1949 test -z "$as_dir" && as_dir=.
1950 for ac_exec_ext in '' $ac_executable_extensions; do
1951 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1952 ac_cv_prog_ac_ct_CC="$ac_prog"
1953 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1954 break 2
1955 fi
1956done
1957done
Jack Jansendd19cf82001-12-06 22:36:17 +00001958
Martin v. Löwis11437992002-04-12 09:54:03 +00001959fi
1960fi
1961ac_ct_CC=$ac_cv_prog_ac_ct_CC
1962if test -n "$ac_ct_CC"; then
1963 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1964echo "${ECHO_T}$ac_ct_CC" >&6
1965else
1966 echo "$as_me:$LINENO: result: no" >&5
1967echo "${ECHO_T}no" >&6
1968fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001969
Martin v. Löwis11437992002-04-12 09:54:03 +00001970 test -n "$ac_ct_CC" && break
1971done
Michael W. Hudson54241132001-12-07 15:38:26 +00001972
Martin v. Löwis11437992002-04-12 09:54:03 +00001973 CC=$ac_ct_CC
1974fi
1975
1976fi
1977
1978
1979test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1980echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1981 { (exit 1); exit 1; }; }
1982
1983# Provide some information about the compiler.
1984echo "$as_me:$LINENO:" \
1985 "checking for C compiler version" >&5
1986ac_compiler=`set X $ac_compile; echo $2`
1987{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1988 (eval $ac_compiler --version </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{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1998 (eval $ac_compiler -V </dev/null >&5) 2>&5
1999 ac_status=$?
2000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2001 (exit $ac_status); }
2002
2003cat >conftest.$ac_ext <<_ACEOF
2004#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002005#include "confdefs.h"
2006
Martin v. Löwis11437992002-04-12 09:54:03 +00002007#ifdef F77_DUMMY_MAIN
2008# ifdef __cplusplus
2009 extern "C"
2010# endif
2011 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002012#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002013int
2014main ()
2015{
2016
2017 ;
2018 return 0;
2019}
2020_ACEOF
2021ac_clean_files_save=$ac_clean_files
2022ac_clean_files="$ac_clean_files a.out a.exe"
2023# Try to create an executable without -o first, disregard a.out.
2024# It will help us diagnose broken compilers, and finding out an intuition
2025# of exeext.
2026echo "$as_me:$LINENO: checking for C compiler default output" >&5
2027echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2028ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2029if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2030 (eval $ac_link_default) 2>&5
2031 ac_status=$?
2032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2033 (exit $ac_status); }; then
2034 # Find the output, starting from the most likely. This scheme is
2035# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2036# resort.
2037
2038# Be careful to initialize this variable, since it used to be cached.
2039# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2040ac_cv_exeext=
2041for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2042 ls a.out conftest 2>/dev/null;
2043 ls a.* conftest.* 2>/dev/null`; do
2044 case $ac_file in
2045 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2046 a.out ) # We found the default executable, but exeext='' is most
2047 # certainly right.
2048 break;;
2049 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2050 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2051 export ac_cv_exeext
2052 break;;
2053 * ) break;;
2054 esac
2055done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002056else
Martin v. Löwis11437992002-04-12 09:54:03 +00002057 echo "$as_me: failed program was:" >&5
2058cat conftest.$ac_ext >&5
2059{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2060echo "$as_me: error: C compiler cannot create executables" >&2;}
2061 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002062fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002063
Martin v. Löwis11437992002-04-12 09:54:03 +00002064ac_exeext=$ac_cv_exeext
2065echo "$as_me:$LINENO: result: $ac_file" >&5
2066echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002067
Martin v. Löwis11437992002-04-12 09:54:03 +00002068# Check the compiler produces executables we can run. If not, either
2069# the compiler is broken, or we cross compile.
2070echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2071echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2072# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2073# If not cross compiling, check that we can run a simple program.
2074if test "$cross_compiling" != yes; then
2075 if { ac_try='./$ac_file'
2076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2077 (eval $ac_try) 2>&5
2078 ac_status=$?
2079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2080 (exit $ac_status); }; }; then
2081 cross_compiling=no
2082 else
2083 if test "$cross_compiling" = maybe; then
2084 cross_compiling=yes
2085 else
2086 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2087If you meant to cross compile, use \`--host'." >&5
2088echo "$as_me: error: cannot run C compiled programs.
2089If you meant to cross compile, use \`--host'." >&2;}
2090 { (exit 1); exit 1; }; }
2091 fi
2092 fi
2093fi
2094echo "$as_me:$LINENO: result: yes" >&5
2095echo "${ECHO_T}yes" >&6
2096
2097rm -f a.out a.exe conftest$ac_cv_exeext
2098ac_clean_files=$ac_clean_files_save
2099# Check the compiler produces executables we can run. If not, either
2100# the compiler is broken, or we cross compile.
2101echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2102echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2103echo "$as_me:$LINENO: result: $cross_compiling" >&5
2104echo "${ECHO_T}$cross_compiling" >&6
2105
2106echo "$as_me:$LINENO: checking for suffix of executables" >&5
2107echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2108if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2109 (eval $ac_link) 2>&5
2110 ac_status=$?
2111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2112 (exit $ac_status); }; then
2113 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2114# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2115# work properly (i.e., refer to `conftest.exe'), while it won't with
2116# `rm'.
2117for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2118 case $ac_file in
2119 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2120 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2121 export ac_cv_exeext
2122 break;;
2123 * ) break;;
2124 esac
2125done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002126else
Martin v. Löwis11437992002-04-12 09:54:03 +00002127 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2128echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2129 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002130fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002131
Martin v. Löwis11437992002-04-12 09:54:03 +00002132rm -f conftest$ac_cv_exeext
2133echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2134echo "${ECHO_T}$ac_cv_exeext" >&6
2135
2136rm -f conftest.$ac_ext
2137EXEEXT=$ac_cv_exeext
2138ac_exeext=$EXEEXT
2139echo "$as_me:$LINENO: checking for suffix of object files" >&5
2140echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2141if test "${ac_cv_objext+set}" = set; then
2142 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002143else
Martin v. Löwis11437992002-04-12 09:54:03 +00002144 cat >conftest.$ac_ext <<_ACEOF
2145#line $LINENO "configure"
2146#include "confdefs.h"
2147
2148#ifdef F77_DUMMY_MAIN
2149# ifdef __cplusplus
2150 extern "C"
2151# endif
2152 int F77_DUMMY_MAIN() { return 1; }
2153#endif
2154int
2155main ()
2156{
2157
2158 ;
2159 return 0;
2160}
2161_ACEOF
2162rm -f conftest.o conftest.obj
2163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2164 (eval $ac_compile) 2>&5
2165 ac_status=$?
2166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2167 (exit $ac_status); }; then
2168 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2169 case $ac_file in
2170 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2171 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2172 break;;
2173 esac
2174done
2175else
2176 echo "$as_me: failed program was:" >&5
2177cat conftest.$ac_ext >&5
2178{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2179echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2180 { (exit 1); exit 1; }; }
2181fi
2182
2183rm -f conftest.$ac_cv_objext conftest.$ac_ext
2184fi
2185echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2186echo "${ECHO_T}$ac_cv_objext" >&6
2187OBJEXT=$ac_cv_objext
2188ac_objext=$OBJEXT
2189echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2190echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2191if test "${ac_cv_c_compiler_gnu+set}" = set; then
2192 echo $ECHO_N "(cached) $ECHO_C" >&6
2193else
2194 cat >conftest.$ac_ext <<_ACEOF
2195#line $LINENO "configure"
2196#include "confdefs.h"
2197
2198#ifdef F77_DUMMY_MAIN
2199# ifdef __cplusplus
2200 extern "C"
2201# endif
2202 int F77_DUMMY_MAIN() { return 1; }
2203#endif
2204int
2205main ()
2206{
2207#ifndef __GNUC__
2208 choke me
2209#endif
2210
2211 ;
2212 return 0;
2213}
2214_ACEOF
2215rm -f conftest.$ac_objext
2216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2217 (eval $ac_compile) 2>&5
2218 ac_status=$?
2219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2220 (exit $ac_status); } &&
2221 { ac_try='test -s conftest.$ac_objext'
2222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2223 (eval $ac_try) 2>&5
2224 ac_status=$?
2225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2226 (exit $ac_status); }; }; then
2227 ac_compiler_gnu=yes
2228else
2229 echo "$as_me: failed program was:" >&5
2230cat conftest.$ac_ext >&5
2231ac_compiler_gnu=no
2232fi
2233rm -f conftest.$ac_objext conftest.$ac_ext
2234ac_cv_c_compiler_gnu=$ac_compiler_gnu
2235
2236fi
2237echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2238echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2239GCC=`test $ac_compiler_gnu = yes && echo yes`
2240ac_test_CFLAGS=${CFLAGS+set}
2241ac_save_CFLAGS=$CFLAGS
2242CFLAGS="-g"
2243echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2244echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2245if test "${ac_cv_prog_cc_g+set}" = set; then
2246 echo $ECHO_N "(cached) $ECHO_C" >&6
2247else
2248 cat >conftest.$ac_ext <<_ACEOF
2249#line $LINENO "configure"
2250#include "confdefs.h"
2251
2252#ifdef F77_DUMMY_MAIN
2253# ifdef __cplusplus
2254 extern "C"
2255# endif
2256 int F77_DUMMY_MAIN() { return 1; }
2257#endif
2258int
2259main ()
2260{
2261
2262 ;
2263 return 0;
2264}
2265_ACEOF
2266rm -f conftest.$ac_objext
2267if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2268 (eval $ac_compile) 2>&5
2269 ac_status=$?
2270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2271 (exit $ac_status); } &&
2272 { ac_try='test -s conftest.$ac_objext'
2273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2274 (eval $ac_try) 2>&5
2275 ac_status=$?
2276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2277 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002278 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002279else
Martin v. Löwis11437992002-04-12 09:54:03 +00002280 echo "$as_me: failed program was:" >&5
2281cat conftest.$ac_ext >&5
2282ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002283fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002284rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002285fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002286echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2287echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002288if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002289 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002290elif test $ac_cv_prog_cc_g = yes; then
2291 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002292 CFLAGS="-g -O2"
2293 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002294 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002295 fi
2296else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002297 if test "$GCC" = yes; then
2298 CFLAGS="-O2"
2299 else
2300 CFLAGS=
2301 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002302fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002303# Some people use a C++ compiler to compile C. Since we use `exit',
2304# in C++ we need to declare it. In case someone uses the same compiler
2305# for both compiling C and C++ we need to have the C++ compiler decide
2306# the declaration of exit, since it's the most demanding environment.
2307cat >conftest.$ac_ext <<_ACEOF
2308#ifndef __cplusplus
2309 choke me
2310#endif
2311_ACEOF
2312rm -f conftest.$ac_objext
2313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2314 (eval $ac_compile) 2>&5
2315 ac_status=$?
2316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2317 (exit $ac_status); } &&
2318 { ac_try='test -s conftest.$ac_objext'
2319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2320 (eval $ac_try) 2>&5
2321 ac_status=$?
2322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2323 (exit $ac_status); }; }; then
2324 for ac_declaration in \
2325 ''\
2326 '#include <stdlib.h>' \
2327 'extern "C" void std::exit (int) throw (); using std::exit;' \
2328 'extern "C" void std::exit (int); using std::exit;' \
2329 'extern "C" void exit (int) throw ();' \
2330 'extern "C" void exit (int);' \
2331 'void exit (int);'
2332do
2333 cat >conftest.$ac_ext <<_ACEOF
2334#line $LINENO "configure"
2335#include "confdefs.h"
2336#include <stdlib.h>
2337$ac_declaration
2338#ifdef F77_DUMMY_MAIN
2339# ifdef __cplusplus
2340 extern "C"
2341# endif
2342 int F77_DUMMY_MAIN() { return 1; }
2343#endif
2344int
2345main ()
2346{
2347exit (42);
2348 ;
2349 return 0;
2350}
2351_ACEOF
2352rm -f conftest.$ac_objext
2353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2354 (eval $ac_compile) 2>&5
2355 ac_status=$?
2356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2357 (exit $ac_status); } &&
2358 { ac_try='test -s conftest.$ac_objext'
2359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2360 (eval $ac_try) 2>&5
2361 ac_status=$?
2362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2363 (exit $ac_status); }; }; then
2364 :
2365else
2366 echo "$as_me: failed program was:" >&5
2367cat conftest.$ac_ext >&5
2368continue
2369fi
2370rm -f conftest.$ac_objext conftest.$ac_ext
2371 cat >conftest.$ac_ext <<_ACEOF
2372#line $LINENO "configure"
2373#include "confdefs.h"
2374$ac_declaration
2375#ifdef F77_DUMMY_MAIN
2376# ifdef __cplusplus
2377 extern "C"
2378# endif
2379 int F77_DUMMY_MAIN() { return 1; }
2380#endif
2381int
2382main ()
2383{
2384exit (42);
2385 ;
2386 return 0;
2387}
2388_ACEOF
2389rm -f conftest.$ac_objext
2390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2391 (eval $ac_compile) 2>&5
2392 ac_status=$?
2393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2394 (exit $ac_status); } &&
2395 { ac_try='test -s conftest.$ac_objext'
2396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2397 (eval $ac_try) 2>&5
2398 ac_status=$?
2399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2400 (exit $ac_status); }; }; then
2401 break
2402else
2403 echo "$as_me: failed program was:" >&5
2404cat conftest.$ac_ext >&5
2405fi
2406rm -f conftest.$ac_objext conftest.$ac_ext
2407done
2408rm -f conftest*
2409if test -n "$ac_declaration"; then
2410 echo '#ifdef __cplusplus' >>confdefs.h
2411 echo $ac_declaration >>confdefs.h
2412 echo '#endif' >>confdefs.h
2413fi
2414
2415else
2416 echo "$as_me: failed program was:" >&5
2417cat conftest.$ac_ext >&5
2418fi
2419rm -f conftest.$ac_objext conftest.$ac_ext
2420ac_ext=c
2421ac_cpp='$CPP $CPPFLAGS'
2422ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2423ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2424ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002425
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002426
2427# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002428
2429ac_ext=c
2430ac_cpp='$CPP $CPPFLAGS'
2431ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2432ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2433ac_compiler_gnu=$ac_cv_c_compiler_gnu
2434echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2435echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002436# On Suns, sometimes $CPP names a directory.
2437if test -n "$CPP" && test -d "$CPP"; then
2438 CPP=
2439fi
2440if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002441 if test "${ac_cv_prog_CPP+set}" = set; then
2442 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002443else
Martin v. Löwis11437992002-04-12 09:54:03 +00002444 # Double quotes because CPP needs to be expanded
2445 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2446 do
2447 ac_preproc_ok=false
2448for ac_c_preproc_warn_flag in '' yes
2449do
2450 # Use a header file that comes with gcc, so configuring glibc
2451 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002452 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 # not just through cpp. "Syntax error" is here to catch this case.
2454 cat >conftest.$ac_ext <<_ACEOF
2455#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002456#include "confdefs.h"
2457#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 Syntax error
2459_ACEOF
2460if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2461 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2462 ac_status=$?
2463 egrep -v '^ *\+' conftest.er1 >conftest.err
2464 rm -f conftest.er1
2465 cat conftest.err >&5
2466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2467 (exit $ac_status); } >/dev/null; then
2468 if test -s conftest.err; then
2469 ac_cpp_err=$ac_c_preproc_warn_flag
2470 else
2471 ac_cpp_err=
2472 fi
2473else
2474 ac_cpp_err=yes
2475fi
2476if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002477 :
2478else
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002480 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002481 # Broken: fails on valid input.
2482continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002483fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002484rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002485
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 # OK, works on sane cases. Now check whether non-existent headers
2487 # can be detected and how.
2488 cat >conftest.$ac_ext <<_ACEOF
2489#line $LINENO "configure"
2490#include "confdefs.h"
2491#include <ac_nonexistent.h>
2492_ACEOF
2493if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2494 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2495 ac_status=$?
2496 egrep -v '^ *\+' conftest.er1 >conftest.err
2497 rm -f conftest.er1
2498 cat conftest.err >&5
2499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2500 (exit $ac_status); } >/dev/null; then
2501 if test -s conftest.err; then
2502 ac_cpp_err=$ac_c_preproc_warn_flag
2503 else
2504 ac_cpp_err=
2505 fi
2506else
2507 ac_cpp_err=yes
2508fi
2509if test -z "$ac_cpp_err"; then
2510 # Broken: success on invalid input.
2511continue
2512else
2513 echo "$as_me: failed program was:" >&5
2514 cat conftest.$ac_ext >&5
2515 # Passes both tests.
2516ac_preproc_ok=:
2517break
2518fi
2519rm -f conftest.err conftest.$ac_ext
2520
2521done
2522# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2523rm -f conftest.err conftest.$ac_ext
2524if $ac_preproc_ok; then
2525 break
2526fi
2527
2528 done
2529 ac_cv_prog_CPP=$CPP
2530
2531fi
2532 CPP=$ac_cv_prog_CPP
2533else
2534 ac_cv_prog_CPP=$CPP
2535fi
2536echo "$as_me:$LINENO: result: $CPP" >&5
2537echo "${ECHO_T}$CPP" >&6
2538ac_preproc_ok=false
2539for ac_c_preproc_warn_flag in '' yes
2540do
2541 # Use a header file that comes with gcc, so configuring glibc
2542 # with a fresh cross-compiler works.
2543 # On the NeXT, cc -E runs the code through the compiler's parser,
2544 # not just through cpp. "Syntax error" is here to catch this case.
2545 cat >conftest.$ac_ext <<_ACEOF
2546#line $LINENO "configure"
2547#include "confdefs.h"
2548#include <assert.h>
2549 Syntax error
2550_ACEOF
2551if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2552 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2553 ac_status=$?
2554 egrep -v '^ *\+' conftest.er1 >conftest.err
2555 rm -f conftest.er1
2556 cat conftest.err >&5
2557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2558 (exit $ac_status); } >/dev/null; then
2559 if test -s conftest.err; then
2560 ac_cpp_err=$ac_c_preproc_warn_flag
2561 else
2562 ac_cpp_err=
2563 fi
2564else
2565 ac_cpp_err=yes
2566fi
2567if test -z "$ac_cpp_err"; then
2568 :
2569else
2570 echo "$as_me: failed program was:" >&5
2571 cat conftest.$ac_ext >&5
2572 # Broken: fails on valid input.
2573continue
2574fi
2575rm -f conftest.err conftest.$ac_ext
2576
2577 # OK, works on sane cases. Now check whether non-existent headers
2578 # can be detected and how.
2579 cat >conftest.$ac_ext <<_ACEOF
2580#line $LINENO "configure"
2581#include "confdefs.h"
2582#include <ac_nonexistent.h>
2583_ACEOF
2584if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2585 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2586 ac_status=$?
2587 egrep -v '^ *\+' conftest.er1 >conftest.err
2588 rm -f conftest.er1
2589 cat conftest.err >&5
2590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2591 (exit $ac_status); } >/dev/null; then
2592 if test -s conftest.err; then
2593 ac_cpp_err=$ac_c_preproc_warn_flag
2594 else
2595 ac_cpp_err=
2596 fi
2597else
2598 ac_cpp_err=yes
2599fi
2600if test -z "$ac_cpp_err"; then
2601 # Broken: success on invalid input.
2602continue
2603else
2604 echo "$as_me: failed program was:" >&5
2605 cat conftest.$ac_ext >&5
2606 # Passes both tests.
2607ac_preproc_ok=:
2608break
2609fi
2610rm -f conftest.err conftest.$ac_ext
2611
2612done
2613# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2614rm -f conftest.err conftest.$ac_ext
2615if $ac_preproc_ok; then
2616 :
2617else
2618 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2619echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2620 { (exit 1); exit 1; }; }
2621fi
2622
2623ac_ext=c
2624ac_cpp='$CPP $CPPFLAGS'
2625ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2626ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2627ac_compiler_gnu=$ac_cv_c_compiler_gnu
2628
2629
2630
2631echo "$as_me:$LINENO: checking for AIX" >&5
2632echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2633cat >conftest.$ac_ext <<_ACEOF
2634#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002635#include "confdefs.h"
2636#ifdef _AIX
2637 yes
2638#endif
2639
Martin v. Löwis11437992002-04-12 09:54:03 +00002640_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2642 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 echo "$as_me:$LINENO: result: yes" >&5
2644echo "${ECHO_T}yes" >&6
2645cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002646#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002647_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002648
2649else
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 echo "$as_me:$LINENO: result: no" >&5
2651echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002652fi
2653rm -f conftest*
2654
Michael W. Hudson54241132001-12-07 15:38:26 +00002655
Martin v. Löwis11437992002-04-12 09:54:03 +00002656echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2657echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2658if test "${ac_cv_header_stdc+set}" = set; then
2659 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002660else
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 cat >conftest.$ac_ext <<_ACEOF
2662#line $LINENO "configure"
2663#include "confdefs.h"
2664#include <stdlib.h>
2665#include <stdarg.h>
2666#include <string.h>
2667#include <float.h>
2668
2669_ACEOF
2670if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2671 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2672 ac_status=$?
2673 egrep -v '^ *\+' conftest.er1 >conftest.err
2674 rm -f conftest.er1
2675 cat conftest.err >&5
2676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2677 (exit $ac_status); } >/dev/null; then
2678 if test -s conftest.err; then
2679 ac_cpp_err=$ac_c_preproc_warn_flag
2680 else
2681 ac_cpp_err=
2682 fi
2683else
2684 ac_cpp_err=yes
2685fi
2686if test -z "$ac_cpp_err"; then
2687 ac_cv_header_stdc=yes
2688else
2689 echo "$as_me: failed program was:" >&5
2690 cat conftest.$ac_ext >&5
2691 ac_cv_header_stdc=no
2692fi
2693rm -f conftest.err conftest.$ac_ext
2694
2695if test $ac_cv_header_stdc = yes; then
2696 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2697 cat >conftest.$ac_ext <<_ACEOF
2698#line $LINENO "configure"
2699#include "confdefs.h"
2700#include <string.h>
2701
2702_ACEOF
2703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2704 egrep "memchr" >/dev/null 2>&1; then
2705 :
2706else
2707 ac_cv_header_stdc=no
2708fi
2709rm -f conftest*
2710
2711fi
2712
2713if test $ac_cv_header_stdc = yes; then
2714 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2715 cat >conftest.$ac_ext <<_ACEOF
2716#line $LINENO "configure"
2717#include "confdefs.h"
2718#include <stdlib.h>
2719
2720_ACEOF
2721if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2722 egrep "free" >/dev/null 2>&1; then
2723 :
2724else
2725 ac_cv_header_stdc=no
2726fi
2727rm -f conftest*
2728
2729fi
2730
2731if test $ac_cv_header_stdc = yes; then
2732 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2733 if test "$cross_compiling" = yes; then
2734 :
2735else
2736 cat >conftest.$ac_ext <<_ACEOF
2737#line $LINENO "configure"
2738#include "confdefs.h"
2739#include <ctype.h>
2740#if ((' ' & 0x0FF) == 0x020)
2741# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2742# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2743#else
2744# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2745 || ('j' <= (c) && (c) <= 'r') \
2746 || ('s' <= (c) && (c) <= 'z'))
2747# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2748#endif
2749
2750#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2751int
2752main ()
2753{
2754 int i;
2755 for (i = 0; i < 256; i++)
2756 if (XOR (islower (i), ISLOWER (i))
2757 || toupper (i) != TOUPPER (i))
2758 exit(2);
2759 exit (0);
2760}
2761_ACEOF
2762rm -f conftest$ac_exeext
2763if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2764 (eval $ac_link) 2>&5
2765 ac_status=$?
2766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2767 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2769 (eval $ac_try) 2>&5
2770 ac_status=$?
2771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2772 (exit $ac_status); }; }; then
2773 :
2774else
2775 echo "$as_me: program exited with status $ac_status" >&5
2776echo "$as_me: failed program was:" >&5
2777cat conftest.$ac_ext >&5
2778( exit $ac_status )
2779ac_cv_header_stdc=no
2780fi
2781rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2782fi
2783fi
2784fi
2785echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2786echo "${ECHO_T}$ac_cv_header_stdc" >&6
2787if test $ac_cv_header_stdc = yes; then
2788
2789cat >>confdefs.h <<\_ACEOF
2790#define STDC_HEADERS 1
2791_ACEOF
2792
2793fi
2794
2795# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2806 inttypes.h stdint.h unistd.h
2807do
2808as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2809echo "$as_me:$LINENO: checking for $ac_header" >&5
2810echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2811if eval "test \"\${$as_ac_Header+set}\" = set"; then
2812 echo $ECHO_N "(cached) $ECHO_C" >&6
2813else
2814 cat >conftest.$ac_ext <<_ACEOF
2815#line $LINENO "configure"
2816#include "confdefs.h"
2817$ac_includes_default
2818
2819#include <$ac_header>
2820_ACEOF
2821rm -f conftest.$ac_objext
2822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2823 (eval $ac_compile) 2>&5
2824 ac_status=$?
2825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2826 (exit $ac_status); } &&
2827 { ac_try='test -s conftest.$ac_objext'
2828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2829 (eval $ac_try) 2>&5
2830 ac_status=$?
2831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2832 (exit $ac_status); }; }; then
2833 eval "$as_ac_Header=yes"
2834else
2835 echo "$as_me: failed program was:" >&5
2836cat conftest.$ac_ext >&5
2837eval "$as_ac_Header=no"
2838fi
2839rm -f conftest.$ac_objext conftest.$ac_ext
2840fi
2841echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2842echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2843if test `eval echo '${'$as_ac_Header'}'` = yes; then
2844 cat >>confdefs.h <<_ACEOF
2845#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2846_ACEOF
2847
2848fi
2849
2850done
2851
2852
2853if test "${ac_cv_header_minix_config_h+set}" = set; then
2854 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2855echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2856if test "${ac_cv_header_minix_config_h+set}" = set; then
2857 echo $ECHO_N "(cached) $ECHO_C" >&6
2858fi
2859echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2860echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2861else
2862 # Is the header compilable?
2863echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2864echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2865cat >conftest.$ac_ext <<_ACEOF
2866#line $LINENO "configure"
2867#include "confdefs.h"
2868$ac_includes_default
2869#include <minix/config.h>
2870_ACEOF
2871rm -f conftest.$ac_objext
2872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2873 (eval $ac_compile) 2>&5
2874 ac_status=$?
2875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2876 (exit $ac_status); } &&
2877 { ac_try='test -s conftest.$ac_objext'
2878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2879 (eval $ac_try) 2>&5
2880 ac_status=$?
2881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2882 (exit $ac_status); }; }; then
2883 ac_header_compiler=yes
2884else
2885 echo "$as_me: failed program was:" >&5
2886cat conftest.$ac_ext >&5
2887ac_header_compiler=no
2888fi
2889rm -f conftest.$ac_objext conftest.$ac_ext
2890echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2891echo "${ECHO_T}$ac_header_compiler" >&6
2892
2893# Is the header present?
2894echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2895echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2896cat >conftest.$ac_ext <<_ACEOF
2897#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002898#include "confdefs.h"
2899#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002900_ACEOF
2901if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2902 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2903 ac_status=$?
2904 egrep -v '^ *\+' conftest.er1 >conftest.err
2905 rm -f conftest.er1
2906 cat conftest.err >&5
2907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2908 (exit $ac_status); } >/dev/null; then
2909 if test -s conftest.err; then
2910 ac_cpp_err=$ac_c_preproc_warn_flag
2911 else
2912 ac_cpp_err=
2913 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002914else
Martin v. Löwis11437992002-04-12 09:54:03 +00002915 ac_cpp_err=yes
2916fi
2917if test -z "$ac_cpp_err"; then
2918 ac_header_preproc=yes
2919else
2920 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002921 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002922 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002923fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002924rm -f conftest.err conftest.$ac_ext
2925echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2926echo "${ECHO_T}$ac_header_preproc" >&6
2927
2928# So? What about this header?
2929case $ac_header_compiler:$ac_header_preproc in
2930 yes:no )
2931 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2932echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2933 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2934echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2935 no:yes )
2936 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2937echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2938 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2939echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2940 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2941echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2942esac
2943echo "$as_me:$LINENO: checking for minix/config.h" >&5
2944echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2945if test "${ac_cv_header_minix_config_h+set}" = set; then
2946 echo $ECHO_N "(cached) $ECHO_C" >&6
2947else
2948 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002949fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002950echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2951echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2952
2953fi
2954if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002955 MINIX=yes
2956else
Martin v. Löwis11437992002-04-12 09:54:03 +00002957 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002958fi
2959
Martin v. Löwis11437992002-04-12 09:54:03 +00002960
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002961if test "$MINIX" = yes; then
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_SOURCE 1
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 _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002970_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002971
Martin v. Löwis11437992002-04-12 09:54:03 +00002972
2973cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002974#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002975_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002976
2977fi
2978
2979
Michael W. Hudson54241132001-12-07 15:38:26 +00002980
Martin v. Löwis11437992002-04-12 09:54:03 +00002981echo "$as_me:$LINENO: checking for --with-suffix" >&5
2982echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002983
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002984# Check whether --with-suffix or --without-suffix was given.
2985if test "${with_suffix+set}" = set; then
2986 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002987
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002988 case $withval in
2989 no) EXEEXT=;;
2990 yes) EXEEXT=.exe;;
2991 *) EXEEXT=$withval;;
2992 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002993fi;
2994echo "$as_me:$LINENO: result: $EXEEXT" >&5
2995echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002996
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002997# Test whether we're running on a non-case-sensitive system, in which
2998# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002999
Martin v. Löwis11437992002-04-12 09:54:03 +00003000echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3001echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen0b06be72002-06-21 14:48:38 +00003002if test -d "${srcdir}/python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003003then
Martin v. Löwis11437992002-04-12 09:54:03 +00003004 echo "$as_me:$LINENO: result: yes" >&5
3005echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003006 BUILDEXEEXT=.exe
3007else
Martin v. Löwis11437992002-04-12 09:54:03 +00003008 echo "$as_me:$LINENO: result: no" >&5
3009echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003010 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003011fi
Guido van Rossumff555e32000-09-22 15:38:21 +00003012
Guido van Rossumdd997f71998-10-07 19:58:26 +00003013case $MACHDEP in
3014bsdos*)
3015 case $CC in
3016 gcc) CC="$CC -D_HAVE_BSDI";;
3017 esac;;
3018esac
3019
Guido van Rossum24b1e751997-08-21 02:29:16 +00003020case $ac_sys_system in
3021hp*|HP*)
3022 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003023 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003024 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003025Monterey*)
3026 case $CC in
3027 cc) CC="$CC -Wl,-Bexport";;
3028 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003029SunOS*)
3030 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003031
3032cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003033#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003034_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003035
3036 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003037esac
3038
Michael W. Hudson54241132001-12-07 15:38:26 +00003039
3040
Martin v. Löwis11437992002-04-12 09:54:03 +00003041echo "$as_me:$LINENO: checking LIBRARY" >&5
3042echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003043if test -z "$LIBRARY"
3044then
3045 LIBRARY='libpython$(VERSION).a'
3046fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003047echo "$as_me:$LINENO: result: $LIBRARY" >&5
3048echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003049
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003050# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003051# name of the library into which to insert object files). BLDLIBRARY is also
3052# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3053# is blank as the main program is not linked directly against LDLIBRARY.
3054# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3055# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3056# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3057# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003058#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003059# RUNSHARED is used to run shared python without installed libraries
3060#
3061# INSTSONAME is the name of the shared library that will be use to install
3062# on the system - some systems like version suffix, others don't
3063
3064
Michael W. Hudson54241132001-12-07 15:38:26 +00003065
3066
3067
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003068
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003069LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003070BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003071INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003072DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003073LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003074RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003075
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003076# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003077# If CXX is set, and if it is needed to link a main function that was
3078# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3079# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003080# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003081# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003082
Martin v. Löwis11437992002-04-12 09:54:03 +00003083echo "$as_me:$LINENO: checking LINKCC" >&5
3084echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003085if test -z "$LINKCC"
3086then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003087 if test -z "$CXX"; then
3088 LINKCC="\$(PURIFY) \$(CC)"
3089 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003090 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003091 $CXX -c conftest.$ac_ext 2>&5
3092 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3093 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3094 then
3095 LINKCC="\$(PURIFY) \$(CC)"
3096 else
3097 LINKCC="\$(PURIFY) \$(CXX)"
3098 fi
3099 rm -fr conftest*
3100 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003101 case $ac_sys_system in
3102 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003103 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003104 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003105 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003106 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003107 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003108 esac
3109fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003110echo "$as_me:$LINENO: result: $LINKCC" >&5
3111echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003112
Martin v. Löwis11437992002-04-12 09:54:03 +00003113echo "$as_me:$LINENO: checking for --enable-shared" >&5
3114echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003115# Check whether --enable-shared or --disable-shared was given.
3116if test "${enable_shared+set}" = set; then
3117 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003118
Martin v. Löwis11437992002-04-12 09:54:03 +00003119fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003120
3121if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003122then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003123 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003124 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003125 enable_shared="yes";;
3126 *)
3127 enable_shared="no";;
3128 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003129fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003130echo "$as_me:$LINENO: result: $enable_shared" >&5
3131echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003132
3133
Martin v. Löwis11437992002-04-12 09:54:03 +00003134echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3135echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003136
Guido van Rossumb8552162001-09-05 14:58:11 +00003137# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3138# library that we build, but we do not want to link against it (we
3139# will find it with a -framework option). For this reason there is an
3140# extra variable BLDLIBRARY against which Python and the extension
3141# modules are linked, BLDLIBRARY. This is normally the same as
3142# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003143if test "$enable_framework"
3144then
3145 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3146 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3147 BLDLIBRARY=''
3148else
3149 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003150fi
Jack Jansene578a632001-08-15 01:27:14 +00003151
Martin v. Löwis1142de32002-03-29 16:28:31 +00003152# Other platforms follow
3153if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003154
3155cat >>confdefs.h <<\_ACEOF
3156#define Py_ENABLE_SHARED 1
3157_ACEOF
3158
Martin v. Löwis1142de32002-03-29 16:28:31 +00003159 case $ac_sys_system in
3160 BeOS*)
3161 LDLIBRARY='libpython$(VERSION).so'
3162 ;;
3163 CYGWIN*)
3164 LDLIBRARY='libpython$(VERSION).dll.a'
3165 DLLLIBRARY='libpython$(VERSION).dll'
3166 ;;
3167 SunOS*)
3168 LDLIBRARY='libpython$(VERSION).so'
3169 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3170 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3171 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003172 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003173 LDLIBRARY='libpython$(VERSION).so'
3174 BLDLIBRARY='-L. -lpython$(VERSION)'
3175 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3176 INSTSONAME="$LDLIBRARY".$SOVERSION
3177 ;;
3178 hp*|HP*)
3179 LDLIBRARY='libpython$(VERSION).sl'
3180 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3181 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3182 ;;
3183 OSF*)
3184 LDLIBRARY='libpython$(VERSION).so'
3185 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3186 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3187 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003188 atheos*)
3189 LDLIBRARY='libpython$(VERSION).so'
3190 BLDLIBRARY='-L. -lpython$(VERSION)'
3191 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3192 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003193 esac
3194 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3195 case $MACHDEP in
3196 dguxR4)
3197 LDLIBRARY='libpython$(VERSION).so'
3198 OPT="$OPT -pic"
3199 ;;
3200 esac
3201fi
3202
Martin v. Löwis11437992002-04-12 09:54:03 +00003203echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3204echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003205
Martin v. Löwis11437992002-04-12 09:54:03 +00003206if test -n "$ac_tool_prefix"; then
3207 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3208set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3209echo "$as_me:$LINENO: checking for $ac_word" >&5
3210echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3211if test "${ac_cv_prog_RANLIB+set}" = set; then
3212 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003213else
3214 if test -n "$RANLIB"; then
3215 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3216else
Martin v. Löwis11437992002-04-12 09:54:03 +00003217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3218for as_dir in $PATH
3219do
3220 IFS=$as_save_IFS
3221 test -z "$as_dir" && as_dir=.
3222 for ac_exec_ext in '' $ac_executable_extensions; do
3223 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3224 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3225 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3226 break 2
3227 fi
3228done
3229done
3230
Guido van Rossum627b2d71993-12-24 10:39:16 +00003231fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003232fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003233RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003234if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003235 echo "$as_me:$LINENO: result: $RANLIB" >&5
3236echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003237else
Martin v. Löwis11437992002-04-12 09:54:03 +00003238 echo "$as_me:$LINENO: result: no" >&5
3239echo "${ECHO_T}no" >&6
3240fi
3241
3242fi
3243if test -z "$ac_cv_prog_RANLIB"; then
3244 ac_ct_RANLIB=$RANLIB
3245 # Extract the first word of "ranlib", so it can be a program name with args.
3246set dummy ranlib; ac_word=$2
3247echo "$as_me:$LINENO: checking for $ac_word" >&5
3248echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3249if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3250 echo $ECHO_N "(cached) $ECHO_C" >&6
3251else
3252 if test -n "$ac_ct_RANLIB"; then
3253 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3254else
3255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3256for as_dir in $PATH
3257do
3258 IFS=$as_save_IFS
3259 test -z "$as_dir" && as_dir=.
3260 for ac_exec_ext in '' $ac_executable_extensions; do
3261 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3262 ac_cv_prog_ac_ct_RANLIB="ranlib"
3263 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3264 break 2
3265 fi
3266done
3267done
3268
3269 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3270fi
3271fi
3272ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3273if test -n "$ac_ct_RANLIB"; then
3274 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3275echo "${ECHO_T}$ac_ct_RANLIB" >&6
3276else
3277 echo "$as_me:$LINENO: result: no" >&5
3278echo "${ECHO_T}no" >&6
3279fi
3280
3281 RANLIB=$ac_ct_RANLIB
3282else
3283 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003284fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003285
3286
Guido van Rossum7f43da71994-08-01 12:15:30 +00003287for ac_prog in ar aal
3288do
Martin v. Löwis11437992002-04-12 09:54:03 +00003289 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003290set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003291echo "$as_me:$LINENO: checking for $ac_word" >&5
3292echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3293if test "${ac_cv_prog_AR+set}" = set; then
3294 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003295else
3296 if test -n "$AR"; then
3297 ac_cv_prog_AR="$AR" # Let the user override the test.
3298else
Martin v. Löwis11437992002-04-12 09:54:03 +00003299as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3300for as_dir in $PATH
3301do
3302 IFS=$as_save_IFS
3303 test -z "$as_dir" && as_dir=.
3304 for ac_exec_ext in '' $ac_executable_extensions; do
3305 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3306 ac_cv_prog_AR="$ac_prog"
3307 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3308 break 2
3309 fi
3310done
3311done
3312
Guido van Rossum7f43da71994-08-01 12:15:30 +00003313fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003314fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003315AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003316if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003317 echo "$as_me:$LINENO: result: $AR" >&5
3318echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003319else
Martin v. Löwis11437992002-04-12 09:54:03 +00003320 echo "$as_me:$LINENO: result: no" >&5
3321echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003322fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003323
Martin v. Löwis11437992002-04-12 09:54:03 +00003324 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003325done
3326test -n "$AR" || AR="ar"
3327
Michael W. Hudson54241132001-12-07 15:38:26 +00003328
Neil Schemenauera42c8272001-03-31 00:01:55 +00003329case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003330bsdos*|hp*|HP*)
3331 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003332 if test -z "$INSTALL"
3333 then
3334 INSTALL="${srcdir}/install-sh -c"
3335 fi
3336esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003337ac_aux_dir=
3338for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3339 if test -f $ac_dir/install-sh; then
3340 ac_aux_dir=$ac_dir
3341 ac_install_sh="$ac_aux_dir/install-sh -c"
3342 break
3343 elif test -f $ac_dir/install.sh; then
3344 ac_aux_dir=$ac_dir
3345 ac_install_sh="$ac_aux_dir/install.sh -c"
3346 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003347 elif test -f $ac_dir/shtool; then
3348 ac_aux_dir=$ac_dir
3349 ac_install_sh="$ac_aux_dir/shtool install -c"
3350 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003351 fi
3352done
3353if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003354 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3355echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3356 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003358ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3359ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3360ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003361
3362# Find a good install program. We prefer a C program (faster),
3363# so one script is as good as another. But avoid the broken or
3364# incompatible versions:
3365# SysV /etc/install, /usr/sbin/install
3366# SunOS /usr/etc/install
3367# IRIX /sbin/install
3368# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003369# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003370# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3371# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3372# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3373# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003374echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3375echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003376if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003377if test "${ac_cv_path_install+set}" = set; then
3378 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003379else
Martin v. Löwis11437992002-04-12 09:54:03 +00003380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3381for as_dir in $PATH
3382do
3383 IFS=$as_save_IFS
3384 test -z "$as_dir" && as_dir=.
3385 # Account for people who put trailing slashes in PATH elements.
3386case $as_dir/ in
3387 ./ | .// | /cC/* | \
3388 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3389 /usr/ucb/* ) ;;
3390 *)
3391 # OSF1 and SCO ODT 3.0 have their own names for install.
3392 # Don't use installbsd from OSF since it installs stuff as root
3393 # by default.
3394 for ac_prog in ginstall scoinst install; do
3395 for ac_exec_ext in '' $ac_executable_extensions; do
3396 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3397 if test $ac_prog = install &&
3398 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3399 # AIX install. It has an incompatible calling convention.
3400 :
3401 elif test $ac_prog = install &&
3402 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3403 # program-specific install script used by HP pwplus--don't use.
3404 :
3405 else
3406 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3407 break 3
3408 fi
3409 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003410 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003411 done
3412 ;;
3413esac
3414done
3415
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003416
3417fi
3418 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003419 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003420 else
3421 # As a last resort, use the slow shell script. We don't cache a
3422 # path for INSTALL within a source directory, because that will
3423 # break other packages using the cache if that directory is
3424 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003425 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003426 fi
3427fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003428echo "$as_me:$LINENO: result: $INSTALL" >&5
3429echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003430
3431# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3432# It thinks the first close brace ends the variable substitution.
3433test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3434
Martin v. Löwis11437992002-04-12 09:54:03 +00003435test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003436
3437test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3438
Michael W. Hudson54241132001-12-07 15:38:26 +00003439
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003440# Not every filesystem supports hard links
3441
3442if test -z "$LN" ; then
3443 case $ac_sys_system in
3444 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003445 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003446 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003447 *) LN=ln;;
3448 esac
3449fi
3450
Fred Drake109d9862001-07-11 06:27:56 +00003451# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003452echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3453echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3454
Fred Drake109d9862001-07-11 06:27:56 +00003455# Check whether --with-pydebug or --without-pydebug was given.
3456if test "${with_pydebug+set}" = set; then
3457 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003458
Fred Drake109d9862001-07-11 06:27:56 +00003459if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003460then
3461
3462cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003463#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003464_ACEOF
3465
3466 echo "$as_me:$LINENO: result: yes" >&5
3467echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003468 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003469else echo "$as_me:$LINENO: result: no" >&5
3470echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003471fi
3472else
Martin v. Löwis11437992002-04-12 09:54:03 +00003473 echo "$as_me:$LINENO: result: no" >&5
3474echo "${ECHO_T}no" >&6
3475fi;
Fred Drake109d9862001-07-11 06:27:56 +00003476
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003477# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003478
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003479if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003480then
Neal Norwitzd957f392002-09-25 21:26:19 +00003481 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003482 yes)
3483 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003484 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003485 if test "$Py_DEBUG" = 'true' ; then
3486 # Optimization messes up debuggers, so turn it off for
3487 # debug builds.
3488 OPT="-g -Wall -Wstrict-prototypes"
3489 else
3490 OPT="-g -O3 -Wall -Wstrict-prototypes"
3491 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003492 *)
Fred Drake109d9862001-07-11 06:27:56 +00003493 OPT="-O3 -Wall -Wstrict-prototypes";;
3494 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003495 case $ac_sys_system in
3496 SCO_SV*) OPT="$OPT -m486 -DSCO5";;
3497 esac
Fred Drake109d9862001-07-11 06:27:56 +00003498 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003499 *)
3500 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003501 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003502 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003503 SCO_SV*)
3504 CFLAGS="$CFLAGS -belf"
3505 OPT="-belf -O -Ki486 -DSCO5";;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003506 *)
3507 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003508 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003509 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003510 case $ac_sys_system in
3511 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003512 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003513 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003514fi
3515
Fred Drakee1ceaa02001-12-04 20:55:47 +00003516if test "$Py_DEBUG" = 'true'; then
3517 :
3518else
3519 OPT="-DNDEBUG $OPT"
3520fi
3521
Trent Mick635f6fb2000-08-23 21:33:05 +00003522# The current (beta) Monterey compiler dies with optimizations
3523case $ac_sys_system in
3524Monterey*) OPT="";;
3525esac
3526
Guido van Rossum563e7081996-09-10 18:20:48 +00003527if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003528then
3529 OPT="$OPT $ac_arch_flags"
3530fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003531
Martin v. Löwis11437992002-04-12 09:54:03 +00003532echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3533echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3534if test "${ac_cv_opt_olimit_ok+set}" = set; then
3535 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003536else
3537 ac_save_cc="$CC"
3538CC="$CC -OPT:Olimit=0"
3539if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003540 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003541else
Martin v. Löwis11437992002-04-12 09:54:03 +00003542 cat >conftest.$ac_ext <<_ACEOF
3543#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003544#include "confdefs.h"
3545int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003546_ACEOF
3547rm -f conftest$ac_exeext
3548if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3549 (eval $ac_link) 2>&5
3550 ac_status=$?
3551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3552 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3554 (eval $ac_try) 2>&5
3555 ac_status=$?
3556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3557 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003558 ac_cv_opt_olimit_ok=yes
3559else
Martin v. Löwis11437992002-04-12 09:54:03 +00003560 echo "$as_me: program exited with status $ac_status" >&5
3561echo "$as_me: failed program was:" >&5
3562cat conftest.$ac_ext >&5
3563( exit $ac_status )
3564ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003565fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003566rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003567fi
Guido van Rossum91922671997-10-09 20:24:13 +00003568CC="$ac_save_cc"
3569fi
3570
Martin v. Löwis11437992002-04-12 09:54:03 +00003571echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3572echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003573if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003574 case $ac_sys_system in
3575 Darwin*) OPT="$OPT" ;;
3576 *) OPT="$OPT -OPT:Olimit=0";;
3577 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003578else
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3580echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3581 if test "${ac_cv_olimit_ok+set}" = set; then
3582 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003583else
3584 ac_save_cc="$CC"
3585 CC="$CC -Olimit 1500"
3586 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003587 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003588else
Martin v. Löwis11437992002-04-12 09:54:03 +00003589 cat >conftest.$ac_ext <<_ACEOF
3590#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003591#include "confdefs.h"
3592int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003593_ACEOF
3594rm -f conftest$ac_exeext
3595if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3596 (eval $ac_link) 2>&5
3597 ac_status=$?
3598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3599 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3601 (eval $ac_try) 2>&5
3602 ac_status=$?
3603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3604 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003605 ac_cv_olimit_ok=yes
3606else
Martin v. Löwis11437992002-04-12 09:54:03 +00003607 echo "$as_me: program exited with status $ac_status" >&5
3608echo "$as_me: failed program was:" >&5
3609cat conftest.$ac_ext >&5
3610( exit $ac_status )
3611ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003612fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003613rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003614fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003615 CC="$ac_save_cc"
3616fi
3617
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3619echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003620 if test $ac_cv_olimit_ok = yes; then
3621 OPT="$OPT -Olimit 1500"
3622 fi
3623fi
3624
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003625# On some compilers, pthreads are available without further options
3626# (e.g. MacOS X). On some of these systems, the compiler will not
3627# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3628# So we have to see first whether pthreads are available without
3629# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003630echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3631echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3632if test "${ac_cv_pthread_is_default+set}" = set; then
3633 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003634else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003635 if test "$cross_compiling" = yes; then
3636 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003637else
Martin v. Löwis11437992002-04-12 09:54:03 +00003638 cat >conftest.$ac_ext <<_ACEOF
3639#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003640#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003641
Martin v. Löwis130fb172001-07-19 11:00:41 +00003642#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003643
3644void* routine(void* p){return NULL;}
3645
3646int main(){
3647 pthread_t p;
3648 if(pthread_create(&p,NULL,routine,NULL)!=0)
3649 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003650 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003651 return 0;
3652}
3653
Martin v. Löwis11437992002-04-12 09:54:03 +00003654_ACEOF
3655rm -f conftest$ac_exeext
3656if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3657 (eval $ac_link) 2>&5
3658 ac_status=$?
3659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3660 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3662 (eval $ac_try) 2>&5
3663 ac_status=$?
3664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3665 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003666 ac_cv_pthread_is_default=yes
3667else
Martin v. Löwis11437992002-04-12 09:54:03 +00003668 echo "$as_me: program exited with status $ac_status" >&5
3669echo "$as_me: failed program was:" >&5
3670cat conftest.$ac_ext >&5
3671( exit $ac_status )
3672ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003673fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003674rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003675fi
3676
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003677fi
3678
Martin v. Löwis11437992002-04-12 09:54:03 +00003679echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3680echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003681
Michael W. Hudson54241132001-12-07 15:38:26 +00003682
Martin v. Löwis11437992002-04-12 09:54:03 +00003683if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003684then
3685 ac_cv_kpthread=no
3686else
3687# -Kpthread, if available, provides the right #defines
3688# and linker options to make pthread_create available
3689# Some compilers won't report that they do not support -Kpthread,
3690# so we need to run a program to see whether it really made the
3691# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003692echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3693echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3694if test "${ac_cv_kpthread+set}" = set; then
3695 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003696else
3697 ac_save_cc="$CC"
3698CC="$CC -Kpthread"
3699if test "$cross_compiling" = yes; then
3700 ac_cv_kpthread=no
3701else
Martin v. Löwis11437992002-04-12 09:54:03 +00003702 cat >conftest.$ac_ext <<_ACEOF
3703#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003704#include "confdefs.h"
3705
3706#include <pthread.h>
3707
3708void* routine(void* p){return NULL;}
3709
3710int main(){
3711 pthread_t p;
3712 if(pthread_create(&p,NULL,routine,NULL)!=0)
3713 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003714 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003715 return 0;
3716}
3717
Martin v. Löwis11437992002-04-12 09:54:03 +00003718_ACEOF
3719rm -f conftest$ac_exeext
3720if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3721 (eval $ac_link) 2>&5
3722 ac_status=$?
3723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3724 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3726 (eval $ac_try) 2>&5
3727 ac_status=$?
3728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3729 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003730 ac_cv_kpthread=yes
3731else
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 echo "$as_me: program exited with status $ac_status" >&5
3733echo "$as_me: failed program was:" >&5
3734cat conftest.$ac_ext >&5
3735( exit $ac_status )
3736ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003737fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003738rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003739fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003740CC="$ac_save_cc"
3741fi
3742
Martin v. Löwis11437992002-04-12 09:54:03 +00003743echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3744echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003745fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003746
Michael W. Hudson54241132001-12-07 15:38:26 +00003747
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003748# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003749echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3750echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3751if test "${ac_cv_header_stdc+set}" = set; then
3752 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003753else
Martin v. Löwis11437992002-04-12 09:54:03 +00003754 cat >conftest.$ac_ext <<_ACEOF
3755#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003756#include "confdefs.h"
3757#include <stdlib.h>
3758#include <stdarg.h>
3759#include <string.h>
3760#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003761
3762_ACEOF
3763if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3764 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3765 ac_status=$?
3766 egrep -v '^ *\+' conftest.er1 >conftest.err
3767 rm -f conftest.er1
3768 cat conftest.err >&5
3769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3770 (exit $ac_status); } >/dev/null; then
3771 if test -s conftest.err; then
3772 ac_cpp_err=$ac_c_preproc_warn_flag
3773 else
3774 ac_cpp_err=
3775 fi
3776else
3777 ac_cpp_err=yes
3778fi
3779if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003780 ac_cv_header_stdc=yes
3781else
Martin v. Löwis11437992002-04-12 09:54:03 +00003782 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003783 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003784 ac_cv_header_stdc=no
3785fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003786rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003787
3788if test $ac_cv_header_stdc = yes; then
3789 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 cat >conftest.$ac_ext <<_ACEOF
3791#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003792#include "confdefs.h"
3793#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003794
3795_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3797 egrep "memchr" >/dev/null 2>&1; then
3798 :
3799else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003800 ac_cv_header_stdc=no
3801fi
3802rm -f conftest*
3803
3804fi
3805
3806if test $ac_cv_header_stdc = yes; then
3807 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 cat >conftest.$ac_ext <<_ACEOF
3809#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003810#include "confdefs.h"
3811#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003812
3813_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003814if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3815 egrep "free" >/dev/null 2>&1; then
3816 :
3817else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003818 ac_cv_header_stdc=no
3819fi
3820rm -f conftest*
3821
3822fi
3823
3824if test $ac_cv_header_stdc = yes; then
3825 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003826 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003827 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003828else
Martin v. Löwis11437992002-04-12 09:54:03 +00003829 cat >conftest.$ac_ext <<_ACEOF
3830#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003831#include "confdefs.h"
3832#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003833#if ((' ' & 0x0FF) == 0x020)
3834# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3835# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3836#else
3837# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3838 || ('j' <= (c) && (c) <= 'r') \
3839 || ('s' <= (c) && (c) <= 'z'))
3840# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3841#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003842
Martin v. Löwis11437992002-04-12 09:54:03 +00003843#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3844int
3845main ()
3846{
3847 int i;
3848 for (i = 0; i < 256; i++)
3849 if (XOR (islower (i), ISLOWER (i))
3850 || toupper (i) != TOUPPER (i))
3851 exit(2);
3852 exit (0);
3853}
3854_ACEOF
3855rm -f conftest$ac_exeext
3856if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3857 (eval $ac_link) 2>&5
3858 ac_status=$?
3859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3860 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3862 (eval $ac_try) 2>&5
3863 ac_status=$?
3864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3865 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003866 :
3867else
Martin v. Löwis11437992002-04-12 09:54:03 +00003868 echo "$as_me: program exited with status $ac_status" >&5
3869echo "$as_me: failed program was:" >&5
3870cat conftest.$ac_ext >&5
3871( exit $ac_status )
3872ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003873fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003874rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003875fi
3876fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003877fi
3878echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3879echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003880if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003881
3882cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003883#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003884_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003885
3886fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003887
Martin v. Löwis11437992002-04-12 09:54:03 +00003888
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
3920
3921
3922
3923
3924
Martin v. Löwis11437992002-04-12 09:54:03 +00003925for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003926libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003927signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003928sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003929sys/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 +00003930sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003931sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003932do
Martin v. Löwis11437992002-04-12 09:54:03 +00003933as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3934if eval "test \"\${$as_ac_Header+set}\" = set"; then
3935 echo "$as_me:$LINENO: checking for $ac_header" >&5
3936echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3937if eval "test \"\${$as_ac_Header+set}\" = set"; then
3938 echo $ECHO_N "(cached) $ECHO_C" >&6
3939fi
3940echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3941echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003942else
Martin v. Löwis11437992002-04-12 09:54:03 +00003943 # Is the header compilable?
3944echo "$as_me:$LINENO: checking $ac_header usability" >&5
3945echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3946cat >conftest.$ac_ext <<_ACEOF
3947#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003948#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003949$ac_includes_default
3950#include <$ac_header>
3951_ACEOF
3952rm -f conftest.$ac_objext
3953if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3954 (eval $ac_compile) 2>&5
3955 ac_status=$?
3956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3957 (exit $ac_status); } &&
3958 { ac_try='test -s conftest.$ac_objext'
3959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3960 (eval $ac_try) 2>&5
3961 ac_status=$?
3962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3963 (exit $ac_status); }; }; then
3964 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003965else
Martin v. Löwis11437992002-04-12 09:54:03 +00003966 echo "$as_me: failed program was:" >&5
3967cat conftest.$ac_ext >&5
3968ac_header_compiler=no
3969fi
3970rm -f conftest.$ac_objext conftest.$ac_ext
3971echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3972echo "${ECHO_T}$ac_header_compiler" >&6
3973
3974# Is the header present?
3975echo "$as_me:$LINENO: checking $ac_header presence" >&5
3976echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3977cat >conftest.$ac_ext <<_ACEOF
3978#line $LINENO "configure"
3979#include "confdefs.h"
3980#include <$ac_header>
3981_ACEOF
3982if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3983 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3984 ac_status=$?
3985 egrep -v '^ *\+' conftest.er1 >conftest.err
3986 rm -f conftest.er1
3987 cat conftest.err >&5
3988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3989 (exit $ac_status); } >/dev/null; then
3990 if test -s conftest.err; then
3991 ac_cpp_err=$ac_c_preproc_warn_flag
3992 else
3993 ac_cpp_err=
3994 fi
3995else
3996 ac_cpp_err=yes
3997fi
3998if test -z "$ac_cpp_err"; then
3999 ac_header_preproc=yes
4000else
4001 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004002 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004003 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004004fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004005rm -f conftest.err conftest.$ac_ext
4006echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4007echo "${ECHO_T}$ac_header_preproc" >&6
4008
4009# So? What about this header?
4010case $ac_header_compiler:$ac_header_preproc in
4011 yes:no )
4012 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4013echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4014 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4015echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4016 no:yes )
4017 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4018echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4019 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4020echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4021 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4022echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4023esac
4024echo "$as_me:$LINENO: checking for $ac_header" >&5
4025echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4026if eval "test \"\${$as_ac_Header+set}\" = set"; then
4027 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004028else
Martin v. Löwis11437992002-04-12 09:54:03 +00004029 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004030fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004031echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4032echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4033
4034fi
4035if test `eval echo '${'$as_ac_Header'}'` = yes; then
4036 cat >>confdefs.h <<_ACEOF
4037#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4038_ACEOF
4039
4040fi
4041
Guido van Rossum627b2d71993-12-24 10:39:16 +00004042done
4043
Martin v. Löwis11437992002-04-12 09:54:03 +00004044
4045
4046
4047
4048
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004049ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004050for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4051 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4052echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4053echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4054if eval "test \"\${$as_ac_Header+set}\" = set"; then
4055 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004056else
Martin v. Löwis11437992002-04-12 09:54:03 +00004057 cat >conftest.$ac_ext <<_ACEOF
4058#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004059#include "confdefs.h"
4060#include <sys/types.h>
4061#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004062
4063#ifdef F77_DUMMY_MAIN
4064# ifdef __cplusplus
4065 extern "C"
4066# endif
4067 int F77_DUMMY_MAIN() { return 1; }
4068#endif
4069int
4070main ()
4071{
4072if ((DIR *) 0)
4073return 0;
4074 ;
4075 return 0;
4076}
4077_ACEOF
4078rm -f conftest.$ac_objext
4079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4080 (eval $ac_compile) 2>&5
4081 ac_status=$?
4082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4083 (exit $ac_status); } &&
4084 { ac_try='test -s conftest.$ac_objext'
4085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4086 (eval $ac_try) 2>&5
4087 ac_status=$?
4088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4089 (exit $ac_status); }; }; then
4090 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004091else
Martin v. Löwis11437992002-04-12 09:54:03 +00004092 echo "$as_me: failed program was:" >&5
4093cat conftest.$ac_ext >&5
4094eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004095fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004096rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004097fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004098echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4099echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4100if test `eval echo '${'$as_ac_Header'}'` = yes; then
4101 cat >>confdefs.h <<_ACEOF
4102#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4103_ACEOF
4104
4105ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004106fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004107
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004108done
4109# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4110if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004111 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4112echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4113if test "${ac_cv_search_opendir+set}" = set; then
4114 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004115else
Martin v. Löwis11437992002-04-12 09:54:03 +00004116 ac_func_search_save_LIBS=$LIBS
4117ac_cv_search_opendir=no
4118cat >conftest.$ac_ext <<_ACEOF
4119#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004120#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004121
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004122/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004123#ifdef __cplusplus
4124extern "C"
4125#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004126/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004127 builtin and then its argument prototype would still apply. */
4128char opendir ();
4129#ifdef F77_DUMMY_MAIN
4130# ifdef __cplusplus
4131 extern "C"
4132# endif
4133 int F77_DUMMY_MAIN() { return 1; }
4134#endif
4135int
4136main ()
4137{
4138opendir ();
4139 ;
4140 return 0;
4141}
4142_ACEOF
4143rm -f conftest.$ac_objext conftest$ac_exeext
4144if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4145 (eval $ac_link) 2>&5
4146 ac_status=$?
4147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4148 (exit $ac_status); } &&
4149 { ac_try='test -s conftest$ac_exeext'
4150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4151 (eval $ac_try) 2>&5
4152 ac_status=$?
4153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4154 (exit $ac_status); }; }; then
4155 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004156else
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 echo "$as_me: failed program was:" >&5
4158cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004159fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004160rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4161if test "$ac_cv_search_opendir" = no; then
4162 for ac_lib in dir; do
4163 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4164 cat >conftest.$ac_ext <<_ACEOF
4165#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004166#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004167
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004168/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004169#ifdef __cplusplus
4170extern "C"
4171#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004172/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004173 builtin and then its argument prototype would still apply. */
4174char opendir ();
4175#ifdef F77_DUMMY_MAIN
4176# ifdef __cplusplus
4177 extern "C"
4178# endif
4179 int F77_DUMMY_MAIN() { return 1; }
4180#endif
4181int
4182main ()
4183{
4184opendir ();
4185 ;
4186 return 0;
4187}
4188_ACEOF
4189rm -f conftest.$ac_objext conftest$ac_exeext
4190if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4191 (eval $ac_link) 2>&5
4192 ac_status=$?
4193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4194 (exit $ac_status); } &&
4195 { ac_try='test -s conftest$ac_exeext'
4196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4197 (eval $ac_try) 2>&5
4198 ac_status=$?
4199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4200 (exit $ac_status); }; }; then
4201 ac_cv_search_opendir="-l$ac_lib"
4202break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004203else
Martin v. Löwis11437992002-04-12 09:54:03 +00004204 echo "$as_me: failed program was:" >&5
4205cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004206fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004207rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4208 done
4209fi
4210LIBS=$ac_func_search_save_LIBS
4211fi
4212echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4213echo "${ECHO_T}$ac_cv_search_opendir" >&6
4214if test "$ac_cv_search_opendir" != no; then
4215 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004216
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004217fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004218
Michael W. Hudson54241132001-12-07 15:38:26 +00004219else
Martin v. Löwis11437992002-04-12 09:54:03 +00004220 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4221echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4222if test "${ac_cv_search_opendir+set}" = set; then
4223 echo $ECHO_N "(cached) $ECHO_C" >&6
4224else
4225 ac_func_search_save_LIBS=$LIBS
4226ac_cv_search_opendir=no
4227cat >conftest.$ac_ext <<_ACEOF
4228#line $LINENO "configure"
4229#include "confdefs.h"
4230
4231/* Override any gcc2 internal prototype to avoid an error. */
4232#ifdef __cplusplus
4233extern "C"
4234#endif
4235/* We use char because int might match the return type of a gcc2
4236 builtin and then its argument prototype would still apply. */
4237char opendir ();
4238#ifdef F77_DUMMY_MAIN
4239# ifdef __cplusplus
4240 extern "C"
4241# endif
4242 int F77_DUMMY_MAIN() { return 1; }
4243#endif
4244int
4245main ()
4246{
4247opendir ();
4248 ;
4249 return 0;
4250}
4251_ACEOF
4252rm -f conftest.$ac_objext conftest$ac_exeext
4253if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4254 (eval $ac_link) 2>&5
4255 ac_status=$?
4256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4257 (exit $ac_status); } &&
4258 { ac_try='test -s conftest$ac_exeext'
4259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4260 (eval $ac_try) 2>&5
4261 ac_status=$?
4262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4263 (exit $ac_status); }; }; then
4264 ac_cv_search_opendir="none required"
4265else
4266 echo "$as_me: failed program was:" >&5
4267cat conftest.$ac_ext >&5
4268fi
4269rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4270if test "$ac_cv_search_opendir" = no; then
4271 for ac_lib in x; do
4272 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4273 cat >conftest.$ac_ext <<_ACEOF
4274#line $LINENO "configure"
4275#include "confdefs.h"
4276
4277/* Override any gcc2 internal prototype to avoid an error. */
4278#ifdef __cplusplus
4279extern "C"
4280#endif
4281/* We use char because int might match the return type of a gcc2
4282 builtin and then its argument prototype would still apply. */
4283char opendir ();
4284#ifdef F77_DUMMY_MAIN
4285# ifdef __cplusplus
4286 extern "C"
4287# endif
4288 int F77_DUMMY_MAIN() { return 1; }
4289#endif
4290int
4291main ()
4292{
4293opendir ();
4294 ;
4295 return 0;
4296}
4297_ACEOF
4298rm -f conftest.$ac_objext conftest$ac_exeext
4299if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4300 (eval $ac_link) 2>&5
4301 ac_status=$?
4302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4303 (exit $ac_status); } &&
4304 { ac_try='test -s conftest$ac_exeext'
4305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4306 (eval $ac_try) 2>&5
4307 ac_status=$?
4308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4309 (exit $ac_status); }; }; then
4310 ac_cv_search_opendir="-l$ac_lib"
4311break
4312else
4313 echo "$as_me: failed program was:" >&5
4314cat conftest.$ac_ext >&5
4315fi
4316rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4317 done
4318fi
4319LIBS=$ac_func_search_save_LIBS
4320fi
4321echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4322echo "${ECHO_T}$ac_cv_search_opendir" >&6
4323if test "$ac_cv_search_opendir" != no; then
4324 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4325
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004326fi
4327
4328fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004329
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004330echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4331echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4332if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4333 echo $ECHO_N "(cached) $ECHO_C" >&6
4334else
4335 cat >conftest.$ac_ext <<_ACEOF
4336#line $LINENO "configure"
4337#include "confdefs.h"
4338#include <sys/types.h>
4339#ifdef F77_DUMMY_MAIN
4340# ifdef __cplusplus
4341 extern "C"
4342# endif
4343 int F77_DUMMY_MAIN() { return 1; }
4344#endif
4345int
4346main ()
4347{
4348return makedev(0, 0);
4349 ;
4350 return 0;
4351}
4352_ACEOF
4353rm -f conftest.$ac_objext conftest$ac_exeext
4354if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4355 (eval $ac_link) 2>&5
4356 ac_status=$?
4357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4358 (exit $ac_status); } &&
4359 { ac_try='test -s conftest$ac_exeext'
4360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4361 (eval $ac_try) 2>&5
4362 ac_status=$?
4363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4364 (exit $ac_status); }; }; then
4365 ac_cv_header_sys_types_h_makedev=yes
4366else
4367 echo "$as_me: failed program was:" >&5
4368cat conftest.$ac_ext >&5
4369ac_cv_header_sys_types_h_makedev=no
4370fi
4371rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4372
4373fi
4374echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4375echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4376
4377if test $ac_cv_header_sys_types_h_makedev = no; then
4378if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4379 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4380echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4381if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4382 echo $ECHO_N "(cached) $ECHO_C" >&6
4383fi
4384echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4385echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4386else
4387 # Is the header compilable?
4388echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4389echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4390cat >conftest.$ac_ext <<_ACEOF
4391#line $LINENO "configure"
4392#include "confdefs.h"
4393$ac_includes_default
4394#include <sys/mkdev.h>
4395_ACEOF
4396rm -f conftest.$ac_objext
4397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4398 (eval $ac_compile) 2>&5
4399 ac_status=$?
4400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4401 (exit $ac_status); } &&
4402 { ac_try='test -s conftest.$ac_objext'
4403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4404 (eval $ac_try) 2>&5
4405 ac_status=$?
4406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4407 (exit $ac_status); }; }; then
4408 ac_header_compiler=yes
4409else
4410 echo "$as_me: failed program was:" >&5
4411cat conftest.$ac_ext >&5
4412ac_header_compiler=no
4413fi
4414rm -f conftest.$ac_objext conftest.$ac_ext
4415echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4416echo "${ECHO_T}$ac_header_compiler" >&6
4417
4418# Is the header present?
4419echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4420echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4421cat >conftest.$ac_ext <<_ACEOF
4422#line $LINENO "configure"
4423#include "confdefs.h"
4424#include <sys/mkdev.h>
4425_ACEOF
4426if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4427 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4428 ac_status=$?
4429 egrep -v '^ *\+' conftest.er1 >conftest.err
4430 rm -f conftest.er1
4431 cat conftest.err >&5
4432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4433 (exit $ac_status); } >/dev/null; then
4434 if test -s conftest.err; then
4435 ac_cpp_err=$ac_c_preproc_warn_flag
4436 else
4437 ac_cpp_err=
4438 fi
4439else
4440 ac_cpp_err=yes
4441fi
4442if test -z "$ac_cpp_err"; then
4443 ac_header_preproc=yes
4444else
4445 echo "$as_me: failed program was:" >&5
4446 cat conftest.$ac_ext >&5
4447 ac_header_preproc=no
4448fi
4449rm -f conftest.err conftest.$ac_ext
4450echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4451echo "${ECHO_T}$ac_header_preproc" >&6
4452
4453# So? What about this header?
4454case $ac_header_compiler:$ac_header_preproc in
4455 yes:no )
4456 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4457echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4458 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4459echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4460 no:yes )
4461 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4462echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4463 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4464echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4465 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4466echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4467esac
4468echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4469echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4470if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4471 echo $ECHO_N "(cached) $ECHO_C" >&6
4472else
4473 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4474fi
4475echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4476echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4477
4478fi
4479if test $ac_cv_header_sys_mkdev_h = yes; then
4480
4481cat >>confdefs.h <<\_ACEOF
4482#define MAJOR_IN_MKDEV 1
4483_ACEOF
4484
4485fi
4486
4487
4488
4489 if test $ac_cv_header_sys_mkdev_h = no; then
4490 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4491 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4492echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4493if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4494 echo $ECHO_N "(cached) $ECHO_C" >&6
4495fi
4496echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4497echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4498else
4499 # Is the header compilable?
4500echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4501echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4502cat >conftest.$ac_ext <<_ACEOF
4503#line $LINENO "configure"
4504#include "confdefs.h"
4505$ac_includes_default
4506#include <sys/sysmacros.h>
4507_ACEOF
4508rm -f conftest.$ac_objext
4509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4510 (eval $ac_compile) 2>&5
4511 ac_status=$?
4512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4513 (exit $ac_status); } &&
4514 { ac_try='test -s conftest.$ac_objext'
4515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4516 (eval $ac_try) 2>&5
4517 ac_status=$?
4518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4519 (exit $ac_status); }; }; then
4520 ac_header_compiler=yes
4521else
4522 echo "$as_me: failed program was:" >&5
4523cat conftest.$ac_ext >&5
4524ac_header_compiler=no
4525fi
4526rm -f conftest.$ac_objext conftest.$ac_ext
4527echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4528echo "${ECHO_T}$ac_header_compiler" >&6
4529
4530# Is the header present?
4531echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4532echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4533cat >conftest.$ac_ext <<_ACEOF
4534#line $LINENO "configure"
4535#include "confdefs.h"
4536#include <sys/sysmacros.h>
4537_ACEOF
4538if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4539 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4540 ac_status=$?
4541 egrep -v '^ *\+' conftest.er1 >conftest.err
4542 rm -f conftest.er1
4543 cat conftest.err >&5
4544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4545 (exit $ac_status); } >/dev/null; then
4546 if test -s conftest.err; then
4547 ac_cpp_err=$ac_c_preproc_warn_flag
4548 else
4549 ac_cpp_err=
4550 fi
4551else
4552 ac_cpp_err=yes
4553fi
4554if test -z "$ac_cpp_err"; then
4555 ac_header_preproc=yes
4556else
4557 echo "$as_me: failed program was:" >&5
4558 cat conftest.$ac_ext >&5
4559 ac_header_preproc=no
4560fi
4561rm -f conftest.err conftest.$ac_ext
4562echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4563echo "${ECHO_T}$ac_header_preproc" >&6
4564
4565# So? What about this header?
4566case $ac_header_compiler:$ac_header_preproc in
4567 yes:no )
4568 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4569echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4570 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4571echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4572 no:yes )
4573 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4574echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4575 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4576echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4577 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4578echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4579esac
4580echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4581echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4582if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4583 echo $ECHO_N "(cached) $ECHO_C" >&6
4584else
4585 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4586fi
4587echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4588echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4589
4590fi
4591if test $ac_cv_header_sys_sysmacros_h = yes; then
4592
4593cat >>confdefs.h <<\_ACEOF
4594#define MAJOR_IN_SYSMACROS 1
4595_ACEOF
4596
4597fi
4598
4599
4600 fi
4601fi
4602
Michael W. Hudson54241132001-12-07 15:38:26 +00004603
Guido van Rossum627b2d71993-12-24 10:39:16 +00004604# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004605was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004606echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4607echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4608cat >conftest.$ac_ext <<_ACEOF
4609#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004610#include "confdefs.h"
4611#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004612
4613_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004614if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4615 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004616 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004617else
Martin v. Löwis11437992002-04-12 09:54:03 +00004618
4619
4620cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004621#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004622_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004623
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004624
Guido van Rossum627b2d71993-12-24 10:39:16 +00004625fi
4626rm -f conftest*
4627
Martin v. Löwis11437992002-04-12 09:54:03 +00004628echo "$as_me:$LINENO: result: $was_it_defined" >&5
4629echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004630
Neal Norwitz11690112002-07-30 01:08:28 +00004631# Check whether using makedev requires defining _OSF_SOURCE
4632echo "$as_me:$LINENO: checking for makedev" >&5
4633echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4634cat >conftest.$ac_ext <<_ACEOF
4635#line $LINENO "configure"
4636#include "confdefs.h"
4637 #include <sys/types.h>
4638#ifdef F77_DUMMY_MAIN
4639# ifdef __cplusplus
4640 extern "C"
4641# endif
4642 int F77_DUMMY_MAIN() { return 1; }
4643#endif
4644int
4645main ()
4646{
4647 makedev(0, 0)
4648 ;
4649 return 0;
4650}
4651_ACEOF
4652rm -f conftest.$ac_objext conftest$ac_exeext
4653if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4654 (eval $ac_link) 2>&5
4655 ac_status=$?
4656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4657 (exit $ac_status); } &&
4658 { ac_try='test -s conftest$ac_exeext'
4659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4660 (eval $ac_try) 2>&5
4661 ac_status=$?
4662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4663 (exit $ac_status); }; }; then
4664 ac_cv_has_makedev=yes
4665else
4666 echo "$as_me: failed program was:" >&5
4667cat conftest.$ac_ext >&5
4668ac_cv_has_makedev=no
4669fi
4670rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4671if test "$ac_cv_has_makedev" = "no"; then
4672 # we didn't link, try if _OSF_SOURCE will allow us to link
4673 cat >conftest.$ac_ext <<_ACEOF
4674#line $LINENO "configure"
4675#include "confdefs.h"
4676
4677 #define _OSF_SOURCE 1
4678 #include <sys/types.h>
4679
4680#ifdef F77_DUMMY_MAIN
4681# ifdef __cplusplus
4682 extern "C"
4683# endif
4684 int F77_DUMMY_MAIN() { return 1; }
4685#endif
4686int
4687main ()
4688{
4689 makedev(0, 0)
4690 ;
4691 return 0;
4692}
4693_ACEOF
4694rm -f conftest.$ac_objext conftest$ac_exeext
4695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4696 (eval $ac_link) 2>&5
4697 ac_status=$?
4698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4699 (exit $ac_status); } &&
4700 { ac_try='test -s conftest$ac_exeext'
4701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4702 (eval $ac_try) 2>&5
4703 ac_status=$?
4704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4705 (exit $ac_status); }; }; then
4706 ac_cv_has_makedev=yes
4707else
4708 echo "$as_me: failed program was:" >&5
4709cat conftest.$ac_ext >&5
4710ac_cv_has_makedev=no
4711fi
4712rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4713 if test "$ac_cv_has_makedev" = "yes"; then
4714
4715cat >>confdefs.h <<\_ACEOF
4716#define _OSF_SOURCE 1
4717_ACEOF
4718
4719 fi
4720fi
4721echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4722echo "${ECHO_T}$ac_cv_has_makedev" >&6
4723if test "$ac_cv_has_makedev" = "yes"; then
4724
4725cat >>confdefs.h <<\_ACEOF
4726#define HAVE_MAKEDEV 1
4727_ACEOF
4728
4729fi
4730
Martin v. Löwis399a6892002-10-04 10:22:02 +00004731# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4732# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4733# defined, but the compiler does not support pragma redefine_extname,
4734# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4735# structures (such as rlimit64) without declaring them. As a
4736# work-around, disable LFS on such configurations
4737
4738use_lfs=yes
4739echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4740echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4741cat >conftest.$ac_ext <<_ACEOF
4742#line $LINENO "configure"
4743#include "confdefs.h"
4744
4745#define _LARGEFILE_SOURCE 1
4746#define _FILE_OFFSET_BITS 64
4747#include <sys/resource.h>
4748
4749#ifdef F77_DUMMY_MAIN
4750# ifdef __cplusplus
4751 extern "C"
4752# endif
4753 int F77_DUMMY_MAIN() { return 1; }
4754#endif
4755int
4756main ()
4757{
4758struct rlimit foo;
4759 ;
4760 return 0;
4761}
4762_ACEOF
4763rm -f conftest.$ac_objext
4764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4765 (eval $ac_compile) 2>&5
4766 ac_status=$?
4767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4768 (exit $ac_status); } &&
4769 { ac_try='test -s conftest.$ac_objext'
4770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4771 (eval $ac_try) 2>&5
4772 ac_status=$?
4773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4774 (exit $ac_status); }; }; then
4775 sol_lfs_bug=no
4776else
4777 echo "$as_me: failed program was:" >&5
4778cat conftest.$ac_ext >&5
4779sol_lfs_bug=yes
4780fi
4781rm -f conftest.$ac_objext conftest.$ac_ext
4782echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4783echo "${ECHO_T}$sol_lfs_bug" >&6
4784if test "$sol_lfs_bug" = "yes"; then
4785 use_lfs=no
4786fi
4787
4788if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004789# Two defines needed to enable largefile support on various platforms
4790# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004791
Martin v. Löwis11437992002-04-12 09:54:03 +00004792cat >>confdefs.h <<\_ACEOF
4793#define _LARGEFILE_SOURCE 1
4794_ACEOF
4795
4796
4797cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004798#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004799_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004800
Martin v. Löwis399a6892002-10-04 10:22:02 +00004801fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004802
Guido van Rossum84e7b241996-08-19 21:59:00 +00004803# Add some code to confdefs.h so that the test for off_t works on SCO
4804cat >> confdefs.h <<\EOF
4805#if defined(SCO_DS)
4806#undef _OFF_T
4807#endif
4808EOF
4809
Guido van Rossumef2255b2000-03-10 22:30:29 +00004810# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004811echo "$as_me:$LINENO: checking for mode_t" >&5
4812echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4813if test "${ac_cv_type_mode_t+set}" = set; then
4814 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004815else
Martin v. Löwis11437992002-04-12 09:54:03 +00004816 cat >conftest.$ac_ext <<_ACEOF
4817#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004818#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004819$ac_includes_default
4820#ifdef F77_DUMMY_MAIN
4821# ifdef __cplusplus
4822 extern "C"
4823# endif
4824 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004826int
4827main ()
4828{
4829if ((mode_t *) 0)
4830 return 0;
4831if (sizeof (mode_t))
4832 return 0;
4833 ;
4834 return 0;
4835}
4836_ACEOF
4837rm -f conftest.$ac_objext
4838if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4839 (eval $ac_compile) 2>&5
4840 ac_status=$?
4841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4842 (exit $ac_status); } &&
4843 { ac_try='test -s conftest.$ac_objext'
4844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4845 (eval $ac_try) 2>&5
4846 ac_status=$?
4847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4848 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004849 ac_cv_type_mode_t=yes
4850else
Martin v. Löwis11437992002-04-12 09:54:03 +00004851 echo "$as_me: failed program was:" >&5
4852cat conftest.$ac_ext >&5
4853ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004854fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004855rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004856fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004857echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4858echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4859if test $ac_cv_type_mode_t = yes; then
4860 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004861else
Martin v. Löwis11437992002-04-12 09:54:03 +00004862
4863cat >>confdefs.h <<_ACEOF
4864#define mode_t int
4865_ACEOF
4866
4867fi
4868
4869echo "$as_me:$LINENO: checking for off_t" >&5
4870echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4871if test "${ac_cv_type_off_t+set}" = set; then
4872 echo $ECHO_N "(cached) $ECHO_C" >&6
4873else
4874 cat >conftest.$ac_ext <<_ACEOF
4875#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004876#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004877$ac_includes_default
4878#ifdef F77_DUMMY_MAIN
4879# ifdef __cplusplus
4880 extern "C"
4881# endif
4882 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004884int
4885main ()
4886{
4887if ((off_t *) 0)
4888 return 0;
4889if (sizeof (off_t))
4890 return 0;
4891 ;
4892 return 0;
4893}
4894_ACEOF
4895rm -f conftest.$ac_objext
4896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4897 (eval $ac_compile) 2>&5
4898 ac_status=$?
4899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4900 (exit $ac_status); } &&
4901 { ac_try='test -s conftest.$ac_objext'
4902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4903 (eval $ac_try) 2>&5
4904 ac_status=$?
4905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4906 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004907 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004908else
Martin v. Löwis11437992002-04-12 09:54:03 +00004909 echo "$as_me: failed program was:" >&5
4910cat conftest.$ac_ext >&5
4911ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004912fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004913rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004914fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004915echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4916echo "${ECHO_T}$ac_cv_type_off_t" >&6
4917if test $ac_cv_type_off_t = yes; then
4918 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004919else
Martin v. Löwis11437992002-04-12 09:54:03 +00004920
4921cat >>confdefs.h <<_ACEOF
4922#define off_t long
4923_ACEOF
4924
4925fi
4926
4927echo "$as_me:$LINENO: checking for pid_t" >&5
4928echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4929if test "${ac_cv_type_pid_t+set}" = set; then
4930 echo $ECHO_N "(cached) $ECHO_C" >&6
4931else
4932 cat >conftest.$ac_ext <<_ACEOF
4933#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004934#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004935$ac_includes_default
4936#ifdef F77_DUMMY_MAIN
4937# ifdef __cplusplus
4938 extern "C"
4939# endif
4940 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004942int
4943main ()
4944{
4945if ((pid_t *) 0)
4946 return 0;
4947if (sizeof (pid_t))
4948 return 0;
4949 ;
4950 return 0;
4951}
4952_ACEOF
4953rm -f conftest.$ac_objext
4954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4955 (eval $ac_compile) 2>&5
4956 ac_status=$?
4957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4958 (exit $ac_status); } &&
4959 { ac_try='test -s conftest.$ac_objext'
4960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4961 (eval $ac_try) 2>&5
4962 ac_status=$?
4963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4964 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004965 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004966else
Martin v. Löwis11437992002-04-12 09:54:03 +00004967 echo "$as_me: failed program was:" >&5
4968cat conftest.$ac_ext >&5
4969ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004970fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004971rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004972fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004973echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4974echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4975if test $ac_cv_type_pid_t = yes; then
4976 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004977else
Martin v. Löwis11437992002-04-12 09:54:03 +00004978
4979cat >>confdefs.h <<_ACEOF
4980#define pid_t int
4981_ACEOF
4982
4983fi
4984
4985echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4986echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4987if test "${ac_cv_type_signal+set}" = set; then
4988 echo $ECHO_N "(cached) $ECHO_C" >&6
4989else
4990 cat >conftest.$ac_ext <<_ACEOF
4991#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004992#include "confdefs.h"
4993#include <sys/types.h>
4994#include <signal.h>
4995#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004996# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004997#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004998#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004999extern "C" void (*signal (int, void (*)(int)))(int);
5000#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005001void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005002#endif
5003
Martin v. Löwis11437992002-04-12 09:54:03 +00005004#ifdef F77_DUMMY_MAIN
5005# ifdef __cplusplus
5006 extern "C"
5007# endif
5008 int F77_DUMMY_MAIN() { return 1; }
5009#endif
5010int
5011main ()
5012{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005013int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005014 ;
5015 return 0;
5016}
5017_ACEOF
5018rm -f conftest.$ac_objext
5019if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5020 (eval $ac_compile) 2>&5
5021 ac_status=$?
5022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5023 (exit $ac_status); } &&
5024 { ac_try='test -s conftest.$ac_objext'
5025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5026 (eval $ac_try) 2>&5
5027 ac_status=$?
5028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5029 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005030 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005031else
Martin v. Löwis11437992002-04-12 09:54:03 +00005032 echo "$as_me: failed program was:" >&5
5033cat conftest.$ac_ext >&5
5034ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005035fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005036rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005037fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005038echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5039echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005040
Martin v. Löwis11437992002-04-12 09:54:03 +00005041cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005042#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005043_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005044
Michael W. Hudson54241132001-12-07 15:38:26 +00005045
Martin v. Löwis11437992002-04-12 09:54:03 +00005046echo "$as_me:$LINENO: checking for size_t" >&5
5047echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5048if test "${ac_cv_type_size_t+set}" = set; then
5049 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005050else
Martin v. Löwis11437992002-04-12 09:54:03 +00005051 cat >conftest.$ac_ext <<_ACEOF
5052#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005053#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005054$ac_includes_default
5055#ifdef F77_DUMMY_MAIN
5056# ifdef __cplusplus
5057 extern "C"
5058# endif
5059 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005061int
5062main ()
5063{
5064if ((size_t *) 0)
5065 return 0;
5066if (sizeof (size_t))
5067 return 0;
5068 ;
5069 return 0;
5070}
5071_ACEOF
5072rm -f conftest.$ac_objext
5073if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5074 (eval $ac_compile) 2>&5
5075 ac_status=$?
5076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5077 (exit $ac_status); } &&
5078 { ac_try='test -s conftest.$ac_objext'
5079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5080 (eval $ac_try) 2>&5
5081 ac_status=$?
5082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5083 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005084 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005085else
Martin v. Löwis11437992002-04-12 09:54:03 +00005086 echo "$as_me: failed program was:" >&5
5087cat conftest.$ac_ext >&5
5088ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005089fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005090rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005091fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005092echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5093echo "${ECHO_T}$ac_cv_type_size_t" >&6
5094if test $ac_cv_type_size_t = yes; then
5095 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005096else
Martin v. Löwis11437992002-04-12 09:54:03 +00005097
5098cat >>confdefs.h <<_ACEOF
5099#define size_t unsigned
5100_ACEOF
5101
5102fi
5103
5104echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5105echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5106if test "${ac_cv_type_uid_t+set}" = set; then
5107 echo $ECHO_N "(cached) $ECHO_C" >&6
5108else
5109 cat >conftest.$ac_ext <<_ACEOF
5110#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005111#include "confdefs.h"
5112#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005113
5114_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5116 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005117 ac_cv_type_uid_t=yes
5118else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005119 ac_cv_type_uid_t=no
5120fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005121rm -f conftest*
5122
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005123fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005124echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5125echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005126if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005127
Martin v. Löwis11437992002-04-12 09:54:03 +00005128cat >>confdefs.h <<\_ACEOF
5129#define uid_t int
5130_ACEOF
5131
5132
5133cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005134#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005135_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005136
5137fi
5138
Jack Jansendd19cf82001-12-06 22:36:17 +00005139
Michael W. Hudson54241132001-12-07 15:38:26 +00005140# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005141echo "$as_me:$LINENO: checking for int" >&5
5142echo $ECHO_N "checking for int... $ECHO_C" >&6
5143if test "${ac_cv_type_int+set}" = set; then
5144 echo $ECHO_N "(cached) $ECHO_C" >&6
5145else
5146 cat >conftest.$ac_ext <<_ACEOF
5147#line $LINENO "configure"
5148#include "confdefs.h"
5149$ac_includes_default
5150#ifdef F77_DUMMY_MAIN
5151# ifdef __cplusplus
5152 extern "C"
5153# endif
5154 int F77_DUMMY_MAIN() { return 1; }
5155#endif
5156int
5157main ()
5158{
5159if ((int *) 0)
5160 return 0;
5161if (sizeof (int))
5162 return 0;
5163 ;
5164 return 0;
5165}
5166_ACEOF
5167rm -f conftest.$ac_objext
5168if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5169 (eval $ac_compile) 2>&5
5170 ac_status=$?
5171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5172 (exit $ac_status); } &&
5173 { ac_try='test -s conftest.$ac_objext'
5174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5175 (eval $ac_try) 2>&5
5176 ac_status=$?
5177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5178 (exit $ac_status); }; }; then
5179 ac_cv_type_int=yes
5180else
5181 echo "$as_me: failed program was:" >&5
5182cat conftest.$ac_ext >&5
5183ac_cv_type_int=no
5184fi
5185rm -f conftest.$ac_objext conftest.$ac_ext
5186fi
5187echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5188echo "${ECHO_T}$ac_cv_type_int" >&6
5189
5190echo "$as_me:$LINENO: checking size of int" >&5
5191echo $ECHO_N "checking size of int... $ECHO_C" >&6
5192if test "${ac_cv_sizeof_int+set}" = set; then
5193 echo $ECHO_N "(cached) $ECHO_C" >&6
5194else
5195 if test "$ac_cv_type_int" = yes; then
5196 # The cast to unsigned long works around a bug in the HP C Compiler
5197 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5198 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5199 # This bug is HP SR number 8606223364.
5200 if test "$cross_compiling" = yes; then
5201 # Depending upon the size, compute the lo and hi bounds.
5202cat >conftest.$ac_ext <<_ACEOF
5203#line $LINENO "configure"
5204#include "confdefs.h"
5205$ac_includes_default
5206#ifdef F77_DUMMY_MAIN
5207# ifdef __cplusplus
5208 extern "C"
5209# endif
5210 int F77_DUMMY_MAIN() { return 1; }
5211#endif
5212int
5213main ()
5214{
5215static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5216test_array [0] = 0
5217
5218 ;
5219 return 0;
5220}
5221_ACEOF
5222rm -f conftest.$ac_objext
5223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5224 (eval $ac_compile) 2>&5
5225 ac_status=$?
5226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5227 (exit $ac_status); } &&
5228 { ac_try='test -s conftest.$ac_objext'
5229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5230 (eval $ac_try) 2>&5
5231 ac_status=$?
5232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5233 (exit $ac_status); }; }; then
5234 ac_lo=0 ac_mid=0
5235 while :; do
5236 cat >conftest.$ac_ext <<_ACEOF
5237#line $LINENO "configure"
5238#include "confdefs.h"
5239$ac_includes_default
5240#ifdef F77_DUMMY_MAIN
5241# ifdef __cplusplus
5242 extern "C"
5243# endif
5244 int F77_DUMMY_MAIN() { return 1; }
5245#endif
5246int
5247main ()
5248{
5249static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5250test_array [0] = 0
5251
5252 ;
5253 return 0;
5254}
5255_ACEOF
5256rm -f conftest.$ac_objext
5257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5258 (eval $ac_compile) 2>&5
5259 ac_status=$?
5260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5261 (exit $ac_status); } &&
5262 { ac_try='test -s conftest.$ac_objext'
5263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5264 (eval $ac_try) 2>&5
5265 ac_status=$?
5266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5267 (exit $ac_status); }; }; then
5268 ac_hi=$ac_mid; break
5269else
5270 echo "$as_me: failed program was:" >&5
5271cat conftest.$ac_ext >&5
5272ac_lo=`expr $ac_mid + 1`
5273 if test $ac_lo -le $ac_mid; then
5274 ac_lo= ac_hi=
5275 break
5276 fi
5277 ac_mid=`expr 2 '*' $ac_mid + 1`
5278fi
5279rm -f conftest.$ac_objext conftest.$ac_ext
5280 done
5281else
5282 echo "$as_me: failed program was:" >&5
5283cat conftest.$ac_ext >&5
5284cat >conftest.$ac_ext <<_ACEOF
5285#line $LINENO "configure"
5286#include "confdefs.h"
5287$ac_includes_default
5288#ifdef F77_DUMMY_MAIN
5289# ifdef __cplusplus
5290 extern "C"
5291# endif
5292 int F77_DUMMY_MAIN() { return 1; }
5293#endif
5294int
5295main ()
5296{
5297static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5298test_array [0] = 0
5299
5300 ;
5301 return 0;
5302}
5303_ACEOF
5304rm -f conftest.$ac_objext
5305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5306 (eval $ac_compile) 2>&5
5307 ac_status=$?
5308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5309 (exit $ac_status); } &&
5310 { ac_try='test -s conftest.$ac_objext'
5311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5312 (eval $ac_try) 2>&5
5313 ac_status=$?
5314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5315 (exit $ac_status); }; }; then
5316 ac_hi=-1 ac_mid=-1
5317 while :; do
5318 cat >conftest.$ac_ext <<_ACEOF
5319#line $LINENO "configure"
5320#include "confdefs.h"
5321$ac_includes_default
5322#ifdef F77_DUMMY_MAIN
5323# ifdef __cplusplus
5324 extern "C"
5325# endif
5326 int F77_DUMMY_MAIN() { return 1; }
5327#endif
5328int
5329main ()
5330{
5331static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5332test_array [0] = 0
5333
5334 ;
5335 return 0;
5336}
5337_ACEOF
5338rm -f conftest.$ac_objext
5339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5340 (eval $ac_compile) 2>&5
5341 ac_status=$?
5342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5343 (exit $ac_status); } &&
5344 { ac_try='test -s conftest.$ac_objext'
5345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5346 (eval $ac_try) 2>&5
5347 ac_status=$?
5348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5349 (exit $ac_status); }; }; then
5350 ac_lo=$ac_mid; break
5351else
5352 echo "$as_me: failed program was:" >&5
5353cat conftest.$ac_ext >&5
5354ac_hi=`expr '(' $ac_mid ')' - 1`
5355 if test $ac_mid -le $ac_hi; then
5356 ac_lo= ac_hi=
5357 break
5358 fi
5359 ac_mid=`expr 2 '*' $ac_mid`
5360fi
5361rm -f conftest.$ac_objext conftest.$ac_ext
5362 done
5363else
5364 echo "$as_me: failed program was:" >&5
5365cat conftest.$ac_ext >&5
5366ac_lo= ac_hi=
5367fi
5368rm -f conftest.$ac_objext conftest.$ac_ext
5369fi
5370rm -f conftest.$ac_objext conftest.$ac_ext
5371# Binary search between lo and hi bounds.
5372while test "x$ac_lo" != "x$ac_hi"; do
5373 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5374 cat >conftest.$ac_ext <<_ACEOF
5375#line $LINENO "configure"
5376#include "confdefs.h"
5377$ac_includes_default
5378#ifdef F77_DUMMY_MAIN
5379# ifdef __cplusplus
5380 extern "C"
5381# endif
5382 int F77_DUMMY_MAIN() { return 1; }
5383#endif
5384int
5385main ()
5386{
5387static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5388test_array [0] = 0
5389
5390 ;
5391 return 0;
5392}
5393_ACEOF
5394rm -f conftest.$ac_objext
5395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5396 (eval $ac_compile) 2>&5
5397 ac_status=$?
5398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5399 (exit $ac_status); } &&
5400 { ac_try='test -s conftest.$ac_objext'
5401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5402 (eval $ac_try) 2>&5
5403 ac_status=$?
5404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5405 (exit $ac_status); }; }; then
5406 ac_hi=$ac_mid
5407else
5408 echo "$as_me: failed program was:" >&5
5409cat conftest.$ac_ext >&5
5410ac_lo=`expr '(' $ac_mid ')' + 1`
5411fi
5412rm -f conftest.$ac_objext conftest.$ac_ext
5413done
5414case $ac_lo in
5415?*) ac_cv_sizeof_int=$ac_lo;;
5416'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5417echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5418 { (exit 1); exit 1; }; } ;;
5419esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005420else
5421 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005422 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5423echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5424 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005425else
Martin v. Löwis11437992002-04-12 09:54:03 +00005426 cat >conftest.$ac_ext <<_ACEOF
5427#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005428#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005429$ac_includes_default
5430long longval () { return (long) (sizeof (int)); }
5431unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005432#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005433#include <stdlib.h>
5434#ifdef F77_DUMMY_MAIN
5435# ifdef __cplusplus
5436 extern "C"
5437# endif
5438 int F77_DUMMY_MAIN() { return 1; }
5439#endif
5440int
5441main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005442{
Martin v. Löwis11437992002-04-12 09:54:03 +00005443
5444 FILE *f = fopen ("conftest.val", "w");
5445 if (! f)
5446 exit (1);
5447 if (((long) (sizeof (int))) < 0)
5448 {
5449 long i = longval ();
5450 if (i != ((long) (sizeof (int))))
5451 exit (1);
5452 fprintf (f, "%ld\n", i);
5453 }
5454 else
5455 {
5456 unsigned long i = ulongval ();
5457 if (i != ((long) (sizeof (int))))
5458 exit (1);
5459 fprintf (f, "%lu\n", i);
5460 }
5461 exit (ferror (f) || fclose (f) != 0);
5462
5463 ;
5464 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005465}
Martin v. Löwis11437992002-04-12 09:54:03 +00005466_ACEOF
5467rm -f conftest$ac_exeext
5468if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5469 (eval $ac_link) 2>&5
5470 ac_status=$?
5471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5472 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5474 (eval $ac_try) 2>&5
5475 ac_status=$?
5476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5477 (exit $ac_status); }; }; then
5478 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005479else
Martin v. Löwis11437992002-04-12 09:54:03 +00005480 echo "$as_me: program exited with status $ac_status" >&5
5481echo "$as_me: failed program was:" >&5
5482cat conftest.$ac_ext >&5
5483( exit $ac_status )
5484{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5485echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5486 { (exit 1); exit 1; }; }
5487fi
5488rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5489fi
5490fi
5491rm -f conftest.val
5492else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005493 ac_cv_sizeof_int=0
5494fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005495fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005496echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5497echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5498cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005499#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005500_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005501
5502
Martin v. Löwis11437992002-04-12 09:54:03 +00005503echo "$as_me:$LINENO: checking for long" >&5
5504echo $ECHO_N "checking for long... $ECHO_C" >&6
5505if test "${ac_cv_type_long+set}" = set; then
5506 echo $ECHO_N "(cached) $ECHO_C" >&6
5507else
5508 cat >conftest.$ac_ext <<_ACEOF
5509#line $LINENO "configure"
5510#include "confdefs.h"
5511$ac_includes_default
5512#ifdef F77_DUMMY_MAIN
5513# ifdef __cplusplus
5514 extern "C"
5515# endif
5516 int F77_DUMMY_MAIN() { return 1; }
5517#endif
5518int
5519main ()
5520{
5521if ((long *) 0)
5522 return 0;
5523if (sizeof (long))
5524 return 0;
5525 ;
5526 return 0;
5527}
5528_ACEOF
5529rm -f conftest.$ac_objext
5530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5531 (eval $ac_compile) 2>&5
5532 ac_status=$?
5533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5534 (exit $ac_status); } &&
5535 { ac_try='test -s conftest.$ac_objext'
5536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5537 (eval $ac_try) 2>&5
5538 ac_status=$?
5539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5540 (exit $ac_status); }; }; then
5541 ac_cv_type_long=yes
5542else
5543 echo "$as_me: failed program was:" >&5
5544cat conftest.$ac_ext >&5
5545ac_cv_type_long=no
5546fi
5547rm -f conftest.$ac_objext conftest.$ac_ext
5548fi
5549echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5550echo "${ECHO_T}$ac_cv_type_long" >&6
5551
5552echo "$as_me:$LINENO: checking size of long" >&5
5553echo $ECHO_N "checking size of long... $ECHO_C" >&6
5554if test "${ac_cv_sizeof_long+set}" = set; then
5555 echo $ECHO_N "(cached) $ECHO_C" >&6
5556else
5557 if test "$ac_cv_type_long" = yes; then
5558 # The cast to unsigned long works around a bug in the HP C Compiler
5559 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5560 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5561 # This bug is HP SR number 8606223364.
5562 if test "$cross_compiling" = yes; then
5563 # Depending upon the size, compute the lo and hi bounds.
5564cat >conftest.$ac_ext <<_ACEOF
5565#line $LINENO "configure"
5566#include "confdefs.h"
5567$ac_includes_default
5568#ifdef F77_DUMMY_MAIN
5569# ifdef __cplusplus
5570 extern "C"
5571# endif
5572 int F77_DUMMY_MAIN() { return 1; }
5573#endif
5574int
5575main ()
5576{
5577static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5578test_array [0] = 0
5579
5580 ;
5581 return 0;
5582}
5583_ACEOF
5584rm -f conftest.$ac_objext
5585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5586 (eval $ac_compile) 2>&5
5587 ac_status=$?
5588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5589 (exit $ac_status); } &&
5590 { ac_try='test -s conftest.$ac_objext'
5591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5592 (eval $ac_try) 2>&5
5593 ac_status=$?
5594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5595 (exit $ac_status); }; }; then
5596 ac_lo=0 ac_mid=0
5597 while :; do
5598 cat >conftest.$ac_ext <<_ACEOF
5599#line $LINENO "configure"
5600#include "confdefs.h"
5601$ac_includes_default
5602#ifdef F77_DUMMY_MAIN
5603# ifdef __cplusplus
5604 extern "C"
5605# endif
5606 int F77_DUMMY_MAIN() { return 1; }
5607#endif
5608int
5609main ()
5610{
5611static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5612test_array [0] = 0
5613
5614 ;
5615 return 0;
5616}
5617_ACEOF
5618rm -f conftest.$ac_objext
5619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5620 (eval $ac_compile) 2>&5
5621 ac_status=$?
5622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5623 (exit $ac_status); } &&
5624 { ac_try='test -s conftest.$ac_objext'
5625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5626 (eval $ac_try) 2>&5
5627 ac_status=$?
5628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5629 (exit $ac_status); }; }; then
5630 ac_hi=$ac_mid; break
5631else
5632 echo "$as_me: failed program was:" >&5
5633cat conftest.$ac_ext >&5
5634ac_lo=`expr $ac_mid + 1`
5635 if test $ac_lo -le $ac_mid; then
5636 ac_lo= ac_hi=
5637 break
5638 fi
5639 ac_mid=`expr 2 '*' $ac_mid + 1`
5640fi
5641rm -f conftest.$ac_objext conftest.$ac_ext
5642 done
5643else
5644 echo "$as_me: failed program was:" >&5
5645cat conftest.$ac_ext >&5
5646cat >conftest.$ac_ext <<_ACEOF
5647#line $LINENO "configure"
5648#include "confdefs.h"
5649$ac_includes_default
5650#ifdef F77_DUMMY_MAIN
5651# ifdef __cplusplus
5652 extern "C"
5653# endif
5654 int F77_DUMMY_MAIN() { return 1; }
5655#endif
5656int
5657main ()
5658{
5659static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5660test_array [0] = 0
5661
5662 ;
5663 return 0;
5664}
5665_ACEOF
5666rm -f conftest.$ac_objext
5667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5668 (eval $ac_compile) 2>&5
5669 ac_status=$?
5670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5671 (exit $ac_status); } &&
5672 { ac_try='test -s conftest.$ac_objext'
5673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5674 (eval $ac_try) 2>&5
5675 ac_status=$?
5676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5677 (exit $ac_status); }; }; then
5678 ac_hi=-1 ac_mid=-1
5679 while :; do
5680 cat >conftest.$ac_ext <<_ACEOF
5681#line $LINENO "configure"
5682#include "confdefs.h"
5683$ac_includes_default
5684#ifdef F77_DUMMY_MAIN
5685# ifdef __cplusplus
5686 extern "C"
5687# endif
5688 int F77_DUMMY_MAIN() { return 1; }
5689#endif
5690int
5691main ()
5692{
5693static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5694test_array [0] = 0
5695
5696 ;
5697 return 0;
5698}
5699_ACEOF
5700rm -f conftest.$ac_objext
5701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5702 (eval $ac_compile) 2>&5
5703 ac_status=$?
5704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5705 (exit $ac_status); } &&
5706 { ac_try='test -s conftest.$ac_objext'
5707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5708 (eval $ac_try) 2>&5
5709 ac_status=$?
5710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5711 (exit $ac_status); }; }; then
5712 ac_lo=$ac_mid; break
5713else
5714 echo "$as_me: failed program was:" >&5
5715cat conftest.$ac_ext >&5
5716ac_hi=`expr '(' $ac_mid ')' - 1`
5717 if test $ac_mid -le $ac_hi; then
5718 ac_lo= ac_hi=
5719 break
5720 fi
5721 ac_mid=`expr 2 '*' $ac_mid`
5722fi
5723rm -f conftest.$ac_objext conftest.$ac_ext
5724 done
5725else
5726 echo "$as_me: failed program was:" >&5
5727cat conftest.$ac_ext >&5
5728ac_lo= ac_hi=
5729fi
5730rm -f conftest.$ac_objext conftest.$ac_ext
5731fi
5732rm -f conftest.$ac_objext conftest.$ac_ext
5733# Binary search between lo and hi bounds.
5734while test "x$ac_lo" != "x$ac_hi"; do
5735 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5736 cat >conftest.$ac_ext <<_ACEOF
5737#line $LINENO "configure"
5738#include "confdefs.h"
5739$ac_includes_default
5740#ifdef F77_DUMMY_MAIN
5741# ifdef __cplusplus
5742 extern "C"
5743# endif
5744 int F77_DUMMY_MAIN() { return 1; }
5745#endif
5746int
5747main ()
5748{
5749static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5750test_array [0] = 0
5751
5752 ;
5753 return 0;
5754}
5755_ACEOF
5756rm -f conftest.$ac_objext
5757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5758 (eval $ac_compile) 2>&5
5759 ac_status=$?
5760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5761 (exit $ac_status); } &&
5762 { ac_try='test -s conftest.$ac_objext'
5763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5764 (eval $ac_try) 2>&5
5765 ac_status=$?
5766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5767 (exit $ac_status); }; }; then
5768 ac_hi=$ac_mid
5769else
5770 echo "$as_me: failed program was:" >&5
5771cat conftest.$ac_ext >&5
5772ac_lo=`expr '(' $ac_mid ')' + 1`
5773fi
5774rm -f conftest.$ac_objext conftest.$ac_ext
5775done
5776case $ac_lo in
5777?*) ac_cv_sizeof_long=$ac_lo;;
5778'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5779echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5780 { (exit 1); exit 1; }; } ;;
5781esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005782else
5783 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005784 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5785echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5786 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005787else
Martin v. Löwis11437992002-04-12 09:54:03 +00005788 cat >conftest.$ac_ext <<_ACEOF
5789#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005790#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005791$ac_includes_default
5792long longval () { return (long) (sizeof (long)); }
5793unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005794#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005795#include <stdlib.h>
5796#ifdef F77_DUMMY_MAIN
5797# ifdef __cplusplus
5798 extern "C"
5799# endif
5800 int F77_DUMMY_MAIN() { return 1; }
5801#endif
5802int
5803main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005804{
Martin v. Löwis11437992002-04-12 09:54:03 +00005805
5806 FILE *f = fopen ("conftest.val", "w");
5807 if (! f)
5808 exit (1);
5809 if (((long) (sizeof (long))) < 0)
5810 {
5811 long i = longval ();
5812 if (i != ((long) (sizeof (long))))
5813 exit (1);
5814 fprintf (f, "%ld\n", i);
5815 }
5816 else
5817 {
5818 unsigned long i = ulongval ();
5819 if (i != ((long) (sizeof (long))))
5820 exit (1);
5821 fprintf (f, "%lu\n", i);
5822 }
5823 exit (ferror (f) || fclose (f) != 0);
5824
5825 ;
5826 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005827}
Martin v. Löwis11437992002-04-12 09:54:03 +00005828_ACEOF
5829rm -f conftest$ac_exeext
5830if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5831 (eval $ac_link) 2>&5
5832 ac_status=$?
5833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5834 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5836 (eval $ac_try) 2>&5
5837 ac_status=$?
5838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5839 (exit $ac_status); }; }; then
5840 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005841else
Martin v. Löwis11437992002-04-12 09:54:03 +00005842 echo "$as_me: program exited with status $ac_status" >&5
5843echo "$as_me: failed program was:" >&5
5844cat conftest.$ac_ext >&5
5845( exit $ac_status )
5846{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5847echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5848 { (exit 1); exit 1; }; }
5849fi
5850rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5851fi
5852fi
5853rm -f conftest.val
5854else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005855 ac_cv_sizeof_long=0
5856fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005857fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005858echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5859echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5860cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005861#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005862_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005863
5864
Martin v. Löwis11437992002-04-12 09:54:03 +00005865echo "$as_me:$LINENO: checking for void *" >&5
5866echo $ECHO_N "checking for void *... $ECHO_C" >&6
5867if test "${ac_cv_type_void_p+set}" = set; then
5868 echo $ECHO_N "(cached) $ECHO_C" >&6
5869else
5870 cat >conftest.$ac_ext <<_ACEOF
5871#line $LINENO "configure"
5872#include "confdefs.h"
5873$ac_includes_default
5874#ifdef F77_DUMMY_MAIN
5875# ifdef __cplusplus
5876 extern "C"
5877# endif
5878 int F77_DUMMY_MAIN() { return 1; }
5879#endif
5880int
5881main ()
5882{
5883if ((void * *) 0)
5884 return 0;
5885if (sizeof (void *))
5886 return 0;
5887 ;
5888 return 0;
5889}
5890_ACEOF
5891rm -f conftest.$ac_objext
5892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5893 (eval $ac_compile) 2>&5
5894 ac_status=$?
5895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5896 (exit $ac_status); } &&
5897 { ac_try='test -s conftest.$ac_objext'
5898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5899 (eval $ac_try) 2>&5
5900 ac_status=$?
5901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5902 (exit $ac_status); }; }; then
5903 ac_cv_type_void_p=yes
5904else
5905 echo "$as_me: failed program was:" >&5
5906cat conftest.$ac_ext >&5
5907ac_cv_type_void_p=no
5908fi
5909rm -f conftest.$ac_objext conftest.$ac_ext
5910fi
5911echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5912echo "${ECHO_T}$ac_cv_type_void_p" >&6
5913
5914echo "$as_me:$LINENO: checking size of void *" >&5
5915echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5916if test "${ac_cv_sizeof_void_p+set}" = set; then
5917 echo $ECHO_N "(cached) $ECHO_C" >&6
5918else
5919 if test "$ac_cv_type_void_p" = yes; then
5920 # The cast to unsigned long works around a bug in the HP C Compiler
5921 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5922 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5923 # This bug is HP SR number 8606223364.
5924 if test "$cross_compiling" = yes; then
5925 # Depending upon the size, compute the lo and hi bounds.
5926cat >conftest.$ac_ext <<_ACEOF
5927#line $LINENO "configure"
5928#include "confdefs.h"
5929$ac_includes_default
5930#ifdef F77_DUMMY_MAIN
5931# ifdef __cplusplus
5932 extern "C"
5933# endif
5934 int F77_DUMMY_MAIN() { return 1; }
5935#endif
5936int
5937main ()
5938{
5939static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5940test_array [0] = 0
5941
5942 ;
5943 return 0;
5944}
5945_ACEOF
5946rm -f conftest.$ac_objext
5947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5948 (eval $ac_compile) 2>&5
5949 ac_status=$?
5950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5951 (exit $ac_status); } &&
5952 { ac_try='test -s conftest.$ac_objext'
5953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5954 (eval $ac_try) 2>&5
5955 ac_status=$?
5956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5957 (exit $ac_status); }; }; then
5958 ac_lo=0 ac_mid=0
5959 while :; do
5960 cat >conftest.$ac_ext <<_ACEOF
5961#line $LINENO "configure"
5962#include "confdefs.h"
5963$ac_includes_default
5964#ifdef F77_DUMMY_MAIN
5965# ifdef __cplusplus
5966 extern "C"
5967# endif
5968 int F77_DUMMY_MAIN() { return 1; }
5969#endif
5970int
5971main ()
5972{
5973static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5974test_array [0] = 0
5975
5976 ;
5977 return 0;
5978}
5979_ACEOF
5980rm -f conftest.$ac_objext
5981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5982 (eval $ac_compile) 2>&5
5983 ac_status=$?
5984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5985 (exit $ac_status); } &&
5986 { ac_try='test -s conftest.$ac_objext'
5987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5988 (eval $ac_try) 2>&5
5989 ac_status=$?
5990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5991 (exit $ac_status); }; }; then
5992 ac_hi=$ac_mid; break
5993else
5994 echo "$as_me: failed program was:" >&5
5995cat conftest.$ac_ext >&5
5996ac_lo=`expr $ac_mid + 1`
5997 if test $ac_lo -le $ac_mid; then
5998 ac_lo= ac_hi=
5999 break
6000 fi
6001 ac_mid=`expr 2 '*' $ac_mid + 1`
6002fi
6003rm -f conftest.$ac_objext conftest.$ac_ext
6004 done
6005else
6006 echo "$as_me: failed program was:" >&5
6007cat conftest.$ac_ext >&5
6008cat >conftest.$ac_ext <<_ACEOF
6009#line $LINENO "configure"
6010#include "confdefs.h"
6011$ac_includes_default
6012#ifdef F77_DUMMY_MAIN
6013# ifdef __cplusplus
6014 extern "C"
6015# endif
6016 int F77_DUMMY_MAIN() { return 1; }
6017#endif
6018int
6019main ()
6020{
6021static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6022test_array [0] = 0
6023
6024 ;
6025 return 0;
6026}
6027_ACEOF
6028rm -f conftest.$ac_objext
6029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6030 (eval $ac_compile) 2>&5
6031 ac_status=$?
6032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6033 (exit $ac_status); } &&
6034 { ac_try='test -s conftest.$ac_objext'
6035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6036 (eval $ac_try) 2>&5
6037 ac_status=$?
6038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6039 (exit $ac_status); }; }; then
6040 ac_hi=-1 ac_mid=-1
6041 while :; do
6042 cat >conftest.$ac_ext <<_ACEOF
6043#line $LINENO "configure"
6044#include "confdefs.h"
6045$ac_includes_default
6046#ifdef F77_DUMMY_MAIN
6047# ifdef __cplusplus
6048 extern "C"
6049# endif
6050 int F77_DUMMY_MAIN() { return 1; }
6051#endif
6052int
6053main ()
6054{
6055static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6056test_array [0] = 0
6057
6058 ;
6059 return 0;
6060}
6061_ACEOF
6062rm -f conftest.$ac_objext
6063if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6064 (eval $ac_compile) 2>&5
6065 ac_status=$?
6066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6067 (exit $ac_status); } &&
6068 { ac_try='test -s conftest.$ac_objext'
6069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6070 (eval $ac_try) 2>&5
6071 ac_status=$?
6072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6073 (exit $ac_status); }; }; then
6074 ac_lo=$ac_mid; break
6075else
6076 echo "$as_me: failed program was:" >&5
6077cat conftest.$ac_ext >&5
6078ac_hi=`expr '(' $ac_mid ')' - 1`
6079 if test $ac_mid -le $ac_hi; then
6080 ac_lo= ac_hi=
6081 break
6082 fi
6083 ac_mid=`expr 2 '*' $ac_mid`
6084fi
6085rm -f conftest.$ac_objext conftest.$ac_ext
6086 done
6087else
6088 echo "$as_me: failed program was:" >&5
6089cat conftest.$ac_ext >&5
6090ac_lo= ac_hi=
6091fi
6092rm -f conftest.$ac_objext conftest.$ac_ext
6093fi
6094rm -f conftest.$ac_objext conftest.$ac_ext
6095# Binary search between lo and hi bounds.
6096while test "x$ac_lo" != "x$ac_hi"; do
6097 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6098 cat >conftest.$ac_ext <<_ACEOF
6099#line $LINENO "configure"
6100#include "confdefs.h"
6101$ac_includes_default
6102#ifdef F77_DUMMY_MAIN
6103# ifdef __cplusplus
6104 extern "C"
6105# endif
6106 int F77_DUMMY_MAIN() { return 1; }
6107#endif
6108int
6109main ()
6110{
6111static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6112test_array [0] = 0
6113
6114 ;
6115 return 0;
6116}
6117_ACEOF
6118rm -f conftest.$ac_objext
6119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6120 (eval $ac_compile) 2>&5
6121 ac_status=$?
6122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6123 (exit $ac_status); } &&
6124 { ac_try='test -s conftest.$ac_objext'
6125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6126 (eval $ac_try) 2>&5
6127 ac_status=$?
6128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6129 (exit $ac_status); }; }; then
6130 ac_hi=$ac_mid
6131else
6132 echo "$as_me: failed program was:" >&5
6133cat conftest.$ac_ext >&5
6134ac_lo=`expr '(' $ac_mid ')' + 1`
6135fi
6136rm -f conftest.$ac_objext conftest.$ac_ext
6137done
6138case $ac_lo in
6139?*) ac_cv_sizeof_void_p=$ac_lo;;
6140'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6141echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6142 { (exit 1); exit 1; }; } ;;
6143esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006144else
6145 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006146 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6147echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6148 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006149else
Martin v. Löwis11437992002-04-12 09:54:03 +00006150 cat >conftest.$ac_ext <<_ACEOF
6151#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006152#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006153$ac_includes_default
6154long longval () { return (long) (sizeof (void *)); }
6155unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006156#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006157#include <stdlib.h>
6158#ifdef F77_DUMMY_MAIN
6159# ifdef __cplusplus
6160 extern "C"
6161# endif
6162 int F77_DUMMY_MAIN() { return 1; }
6163#endif
6164int
6165main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006166{
Martin v. Löwis11437992002-04-12 09:54:03 +00006167
6168 FILE *f = fopen ("conftest.val", "w");
6169 if (! f)
6170 exit (1);
6171 if (((long) (sizeof (void *))) < 0)
6172 {
6173 long i = longval ();
6174 if (i != ((long) (sizeof (void *))))
6175 exit (1);
6176 fprintf (f, "%ld\n", i);
6177 }
6178 else
6179 {
6180 unsigned long i = ulongval ();
6181 if (i != ((long) (sizeof (void *))))
6182 exit (1);
6183 fprintf (f, "%lu\n", i);
6184 }
6185 exit (ferror (f) || fclose (f) != 0);
6186
6187 ;
6188 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006189}
Martin v. Löwis11437992002-04-12 09:54:03 +00006190_ACEOF
6191rm -f conftest$ac_exeext
6192if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6193 (eval $ac_link) 2>&5
6194 ac_status=$?
6195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6196 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6198 (eval $ac_try) 2>&5
6199 ac_status=$?
6200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6201 (exit $ac_status); }; }; then
6202 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006203else
Martin v. Löwis11437992002-04-12 09:54:03 +00006204 echo "$as_me: program exited with status $ac_status" >&5
6205echo "$as_me: failed program was:" >&5
6206cat conftest.$ac_ext >&5
6207( exit $ac_status )
6208{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6209echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6210 { (exit 1); exit 1; }; }
6211fi
6212rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6213fi
6214fi
6215rm -f conftest.val
6216else
Guido van Rossumad678af1998-10-02 14:42:15 +00006217 ac_cv_sizeof_void_p=0
6218fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006219fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006220echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6221echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6222cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006223#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006224_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006225
6226
Martin v. Löwis11437992002-04-12 09:54:03 +00006227echo "$as_me:$LINENO: checking for char" >&5
6228echo $ECHO_N "checking for char... $ECHO_C" >&6
6229if test "${ac_cv_type_char+set}" = set; then
6230 echo $ECHO_N "(cached) $ECHO_C" >&6
6231else
6232 cat >conftest.$ac_ext <<_ACEOF
6233#line $LINENO "configure"
6234#include "confdefs.h"
6235$ac_includes_default
6236#ifdef F77_DUMMY_MAIN
6237# ifdef __cplusplus
6238 extern "C"
6239# endif
6240 int F77_DUMMY_MAIN() { return 1; }
6241#endif
6242int
6243main ()
6244{
6245if ((char *) 0)
6246 return 0;
6247if (sizeof (char))
6248 return 0;
6249 ;
6250 return 0;
6251}
6252_ACEOF
6253rm -f conftest.$ac_objext
6254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6255 (eval $ac_compile) 2>&5
6256 ac_status=$?
6257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6258 (exit $ac_status); } &&
6259 { ac_try='test -s conftest.$ac_objext'
6260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6261 (eval $ac_try) 2>&5
6262 ac_status=$?
6263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6264 (exit $ac_status); }; }; then
6265 ac_cv_type_char=yes
6266else
6267 echo "$as_me: failed program was:" >&5
6268cat conftest.$ac_ext >&5
6269ac_cv_type_char=no
6270fi
6271rm -f conftest.$ac_objext conftest.$ac_ext
6272fi
6273echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6274echo "${ECHO_T}$ac_cv_type_char" >&6
6275
6276echo "$as_me:$LINENO: checking size of char" >&5
6277echo $ECHO_N "checking size of char... $ECHO_C" >&6
6278if test "${ac_cv_sizeof_char+set}" = set; then
6279 echo $ECHO_N "(cached) $ECHO_C" >&6
6280else
6281 if test "$ac_cv_type_char" = yes; then
6282 # The cast to unsigned long works around a bug in the HP C Compiler
6283 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6284 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6285 # This bug is HP SR number 8606223364.
6286 if test "$cross_compiling" = yes; then
6287 # Depending upon the size, compute the lo and hi bounds.
6288cat >conftest.$ac_ext <<_ACEOF
6289#line $LINENO "configure"
6290#include "confdefs.h"
6291$ac_includes_default
6292#ifdef F77_DUMMY_MAIN
6293# ifdef __cplusplus
6294 extern "C"
6295# endif
6296 int F77_DUMMY_MAIN() { return 1; }
6297#endif
6298int
6299main ()
6300{
6301static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6302test_array [0] = 0
6303
6304 ;
6305 return 0;
6306}
6307_ACEOF
6308rm -f conftest.$ac_objext
6309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6310 (eval $ac_compile) 2>&5
6311 ac_status=$?
6312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6313 (exit $ac_status); } &&
6314 { ac_try='test -s conftest.$ac_objext'
6315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6316 (eval $ac_try) 2>&5
6317 ac_status=$?
6318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6319 (exit $ac_status); }; }; then
6320 ac_lo=0 ac_mid=0
6321 while :; do
6322 cat >conftest.$ac_ext <<_ACEOF
6323#line $LINENO "configure"
6324#include "confdefs.h"
6325$ac_includes_default
6326#ifdef F77_DUMMY_MAIN
6327# ifdef __cplusplus
6328 extern "C"
6329# endif
6330 int F77_DUMMY_MAIN() { return 1; }
6331#endif
6332int
6333main ()
6334{
6335static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6336test_array [0] = 0
6337
6338 ;
6339 return 0;
6340}
6341_ACEOF
6342rm -f conftest.$ac_objext
6343if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6344 (eval $ac_compile) 2>&5
6345 ac_status=$?
6346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6347 (exit $ac_status); } &&
6348 { ac_try='test -s conftest.$ac_objext'
6349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6350 (eval $ac_try) 2>&5
6351 ac_status=$?
6352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6353 (exit $ac_status); }; }; then
6354 ac_hi=$ac_mid; break
6355else
6356 echo "$as_me: failed program was:" >&5
6357cat conftest.$ac_ext >&5
6358ac_lo=`expr $ac_mid + 1`
6359 if test $ac_lo -le $ac_mid; then
6360 ac_lo= ac_hi=
6361 break
6362 fi
6363 ac_mid=`expr 2 '*' $ac_mid + 1`
6364fi
6365rm -f conftest.$ac_objext conftest.$ac_ext
6366 done
6367else
6368 echo "$as_me: failed program was:" >&5
6369cat conftest.$ac_ext >&5
6370cat >conftest.$ac_ext <<_ACEOF
6371#line $LINENO "configure"
6372#include "confdefs.h"
6373$ac_includes_default
6374#ifdef F77_DUMMY_MAIN
6375# ifdef __cplusplus
6376 extern "C"
6377# endif
6378 int F77_DUMMY_MAIN() { return 1; }
6379#endif
6380int
6381main ()
6382{
6383static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6384test_array [0] = 0
6385
6386 ;
6387 return 0;
6388}
6389_ACEOF
6390rm -f conftest.$ac_objext
6391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6392 (eval $ac_compile) 2>&5
6393 ac_status=$?
6394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6395 (exit $ac_status); } &&
6396 { ac_try='test -s conftest.$ac_objext'
6397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6398 (eval $ac_try) 2>&5
6399 ac_status=$?
6400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6401 (exit $ac_status); }; }; then
6402 ac_hi=-1 ac_mid=-1
6403 while :; do
6404 cat >conftest.$ac_ext <<_ACEOF
6405#line $LINENO "configure"
6406#include "confdefs.h"
6407$ac_includes_default
6408#ifdef F77_DUMMY_MAIN
6409# ifdef __cplusplus
6410 extern "C"
6411# endif
6412 int F77_DUMMY_MAIN() { return 1; }
6413#endif
6414int
6415main ()
6416{
6417static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6418test_array [0] = 0
6419
6420 ;
6421 return 0;
6422}
6423_ACEOF
6424rm -f conftest.$ac_objext
6425if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6426 (eval $ac_compile) 2>&5
6427 ac_status=$?
6428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6429 (exit $ac_status); } &&
6430 { ac_try='test -s conftest.$ac_objext'
6431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6432 (eval $ac_try) 2>&5
6433 ac_status=$?
6434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6435 (exit $ac_status); }; }; then
6436 ac_lo=$ac_mid; break
6437else
6438 echo "$as_me: failed program was:" >&5
6439cat conftest.$ac_ext >&5
6440ac_hi=`expr '(' $ac_mid ')' - 1`
6441 if test $ac_mid -le $ac_hi; then
6442 ac_lo= ac_hi=
6443 break
6444 fi
6445 ac_mid=`expr 2 '*' $ac_mid`
6446fi
6447rm -f conftest.$ac_objext conftest.$ac_ext
6448 done
6449else
6450 echo "$as_me: failed program was:" >&5
6451cat conftest.$ac_ext >&5
6452ac_lo= ac_hi=
6453fi
6454rm -f conftest.$ac_objext conftest.$ac_ext
6455fi
6456rm -f conftest.$ac_objext conftest.$ac_ext
6457# Binary search between lo and hi bounds.
6458while test "x$ac_lo" != "x$ac_hi"; do
6459 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6460 cat >conftest.$ac_ext <<_ACEOF
6461#line $LINENO "configure"
6462#include "confdefs.h"
6463$ac_includes_default
6464#ifdef F77_DUMMY_MAIN
6465# ifdef __cplusplus
6466 extern "C"
6467# endif
6468 int F77_DUMMY_MAIN() { return 1; }
6469#endif
6470int
6471main ()
6472{
6473static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6474test_array [0] = 0
6475
6476 ;
6477 return 0;
6478}
6479_ACEOF
6480rm -f conftest.$ac_objext
6481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6482 (eval $ac_compile) 2>&5
6483 ac_status=$?
6484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6485 (exit $ac_status); } &&
6486 { ac_try='test -s conftest.$ac_objext'
6487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6488 (eval $ac_try) 2>&5
6489 ac_status=$?
6490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6491 (exit $ac_status); }; }; then
6492 ac_hi=$ac_mid
6493else
6494 echo "$as_me: failed program was:" >&5
6495cat conftest.$ac_ext >&5
6496ac_lo=`expr '(' $ac_mid ')' + 1`
6497fi
6498rm -f conftest.$ac_objext conftest.$ac_ext
6499done
6500case $ac_lo in
6501?*) ac_cv_sizeof_char=$ac_lo;;
6502'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6503echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6504 { (exit 1); exit 1; }; } ;;
6505esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006506else
6507 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006508 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6509echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6510 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006511else
Martin v. Löwis11437992002-04-12 09:54:03 +00006512 cat >conftest.$ac_ext <<_ACEOF
6513#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006514#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006515$ac_includes_default
6516long longval () { return (long) (sizeof (char)); }
6517unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006518#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006519#include <stdlib.h>
6520#ifdef F77_DUMMY_MAIN
6521# ifdef __cplusplus
6522 extern "C"
6523# endif
6524 int F77_DUMMY_MAIN() { return 1; }
6525#endif
6526int
6527main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006528{
Martin v. Löwis11437992002-04-12 09:54:03 +00006529
6530 FILE *f = fopen ("conftest.val", "w");
6531 if (! f)
6532 exit (1);
6533 if (((long) (sizeof (char))) < 0)
6534 {
6535 long i = longval ();
6536 if (i != ((long) (sizeof (char))))
6537 exit (1);
6538 fprintf (f, "%ld\n", i);
6539 }
6540 else
6541 {
6542 unsigned long i = ulongval ();
6543 if (i != ((long) (sizeof (char))))
6544 exit (1);
6545 fprintf (f, "%lu\n", i);
6546 }
6547 exit (ferror (f) || fclose (f) != 0);
6548
6549 ;
6550 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006551}
Martin v. Löwis11437992002-04-12 09:54:03 +00006552_ACEOF
6553rm -f conftest$ac_exeext
6554if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6555 (eval $ac_link) 2>&5
6556 ac_status=$?
6557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6558 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6560 (eval $ac_try) 2>&5
6561 ac_status=$?
6562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6563 (exit $ac_status); }; }; then
6564 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006565else
Martin v. Löwis11437992002-04-12 09:54:03 +00006566 echo "$as_me: program exited with status $ac_status" >&5
6567echo "$as_me: failed program was:" >&5
6568cat conftest.$ac_ext >&5
6569( exit $ac_status )
6570{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6571echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6572 { (exit 1); exit 1; }; }
6573fi
6574rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6575fi
6576fi
6577rm -f conftest.val
6578else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006579 ac_cv_sizeof_char=0
6580fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006581fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006582echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6583echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6584cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006585#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006586_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006587
6588
Martin v. Löwis11437992002-04-12 09:54:03 +00006589echo "$as_me:$LINENO: checking for short" >&5
6590echo $ECHO_N "checking for short... $ECHO_C" >&6
6591if test "${ac_cv_type_short+set}" = set; then
6592 echo $ECHO_N "(cached) $ECHO_C" >&6
6593else
6594 cat >conftest.$ac_ext <<_ACEOF
6595#line $LINENO "configure"
6596#include "confdefs.h"
6597$ac_includes_default
6598#ifdef F77_DUMMY_MAIN
6599# ifdef __cplusplus
6600 extern "C"
6601# endif
6602 int F77_DUMMY_MAIN() { return 1; }
6603#endif
6604int
6605main ()
6606{
6607if ((short *) 0)
6608 return 0;
6609if (sizeof (short))
6610 return 0;
6611 ;
6612 return 0;
6613}
6614_ACEOF
6615rm -f conftest.$ac_objext
6616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6617 (eval $ac_compile) 2>&5
6618 ac_status=$?
6619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6620 (exit $ac_status); } &&
6621 { ac_try='test -s conftest.$ac_objext'
6622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6623 (eval $ac_try) 2>&5
6624 ac_status=$?
6625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6626 (exit $ac_status); }; }; then
6627 ac_cv_type_short=yes
6628else
6629 echo "$as_me: failed program was:" >&5
6630cat conftest.$ac_ext >&5
6631ac_cv_type_short=no
6632fi
6633rm -f conftest.$ac_objext conftest.$ac_ext
6634fi
6635echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6636echo "${ECHO_T}$ac_cv_type_short" >&6
6637
6638echo "$as_me:$LINENO: checking size of short" >&5
6639echo $ECHO_N "checking size of short... $ECHO_C" >&6
6640if test "${ac_cv_sizeof_short+set}" = set; then
6641 echo $ECHO_N "(cached) $ECHO_C" >&6
6642else
6643 if test "$ac_cv_type_short" = yes; then
6644 # The cast to unsigned long works around a bug in the HP C Compiler
6645 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6646 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6647 # This bug is HP SR number 8606223364.
6648 if test "$cross_compiling" = yes; then
6649 # Depending upon the size, compute the lo and hi bounds.
6650cat >conftest.$ac_ext <<_ACEOF
6651#line $LINENO "configure"
6652#include "confdefs.h"
6653$ac_includes_default
6654#ifdef F77_DUMMY_MAIN
6655# ifdef __cplusplus
6656 extern "C"
6657# endif
6658 int F77_DUMMY_MAIN() { return 1; }
6659#endif
6660int
6661main ()
6662{
6663static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6664test_array [0] = 0
6665
6666 ;
6667 return 0;
6668}
6669_ACEOF
6670rm -f conftest.$ac_objext
6671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6672 (eval $ac_compile) 2>&5
6673 ac_status=$?
6674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6675 (exit $ac_status); } &&
6676 { ac_try='test -s conftest.$ac_objext'
6677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6678 (eval $ac_try) 2>&5
6679 ac_status=$?
6680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6681 (exit $ac_status); }; }; then
6682 ac_lo=0 ac_mid=0
6683 while :; do
6684 cat >conftest.$ac_ext <<_ACEOF
6685#line $LINENO "configure"
6686#include "confdefs.h"
6687$ac_includes_default
6688#ifdef F77_DUMMY_MAIN
6689# ifdef __cplusplus
6690 extern "C"
6691# endif
6692 int F77_DUMMY_MAIN() { return 1; }
6693#endif
6694int
6695main ()
6696{
6697static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6698test_array [0] = 0
6699
6700 ;
6701 return 0;
6702}
6703_ACEOF
6704rm -f conftest.$ac_objext
6705if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6706 (eval $ac_compile) 2>&5
6707 ac_status=$?
6708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6709 (exit $ac_status); } &&
6710 { ac_try='test -s conftest.$ac_objext'
6711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6712 (eval $ac_try) 2>&5
6713 ac_status=$?
6714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6715 (exit $ac_status); }; }; then
6716 ac_hi=$ac_mid; break
6717else
6718 echo "$as_me: failed program was:" >&5
6719cat conftest.$ac_ext >&5
6720ac_lo=`expr $ac_mid + 1`
6721 if test $ac_lo -le $ac_mid; then
6722 ac_lo= ac_hi=
6723 break
6724 fi
6725 ac_mid=`expr 2 '*' $ac_mid + 1`
6726fi
6727rm -f conftest.$ac_objext conftest.$ac_ext
6728 done
6729else
6730 echo "$as_me: failed program was:" >&5
6731cat conftest.$ac_ext >&5
6732cat >conftest.$ac_ext <<_ACEOF
6733#line $LINENO "configure"
6734#include "confdefs.h"
6735$ac_includes_default
6736#ifdef F77_DUMMY_MAIN
6737# ifdef __cplusplus
6738 extern "C"
6739# endif
6740 int F77_DUMMY_MAIN() { return 1; }
6741#endif
6742int
6743main ()
6744{
6745static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6746test_array [0] = 0
6747
6748 ;
6749 return 0;
6750}
6751_ACEOF
6752rm -f conftest.$ac_objext
6753if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6754 (eval $ac_compile) 2>&5
6755 ac_status=$?
6756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6757 (exit $ac_status); } &&
6758 { ac_try='test -s conftest.$ac_objext'
6759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6760 (eval $ac_try) 2>&5
6761 ac_status=$?
6762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6763 (exit $ac_status); }; }; then
6764 ac_hi=-1 ac_mid=-1
6765 while :; do
6766 cat >conftest.$ac_ext <<_ACEOF
6767#line $LINENO "configure"
6768#include "confdefs.h"
6769$ac_includes_default
6770#ifdef F77_DUMMY_MAIN
6771# ifdef __cplusplus
6772 extern "C"
6773# endif
6774 int F77_DUMMY_MAIN() { return 1; }
6775#endif
6776int
6777main ()
6778{
6779static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6780test_array [0] = 0
6781
6782 ;
6783 return 0;
6784}
6785_ACEOF
6786rm -f conftest.$ac_objext
6787if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6788 (eval $ac_compile) 2>&5
6789 ac_status=$?
6790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6791 (exit $ac_status); } &&
6792 { ac_try='test -s conftest.$ac_objext'
6793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6794 (eval $ac_try) 2>&5
6795 ac_status=$?
6796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6797 (exit $ac_status); }; }; then
6798 ac_lo=$ac_mid; break
6799else
6800 echo "$as_me: failed program was:" >&5
6801cat conftest.$ac_ext >&5
6802ac_hi=`expr '(' $ac_mid ')' - 1`
6803 if test $ac_mid -le $ac_hi; then
6804 ac_lo= ac_hi=
6805 break
6806 fi
6807 ac_mid=`expr 2 '*' $ac_mid`
6808fi
6809rm -f conftest.$ac_objext conftest.$ac_ext
6810 done
6811else
6812 echo "$as_me: failed program was:" >&5
6813cat conftest.$ac_ext >&5
6814ac_lo= ac_hi=
6815fi
6816rm -f conftest.$ac_objext conftest.$ac_ext
6817fi
6818rm -f conftest.$ac_objext conftest.$ac_ext
6819# Binary search between lo and hi bounds.
6820while test "x$ac_lo" != "x$ac_hi"; do
6821 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6822 cat >conftest.$ac_ext <<_ACEOF
6823#line $LINENO "configure"
6824#include "confdefs.h"
6825$ac_includes_default
6826#ifdef F77_DUMMY_MAIN
6827# ifdef __cplusplus
6828 extern "C"
6829# endif
6830 int F77_DUMMY_MAIN() { return 1; }
6831#endif
6832int
6833main ()
6834{
6835static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6836test_array [0] = 0
6837
6838 ;
6839 return 0;
6840}
6841_ACEOF
6842rm -f conftest.$ac_objext
6843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6844 (eval $ac_compile) 2>&5
6845 ac_status=$?
6846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6847 (exit $ac_status); } &&
6848 { ac_try='test -s conftest.$ac_objext'
6849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6850 (eval $ac_try) 2>&5
6851 ac_status=$?
6852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6853 (exit $ac_status); }; }; then
6854 ac_hi=$ac_mid
6855else
6856 echo "$as_me: failed program was:" >&5
6857cat conftest.$ac_ext >&5
6858ac_lo=`expr '(' $ac_mid ')' + 1`
6859fi
6860rm -f conftest.$ac_objext conftest.$ac_ext
6861done
6862case $ac_lo in
6863?*) ac_cv_sizeof_short=$ac_lo;;
6864'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6865echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6866 { (exit 1); exit 1; }; } ;;
6867esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006868else
6869 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006870 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6871echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6872 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006873else
Martin v. Löwis11437992002-04-12 09:54:03 +00006874 cat >conftest.$ac_ext <<_ACEOF
6875#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006876#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006877$ac_includes_default
6878long longval () { return (long) (sizeof (short)); }
6879unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006880#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006881#include <stdlib.h>
6882#ifdef F77_DUMMY_MAIN
6883# ifdef __cplusplus
6884 extern "C"
6885# endif
6886 int F77_DUMMY_MAIN() { return 1; }
6887#endif
6888int
6889main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006890{
Martin v. Löwis11437992002-04-12 09:54:03 +00006891
6892 FILE *f = fopen ("conftest.val", "w");
6893 if (! f)
6894 exit (1);
6895 if (((long) (sizeof (short))) < 0)
6896 {
6897 long i = longval ();
6898 if (i != ((long) (sizeof (short))))
6899 exit (1);
6900 fprintf (f, "%ld\n", i);
6901 }
6902 else
6903 {
6904 unsigned long i = ulongval ();
6905 if (i != ((long) (sizeof (short))))
6906 exit (1);
6907 fprintf (f, "%lu\n", i);
6908 }
6909 exit (ferror (f) || fclose (f) != 0);
6910
6911 ;
6912 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006913}
Martin v. Löwis11437992002-04-12 09:54:03 +00006914_ACEOF
6915rm -f conftest$ac_exeext
6916if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6917 (eval $ac_link) 2>&5
6918 ac_status=$?
6919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6922 (eval $ac_try) 2>&5
6923 ac_status=$?
6924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6925 (exit $ac_status); }; }; then
6926 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006927else
Martin v. Löwis11437992002-04-12 09:54:03 +00006928 echo "$as_me: program exited with status $ac_status" >&5
6929echo "$as_me: failed program was:" >&5
6930cat conftest.$ac_ext >&5
6931( exit $ac_status )
6932{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6933echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6934 { (exit 1); exit 1; }; }
6935fi
6936rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6937fi
6938fi
6939rm -f conftest.val
6940else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006941 ac_cv_sizeof_short=0
6942fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006943fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006944echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6945echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6946cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006947#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006948_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006949
6950
Martin v. Löwis11437992002-04-12 09:54:03 +00006951echo "$as_me:$LINENO: checking for float" >&5
6952echo $ECHO_N "checking for float... $ECHO_C" >&6
6953if test "${ac_cv_type_float+set}" = set; then
6954 echo $ECHO_N "(cached) $ECHO_C" >&6
6955else
6956 cat >conftest.$ac_ext <<_ACEOF
6957#line $LINENO "configure"
6958#include "confdefs.h"
6959$ac_includes_default
6960#ifdef F77_DUMMY_MAIN
6961# ifdef __cplusplus
6962 extern "C"
6963# endif
6964 int F77_DUMMY_MAIN() { return 1; }
6965#endif
6966int
6967main ()
6968{
6969if ((float *) 0)
6970 return 0;
6971if (sizeof (float))
6972 return 0;
6973 ;
6974 return 0;
6975}
6976_ACEOF
6977rm -f conftest.$ac_objext
6978if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6979 (eval $ac_compile) 2>&5
6980 ac_status=$?
6981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6982 (exit $ac_status); } &&
6983 { ac_try='test -s conftest.$ac_objext'
6984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6985 (eval $ac_try) 2>&5
6986 ac_status=$?
6987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6988 (exit $ac_status); }; }; then
6989 ac_cv_type_float=yes
6990else
6991 echo "$as_me: failed program was:" >&5
6992cat conftest.$ac_ext >&5
6993ac_cv_type_float=no
6994fi
6995rm -f conftest.$ac_objext conftest.$ac_ext
6996fi
6997echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6998echo "${ECHO_T}$ac_cv_type_float" >&6
6999
7000echo "$as_me:$LINENO: checking size of float" >&5
7001echo $ECHO_N "checking size of float... $ECHO_C" >&6
7002if test "${ac_cv_sizeof_float+set}" = set; then
7003 echo $ECHO_N "(cached) $ECHO_C" >&6
7004else
7005 if test "$ac_cv_type_float" = yes; then
7006 # The cast to unsigned long works around a bug in the HP C Compiler
7007 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7008 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7009 # This bug is HP SR number 8606223364.
7010 if test "$cross_compiling" = yes; then
7011 # Depending upon the size, compute the lo and hi bounds.
7012cat >conftest.$ac_ext <<_ACEOF
7013#line $LINENO "configure"
7014#include "confdefs.h"
7015$ac_includes_default
7016#ifdef F77_DUMMY_MAIN
7017# ifdef __cplusplus
7018 extern "C"
7019# endif
7020 int F77_DUMMY_MAIN() { return 1; }
7021#endif
7022int
7023main ()
7024{
7025static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7026test_array [0] = 0
7027
7028 ;
7029 return 0;
7030}
7031_ACEOF
7032rm -f conftest.$ac_objext
7033if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7034 (eval $ac_compile) 2>&5
7035 ac_status=$?
7036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7037 (exit $ac_status); } &&
7038 { ac_try='test -s conftest.$ac_objext'
7039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7040 (eval $ac_try) 2>&5
7041 ac_status=$?
7042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7043 (exit $ac_status); }; }; then
7044 ac_lo=0 ac_mid=0
7045 while :; do
7046 cat >conftest.$ac_ext <<_ACEOF
7047#line $LINENO "configure"
7048#include "confdefs.h"
7049$ac_includes_default
7050#ifdef F77_DUMMY_MAIN
7051# ifdef __cplusplus
7052 extern "C"
7053# endif
7054 int F77_DUMMY_MAIN() { return 1; }
7055#endif
7056int
7057main ()
7058{
7059static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7060test_array [0] = 0
7061
7062 ;
7063 return 0;
7064}
7065_ACEOF
7066rm -f conftest.$ac_objext
7067if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7068 (eval $ac_compile) 2>&5
7069 ac_status=$?
7070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7071 (exit $ac_status); } &&
7072 { ac_try='test -s conftest.$ac_objext'
7073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7074 (eval $ac_try) 2>&5
7075 ac_status=$?
7076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7077 (exit $ac_status); }; }; then
7078 ac_hi=$ac_mid; break
7079else
7080 echo "$as_me: failed program was:" >&5
7081cat conftest.$ac_ext >&5
7082ac_lo=`expr $ac_mid + 1`
7083 if test $ac_lo -le $ac_mid; then
7084 ac_lo= ac_hi=
7085 break
7086 fi
7087 ac_mid=`expr 2 '*' $ac_mid + 1`
7088fi
7089rm -f conftest.$ac_objext conftest.$ac_ext
7090 done
7091else
7092 echo "$as_me: failed program was:" >&5
7093cat conftest.$ac_ext >&5
7094cat >conftest.$ac_ext <<_ACEOF
7095#line $LINENO "configure"
7096#include "confdefs.h"
7097$ac_includes_default
7098#ifdef F77_DUMMY_MAIN
7099# ifdef __cplusplus
7100 extern "C"
7101# endif
7102 int F77_DUMMY_MAIN() { return 1; }
7103#endif
7104int
7105main ()
7106{
7107static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7108test_array [0] = 0
7109
7110 ;
7111 return 0;
7112}
7113_ACEOF
7114rm -f conftest.$ac_objext
7115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7116 (eval $ac_compile) 2>&5
7117 ac_status=$?
7118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7119 (exit $ac_status); } &&
7120 { ac_try='test -s conftest.$ac_objext'
7121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7122 (eval $ac_try) 2>&5
7123 ac_status=$?
7124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7125 (exit $ac_status); }; }; then
7126 ac_hi=-1 ac_mid=-1
7127 while :; do
7128 cat >conftest.$ac_ext <<_ACEOF
7129#line $LINENO "configure"
7130#include "confdefs.h"
7131$ac_includes_default
7132#ifdef F77_DUMMY_MAIN
7133# ifdef __cplusplus
7134 extern "C"
7135# endif
7136 int F77_DUMMY_MAIN() { return 1; }
7137#endif
7138int
7139main ()
7140{
7141static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7142test_array [0] = 0
7143
7144 ;
7145 return 0;
7146}
7147_ACEOF
7148rm -f conftest.$ac_objext
7149if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7150 (eval $ac_compile) 2>&5
7151 ac_status=$?
7152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7153 (exit $ac_status); } &&
7154 { ac_try='test -s conftest.$ac_objext'
7155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7156 (eval $ac_try) 2>&5
7157 ac_status=$?
7158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7159 (exit $ac_status); }; }; then
7160 ac_lo=$ac_mid; break
7161else
7162 echo "$as_me: failed program was:" >&5
7163cat conftest.$ac_ext >&5
7164ac_hi=`expr '(' $ac_mid ')' - 1`
7165 if test $ac_mid -le $ac_hi; then
7166 ac_lo= ac_hi=
7167 break
7168 fi
7169 ac_mid=`expr 2 '*' $ac_mid`
7170fi
7171rm -f conftest.$ac_objext conftest.$ac_ext
7172 done
7173else
7174 echo "$as_me: failed program was:" >&5
7175cat conftest.$ac_ext >&5
7176ac_lo= ac_hi=
7177fi
7178rm -f conftest.$ac_objext conftest.$ac_ext
7179fi
7180rm -f conftest.$ac_objext conftest.$ac_ext
7181# Binary search between lo and hi bounds.
7182while test "x$ac_lo" != "x$ac_hi"; do
7183 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7184 cat >conftest.$ac_ext <<_ACEOF
7185#line $LINENO "configure"
7186#include "confdefs.h"
7187$ac_includes_default
7188#ifdef F77_DUMMY_MAIN
7189# ifdef __cplusplus
7190 extern "C"
7191# endif
7192 int F77_DUMMY_MAIN() { return 1; }
7193#endif
7194int
7195main ()
7196{
7197static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7198test_array [0] = 0
7199
7200 ;
7201 return 0;
7202}
7203_ACEOF
7204rm -f conftest.$ac_objext
7205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7206 (eval $ac_compile) 2>&5
7207 ac_status=$?
7208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7209 (exit $ac_status); } &&
7210 { ac_try='test -s conftest.$ac_objext'
7211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7212 (eval $ac_try) 2>&5
7213 ac_status=$?
7214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7215 (exit $ac_status); }; }; then
7216 ac_hi=$ac_mid
7217else
7218 echo "$as_me: failed program was:" >&5
7219cat conftest.$ac_ext >&5
7220ac_lo=`expr '(' $ac_mid ')' + 1`
7221fi
7222rm -f conftest.$ac_objext conftest.$ac_ext
7223done
7224case $ac_lo in
7225?*) ac_cv_sizeof_float=$ac_lo;;
7226'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7227echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7228 { (exit 1); exit 1; }; } ;;
7229esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007230else
7231 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007232 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7233echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7234 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007235else
Martin v. Löwis11437992002-04-12 09:54:03 +00007236 cat >conftest.$ac_ext <<_ACEOF
7237#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007238#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007239$ac_includes_default
7240long longval () { return (long) (sizeof (float)); }
7241unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007242#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007243#include <stdlib.h>
7244#ifdef F77_DUMMY_MAIN
7245# ifdef __cplusplus
7246 extern "C"
7247# endif
7248 int F77_DUMMY_MAIN() { return 1; }
7249#endif
7250int
7251main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007252{
Martin v. Löwis11437992002-04-12 09:54:03 +00007253
7254 FILE *f = fopen ("conftest.val", "w");
7255 if (! f)
7256 exit (1);
7257 if (((long) (sizeof (float))) < 0)
7258 {
7259 long i = longval ();
7260 if (i != ((long) (sizeof (float))))
7261 exit (1);
7262 fprintf (f, "%ld\n", i);
7263 }
7264 else
7265 {
7266 unsigned long i = ulongval ();
7267 if (i != ((long) (sizeof (float))))
7268 exit (1);
7269 fprintf (f, "%lu\n", i);
7270 }
7271 exit (ferror (f) || fclose (f) != 0);
7272
7273 ;
7274 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007275}
Martin v. Löwis11437992002-04-12 09:54:03 +00007276_ACEOF
7277rm -f conftest$ac_exeext
7278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7279 (eval $ac_link) 2>&5
7280 ac_status=$?
7281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7284 (eval $ac_try) 2>&5
7285 ac_status=$?
7286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7287 (exit $ac_status); }; }; then
7288 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007289else
Martin v. Löwis11437992002-04-12 09:54:03 +00007290 echo "$as_me: program exited with status $ac_status" >&5
7291echo "$as_me: failed program was:" >&5
7292cat conftest.$ac_ext >&5
7293( exit $ac_status )
7294{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7295echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7296 { (exit 1); exit 1; }; }
7297fi
7298rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7299fi
7300fi
7301rm -f conftest.val
7302else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007303 ac_cv_sizeof_float=0
7304fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007305fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007306echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7307echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7308cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007309#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007310_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007311
7312
Martin v. Löwis11437992002-04-12 09:54:03 +00007313echo "$as_me:$LINENO: checking for double" >&5
7314echo $ECHO_N "checking for double... $ECHO_C" >&6
7315if test "${ac_cv_type_double+set}" = set; then
7316 echo $ECHO_N "(cached) $ECHO_C" >&6
7317else
7318 cat >conftest.$ac_ext <<_ACEOF
7319#line $LINENO "configure"
7320#include "confdefs.h"
7321$ac_includes_default
7322#ifdef F77_DUMMY_MAIN
7323# ifdef __cplusplus
7324 extern "C"
7325# endif
7326 int F77_DUMMY_MAIN() { return 1; }
7327#endif
7328int
7329main ()
7330{
7331if ((double *) 0)
7332 return 0;
7333if (sizeof (double))
7334 return 0;
7335 ;
7336 return 0;
7337}
7338_ACEOF
7339rm -f conftest.$ac_objext
7340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7341 (eval $ac_compile) 2>&5
7342 ac_status=$?
7343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7344 (exit $ac_status); } &&
7345 { ac_try='test -s conftest.$ac_objext'
7346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7347 (eval $ac_try) 2>&5
7348 ac_status=$?
7349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7350 (exit $ac_status); }; }; then
7351 ac_cv_type_double=yes
7352else
7353 echo "$as_me: failed program was:" >&5
7354cat conftest.$ac_ext >&5
7355ac_cv_type_double=no
7356fi
7357rm -f conftest.$ac_objext conftest.$ac_ext
7358fi
7359echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7360echo "${ECHO_T}$ac_cv_type_double" >&6
7361
7362echo "$as_me:$LINENO: checking size of double" >&5
7363echo $ECHO_N "checking size of double... $ECHO_C" >&6
7364if test "${ac_cv_sizeof_double+set}" = set; then
7365 echo $ECHO_N "(cached) $ECHO_C" >&6
7366else
7367 if test "$ac_cv_type_double" = yes; then
7368 # The cast to unsigned long works around a bug in the HP C Compiler
7369 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7370 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7371 # This bug is HP SR number 8606223364.
7372 if test "$cross_compiling" = yes; then
7373 # Depending upon the size, compute the lo and hi bounds.
7374cat >conftest.$ac_ext <<_ACEOF
7375#line $LINENO "configure"
7376#include "confdefs.h"
7377$ac_includes_default
7378#ifdef F77_DUMMY_MAIN
7379# ifdef __cplusplus
7380 extern "C"
7381# endif
7382 int F77_DUMMY_MAIN() { return 1; }
7383#endif
7384int
7385main ()
7386{
7387static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7388test_array [0] = 0
7389
7390 ;
7391 return 0;
7392}
7393_ACEOF
7394rm -f conftest.$ac_objext
7395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7396 (eval $ac_compile) 2>&5
7397 ac_status=$?
7398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7399 (exit $ac_status); } &&
7400 { ac_try='test -s conftest.$ac_objext'
7401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7402 (eval $ac_try) 2>&5
7403 ac_status=$?
7404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7405 (exit $ac_status); }; }; then
7406 ac_lo=0 ac_mid=0
7407 while :; do
7408 cat >conftest.$ac_ext <<_ACEOF
7409#line $LINENO "configure"
7410#include "confdefs.h"
7411$ac_includes_default
7412#ifdef F77_DUMMY_MAIN
7413# ifdef __cplusplus
7414 extern "C"
7415# endif
7416 int F77_DUMMY_MAIN() { return 1; }
7417#endif
7418int
7419main ()
7420{
7421static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7422test_array [0] = 0
7423
7424 ;
7425 return 0;
7426}
7427_ACEOF
7428rm -f conftest.$ac_objext
7429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7430 (eval $ac_compile) 2>&5
7431 ac_status=$?
7432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7433 (exit $ac_status); } &&
7434 { ac_try='test -s conftest.$ac_objext'
7435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7436 (eval $ac_try) 2>&5
7437 ac_status=$?
7438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7439 (exit $ac_status); }; }; then
7440 ac_hi=$ac_mid; break
7441else
7442 echo "$as_me: failed program was:" >&5
7443cat conftest.$ac_ext >&5
7444ac_lo=`expr $ac_mid + 1`
7445 if test $ac_lo -le $ac_mid; then
7446 ac_lo= ac_hi=
7447 break
7448 fi
7449 ac_mid=`expr 2 '*' $ac_mid + 1`
7450fi
7451rm -f conftest.$ac_objext conftest.$ac_ext
7452 done
7453else
7454 echo "$as_me: failed program was:" >&5
7455cat conftest.$ac_ext >&5
7456cat >conftest.$ac_ext <<_ACEOF
7457#line $LINENO "configure"
7458#include "confdefs.h"
7459$ac_includes_default
7460#ifdef F77_DUMMY_MAIN
7461# ifdef __cplusplus
7462 extern "C"
7463# endif
7464 int F77_DUMMY_MAIN() { return 1; }
7465#endif
7466int
7467main ()
7468{
7469static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7470test_array [0] = 0
7471
7472 ;
7473 return 0;
7474}
7475_ACEOF
7476rm -f conftest.$ac_objext
7477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7478 (eval $ac_compile) 2>&5
7479 ac_status=$?
7480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7481 (exit $ac_status); } &&
7482 { ac_try='test -s conftest.$ac_objext'
7483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7484 (eval $ac_try) 2>&5
7485 ac_status=$?
7486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7487 (exit $ac_status); }; }; then
7488 ac_hi=-1 ac_mid=-1
7489 while :; do
7490 cat >conftest.$ac_ext <<_ACEOF
7491#line $LINENO "configure"
7492#include "confdefs.h"
7493$ac_includes_default
7494#ifdef F77_DUMMY_MAIN
7495# ifdef __cplusplus
7496 extern "C"
7497# endif
7498 int F77_DUMMY_MAIN() { return 1; }
7499#endif
7500int
7501main ()
7502{
7503static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7504test_array [0] = 0
7505
7506 ;
7507 return 0;
7508}
7509_ACEOF
7510rm -f conftest.$ac_objext
7511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7512 (eval $ac_compile) 2>&5
7513 ac_status=$?
7514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7515 (exit $ac_status); } &&
7516 { ac_try='test -s conftest.$ac_objext'
7517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7518 (eval $ac_try) 2>&5
7519 ac_status=$?
7520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7521 (exit $ac_status); }; }; then
7522 ac_lo=$ac_mid; break
7523else
7524 echo "$as_me: failed program was:" >&5
7525cat conftest.$ac_ext >&5
7526ac_hi=`expr '(' $ac_mid ')' - 1`
7527 if test $ac_mid -le $ac_hi; then
7528 ac_lo= ac_hi=
7529 break
7530 fi
7531 ac_mid=`expr 2 '*' $ac_mid`
7532fi
7533rm -f conftest.$ac_objext conftest.$ac_ext
7534 done
7535else
7536 echo "$as_me: failed program was:" >&5
7537cat conftest.$ac_ext >&5
7538ac_lo= ac_hi=
7539fi
7540rm -f conftest.$ac_objext conftest.$ac_ext
7541fi
7542rm -f conftest.$ac_objext conftest.$ac_ext
7543# Binary search between lo and hi bounds.
7544while test "x$ac_lo" != "x$ac_hi"; do
7545 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7546 cat >conftest.$ac_ext <<_ACEOF
7547#line $LINENO "configure"
7548#include "confdefs.h"
7549$ac_includes_default
7550#ifdef F77_DUMMY_MAIN
7551# ifdef __cplusplus
7552 extern "C"
7553# endif
7554 int F77_DUMMY_MAIN() { return 1; }
7555#endif
7556int
7557main ()
7558{
7559static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7560test_array [0] = 0
7561
7562 ;
7563 return 0;
7564}
7565_ACEOF
7566rm -f conftest.$ac_objext
7567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7568 (eval $ac_compile) 2>&5
7569 ac_status=$?
7570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7571 (exit $ac_status); } &&
7572 { ac_try='test -s conftest.$ac_objext'
7573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7574 (eval $ac_try) 2>&5
7575 ac_status=$?
7576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7577 (exit $ac_status); }; }; then
7578 ac_hi=$ac_mid
7579else
7580 echo "$as_me: failed program was:" >&5
7581cat conftest.$ac_ext >&5
7582ac_lo=`expr '(' $ac_mid ')' + 1`
7583fi
7584rm -f conftest.$ac_objext conftest.$ac_ext
7585done
7586case $ac_lo in
7587?*) ac_cv_sizeof_double=$ac_lo;;
7588'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7589echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7590 { (exit 1); exit 1; }; } ;;
7591esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007592else
7593 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007594 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7595echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7596 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007597else
Martin v. Löwis11437992002-04-12 09:54:03 +00007598 cat >conftest.$ac_ext <<_ACEOF
7599#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007600#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007601$ac_includes_default
7602long longval () { return (long) (sizeof (double)); }
7603unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007604#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007605#include <stdlib.h>
7606#ifdef F77_DUMMY_MAIN
7607# ifdef __cplusplus
7608 extern "C"
7609# endif
7610 int F77_DUMMY_MAIN() { return 1; }
7611#endif
7612int
7613main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007614{
Martin v. Löwis11437992002-04-12 09:54:03 +00007615
7616 FILE *f = fopen ("conftest.val", "w");
7617 if (! f)
7618 exit (1);
7619 if (((long) (sizeof (double))) < 0)
7620 {
7621 long i = longval ();
7622 if (i != ((long) (sizeof (double))))
7623 exit (1);
7624 fprintf (f, "%ld\n", i);
7625 }
7626 else
7627 {
7628 unsigned long i = ulongval ();
7629 if (i != ((long) (sizeof (double))))
7630 exit (1);
7631 fprintf (f, "%lu\n", i);
7632 }
7633 exit (ferror (f) || fclose (f) != 0);
7634
7635 ;
7636 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007637}
Martin v. Löwis11437992002-04-12 09:54:03 +00007638_ACEOF
7639rm -f conftest$ac_exeext
7640if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7641 (eval $ac_link) 2>&5
7642 ac_status=$?
7643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7644 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7646 (eval $ac_try) 2>&5
7647 ac_status=$?
7648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7649 (exit $ac_status); }; }; then
7650 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007651else
Martin v. Löwis11437992002-04-12 09:54:03 +00007652 echo "$as_me: program exited with status $ac_status" >&5
7653echo "$as_me: failed program was:" >&5
7654cat conftest.$ac_ext >&5
7655( exit $ac_status )
7656{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7657echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7658 { (exit 1); exit 1; }; }
7659fi
7660rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7661fi
7662fi
7663rm -f conftest.val
7664else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007665 ac_cv_sizeof_double=0
7666fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007668echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7669echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7670cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007671#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007672_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007673
7674
Martin v. Löwis11437992002-04-12 09:54:03 +00007675echo "$as_me:$LINENO: checking for fpos_t" >&5
7676echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7677if test "${ac_cv_type_fpos_t+set}" = set; then
7678 echo $ECHO_N "(cached) $ECHO_C" >&6
7679else
7680 cat >conftest.$ac_ext <<_ACEOF
7681#line $LINENO "configure"
7682#include "confdefs.h"
7683$ac_includes_default
7684#ifdef F77_DUMMY_MAIN
7685# ifdef __cplusplus
7686 extern "C"
7687# endif
7688 int F77_DUMMY_MAIN() { return 1; }
7689#endif
7690int
7691main ()
7692{
7693if ((fpos_t *) 0)
7694 return 0;
7695if (sizeof (fpos_t))
7696 return 0;
7697 ;
7698 return 0;
7699}
7700_ACEOF
7701rm -f conftest.$ac_objext
7702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7703 (eval $ac_compile) 2>&5
7704 ac_status=$?
7705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7706 (exit $ac_status); } &&
7707 { ac_try='test -s conftest.$ac_objext'
7708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7709 (eval $ac_try) 2>&5
7710 ac_status=$?
7711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7712 (exit $ac_status); }; }; then
7713 ac_cv_type_fpos_t=yes
7714else
7715 echo "$as_me: failed program was:" >&5
7716cat conftest.$ac_ext >&5
7717ac_cv_type_fpos_t=no
7718fi
7719rm -f conftest.$ac_objext conftest.$ac_ext
7720fi
7721echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7722echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7723
7724echo "$as_me:$LINENO: checking size of fpos_t" >&5
7725echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7726if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7727 echo $ECHO_N "(cached) $ECHO_C" >&6
7728else
7729 if test "$ac_cv_type_fpos_t" = yes; then
7730 # The cast to unsigned long works around a bug in the HP C Compiler
7731 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7732 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7733 # This bug is HP SR number 8606223364.
7734 if test "$cross_compiling" = yes; then
7735 # Depending upon the size, compute the lo and hi bounds.
7736cat >conftest.$ac_ext <<_ACEOF
7737#line $LINENO "configure"
7738#include "confdefs.h"
7739$ac_includes_default
7740#ifdef F77_DUMMY_MAIN
7741# ifdef __cplusplus
7742 extern "C"
7743# endif
7744 int F77_DUMMY_MAIN() { return 1; }
7745#endif
7746int
7747main ()
7748{
7749static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7750test_array [0] = 0
7751
7752 ;
7753 return 0;
7754}
7755_ACEOF
7756rm -f conftest.$ac_objext
7757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7758 (eval $ac_compile) 2>&5
7759 ac_status=$?
7760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7761 (exit $ac_status); } &&
7762 { ac_try='test -s conftest.$ac_objext'
7763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7764 (eval $ac_try) 2>&5
7765 ac_status=$?
7766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7767 (exit $ac_status); }; }; then
7768 ac_lo=0 ac_mid=0
7769 while :; do
7770 cat >conftest.$ac_ext <<_ACEOF
7771#line $LINENO "configure"
7772#include "confdefs.h"
7773$ac_includes_default
7774#ifdef F77_DUMMY_MAIN
7775# ifdef __cplusplus
7776 extern "C"
7777# endif
7778 int F77_DUMMY_MAIN() { return 1; }
7779#endif
7780int
7781main ()
7782{
7783static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7784test_array [0] = 0
7785
7786 ;
7787 return 0;
7788}
7789_ACEOF
7790rm -f conftest.$ac_objext
7791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7792 (eval $ac_compile) 2>&5
7793 ac_status=$?
7794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7795 (exit $ac_status); } &&
7796 { ac_try='test -s conftest.$ac_objext'
7797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7798 (eval $ac_try) 2>&5
7799 ac_status=$?
7800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7801 (exit $ac_status); }; }; then
7802 ac_hi=$ac_mid; break
7803else
7804 echo "$as_me: failed program was:" >&5
7805cat conftest.$ac_ext >&5
7806ac_lo=`expr $ac_mid + 1`
7807 if test $ac_lo -le $ac_mid; then
7808 ac_lo= ac_hi=
7809 break
7810 fi
7811 ac_mid=`expr 2 '*' $ac_mid + 1`
7812fi
7813rm -f conftest.$ac_objext conftest.$ac_ext
7814 done
7815else
7816 echo "$as_me: failed program was:" >&5
7817cat conftest.$ac_ext >&5
7818cat >conftest.$ac_ext <<_ACEOF
7819#line $LINENO "configure"
7820#include "confdefs.h"
7821$ac_includes_default
7822#ifdef F77_DUMMY_MAIN
7823# ifdef __cplusplus
7824 extern "C"
7825# endif
7826 int F77_DUMMY_MAIN() { return 1; }
7827#endif
7828int
7829main ()
7830{
7831static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7832test_array [0] = 0
7833
7834 ;
7835 return 0;
7836}
7837_ACEOF
7838rm -f conftest.$ac_objext
7839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7840 (eval $ac_compile) 2>&5
7841 ac_status=$?
7842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7843 (exit $ac_status); } &&
7844 { ac_try='test -s conftest.$ac_objext'
7845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7846 (eval $ac_try) 2>&5
7847 ac_status=$?
7848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7849 (exit $ac_status); }; }; then
7850 ac_hi=-1 ac_mid=-1
7851 while :; do
7852 cat >conftest.$ac_ext <<_ACEOF
7853#line $LINENO "configure"
7854#include "confdefs.h"
7855$ac_includes_default
7856#ifdef F77_DUMMY_MAIN
7857# ifdef __cplusplus
7858 extern "C"
7859# endif
7860 int F77_DUMMY_MAIN() { return 1; }
7861#endif
7862int
7863main ()
7864{
7865static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7866test_array [0] = 0
7867
7868 ;
7869 return 0;
7870}
7871_ACEOF
7872rm -f conftest.$ac_objext
7873if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7874 (eval $ac_compile) 2>&5
7875 ac_status=$?
7876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7877 (exit $ac_status); } &&
7878 { ac_try='test -s conftest.$ac_objext'
7879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7880 (eval $ac_try) 2>&5
7881 ac_status=$?
7882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7883 (exit $ac_status); }; }; then
7884 ac_lo=$ac_mid; break
7885else
7886 echo "$as_me: failed program was:" >&5
7887cat conftest.$ac_ext >&5
7888ac_hi=`expr '(' $ac_mid ')' - 1`
7889 if test $ac_mid -le $ac_hi; then
7890 ac_lo= ac_hi=
7891 break
7892 fi
7893 ac_mid=`expr 2 '*' $ac_mid`
7894fi
7895rm -f conftest.$ac_objext conftest.$ac_ext
7896 done
7897else
7898 echo "$as_me: failed program was:" >&5
7899cat conftest.$ac_ext >&5
7900ac_lo= ac_hi=
7901fi
7902rm -f conftest.$ac_objext conftest.$ac_ext
7903fi
7904rm -f conftest.$ac_objext conftest.$ac_ext
7905# Binary search between lo and hi bounds.
7906while test "x$ac_lo" != "x$ac_hi"; do
7907 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7908 cat >conftest.$ac_ext <<_ACEOF
7909#line $LINENO "configure"
7910#include "confdefs.h"
7911$ac_includes_default
7912#ifdef F77_DUMMY_MAIN
7913# ifdef __cplusplus
7914 extern "C"
7915# endif
7916 int F77_DUMMY_MAIN() { return 1; }
7917#endif
7918int
7919main ()
7920{
7921static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7922test_array [0] = 0
7923
7924 ;
7925 return 0;
7926}
7927_ACEOF
7928rm -f conftest.$ac_objext
7929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7930 (eval $ac_compile) 2>&5
7931 ac_status=$?
7932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7933 (exit $ac_status); } &&
7934 { ac_try='test -s conftest.$ac_objext'
7935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7936 (eval $ac_try) 2>&5
7937 ac_status=$?
7938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7939 (exit $ac_status); }; }; then
7940 ac_hi=$ac_mid
7941else
7942 echo "$as_me: failed program was:" >&5
7943cat conftest.$ac_ext >&5
7944ac_lo=`expr '(' $ac_mid ')' + 1`
7945fi
7946rm -f conftest.$ac_objext conftest.$ac_ext
7947done
7948case $ac_lo in
7949?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7950'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7951echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7952 { (exit 1); exit 1; }; } ;;
7953esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007954else
7955 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7957echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7958 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007959else
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 cat >conftest.$ac_ext <<_ACEOF
7961#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007962#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007963$ac_includes_default
7964long longval () { return (long) (sizeof (fpos_t)); }
7965unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007966#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007967#include <stdlib.h>
7968#ifdef F77_DUMMY_MAIN
7969# ifdef __cplusplus
7970 extern "C"
7971# endif
7972 int F77_DUMMY_MAIN() { return 1; }
7973#endif
7974int
7975main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007976{
Martin v. Löwis11437992002-04-12 09:54:03 +00007977
7978 FILE *f = fopen ("conftest.val", "w");
7979 if (! f)
7980 exit (1);
7981 if (((long) (sizeof (fpos_t))) < 0)
7982 {
7983 long i = longval ();
7984 if (i != ((long) (sizeof (fpos_t))))
7985 exit (1);
7986 fprintf (f, "%ld\n", i);
7987 }
7988 else
7989 {
7990 unsigned long i = ulongval ();
7991 if (i != ((long) (sizeof (fpos_t))))
7992 exit (1);
7993 fprintf (f, "%lu\n", i);
7994 }
7995 exit (ferror (f) || fclose (f) != 0);
7996
7997 ;
7998 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007999}
Martin v. Löwis11437992002-04-12 09:54:03 +00008000_ACEOF
8001rm -f conftest$ac_exeext
8002if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8003 (eval $ac_link) 2>&5
8004 ac_status=$?
8005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8006 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8008 (eval $ac_try) 2>&5
8009 ac_status=$?
8010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8011 (exit $ac_status); }; }; then
8012 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008013else
Martin v. Löwis11437992002-04-12 09:54:03 +00008014 echo "$as_me: program exited with status $ac_status" >&5
8015echo "$as_me: failed program was:" >&5
8016cat conftest.$ac_ext >&5
8017( exit $ac_status )
8018{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8019echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8020 { (exit 1); exit 1; }; }
8021fi
8022rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8023fi
8024fi
8025rm -f conftest.val
8026else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008027 ac_cv_sizeof_fpos_t=0
8028fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008029fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008030echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8031echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8032cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008033#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008034_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008035
Michael W. Hudson54241132001-12-07 15:38:26 +00008036
8037
Martin v. Löwis11437992002-04-12 09:54:03 +00008038echo "$as_me:$LINENO: checking for long long support" >&5
8039echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008040have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008041cat >conftest.$ac_ext <<_ACEOF
8042#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008043#include "confdefs.h"
8044
Martin v. Löwis11437992002-04-12 09:54:03 +00008045#ifdef F77_DUMMY_MAIN
8046# ifdef __cplusplus
8047 extern "C"
8048# endif
8049 int F77_DUMMY_MAIN() { return 1; }
8050#endif
8051int
8052main ()
8053{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008054long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 ;
8056 return 0;
8057}
8058_ACEOF
8059rm -f conftest.$ac_objext
8060if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8061 (eval $ac_compile) 2>&5
8062 ac_status=$?
8063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8064 (exit $ac_status); } &&
8065 { ac_try='test -s conftest.$ac_objext'
8066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8067 (eval $ac_try) 2>&5
8068 ac_status=$?
8069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8070 (exit $ac_status); }; }; then
8071
8072
8073cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008074#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008075_ACEOF
8076
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008077 have_long_long=yes
8078
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008079else
Martin v. Löwis11437992002-04-12 09:54:03 +00008080 echo "$as_me: failed program was:" >&5
8081cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008082fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008083rm -f conftest.$ac_objext conftest.$ac_ext
8084echo "$as_me:$LINENO: result: $have_long_long" >&5
8085echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008086if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008087echo "$as_me:$LINENO: checking for long long" >&5
8088echo $ECHO_N "checking for long long... $ECHO_C" >&6
8089if test "${ac_cv_type_long_long+set}" = set; then
8090 echo $ECHO_N "(cached) $ECHO_C" >&6
8091else
8092 cat >conftest.$ac_ext <<_ACEOF
8093#line $LINENO "configure"
8094#include "confdefs.h"
8095$ac_includes_default
8096#ifdef F77_DUMMY_MAIN
8097# ifdef __cplusplus
8098 extern "C"
8099# endif
8100 int F77_DUMMY_MAIN() { return 1; }
8101#endif
8102int
8103main ()
8104{
8105if ((long long *) 0)
8106 return 0;
8107if (sizeof (long long))
8108 return 0;
8109 ;
8110 return 0;
8111}
8112_ACEOF
8113rm -f conftest.$ac_objext
8114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8115 (eval $ac_compile) 2>&5
8116 ac_status=$?
8117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8118 (exit $ac_status); } &&
8119 { ac_try='test -s conftest.$ac_objext'
8120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8121 (eval $ac_try) 2>&5
8122 ac_status=$?
8123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8124 (exit $ac_status); }; }; then
8125 ac_cv_type_long_long=yes
8126else
8127 echo "$as_me: failed program was:" >&5
8128cat conftest.$ac_ext >&5
8129ac_cv_type_long_long=no
8130fi
8131rm -f conftest.$ac_objext conftest.$ac_ext
8132fi
8133echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8134echo "${ECHO_T}$ac_cv_type_long_long" >&6
8135
8136echo "$as_me:$LINENO: checking size of long long" >&5
8137echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8138if test "${ac_cv_sizeof_long_long+set}" = set; then
8139 echo $ECHO_N "(cached) $ECHO_C" >&6
8140else
8141 if test "$ac_cv_type_long_long" = yes; then
8142 # The cast to unsigned long works around a bug in the HP C Compiler
8143 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8144 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8145 # This bug is HP SR number 8606223364.
8146 if test "$cross_compiling" = yes; then
8147 # Depending upon the size, compute the lo and hi bounds.
8148cat >conftest.$ac_ext <<_ACEOF
8149#line $LINENO "configure"
8150#include "confdefs.h"
8151$ac_includes_default
8152#ifdef F77_DUMMY_MAIN
8153# ifdef __cplusplus
8154 extern "C"
8155# endif
8156 int F77_DUMMY_MAIN() { return 1; }
8157#endif
8158int
8159main ()
8160{
8161static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8162test_array [0] = 0
8163
8164 ;
8165 return 0;
8166}
8167_ACEOF
8168rm -f conftest.$ac_objext
8169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8170 (eval $ac_compile) 2>&5
8171 ac_status=$?
8172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173 (exit $ac_status); } &&
8174 { ac_try='test -s conftest.$ac_objext'
8175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8176 (eval $ac_try) 2>&5
8177 ac_status=$?
8178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8179 (exit $ac_status); }; }; then
8180 ac_lo=0 ac_mid=0
8181 while :; do
8182 cat >conftest.$ac_ext <<_ACEOF
8183#line $LINENO "configure"
8184#include "confdefs.h"
8185$ac_includes_default
8186#ifdef F77_DUMMY_MAIN
8187# ifdef __cplusplus
8188 extern "C"
8189# endif
8190 int F77_DUMMY_MAIN() { return 1; }
8191#endif
8192int
8193main ()
8194{
8195static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8196test_array [0] = 0
8197
8198 ;
8199 return 0;
8200}
8201_ACEOF
8202rm -f conftest.$ac_objext
8203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8204 (eval $ac_compile) 2>&5
8205 ac_status=$?
8206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8207 (exit $ac_status); } &&
8208 { ac_try='test -s conftest.$ac_objext'
8209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8210 (eval $ac_try) 2>&5
8211 ac_status=$?
8212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8213 (exit $ac_status); }; }; then
8214 ac_hi=$ac_mid; break
8215else
8216 echo "$as_me: failed program was:" >&5
8217cat conftest.$ac_ext >&5
8218ac_lo=`expr $ac_mid + 1`
8219 if test $ac_lo -le $ac_mid; then
8220 ac_lo= ac_hi=
8221 break
8222 fi
8223 ac_mid=`expr 2 '*' $ac_mid + 1`
8224fi
8225rm -f conftest.$ac_objext conftest.$ac_ext
8226 done
8227else
8228 echo "$as_me: failed program was:" >&5
8229cat conftest.$ac_ext >&5
8230cat >conftest.$ac_ext <<_ACEOF
8231#line $LINENO "configure"
8232#include "confdefs.h"
8233$ac_includes_default
8234#ifdef F77_DUMMY_MAIN
8235# ifdef __cplusplus
8236 extern "C"
8237# endif
8238 int F77_DUMMY_MAIN() { return 1; }
8239#endif
8240int
8241main ()
8242{
8243static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8244test_array [0] = 0
8245
8246 ;
8247 return 0;
8248}
8249_ACEOF
8250rm -f conftest.$ac_objext
8251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8252 (eval $ac_compile) 2>&5
8253 ac_status=$?
8254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8255 (exit $ac_status); } &&
8256 { ac_try='test -s conftest.$ac_objext'
8257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8258 (eval $ac_try) 2>&5
8259 ac_status=$?
8260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8261 (exit $ac_status); }; }; then
8262 ac_hi=-1 ac_mid=-1
8263 while :; do
8264 cat >conftest.$ac_ext <<_ACEOF
8265#line $LINENO "configure"
8266#include "confdefs.h"
8267$ac_includes_default
8268#ifdef F77_DUMMY_MAIN
8269# ifdef __cplusplus
8270 extern "C"
8271# endif
8272 int F77_DUMMY_MAIN() { return 1; }
8273#endif
8274int
8275main ()
8276{
8277static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8278test_array [0] = 0
8279
8280 ;
8281 return 0;
8282}
8283_ACEOF
8284rm -f conftest.$ac_objext
8285if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8286 (eval $ac_compile) 2>&5
8287 ac_status=$?
8288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8289 (exit $ac_status); } &&
8290 { ac_try='test -s conftest.$ac_objext'
8291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8292 (eval $ac_try) 2>&5
8293 ac_status=$?
8294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8295 (exit $ac_status); }; }; then
8296 ac_lo=$ac_mid; break
8297else
8298 echo "$as_me: failed program was:" >&5
8299cat conftest.$ac_ext >&5
8300ac_hi=`expr '(' $ac_mid ')' - 1`
8301 if test $ac_mid -le $ac_hi; then
8302 ac_lo= ac_hi=
8303 break
8304 fi
8305 ac_mid=`expr 2 '*' $ac_mid`
8306fi
8307rm -f conftest.$ac_objext conftest.$ac_ext
8308 done
8309else
8310 echo "$as_me: failed program was:" >&5
8311cat conftest.$ac_ext >&5
8312ac_lo= ac_hi=
8313fi
8314rm -f conftest.$ac_objext conftest.$ac_ext
8315fi
8316rm -f conftest.$ac_objext conftest.$ac_ext
8317# Binary search between lo and hi bounds.
8318while test "x$ac_lo" != "x$ac_hi"; do
8319 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8320 cat >conftest.$ac_ext <<_ACEOF
8321#line $LINENO "configure"
8322#include "confdefs.h"
8323$ac_includes_default
8324#ifdef F77_DUMMY_MAIN
8325# ifdef __cplusplus
8326 extern "C"
8327# endif
8328 int F77_DUMMY_MAIN() { return 1; }
8329#endif
8330int
8331main ()
8332{
8333static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8334test_array [0] = 0
8335
8336 ;
8337 return 0;
8338}
8339_ACEOF
8340rm -f conftest.$ac_objext
8341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8342 (eval $ac_compile) 2>&5
8343 ac_status=$?
8344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8345 (exit $ac_status); } &&
8346 { ac_try='test -s conftest.$ac_objext'
8347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8348 (eval $ac_try) 2>&5
8349 ac_status=$?
8350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8351 (exit $ac_status); }; }; then
8352 ac_hi=$ac_mid
8353else
8354 echo "$as_me: failed program was:" >&5
8355cat conftest.$ac_ext >&5
8356ac_lo=`expr '(' $ac_mid ')' + 1`
8357fi
8358rm -f conftest.$ac_objext conftest.$ac_ext
8359done
8360case $ac_lo in
8361?*) ac_cv_sizeof_long_long=$ac_lo;;
8362'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8363echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8364 { (exit 1); exit 1; }; } ;;
8365esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008366else
8367 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008368 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8369echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8370 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008371else
Martin v. Löwis11437992002-04-12 09:54:03 +00008372 cat >conftest.$ac_ext <<_ACEOF
8373#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008374#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008375$ac_includes_default
8376long longval () { return (long) (sizeof (long long)); }
8377unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008378#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008379#include <stdlib.h>
8380#ifdef F77_DUMMY_MAIN
8381# ifdef __cplusplus
8382 extern "C"
8383# endif
8384 int F77_DUMMY_MAIN() { return 1; }
8385#endif
8386int
8387main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008388{
Martin v. Löwis11437992002-04-12 09:54:03 +00008389
8390 FILE *f = fopen ("conftest.val", "w");
8391 if (! f)
8392 exit (1);
8393 if (((long) (sizeof (long long))) < 0)
8394 {
8395 long i = longval ();
8396 if (i != ((long) (sizeof (long long))))
8397 exit (1);
8398 fprintf (f, "%ld\n", i);
8399 }
8400 else
8401 {
8402 unsigned long i = ulongval ();
8403 if (i != ((long) (sizeof (long long))))
8404 exit (1);
8405 fprintf (f, "%lu\n", i);
8406 }
8407 exit (ferror (f) || fclose (f) != 0);
8408
8409 ;
8410 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008411}
Martin v. Löwis11437992002-04-12 09:54:03 +00008412_ACEOF
8413rm -f conftest$ac_exeext
8414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8415 (eval $ac_link) 2>&5
8416 ac_status=$?
8417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8418 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8420 (eval $ac_try) 2>&5
8421 ac_status=$?
8422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8423 (exit $ac_status); }; }; then
8424 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008425else
Martin v. Löwis11437992002-04-12 09:54:03 +00008426 echo "$as_me: program exited with status $ac_status" >&5
8427echo "$as_me: failed program was:" >&5
8428cat conftest.$ac_ext >&5
8429( exit $ac_status )
8430{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8431echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8432 { (exit 1); exit 1; }; }
8433fi
8434rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8435fi
8436fi
8437rm -f conftest.val
8438else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008439 ac_cv_sizeof_long_long=0
8440fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008441fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008442echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8443echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8444cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008445#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008446_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008447
Michael W. Hudson54241132001-12-07 15:38:26 +00008448
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008449fi
8450
Martin v. Löwis11437992002-04-12 09:54:03 +00008451echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8452echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008453have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008454cat >conftest.$ac_ext <<_ACEOF
8455#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008456#include "confdefs.h"
8457
Martin v. Löwis11437992002-04-12 09:54:03 +00008458#ifdef F77_DUMMY_MAIN
8459# ifdef __cplusplus
8460 extern "C"
8461# endif
8462 int F77_DUMMY_MAIN() { return 1; }
8463#endif
8464int
8465main ()
8466{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008467uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008468 ;
8469 return 0;
8470}
8471_ACEOF
8472rm -f conftest.$ac_objext
8473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8474 (eval $ac_compile) 2>&5
8475 ac_status=$?
8476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8477 (exit $ac_status); } &&
8478 { ac_try='test -s conftest.$ac_objext'
8479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8480 (eval $ac_try) 2>&5
8481 ac_status=$?
8482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8483 (exit $ac_status); }; }; then
8484
8485
8486cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008487#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008488_ACEOF
8489
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008490 have_uintptr_t=yes
8491
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008492else
Martin v. Löwis11437992002-04-12 09:54:03 +00008493 echo "$as_me: failed program was:" >&5
8494cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008495fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008496rm -f conftest.$ac_objext conftest.$ac_ext
8497echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8498echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008499if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008500echo "$as_me:$LINENO: checking for uintptr_t" >&5
8501echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8502if test "${ac_cv_type_uintptr_t+set}" = set; then
8503 echo $ECHO_N "(cached) $ECHO_C" >&6
8504else
8505 cat >conftest.$ac_ext <<_ACEOF
8506#line $LINENO "configure"
8507#include "confdefs.h"
8508$ac_includes_default
8509#ifdef F77_DUMMY_MAIN
8510# ifdef __cplusplus
8511 extern "C"
8512# endif
8513 int F77_DUMMY_MAIN() { return 1; }
8514#endif
8515int
8516main ()
8517{
8518if ((uintptr_t *) 0)
8519 return 0;
8520if (sizeof (uintptr_t))
8521 return 0;
8522 ;
8523 return 0;
8524}
8525_ACEOF
8526rm -f conftest.$ac_objext
8527if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8528 (eval $ac_compile) 2>&5
8529 ac_status=$?
8530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8531 (exit $ac_status); } &&
8532 { ac_try='test -s conftest.$ac_objext'
8533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8534 (eval $ac_try) 2>&5
8535 ac_status=$?
8536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8537 (exit $ac_status); }; }; then
8538 ac_cv_type_uintptr_t=yes
8539else
8540 echo "$as_me: failed program was:" >&5
8541cat conftest.$ac_ext >&5
8542ac_cv_type_uintptr_t=no
8543fi
8544rm -f conftest.$ac_objext conftest.$ac_ext
8545fi
8546echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8547echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8548
8549echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8550echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8551if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8552 echo $ECHO_N "(cached) $ECHO_C" >&6
8553else
8554 if test "$ac_cv_type_uintptr_t" = yes; then
8555 # The cast to unsigned long works around a bug in the HP C Compiler
8556 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8557 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8558 # This bug is HP SR number 8606223364.
8559 if test "$cross_compiling" = yes; then
8560 # Depending upon the size, compute the lo and hi bounds.
8561cat >conftest.$ac_ext <<_ACEOF
8562#line $LINENO "configure"
8563#include "confdefs.h"
8564$ac_includes_default
8565#ifdef F77_DUMMY_MAIN
8566# ifdef __cplusplus
8567 extern "C"
8568# endif
8569 int F77_DUMMY_MAIN() { return 1; }
8570#endif
8571int
8572main ()
8573{
8574static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8575test_array [0] = 0
8576
8577 ;
8578 return 0;
8579}
8580_ACEOF
8581rm -f conftest.$ac_objext
8582if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8583 (eval $ac_compile) 2>&5
8584 ac_status=$?
8585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8586 (exit $ac_status); } &&
8587 { ac_try='test -s conftest.$ac_objext'
8588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8589 (eval $ac_try) 2>&5
8590 ac_status=$?
8591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8592 (exit $ac_status); }; }; then
8593 ac_lo=0 ac_mid=0
8594 while :; do
8595 cat >conftest.$ac_ext <<_ACEOF
8596#line $LINENO "configure"
8597#include "confdefs.h"
8598$ac_includes_default
8599#ifdef F77_DUMMY_MAIN
8600# ifdef __cplusplus
8601 extern "C"
8602# endif
8603 int F77_DUMMY_MAIN() { return 1; }
8604#endif
8605int
8606main ()
8607{
8608static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8609test_array [0] = 0
8610
8611 ;
8612 return 0;
8613}
8614_ACEOF
8615rm -f conftest.$ac_objext
8616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8617 (eval $ac_compile) 2>&5
8618 ac_status=$?
8619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8620 (exit $ac_status); } &&
8621 { ac_try='test -s conftest.$ac_objext'
8622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8623 (eval $ac_try) 2>&5
8624 ac_status=$?
8625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8626 (exit $ac_status); }; }; then
8627 ac_hi=$ac_mid; break
8628else
8629 echo "$as_me: failed program was:" >&5
8630cat conftest.$ac_ext >&5
8631ac_lo=`expr $ac_mid + 1`
8632 if test $ac_lo -le $ac_mid; then
8633 ac_lo= ac_hi=
8634 break
8635 fi
8636 ac_mid=`expr 2 '*' $ac_mid + 1`
8637fi
8638rm -f conftest.$ac_objext conftest.$ac_ext
8639 done
8640else
8641 echo "$as_me: failed program was:" >&5
8642cat conftest.$ac_ext >&5
8643cat >conftest.$ac_ext <<_ACEOF
8644#line $LINENO "configure"
8645#include "confdefs.h"
8646$ac_includes_default
8647#ifdef F77_DUMMY_MAIN
8648# ifdef __cplusplus
8649 extern "C"
8650# endif
8651 int F77_DUMMY_MAIN() { return 1; }
8652#endif
8653int
8654main ()
8655{
8656static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8657test_array [0] = 0
8658
8659 ;
8660 return 0;
8661}
8662_ACEOF
8663rm -f conftest.$ac_objext
8664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8665 (eval $ac_compile) 2>&5
8666 ac_status=$?
8667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8668 (exit $ac_status); } &&
8669 { ac_try='test -s conftest.$ac_objext'
8670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8671 (eval $ac_try) 2>&5
8672 ac_status=$?
8673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8674 (exit $ac_status); }; }; then
8675 ac_hi=-1 ac_mid=-1
8676 while :; do
8677 cat >conftest.$ac_ext <<_ACEOF
8678#line $LINENO "configure"
8679#include "confdefs.h"
8680$ac_includes_default
8681#ifdef F77_DUMMY_MAIN
8682# ifdef __cplusplus
8683 extern "C"
8684# endif
8685 int F77_DUMMY_MAIN() { return 1; }
8686#endif
8687int
8688main ()
8689{
8690static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8691test_array [0] = 0
8692
8693 ;
8694 return 0;
8695}
8696_ACEOF
8697rm -f conftest.$ac_objext
8698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8699 (eval $ac_compile) 2>&5
8700 ac_status=$?
8701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8702 (exit $ac_status); } &&
8703 { ac_try='test -s conftest.$ac_objext'
8704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8705 (eval $ac_try) 2>&5
8706 ac_status=$?
8707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8708 (exit $ac_status); }; }; then
8709 ac_lo=$ac_mid; break
8710else
8711 echo "$as_me: failed program was:" >&5
8712cat conftest.$ac_ext >&5
8713ac_hi=`expr '(' $ac_mid ')' - 1`
8714 if test $ac_mid -le $ac_hi; then
8715 ac_lo= ac_hi=
8716 break
8717 fi
8718 ac_mid=`expr 2 '*' $ac_mid`
8719fi
8720rm -f conftest.$ac_objext conftest.$ac_ext
8721 done
8722else
8723 echo "$as_me: failed program was:" >&5
8724cat conftest.$ac_ext >&5
8725ac_lo= ac_hi=
8726fi
8727rm -f conftest.$ac_objext conftest.$ac_ext
8728fi
8729rm -f conftest.$ac_objext conftest.$ac_ext
8730# Binary search between lo and hi bounds.
8731while test "x$ac_lo" != "x$ac_hi"; do
8732 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8733 cat >conftest.$ac_ext <<_ACEOF
8734#line $LINENO "configure"
8735#include "confdefs.h"
8736$ac_includes_default
8737#ifdef F77_DUMMY_MAIN
8738# ifdef __cplusplus
8739 extern "C"
8740# endif
8741 int F77_DUMMY_MAIN() { return 1; }
8742#endif
8743int
8744main ()
8745{
8746static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8747test_array [0] = 0
8748
8749 ;
8750 return 0;
8751}
8752_ACEOF
8753rm -f conftest.$ac_objext
8754if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8755 (eval $ac_compile) 2>&5
8756 ac_status=$?
8757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8758 (exit $ac_status); } &&
8759 { ac_try='test -s conftest.$ac_objext'
8760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8761 (eval $ac_try) 2>&5
8762 ac_status=$?
8763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8764 (exit $ac_status); }; }; then
8765 ac_hi=$ac_mid
8766else
8767 echo "$as_me: failed program was:" >&5
8768cat conftest.$ac_ext >&5
8769ac_lo=`expr '(' $ac_mid ')' + 1`
8770fi
8771rm -f conftest.$ac_objext conftest.$ac_ext
8772done
8773case $ac_lo in
8774?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8775'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8776echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8777 { (exit 1); exit 1; }; } ;;
8778esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008779else
8780 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008781 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8782echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8783 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008784else
Martin v. Löwis11437992002-04-12 09:54:03 +00008785 cat >conftest.$ac_ext <<_ACEOF
8786#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008787#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008788$ac_includes_default
8789long longval () { return (long) (sizeof (uintptr_t)); }
8790unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008791#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008792#include <stdlib.h>
8793#ifdef F77_DUMMY_MAIN
8794# ifdef __cplusplus
8795 extern "C"
8796# endif
8797 int F77_DUMMY_MAIN() { return 1; }
8798#endif
8799int
8800main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008801{
Martin v. Löwis11437992002-04-12 09:54:03 +00008802
8803 FILE *f = fopen ("conftest.val", "w");
8804 if (! f)
8805 exit (1);
8806 if (((long) (sizeof (uintptr_t))) < 0)
8807 {
8808 long i = longval ();
8809 if (i != ((long) (sizeof (uintptr_t))))
8810 exit (1);
8811 fprintf (f, "%ld\n", i);
8812 }
8813 else
8814 {
8815 unsigned long i = ulongval ();
8816 if (i != ((long) (sizeof (uintptr_t))))
8817 exit (1);
8818 fprintf (f, "%lu\n", i);
8819 }
8820 exit (ferror (f) || fclose (f) != 0);
8821
8822 ;
8823 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008824}
Martin v. Löwis11437992002-04-12 09:54:03 +00008825_ACEOF
8826rm -f conftest$ac_exeext
8827if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8828 (eval $ac_link) 2>&5
8829 ac_status=$?
8830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8831 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8833 (eval $ac_try) 2>&5
8834 ac_status=$?
8835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8836 (exit $ac_status); }; }; then
8837 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008838else
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 echo "$as_me: program exited with status $ac_status" >&5
8840echo "$as_me: failed program was:" >&5
8841cat conftest.$ac_ext >&5
8842( exit $ac_status )
8843{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8844echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8845 { (exit 1); exit 1; }; }
8846fi
8847rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8848fi
8849fi
8850rm -f conftest.val
8851else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008852 ac_cv_sizeof_uintptr_t=0
8853fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008854fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008855echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8856echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8857cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008858#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008859_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008860
Michael W. Hudson54241132001-12-07 15:38:26 +00008861
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008862fi
8863
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008864# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008865echo "$as_me:$LINENO: checking size of off_t" >&5
8866echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8867if test "${ac_cv_sizeof_off_t+set}" = set; then
8868 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008869else
8870 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008871 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008872else
Martin v. Löwis11437992002-04-12 09:54:03 +00008873 cat >conftest.$ac_ext <<_ACEOF
8874#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008875#include "confdefs.h"
8876#include <stdio.h>
8877#include <sys/types.h>
8878main()
8879{
8880 FILE *f=fopen("conftestval", "w");
8881 if (!f) exit(1);
8882 fprintf(f, "%d\n", sizeof(off_t));
8883 exit(0);
8884}
Martin v. Löwis11437992002-04-12 09:54:03 +00008885_ACEOF
8886rm -f conftest$ac_exeext
8887if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8888 (eval $ac_link) 2>&5
8889 ac_status=$?
8890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8891 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8893 (eval $ac_try) 2>&5
8894 ac_status=$?
8895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8896 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008897 ac_cv_sizeof_off_t=`cat conftestval`
8898else
Martin v. Löwis11437992002-04-12 09:54:03 +00008899 echo "$as_me: program exited with status $ac_status" >&5
8900echo "$as_me: failed program was:" >&5
8901cat conftest.$ac_ext >&5
8902( exit $ac_status )
8903ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008904fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008905rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008906fi
8907
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008908fi
8909
Martin v. Löwis11437992002-04-12 09:54:03 +00008910echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8911echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8912
8913cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008914#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008915_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008916
Michael W. Hudson54241132001-12-07 15:38:26 +00008917
Martin v. Löwis11437992002-04-12 09:54:03 +00008918echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8919echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008920if test "$have_long_long" = yes -a \
8921 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8922 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008923
Martin v. Löwis11437992002-04-12 09:54:03 +00008924cat >>confdefs.h <<\_ACEOF
8925#define HAVE_LARGEFILE_SUPPORT 1
8926_ACEOF
8927
8928 echo "$as_me:$LINENO: result: yes" >&5
8929echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008930else
Martin v. Löwis11437992002-04-12 09:54:03 +00008931 echo "$as_me:$LINENO: result: no" >&5
8932echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008933fi
8934
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008935# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008936echo "$as_me:$LINENO: checking size of time_t" >&5
8937echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8938if test "${ac_cv_sizeof_time_t+set}" = set; then
8939 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008940else
8941 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008942 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008943else
Martin v. Löwis11437992002-04-12 09:54:03 +00008944 cat >conftest.$ac_ext <<_ACEOF
8945#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008946#include "confdefs.h"
8947#include <stdio.h>
8948#include <time.h>
8949main()
8950{
8951 FILE *f=fopen("conftestval", "w");
8952 if (!f) exit(1);
8953 fprintf(f, "%d\n", sizeof(time_t));
8954 exit(0);
8955}
Martin v. Löwis11437992002-04-12 09:54:03 +00008956_ACEOF
8957rm -f conftest$ac_exeext
8958if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8959 (eval $ac_link) 2>&5
8960 ac_status=$?
8961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8962 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8964 (eval $ac_try) 2>&5
8965 ac_status=$?
8966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8967 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008968 ac_cv_sizeof_time_t=`cat conftestval`
8969else
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 echo "$as_me: program exited with status $ac_status" >&5
8971echo "$as_me: failed program was:" >&5
8972cat conftest.$ac_ext >&5
8973( exit $ac_status )
8974ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008975fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008976rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008977fi
8978
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008979fi
8980
Martin v. Löwis11437992002-04-12 09:54:03 +00008981echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8982echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8983
8984cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008985#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008986_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008987
Michael W. Hudson54241132001-12-07 15:38:26 +00008988
8989
Trent Mick635f6fb2000-08-23 21:33:05 +00008990# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008991ac_save_cc="$CC"
8992if test "$ac_cv_kpthread" = "yes"
8993then CC="$CC -Kpthread"
8994fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008995echo "$as_me:$LINENO: checking for pthread_t" >&5
8996echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008997have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008998cat >conftest.$ac_ext <<_ACEOF
8999#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009000#include "confdefs.h"
9001#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009002#ifdef F77_DUMMY_MAIN
9003# ifdef __cplusplus
9004 extern "C"
9005# endif
9006 int F77_DUMMY_MAIN() { return 1; }
9007#endif
9008int
9009main ()
9010{
Guido van Rossum12580492000-09-24 16:47:19 +00009011pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 ;
9013 return 0;
9014}
9015_ACEOF
9016rm -f conftest.$ac_objext
9017if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9018 (eval $ac_compile) 2>&5
9019 ac_status=$?
9020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9021 (exit $ac_status); } &&
9022 { ac_try='test -s conftest.$ac_objext'
9023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9024 (eval $ac_try) 2>&5
9025 ac_status=$?
9026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9027 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009028 have_pthread_t=yes
9029else
Martin v. Löwis11437992002-04-12 09:54:03 +00009030 echo "$as_me: failed program was:" >&5
9031cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009032fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009033rm -f conftest.$ac_objext conftest.$ac_ext
9034echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9035echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009036if test "$have_pthread_t" = yes ; then
9037 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9039echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9040 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9041 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009042else
9043 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009044 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009045else
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 cat >conftest.$ac_ext <<_ACEOF
9047#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009048#include "confdefs.h"
9049#include <stdio.h>
9050 #include <pthread.h>
9051 main()
9052 {
9053 FILE *f=fopen("conftestval", "w");
9054 if (!f) exit(1);
9055 fprintf(f, "%d\n", sizeof(pthread_t));
9056 exit(0);
9057 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009058_ACEOF
9059rm -f conftest$ac_exeext
9060if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9061 (eval $ac_link) 2>&5
9062 ac_status=$?
9063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9064 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9066 (eval $ac_try) 2>&5
9067 ac_status=$?
9068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9069 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009070 ac_cv_sizeof_pthread_t=`cat conftestval`
9071else
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 echo "$as_me: program exited with status $ac_status" >&5
9073echo "$as_me: failed program was:" >&5
9074cat conftest.$ac_ext >&5
9075( exit $ac_status )
9076ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009077fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009078rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009079fi
9080
Trent Mick635f6fb2000-08-23 21:33:05 +00009081fi
9082
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9084echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9085
9086cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009087#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009088_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009089
9090fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009091CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009092
Martin v. Löwis11437992002-04-12 09:54:03 +00009093echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9094echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009095# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9096if test "${enable_toolbox_glue+set}" = set; then
9097 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009098
Martin v. Löwis11437992002-04-12 09:54:03 +00009099fi;
Jack Jansene578a632001-08-15 01:27:14 +00009100
9101if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009102then
Jack Jansene578a632001-08-15 01:27:14 +00009103 case $ac_sys_system/$ac_sys_release in
9104 Darwin/*)
9105 enable_toolbox_glue="yes";;
9106 *)
9107 enable_toolbox_glue="no";;
9108 esac
9109fi
9110case "$enable_toolbox_glue" in
9111yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009112 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009113 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009114 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009115
9116cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009117#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009118_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009119
9120 ;;
9121*)
9122 extra_frameworks=""
9123 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009124 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009125 ;;
9126esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009127echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9128echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009129
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009130
9131case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009132 Darwin/1.3*)
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 Jansena3891ea2001-09-07 14:25:12 +00009135 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9136 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009137 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009138 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009139 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009140 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9141 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009142esac
9143
Martin v. Löwis11437992002-04-12 09:54:03 +00009144echo "$as_me:$LINENO: checking for --enable-framework" >&5
9145echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009146if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009147then
Jack Jansenca06bc62001-08-03 15:32:23 +00009148 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009149 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009150 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009151 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009152
Martin v. Löwis11437992002-04-12 09:54:03 +00009153cat >>confdefs.h <<\_ACEOF
9154#define WITH_NEXT_FRAMEWORK 1
9155_ACEOF
9156
9157 echo "$as_me:$LINENO: result: yes" >&5
9158echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009159else
Martin v. Löwis11437992002-04-12 09:54:03 +00009160 echo "$as_me:$LINENO: result: no" >&5
9161echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009162fi
9163
Martin v. Löwis11437992002-04-12 09:54:03 +00009164echo "$as_me:$LINENO: checking for dyld" >&5
9165echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009166case $ac_sys_system/$ac_sys_release in
9167 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009168
Martin v. Löwis11437992002-04-12 09:54:03 +00009169cat >>confdefs.h <<\_ACEOF
9170#define WITH_DYLD 1
9171_ACEOF
9172
9173 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9174echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009175 ;;
9176 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 echo "$as_me:$LINENO: result: no" >&5
9178echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009179 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009180esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009181
Guido van Rossum0a516c91994-09-12 10:58:40 +00009182# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009183
Michael W. Hudson54241132001-12-07 15:38:26 +00009184
9185
9186
9187
Guido van Rossum0a516c91994-09-12 10:58:40 +00009188# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009189# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009190echo "$as_me:$LINENO: checking SO" >&5
9191echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009192if test -z "$SO"
9193then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009194 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009195 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009196 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009197 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009198 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009199fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009200echo "$as_me:$LINENO: result: $SO" >&5
9201echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009202# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009203# -- "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 +00009204# (Shared libraries in this instance are shared modules to be loaded into
9205# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009206echo "$as_me:$LINENO: checking LDSHARED" >&5
9207echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009208if test -z "$LDSHARED"
9209then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009210 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009211 AIX*)
9212 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009213 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009214 ;;
9215 BeOS*)
9216 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009217 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009218 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009219 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009220 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009221 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009223 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009224 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009225 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009226 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009227 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009228 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9229 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009230 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009231 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9232 if test "$enable_framework" ; then
9233 # Link against the framework. All externals should be defined.
9234 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9235 else
9236 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009237 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009238 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009239 Darwin/*)
9240 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9241 if test "$enable_framework" ; then
9242 # Link against the framework. All externals should be defined.
9243 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9244 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009245 # No framework, use the Python app as bundle-loader
9246 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9247 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009248 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009249 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009250 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009251 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009252 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009253 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009254 then
9255 LDSHARED="cc -shared ${LDFLAGS}"
9256 else
9257 LDSHARED="ld -Bshareable ${LDFLAGS}"
9258 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009259 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009260 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009261 if test "$GCC" = "yes"
9262 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009263 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009264 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009265 SCO_SV*) LDSHARED="$(CC) -Wl,-G,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00009266 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009267 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009268 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009269 *) LDSHARED="ld";;
9270 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009271fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009272echo "$as_me:$LINENO: result: $LDSHARED" >&5
9273echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009274BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009275# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009276# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009277echo "$as_me:$LINENO: checking CCSHARED" >&5
9278echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009279if test -z "$CCSHARED"
9280then
Guido van Rossum07397971997-04-29 21:49:50 +00009281 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009282 SunOS*) if test "$GCC" = yes;
9283 then CCSHARED="-fPIC";
9284 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009285 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009286 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009287 else CCSHARED="+z";
9288 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009289 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009290 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009291 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009292 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009293 if test "$GCC" = "yes"
9294 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009295 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009296 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009297 SCO_SV*)
9298 if test "$GCC" = "yes"
9299 then CCSHARED="-fPIC"
9300 else CCSHARED="-Kpic -belf"
9301 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009302 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009303 IRIX*/6*) case $CC in
9304 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009305 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009306 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009307 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009308 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009309fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009310echo "$as_me:$LINENO: result: $CCSHARED" >&5
9311echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009312# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009313# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009314echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9315echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009316if test -z "$LINKFORSHARED"
9317then
Guido van Rossum07397971997-04-29 21:49:50 +00009318 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009319 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009320 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009321 LINKFORSHARED="-Wl,-E -Wl,+s";;
9322# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009323 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009324 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009325 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009327 # -u __dummy makes the linker aware of the objc runtime
9328 # in System.framework; otherwise, __objcInit (referenced in
9329 # crt1.o) gets erroneously defined as common, which breaks dynamic
9330 # loading of any modules which reference it in System.framework.
9331 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9332 # not used by the core itself but which needs to be in the core so
9333 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009334 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009335 if test "$enable_framework"
9336 then
9337 LINKFORSHARED="$LINKFORSHARED -framework Python"
9338 fi
9339 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009340 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009341 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009342 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009343 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009344 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9345 then
9346 LINKFORSHARED="-Wl,--export-dynamic"
9347 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009348 SunOS/5*) case $CC in
9349 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009350 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009351 then
9352 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009353 fi;;
9354 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009355 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009356fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009357echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9358echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009359
Michael W. Hudson54241132001-12-07 15:38:26 +00009360
Martin v. Löwis11437992002-04-12 09:54:03 +00009361echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9362echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009363if test ! "$LIBRARY" = "$LDLIBRARY"
9364then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009365 case $ac_sys_system in
9366 CYGWIN*)
9367 # Cygwin needs CCSHARED when building extension DLLs
9368 # but not when building the interpreter DLL.
9369 CFLAGSFORSHARED='';;
9370 *)
9371 CFLAGSFORSHARED='$(CCSHARED)'
9372 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009373fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009374echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9375echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009376
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009377# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9378# library (with --enable-shared).
9379# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009380# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9381# if it is not required, since it creates a dependency of the shared library
9382# to LIBS. This, in turn, means that applications linking the shared libpython
9383# don't need to link LIBS explicitly. The default should be only changed
9384# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009385
9386echo "$as_me:$LINENO: checking SHLIBS" >&5
9387echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9388case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009389 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009390 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009391esac
9392echo "$as_me:$LINENO: result: $SHLIBS" >&5
9393echo "${ECHO_T}$SHLIBS" >&6
9394
9395
Guido van Rossum627b2d71993-12-24 10:39:16 +00009396# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009397
9398echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9399echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9400if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9401 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009402else
Martin v. Löwis11437992002-04-12 09:54:03 +00009403 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009404LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009405cat >conftest.$ac_ext <<_ACEOF
9406#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009407#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009408
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009409/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009410#ifdef __cplusplus
9411extern "C"
9412#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009413/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 builtin and then its argument prototype would still apply. */
9415char dlopen ();
9416#ifdef F77_DUMMY_MAIN
9417# ifdef __cplusplus
9418 extern "C"
9419# endif
9420 int F77_DUMMY_MAIN() { return 1; }
9421#endif
9422int
9423main ()
9424{
9425dlopen ();
9426 ;
9427 return 0;
9428}
9429_ACEOF
9430rm -f conftest.$ac_objext conftest$ac_exeext
9431if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9432 (eval $ac_link) 2>&5
9433 ac_status=$?
9434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9435 (exit $ac_status); } &&
9436 { ac_try='test -s conftest$ac_exeext'
9437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9438 (eval $ac_try) 2>&5
9439 ac_status=$?
9440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9441 (exit $ac_status); }; }; then
9442 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009443else
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 echo "$as_me: failed program was:" >&5
9445cat conftest.$ac_ext >&5
9446ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009447fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009448rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9449LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009450fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009451echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9452echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9453if test $ac_cv_lib_dl_dlopen = yes; then
9454 cat >>confdefs.h <<_ACEOF
9455#define HAVE_LIBDL 1
9456_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009457
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009458 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009459
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009460fi
9461 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009462
9463echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9464echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9465if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9466 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009467else
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009469LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009470cat >conftest.$ac_ext <<_ACEOF
9471#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009472#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009473
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009474/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009475#ifdef __cplusplus
9476extern "C"
9477#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009478/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009479 builtin and then its argument prototype would still apply. */
9480char shl_load ();
9481#ifdef F77_DUMMY_MAIN
9482# ifdef __cplusplus
9483 extern "C"
9484# endif
9485 int F77_DUMMY_MAIN() { return 1; }
9486#endif
9487int
9488main ()
9489{
9490shl_load ();
9491 ;
9492 return 0;
9493}
9494_ACEOF
9495rm -f conftest.$ac_objext conftest$ac_exeext
9496if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9497 (eval $ac_link) 2>&5
9498 ac_status=$?
9499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9500 (exit $ac_status); } &&
9501 { ac_try='test -s conftest$ac_exeext'
9502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9503 (eval $ac_try) 2>&5
9504 ac_status=$?
9505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9506 (exit $ac_status); }; }; then
9507 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009508else
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 echo "$as_me: failed program was:" >&5
9510cat conftest.$ac_ext >&5
9511ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009512fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009513rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9514LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009515fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009516echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9517echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9518if test $ac_cv_lib_dld_shl_load = yes; then
9519 cat >>confdefs.h <<_ACEOF
9520#define HAVE_LIBDLD 1
9521_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009522
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009523 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009524
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009525fi
9526 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009527echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9528echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9529if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009530 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009531else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009532 ac_func_search_save_LIBS=$LIBS
9533ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009534cat >conftest.$ac_ext <<_ACEOF
9535#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009536#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009537
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009538/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009539#ifdef __cplusplus
9540extern "C"
9541#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009542/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 builtin and then its argument prototype would still apply. */
9544char sem_init ();
9545#ifdef F77_DUMMY_MAIN
9546# ifdef __cplusplus
9547 extern "C"
9548# endif
9549 int F77_DUMMY_MAIN() { return 1; }
9550#endif
9551int
9552main ()
9553{
9554sem_init ();
9555 ;
9556 return 0;
9557}
9558_ACEOF
9559rm -f conftest.$ac_objext conftest$ac_exeext
9560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9561 (eval $ac_link) 2>&5
9562 ac_status=$?
9563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9564 (exit $ac_status); } &&
9565 { ac_try='test -s conftest$ac_exeext'
9566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9567 (eval $ac_try) 2>&5
9568 ac_status=$?
9569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9570 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009571 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009572else
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 echo "$as_me: failed program was:" >&5
9574cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009575fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009576rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009577if test "$ac_cv_search_sem_init" = no; then
9578 for ac_lib in rt posix4; do
9579 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9580 cat >conftest.$ac_ext <<_ACEOF
9581#line $LINENO "configure"
9582#include "confdefs.h"
9583
9584/* Override any gcc2 internal prototype to avoid an error. */
9585#ifdef __cplusplus
9586extern "C"
9587#endif
9588/* We use char because int might match the return type of a gcc2
9589 builtin and then its argument prototype would still apply. */
9590char sem_init ();
9591#ifdef F77_DUMMY_MAIN
9592# ifdef __cplusplus
9593 extern "C"
9594# endif
9595 int F77_DUMMY_MAIN() { return 1; }
9596#endif
9597int
9598main ()
9599{
9600sem_init ();
9601 ;
9602 return 0;
9603}
Martin v. Löwis11437992002-04-12 09:54:03 +00009604_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009605rm -f conftest.$ac_objext conftest$ac_exeext
9606if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9607 (eval $ac_link) 2>&5
9608 ac_status=$?
9609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9610 (exit $ac_status); } &&
9611 { ac_try='test -s conftest$ac_exeext'
9612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9613 (eval $ac_try) 2>&5
9614 ac_status=$?
9615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9616 (exit $ac_status); }; }; then
9617 ac_cv_search_sem_init="-l$ac_lib"
9618break
9619else
9620 echo "$as_me: failed program was:" >&5
9621cat conftest.$ac_ext >&5
9622fi
9623rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9624 done
9625fi
9626LIBS=$ac_func_search_save_LIBS
9627fi
9628echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9629echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9630if test "$ac_cv_search_sem_init" != no; then
9631 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009632
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009633fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009634 # 'Real Time' functions on Solaris,
9635 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009636
9637# checks for system dependent C++ extensions support
9638case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009639 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9640echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9641 cat >conftest.$ac_ext <<_ACEOF
9642#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009643#include "confdefs.h"
9644#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009645#ifdef F77_DUMMY_MAIN
9646# ifdef __cplusplus
9647 extern "C"
9648# endif
9649 int F77_DUMMY_MAIN() { return 1; }
9650#endif
9651int
9652main ()
9653{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009654loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009655 ;
9656 return 0;
9657}
9658_ACEOF
9659rm -f conftest.$ac_objext conftest$ac_exeext
9660if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9661 (eval $ac_link) 2>&5
9662 ac_status=$?
9663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9664 (exit $ac_status); } &&
9665 { ac_try='test -s conftest$ac_exeext'
9666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9667 (eval $ac_try) 2>&5
9668 ac_status=$?
9669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9670 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009671
Martin v. Löwis11437992002-04-12 09:54:03 +00009672cat >>confdefs.h <<\_ACEOF
9673#define AIX_GENUINE_CPLUSPLUS 1
9674_ACEOF
9675
9676 echo "$as_me:$LINENO: result: yes" >&5
9677echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009678else
Martin v. Löwis11437992002-04-12 09:54:03 +00009679 echo "$as_me: failed program was:" >&5
9680cat conftest.$ac_ext >&5
9681echo "$as_me:$LINENO: result: no" >&5
9682echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009683fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009684rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009685 *) ;;
9686esac
9687
Guido van Rossum70c7f481998-03-26 18:44:10 +00009688# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9689# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009690# BeOS' sockets are stashed in libnet.
9691case "$ac_sys_system" in
9692IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009693*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009694echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9695echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9696if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9697 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009698else
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009700LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009701cat >conftest.$ac_ext <<_ACEOF
9702#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009703#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009704
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009705/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009706#ifdef __cplusplus
9707extern "C"
9708#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009709/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 builtin and then its argument prototype would still apply. */
9711char t_open ();
9712#ifdef F77_DUMMY_MAIN
9713# ifdef __cplusplus
9714 extern "C"
9715# endif
9716 int F77_DUMMY_MAIN() { return 1; }
9717#endif
9718int
9719main ()
9720{
9721t_open ();
9722 ;
9723 return 0;
9724}
9725_ACEOF
9726rm -f conftest.$ac_objext conftest$ac_exeext
9727if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9728 (eval $ac_link) 2>&5
9729 ac_status=$?
9730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9731 (exit $ac_status); } &&
9732 { ac_try='test -s conftest$ac_exeext'
9733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9734 (eval $ac_try) 2>&5
9735 ac_status=$?
9736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9737 (exit $ac_status); }; }; then
9738 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009739else
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 echo "$as_me: failed program was:" >&5
9741cat conftest.$ac_ext >&5
9742ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009743fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009744rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9745LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009746fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009747echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9748echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9749if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009750 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009751fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009752 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009753echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9754echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9755if test "${ac_cv_lib_socket_socket+set}" = set; then
9756 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009757else
Martin v. Löwis11437992002-04-12 09:54:03 +00009758 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009759LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009760cat >conftest.$ac_ext <<_ACEOF
9761#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009762#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009763
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009764/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009765#ifdef __cplusplus
9766extern "C"
9767#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009768/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 builtin and then its argument prototype would still apply. */
9770char socket ();
9771#ifdef F77_DUMMY_MAIN
9772# ifdef __cplusplus
9773 extern "C"
9774# endif
9775 int F77_DUMMY_MAIN() { return 1; }
9776#endif
9777int
9778main ()
9779{
9780socket ();
9781 ;
9782 return 0;
9783}
9784_ACEOF
9785rm -f conftest.$ac_objext conftest$ac_exeext
9786if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9787 (eval $ac_link) 2>&5
9788 ac_status=$?
9789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9790 (exit $ac_status); } &&
9791 { ac_try='test -s conftest$ac_exeext'
9792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9793 (eval $ac_try) 2>&5
9794 ac_status=$?
9795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9796 (exit $ac_status); }; }; then
9797 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009798else
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 echo "$as_me: failed program was:" >&5
9800cat conftest.$ac_ext >&5
9801ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009802fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009803rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9804LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009805fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009806echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9807echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9808if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009809 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009810fi
9811 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009812;;
9813esac
9814case "$ac_sys_system" in
9815BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009816echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9817echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9818if test "${ac_cv_lib_net_socket+set}" = set; then
9819 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009820else
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009822LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009823cat >conftest.$ac_ext <<_ACEOF
9824#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009825#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009826
Guido van Rossumad678af1998-10-02 14:42:15 +00009827/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009828#ifdef __cplusplus
9829extern "C"
9830#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009831/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009832 builtin and then its argument prototype would still apply. */
9833char socket ();
9834#ifdef F77_DUMMY_MAIN
9835# ifdef __cplusplus
9836 extern "C"
9837# endif
9838 int F77_DUMMY_MAIN() { return 1; }
9839#endif
9840int
9841main ()
9842{
9843socket ();
9844 ;
9845 return 0;
9846}
9847_ACEOF
9848rm -f conftest.$ac_objext conftest$ac_exeext
9849if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9850 (eval $ac_link) 2>&5
9851 ac_status=$?
9852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9853 (exit $ac_status); } &&
9854 { ac_try='test -s conftest$ac_exeext'
9855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9856 (eval $ac_try) 2>&5
9857 ac_status=$?
9858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9859 (exit $ac_status); }; }; then
9860 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009861else
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 echo "$as_me: failed program was:" >&5
9863cat conftest.$ac_ext >&5
9864ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009865fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009866rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9867LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009868fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009869echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9870echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9871if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009872 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009873fi
9874 # BeOS
9875;;
9876esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009877
Martin v. Löwis11437992002-04-12 09:54:03 +00009878echo "$as_me:$LINENO: checking for --with-libs" >&5
9879echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9880
Guido van Rossuma68acba1996-07-31 17:36:39 +00009881# Check whether --with-libs or --without-libs was given.
9882if test "${with_libs+set}" = set; then
9883 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009884
9885echo "$as_me:$LINENO: result: $withval" >&5
9886echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009887LIBS="$withval $LIBS"
9888
9889else
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 echo "$as_me:$LINENO: result: no" >&5
9891echo "${ECHO_T}no" >&6
9892fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009893
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009894# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009895
9896
Martin v. Löwis11437992002-04-12 09:54:03 +00009897echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9898echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9899
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009900# Check whether --with-signal-module or --without-signal-module was given.
9901if test "${with_signal_module+set}" = set; then
9902 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009903
Martin v. Löwis11437992002-04-12 09:54:03 +00009904fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009905
9906if test -z "$with_signal_module"
9907then with_signal_module="yes"
9908fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009909echo "$as_me:$LINENO: result: $with_signal_module" >&5
9910echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009911
9912if test "${with_signal_module}" = "yes"; then
9913 USE_SIGNAL_MODULE=""
9914 SIGNAL_OBJS=""
9915else
9916 USE_SIGNAL_MODULE="#"
9917 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9918fi
9919
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009920# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009921
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009922USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009923
Martin v. Löwis11437992002-04-12 09:54:03 +00009924echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9925echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9926
Guido van Rossumec2f0731997-01-22 20:54:01 +00009927
9928# Check whether --with-dec-threads or --without-dec-threads was given.
9929if test "${with_dec_threads+set}" = set; then
9930 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009931
9932echo "$as_me:$LINENO: result: $withval" >&5
9933echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009934LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009935if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009936 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009937fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009938else
Martin v. Löwis11437992002-04-12 09:54:03 +00009939 echo "$as_me:$LINENO: result: no" >&5
9940echo "${ECHO_T}no" >&6
9941fi;
9942
9943# Templates for things AC_DEFINEd more than once.
9944# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009945
9946
Martin v. Löwis11437992002-04-12 09:54:03 +00009947
9948
9949
9950
9951
9952echo "$as_me:$LINENO: checking for --with-threads" >&5
9953echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9954
Guido van Rossumec2f0731997-01-22 20:54:01 +00009955# Check whether --with-threads or --without-threads was given.
9956if test "${with_threads+set}" = set; then
9957 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009958
Martin v. Löwis11437992002-04-12 09:54:03 +00009959fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009960
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009961# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009962
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009963# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009964if test "${with_thread+set}" = set; then
9965 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009966 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +00009967fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009968
9969if test -z "$with_threads"
9970then with_threads="yes"
9971fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009972echo "$as_me:$LINENO: result: $with_threads" >&5
9973echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009974
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009975
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009976if test "$with_threads" = "no"
9977then
9978 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009979elif test "$ac_cv_pthread_is_default" = yes
9980then
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009982#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009983_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009984
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009985 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009987#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009988_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009989
9990 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009992elif test "$ac_cv_kpthread" = "yes"
9993then
9994 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009995 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009996#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009997_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009998
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009999 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010000 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010001else
10002 if test ! -z "$with_threads" -a -d "$with_threads"
10003 then LDFLAGS="$LDFLAGS -L$with_threads"
10004 fi
10005 if test ! -z "$withval" -a -d "$withval"
10006 then LDFLAGS="$LDFLAGS -L$withval"
10007 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010008
10009 # According to the POSIX spec, a pthreads implementation must
10010 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010011 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10012echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10013 cat >conftest.$ac_ext <<_ACEOF
10014#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010015#include "confdefs.h"
10016#include <unistd.h>
10017 #ifdef _POSIX_THREADS
10018 yes
10019 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010020
10021_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10023 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010024 unistd_defines_pthreads=yes
10025else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010026 unistd_defines_pthreads=no
10027fi
10028rm -f conftest*
10029
Martin v. Löwis11437992002-04-12 09:54:03 +000010030 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10031echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010032
Martin v. Löwis11437992002-04-12 09:54:03 +000010033 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010034#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010035_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010036
Martin v. Löwis11437992002-04-12 09:54:03 +000010037 if test "${ac_cv_header_cthreads_h+set}" = set; then
10038 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10039echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10040if test "${ac_cv_header_cthreads_h+set}" = set; then
10041 echo $ECHO_N "(cached) $ECHO_C" >&6
10042fi
10043echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10044echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010045else
Martin v. Löwis11437992002-04-12 09:54:03 +000010046 # Is the header compilable?
10047echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10048echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10049cat >conftest.$ac_ext <<_ACEOF
10050#line $LINENO "configure"
10051#include "confdefs.h"
10052$ac_includes_default
10053#include <cthreads.h>
10054_ACEOF
10055rm -f conftest.$ac_objext
10056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10057 (eval $ac_compile) 2>&5
10058 ac_status=$?
10059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10060 (exit $ac_status); } &&
10061 { ac_try='test -s conftest.$ac_objext'
10062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10063 (eval $ac_try) 2>&5
10064 ac_status=$?
10065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10066 (exit $ac_status); }; }; then
10067 ac_header_compiler=yes
10068else
10069 echo "$as_me: failed program was:" >&5
10070cat conftest.$ac_ext >&5
10071ac_header_compiler=no
10072fi
10073rm -f conftest.$ac_objext conftest.$ac_ext
10074echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10075echo "${ECHO_T}$ac_header_compiler" >&6
10076
10077# Is the header present?
10078echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10079echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10080cat >conftest.$ac_ext <<_ACEOF
10081#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010082#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010083#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010084_ACEOF
10085if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10086 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10087 ac_status=$?
10088 egrep -v '^ *\+' conftest.er1 >conftest.err
10089 rm -f conftest.er1
10090 cat conftest.err >&5
10091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10092 (exit $ac_status); } >/dev/null; then
10093 if test -s conftest.err; then
10094 ac_cpp_err=$ac_c_preproc_warn_flag
10095 else
10096 ac_cpp_err=
10097 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010098else
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 ac_cpp_err=yes
10100fi
10101if test -z "$ac_cpp_err"; then
10102 ac_header_preproc=yes
10103else
10104 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010105 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010106 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010107fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010108rm -f conftest.err conftest.$ac_ext
10109echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10110echo "${ECHO_T}$ac_header_preproc" >&6
10111
10112# So? What about this header?
10113case $ac_header_compiler:$ac_header_preproc in
10114 yes:no )
10115 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10116echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10117 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10118echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10119 no:yes )
10120 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10121echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10122 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10123echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10124 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10125echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10126esac
10127echo "$as_me:$LINENO: checking for cthreads.h" >&5
10128echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10129if test "${ac_cv_header_cthreads_h+set}" = set; then
10130 echo $ECHO_N "(cached) $ECHO_C" >&6
10131else
10132 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010133fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010134echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10135echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10136
10137fi
10138if test $ac_cv_header_cthreads_h = yes; then
10139 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010140#define WITH_THREAD 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 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010144#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010145_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010146
Martin v. Löwis11437992002-04-12 09:54:03 +000010147
10148cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010149#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010150_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010151
10152 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010153 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010154else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010155
Martin v. Löwis11437992002-04-12 09:54:03 +000010156 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10157 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10158echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10159if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10160 echo $ECHO_N "(cached) $ECHO_C" >&6
10161fi
10162echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10163echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010164else
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 # Is the header compilable?
10166echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10167echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10168cat >conftest.$ac_ext <<_ACEOF
10169#line $LINENO "configure"
10170#include "confdefs.h"
10171$ac_includes_default
10172#include <mach/cthreads.h>
10173_ACEOF
10174rm -f conftest.$ac_objext
10175if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10176 (eval $ac_compile) 2>&5
10177 ac_status=$?
10178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10179 (exit $ac_status); } &&
10180 { ac_try='test -s conftest.$ac_objext'
10181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10182 (eval $ac_try) 2>&5
10183 ac_status=$?
10184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10185 (exit $ac_status); }; }; then
10186 ac_header_compiler=yes
10187else
10188 echo "$as_me: failed program was:" >&5
10189cat conftest.$ac_ext >&5
10190ac_header_compiler=no
10191fi
10192rm -f conftest.$ac_objext conftest.$ac_ext
10193echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10194echo "${ECHO_T}$ac_header_compiler" >&6
10195
10196# Is the header present?
10197echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10198echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10199cat >conftest.$ac_ext <<_ACEOF
10200#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010201#include "confdefs.h"
10202#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010203_ACEOF
10204if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10205 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10206 ac_status=$?
10207 egrep -v '^ *\+' conftest.er1 >conftest.err
10208 rm -f conftest.er1
10209 cat conftest.err >&5
10210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10211 (exit $ac_status); } >/dev/null; then
10212 if test -s conftest.err; then
10213 ac_cpp_err=$ac_c_preproc_warn_flag
10214 else
10215 ac_cpp_err=
10216 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010217else
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 ac_cpp_err=yes
10219fi
10220if test -z "$ac_cpp_err"; then
10221 ac_header_preproc=yes
10222else
10223 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010224 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010225 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010226fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010227rm -f conftest.err conftest.$ac_ext
10228echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10229echo "${ECHO_T}$ac_header_preproc" >&6
10230
10231# So? What about this header?
10232case $ac_header_compiler:$ac_header_preproc in
10233 yes:no )
10234 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10235echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10236 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10237echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10238 no:yes )
10239 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10240echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10241 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10242echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10243 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10244echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10245esac
10246echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10247echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10248if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10249 echo $ECHO_N "(cached) $ECHO_C" >&6
10250else
10251 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010252fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010253echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10254echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10255
10256fi
10257if test $ac_cv_header_mach_cthreads_h = yes; then
10258 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010259#define WITH_THREAD 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 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010263#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010264_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010265
Martin v. Löwis11437992002-04-12 09:54:03 +000010266
10267cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010268#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010269_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010270
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010271 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010272else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010273
Martin v. Löwis11437992002-04-12 09:54:03 +000010274 echo "$as_me:$LINENO: checking for --with-pth" >&5
10275echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10276
10277# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010278if test "${with_pth+set}" = set; then
10279 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010280 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010281echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010282 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010283#define WITH_THREAD 1
10284_ACEOF
10285
10286
10287cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010288#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010289_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010290
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010291 LIBS="-lpth $LIBS"
10292 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010293else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010294 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010295echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010296
10297 # Just looking for pthread_create in libpthread is not enough:
10298 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10299 # So we really have to include pthread.h, and then link.
10300 _libs=$LIBS
10301 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010302 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10303echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10304 cat >conftest.$ac_ext <<_ACEOF
10305#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010306#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010307#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010308
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010309void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010310#ifdef F77_DUMMY_MAIN
10311# ifdef __cplusplus
10312 extern "C"
10313# endif
10314 int F77_DUMMY_MAIN() { return 1; }
10315#endif
10316int
10317main ()
10318{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010319
10320pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 ;
10322 return 0;
10323}
10324_ACEOF
10325rm -f conftest.$ac_objext conftest$ac_exeext
10326if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10327 (eval $ac_link) 2>&5
10328 ac_status=$?
10329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10330 (exit $ac_status); } &&
10331 { ac_try='test -s conftest$ac_exeext'
10332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10333 (eval $ac_try) 2>&5
10334 ac_status=$?
10335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10336 (exit $ac_status); }; }; then
10337
10338 echo "$as_me:$LINENO: result: yes" >&5
10339echo "${ECHO_T}yes" >&6
10340 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010341#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010342_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010343
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010344 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010345 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010346else
Martin v. Löwis11437992002-04-12 09:54:03 +000010347 echo "$as_me: failed program was:" >&5
10348cat conftest.$ac_ext >&5
10349
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010350 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010351 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10352echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10353if test "${ac_cv_func_pthread_detach+set}" = set; then
10354 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010355else
Martin v. Löwis11437992002-04-12 09:54:03 +000010356 cat >conftest.$ac_ext <<_ACEOF
10357#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010358#include "confdefs.h"
10359/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010360 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010361#include <assert.h>
10362/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010363#ifdef __cplusplus
10364extern "C"
10365#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010366/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010367 builtin and then its argument prototype would still apply. */
10368char pthread_detach ();
10369char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010370
Martin v. Löwis11437992002-04-12 09:54:03 +000010371#ifdef F77_DUMMY_MAIN
10372# ifdef __cplusplus
10373 extern "C"
10374# endif
10375 int F77_DUMMY_MAIN() { return 1; }
10376#endif
10377int
10378main ()
10379{
Guido van Rossumad678af1998-10-02 14:42:15 +000010380/* The GNU C library defines this for functions which it implements
10381 to always fail with ENOSYS. Some functions are actually named
10382 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010383#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010384choke me
10385#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010386f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010387#endif
10388
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 ;
10390 return 0;
10391}
10392_ACEOF
10393rm -f conftest.$ac_objext conftest$ac_exeext
10394if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10395 (eval $ac_link) 2>&5
10396 ac_status=$?
10397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10398 (exit $ac_status); } &&
10399 { ac_try='test -s conftest$ac_exeext'
10400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10401 (eval $ac_try) 2>&5
10402 ac_status=$?
10403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10404 (exit $ac_status); }; }; then
10405 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010406else
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 echo "$as_me: failed program was:" >&5
10408cat conftest.$ac_ext >&5
10409ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010410fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010411rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010412fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010413echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10414echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10415if test $ac_cv_func_pthread_detach = yes; then
10416 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010417#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010418_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010419
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010420 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010421 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010422else
Guido van Rossumad678af1998-10-02 14:42:15 +000010423
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010424 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10425 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10426echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10427if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10428 echo $ECHO_N "(cached) $ECHO_C" >&6
10429fi
10430echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10431echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10432else
10433 # Is the header compilable?
10434echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10435echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10436cat >conftest.$ac_ext <<_ACEOF
10437#line $LINENO "configure"
10438#include "confdefs.h"
10439$ac_includes_default
10440#include <atheos/threads.h>
10441_ACEOF
10442rm -f conftest.$ac_objext
10443if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10444 (eval $ac_compile) 2>&5
10445 ac_status=$?
10446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10447 (exit $ac_status); } &&
10448 { ac_try='test -s conftest.$ac_objext'
10449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10450 (eval $ac_try) 2>&5
10451 ac_status=$?
10452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10453 (exit $ac_status); }; }; then
10454 ac_header_compiler=yes
10455else
10456 echo "$as_me: failed program was:" >&5
10457cat conftest.$ac_ext >&5
10458ac_header_compiler=no
10459fi
10460rm -f conftest.$ac_objext conftest.$ac_ext
10461echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10462echo "${ECHO_T}$ac_header_compiler" >&6
10463
10464# Is the header present?
10465echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10466echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10467cat >conftest.$ac_ext <<_ACEOF
10468#line $LINENO "configure"
10469#include "confdefs.h"
10470#include <atheos/threads.h>
10471_ACEOF
10472if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10473 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10474 ac_status=$?
10475 egrep -v '^ *\+' conftest.er1 >conftest.err
10476 rm -f conftest.er1
10477 cat conftest.err >&5
10478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10479 (exit $ac_status); } >/dev/null; then
10480 if test -s conftest.err; then
10481 ac_cpp_err=$ac_c_preproc_warn_flag
10482 else
10483 ac_cpp_err=
10484 fi
10485else
10486 ac_cpp_err=yes
10487fi
10488if test -z "$ac_cpp_err"; then
10489 ac_header_preproc=yes
10490else
10491 echo "$as_me: failed program was:" >&5
10492 cat conftest.$ac_ext >&5
10493 ac_header_preproc=no
10494fi
10495rm -f conftest.err conftest.$ac_ext
10496echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10497echo "${ECHO_T}$ac_header_preproc" >&6
10498
10499# So? What about this header?
10500case $ac_header_compiler:$ac_header_preproc in
10501 yes:no )
10502 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10503echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10504 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10505echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10506 no:yes )
10507 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10508echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10509 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10510echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10511 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10512echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10513esac
10514echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10515echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10516if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10517 echo $ECHO_N "(cached) $ECHO_C" >&6
10518else
10519 ac_cv_header_atheos_threads_h=$ac_header_preproc
10520fi
10521echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10522echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10523
10524fi
10525if test $ac_cv_header_atheos_threads_h = yes; then
10526 cat >>confdefs.h <<\_ACEOF
10527#define WITH_THREAD 1
10528_ACEOF
10529
10530
10531cat >>confdefs.h <<\_ACEOF
10532#define ATHEOS_THREADS 1
10533_ACEOF
10534
10535 THREADOBJ="Python/thread.o"
10536else
10537
Martin v. Löwis11437992002-04-12 09:54:03 +000010538 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10539 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10540echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10541if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10542 echo $ECHO_N "(cached) $ECHO_C" >&6
10543fi
10544echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10545echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010546else
Martin v. Löwis11437992002-04-12 09:54:03 +000010547 # Is the header compilable?
10548echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10549echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10550cat >conftest.$ac_ext <<_ACEOF
10551#line $LINENO "configure"
10552#include "confdefs.h"
10553$ac_includes_default
10554#include <kernel/OS.h>
10555_ACEOF
10556rm -f conftest.$ac_objext
10557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10558 (eval $ac_compile) 2>&5
10559 ac_status=$?
10560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10561 (exit $ac_status); } &&
10562 { ac_try='test -s conftest.$ac_objext'
10563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10564 (eval $ac_try) 2>&5
10565 ac_status=$?
10566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10567 (exit $ac_status); }; }; then
10568 ac_header_compiler=yes
10569else
10570 echo "$as_me: failed program was:" >&5
10571cat conftest.$ac_ext >&5
10572ac_header_compiler=no
10573fi
10574rm -f conftest.$ac_objext conftest.$ac_ext
10575echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10576echo "${ECHO_T}$ac_header_compiler" >&6
10577
10578# Is the header present?
10579echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10580echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10581cat >conftest.$ac_ext <<_ACEOF
10582#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010583#include "confdefs.h"
10584#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010585_ACEOF
10586if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10587 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10588 ac_status=$?
10589 egrep -v '^ *\+' conftest.er1 >conftest.err
10590 rm -f conftest.er1
10591 cat conftest.err >&5
10592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10593 (exit $ac_status); } >/dev/null; then
10594 if test -s conftest.err; then
10595 ac_cpp_err=$ac_c_preproc_warn_flag
10596 else
10597 ac_cpp_err=
10598 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010599else
Martin v. Löwis11437992002-04-12 09:54:03 +000010600 ac_cpp_err=yes
10601fi
10602if test -z "$ac_cpp_err"; then
10603 ac_header_preproc=yes
10604else
10605 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010606 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010607 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010608fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010609rm -f conftest.err conftest.$ac_ext
10610echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10611echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010612
Martin v. Löwis11437992002-04-12 09:54:03 +000010613# So? What about this header?
10614case $ac_header_compiler:$ac_header_preproc in
10615 yes:no )
10616 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10617echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10618 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10619echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10620 no:yes )
10621 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10622echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10623 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10624echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10625 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10626echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10627esac
10628echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10629echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10630if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10631 echo $ECHO_N "(cached) $ECHO_C" >&6
10632else
10633 ac_cv_header_kernel_OS_h=$ac_header_preproc
10634fi
10635echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10636echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10637
10638fi
10639if test $ac_cv_header_kernel_OS_h = yes; then
10640 cat >>confdefs.h <<\_ACEOF
10641#define WITH_THREAD 1
10642_ACEOF
10643
10644
10645cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010646#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010647_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010648
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010649 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010650else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010651
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10653echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10654if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10655 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010656else
Martin v. Löwis11437992002-04-12 09:54:03 +000010657 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010658LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010659cat >conftest.$ac_ext <<_ACEOF
10660#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010661#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010662
Greg Steinadf63d62000-07-05 10:38:09 +000010663/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010664#ifdef __cplusplus
10665extern "C"
10666#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010667/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010668 builtin and then its argument prototype would still apply. */
10669char pthread_create ();
10670#ifdef F77_DUMMY_MAIN
10671# ifdef __cplusplus
10672 extern "C"
10673# endif
10674 int F77_DUMMY_MAIN() { return 1; }
10675#endif
10676int
10677main ()
10678{
10679pthread_create ();
10680 ;
10681 return 0;
10682}
10683_ACEOF
10684rm -f conftest.$ac_objext conftest$ac_exeext
10685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10686 (eval $ac_link) 2>&5
10687 ac_status=$?
10688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10689 (exit $ac_status); } &&
10690 { ac_try='test -s conftest$ac_exeext'
10691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10692 (eval $ac_try) 2>&5
10693 ac_status=$?
10694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10695 (exit $ac_status); }; }; then
10696 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010697else
Martin v. Löwis11437992002-04-12 09:54:03 +000010698 echo "$as_me: failed program was:" >&5
10699cat conftest.$ac_ext >&5
10700ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010701fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010702rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10703LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010704fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010705echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10706echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10707if test $ac_cv_lib_pthreads_pthread_create = yes; then
10708 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010709#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010710_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010711
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010712 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010713 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010714 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010715else
Greg Steinadf63d62000-07-05 10:38:09 +000010716
Martin v. Löwis11437992002-04-12 09:54:03 +000010717 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10718echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10719if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10720 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010721else
Martin v. Löwis11437992002-04-12 09:54:03 +000010722 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010723LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010724cat >conftest.$ac_ext <<_ACEOF
10725#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010726#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010727
Guido van Rossum49545951997-12-02 19:28:29 +000010728/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010729#ifdef __cplusplus
10730extern "C"
10731#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010732/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010733 builtin and then its argument prototype would still apply. */
10734char pthread_create ();
10735#ifdef F77_DUMMY_MAIN
10736# ifdef __cplusplus
10737 extern "C"
10738# endif
10739 int F77_DUMMY_MAIN() { return 1; }
10740#endif
10741int
10742main ()
10743{
10744pthread_create ();
10745 ;
10746 return 0;
10747}
10748_ACEOF
10749rm -f conftest.$ac_objext conftest$ac_exeext
10750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10751 (eval $ac_link) 2>&5
10752 ac_status=$?
10753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10754 (exit $ac_status); } &&
10755 { ac_try='test -s conftest$ac_exeext'
10756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10757 (eval $ac_try) 2>&5
10758 ac_status=$?
10759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10760 (exit $ac_status); }; }; then
10761 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010762else
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 echo "$as_me: failed program was:" >&5
10764cat conftest.$ac_ext >&5
10765ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010766fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010767rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10768LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010769fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010770echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10771echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10772if test $ac_cv_lib_c_r_pthread_create = yes; then
10773 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010774#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010775_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010776
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010777 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010778 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010779 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010780else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010781
Martin v. Löwis11437992002-04-12 09:54:03 +000010782 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10783echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10784if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10785 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010786else
Martin v. Löwis11437992002-04-12 09:54:03 +000010787 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010788LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010789cat >conftest.$ac_ext <<_ACEOF
10790#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010791#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010792
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010793/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010794#ifdef __cplusplus
10795extern "C"
10796#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010797/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 builtin and then its argument prototype would still apply. */
10799char __d6_pthread_create ();
10800#ifdef F77_DUMMY_MAIN
10801# ifdef __cplusplus
10802 extern "C"
10803# endif
10804 int F77_DUMMY_MAIN() { return 1; }
10805#endif
10806int
10807main ()
10808{
10809__d6_pthread_create ();
10810 ;
10811 return 0;
10812}
10813_ACEOF
10814rm -f conftest.$ac_objext conftest$ac_exeext
10815if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10816 (eval $ac_link) 2>&5
10817 ac_status=$?
10818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10819 (exit $ac_status); } &&
10820 { ac_try='test -s conftest$ac_exeext'
10821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10822 (eval $ac_try) 2>&5
10823 ac_status=$?
10824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10825 (exit $ac_status); }; }; then
10826 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010827else
Martin v. Löwis11437992002-04-12 09:54:03 +000010828 echo "$as_me: failed program was:" >&5
10829cat conftest.$ac_ext >&5
10830ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010831fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010832rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10833LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010834fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010835echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10836echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10837if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10838 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010839#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010840_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010841
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010842 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010843 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010844 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010845else
Guido van Rossum49545951997-12-02 19:28:29 +000010846
Martin v. Löwis11437992002-04-12 09:54:03 +000010847 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10848echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10849if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10850 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010851else
Martin v. Löwis11437992002-04-12 09:54:03 +000010852 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010853LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010854cat >conftest.$ac_ext <<_ACEOF
10855#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010856#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010857
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010858/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010859#ifdef __cplusplus
10860extern "C"
10861#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010862/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010863 builtin and then its argument prototype would still apply. */
10864char __pthread_create_system ();
10865#ifdef F77_DUMMY_MAIN
10866# ifdef __cplusplus
10867 extern "C"
10868# endif
10869 int F77_DUMMY_MAIN() { return 1; }
10870#endif
10871int
10872main ()
10873{
10874__pthread_create_system ();
10875 ;
10876 return 0;
10877}
10878_ACEOF
10879rm -f conftest.$ac_objext conftest$ac_exeext
10880if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10881 (eval $ac_link) 2>&5
10882 ac_status=$?
10883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10884 (exit $ac_status); } &&
10885 { ac_try='test -s conftest$ac_exeext'
10886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10887 (eval $ac_try) 2>&5
10888 ac_status=$?
10889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10890 (exit $ac_status); }; }; then
10891 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010892else
Martin v. Löwis11437992002-04-12 09:54:03 +000010893 echo "$as_me: failed program was:" >&5
10894cat conftest.$ac_ext >&5
10895ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010896fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010897rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10898LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010899fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010900echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10901echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10902if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10903 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010904#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010905_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010906
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010907 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010908 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010909 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010910else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010911
Martin v. Löwis11437992002-04-12 09:54:03 +000010912 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10913echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10914if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10915 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010916else
Martin v. Löwis11437992002-04-12 09:54:03 +000010917 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010918LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010919cat >conftest.$ac_ext <<_ACEOF
10920#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010921#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010922
Guido van Rossumb93a8621998-05-07 13:27:32 +000010923/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010924#ifdef __cplusplus
10925extern "C"
10926#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010927/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010928 builtin and then its argument prototype would still apply. */
10929char pthread_create ();
10930#ifdef F77_DUMMY_MAIN
10931# ifdef __cplusplus
10932 extern "C"
10933# endif
10934 int F77_DUMMY_MAIN() { return 1; }
10935#endif
10936int
10937main ()
10938{
10939pthread_create ();
10940 ;
10941 return 0;
10942}
10943_ACEOF
10944rm -f conftest.$ac_objext conftest$ac_exeext
10945if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10946 (eval $ac_link) 2>&5
10947 ac_status=$?
10948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10949 (exit $ac_status); } &&
10950 { ac_try='test -s conftest$ac_exeext'
10951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10952 (eval $ac_try) 2>&5
10953 ac_status=$?
10954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10955 (exit $ac_status); }; }; then
10956 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010957else
Martin v. Löwis11437992002-04-12 09:54:03 +000010958 echo "$as_me: failed program was:" >&5
10959cat conftest.$ac_ext >&5
10960ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010961fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010962rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10963LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010964fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010965echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10966echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10967if test $ac_cv_lib_cma_pthread_create = yes; then
10968 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010969#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010970_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010971
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010972 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010973 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010974 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010975else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010976
Martin v. Löwis130fb172001-07-19 11:00:41 +000010977 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010978fi
10979
Guido van Rossum627b2d71993-12-24 10:39:16 +000010980
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010981fi
10982
Guido van Rossum0be3e491997-05-22 20:33:33 +000010983fi
10984
Guido van Rossum49545951997-12-02 19:28:29 +000010985fi
10986
Guido van Rossumb93a8621998-05-07 13:27:32 +000010987fi
10988
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010989fi
10990
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010991
Michael W. Hudson54241132001-12-07 15:38:26 +000010992fi
10993
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010994
10995fi
10996
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010997fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010998rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10999fi;
11000fi
11001
11002
11003fi
11004
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011005
Michael W. Hudson54241132001-12-07 15:38:26 +000011006
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011007 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011008 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011009
11010cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011011#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011012_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011013
11014 fi
11015
Martin v. Löwis11437992002-04-12 09:54:03 +000011016 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11017echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11018 if test "${ac_cv_pthread_system_supported+set}" = set; then
11019 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011020else
11021 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011022 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011023else
Martin v. Löwis11437992002-04-12 09:54:03 +000011024 cat >conftest.$ac_ext <<_ACEOF
11025#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011026#include "confdefs.h"
11027#include <pthread.h>
11028 void *foo(void *parm) {
11029 return NULL;
11030 }
11031 main() {
11032 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011033 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011034 if (pthread_attr_init(&attr)) exit(-1);
11035 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011036 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011037 exit(0);
11038 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011039_ACEOF
11040rm -f conftest$ac_exeext
11041if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11042 (eval $ac_link) 2>&5
11043 ac_status=$?
11044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11045 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11047 (eval $ac_try) 2>&5
11048 ac_status=$?
11049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11050 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011051 ac_cv_pthread_system_supported=yes
11052else
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 echo "$as_me: program exited with status $ac_status" >&5
11054echo "$as_me: failed program was:" >&5
11055cat conftest.$ac_ext >&5
11056( exit $ac_status )
11057ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011058fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011059rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011060fi
11061
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011062fi
11063
Martin v. Löwis11437992002-04-12 09:54:03 +000011064 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11065echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011066 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011067
11068cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011069#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011070_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011071
11072 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011073
11074for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011075do
Martin v. Löwis11437992002-04-12 09:54:03 +000011076as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11077echo "$as_me:$LINENO: checking for $ac_func" >&5
11078echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11079if eval "test \"\${$as_ac_var+set}\" = set"; then
11080 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011081else
Martin v. Löwis11437992002-04-12 09:54:03 +000011082 cat >conftest.$ac_ext <<_ACEOF
11083#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011084#include "confdefs.h"
11085/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011086 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011087#include <assert.h>
11088/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011089#ifdef __cplusplus
11090extern "C"
11091#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011092/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011093 builtin and then its argument prototype would still apply. */
11094char $ac_func ();
11095char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011096
Martin v. Löwis11437992002-04-12 09:54:03 +000011097#ifdef F77_DUMMY_MAIN
11098# ifdef __cplusplus
11099 extern "C"
11100# endif
11101 int F77_DUMMY_MAIN() { return 1; }
11102#endif
11103int
11104main ()
11105{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011106/* The GNU C library defines this for functions which it implements
11107 to always fail with ENOSYS. Some functions are actually named
11108 something starting with __ and the normal name is an alias. */
11109#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11110choke me
11111#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011112f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011113#endif
11114
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 ;
11116 return 0;
11117}
11118_ACEOF
11119rm -f conftest.$ac_objext conftest$ac_exeext
11120if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11121 (eval $ac_link) 2>&5
11122 ac_status=$?
11123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11124 (exit $ac_status); } &&
11125 { ac_try='test -s conftest$ac_exeext'
11126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11127 (eval $ac_try) 2>&5
11128 ac_status=$?
11129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11130 (exit $ac_status); }; }; then
11131 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011132else
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 echo "$as_me: failed program was:" >&5
11134cat conftest.$ac_ext >&5
11135eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011137rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011138fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011139echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11140echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11141if test `eval echo '${'$as_ac_var'}'` = yes; then
11142 cat >>confdefs.h <<_ACEOF
11143#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11144_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011145
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011146fi
11147done
11148
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011149 fi
11150
Martin v. Löwis11437992002-04-12 09:54:03 +000011151 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11152echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11153if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11154 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011155else
Martin v. Löwis11437992002-04-12 09:54:03 +000011156 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011157LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011158cat >conftest.$ac_ext <<_ACEOF
11159#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011160#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011161
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011162/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011163#ifdef __cplusplus
11164extern "C"
11165#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011166/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011167 builtin and then its argument prototype would still apply. */
11168char usconfig ();
11169#ifdef F77_DUMMY_MAIN
11170# ifdef __cplusplus
11171 extern "C"
11172# endif
11173 int F77_DUMMY_MAIN() { return 1; }
11174#endif
11175int
11176main ()
11177{
11178usconfig ();
11179 ;
11180 return 0;
11181}
11182_ACEOF
11183rm -f conftest.$ac_objext conftest$ac_exeext
11184if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11185 (eval $ac_link) 2>&5
11186 ac_status=$?
11187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11188 (exit $ac_status); } &&
11189 { ac_try='test -s conftest$ac_exeext'
11190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11191 (eval $ac_try) 2>&5
11192 ac_status=$?
11193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194 (exit $ac_status); }; }; then
11195 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011196else
Martin v. Löwis11437992002-04-12 09:54:03 +000011197 echo "$as_me: failed program was:" >&5
11198cat conftest.$ac_ext >&5
11199ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011200fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011201rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11202LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011203fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011204echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11205echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11206if test $ac_cv_lib_mpc_usconfig = yes; then
11207 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011208#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011209_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011210
Martin v. Löwis130fb172001-07-19 11:00:41 +000011211 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011212 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011213 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011214fi
11215
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011216
Martin v. Löwis11437992002-04-12 09:54:03 +000011217 if test $posix_threads != "yes"; then
11218 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11219echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11220if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11221 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011222else
Martin v. Löwis11437992002-04-12 09:54:03 +000011223 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011224LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011225cat >conftest.$ac_ext <<_ACEOF
11226#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011227#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011228
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011229/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011230#ifdef __cplusplus
11231extern "C"
11232#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011233/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011234 builtin and then its argument prototype would still apply. */
11235char thr_create ();
11236#ifdef F77_DUMMY_MAIN
11237# ifdef __cplusplus
11238 extern "C"
11239# endif
11240 int F77_DUMMY_MAIN() { return 1; }
11241#endif
11242int
11243main ()
11244{
11245thr_create ();
11246 ;
11247 return 0;
11248}
11249_ACEOF
11250rm -f conftest.$ac_objext conftest$ac_exeext
11251if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11252 (eval $ac_link) 2>&5
11253 ac_status=$?
11254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11255 (exit $ac_status); } &&
11256 { ac_try='test -s conftest$ac_exeext'
11257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11258 (eval $ac_try) 2>&5
11259 ac_status=$?
11260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11261 (exit $ac_status); }; }; then
11262 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011263else
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 echo "$as_me: failed program was:" >&5
11265cat conftest.$ac_ext >&5
11266ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011267fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011268rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11269LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011270fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011271echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11272echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11273if test $ac_cv_lib_thread_thr_create = yes; then
11274 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011275#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011276_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011277
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011278 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011279 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011280 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011281fi
11282
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011283 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011284
Martin v. Löwis130fb172001-07-19 11:00:41 +000011285 if test "$USE_THREAD_MODULE" != "#"
11286 then
11287 # If the above checks didn't disable threads, (at least) OSF1
11288 # needs this '-threads' argument during linking.
11289 case $ac_sys_system in
11290 OSF1) LDLAST=-threads;;
11291 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011292 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011293
11294 if test "$posix_threads" = yes -a \
11295 "$ac_sys_system" = "SunOS" -a \
11296 "$ac_sys_release" = "5.6"; then
11297
11298cat >>confdefs.h <<\_ACEOF
11299#define HAVE_PTHREAD_DESTRUCTOR 1
11300_ACEOF
11301
11302 fi
11303
Guido van Rossum627b2d71993-12-24 10:39:16 +000011304fi
11305
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011306# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011307
11308
11309echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11310echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011311# Check whether --enable-ipv6 or --disable-ipv6 was given.
11312if test "${enable_ipv6+set}" = set; then
11313 enableval="$enable_ipv6"
11314 case "$enableval" in
11315 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011316 echo "$as_me:$LINENO: result: no" >&5
11317echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011318 ipv6=no
11319 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 *) echo "$as_me:$LINENO: result: yes" >&5
11321echo "${ECHO_T}yes" >&6
11322 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011323#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011324_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011325
11326 ipv6=yes
11327 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011329else
Martin v. Löwis11437992002-04-12 09:54:03 +000011330
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011331 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 echo "$as_me:$LINENO: result: no" >&5
11333echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011334 ipv6=no
11335
11336else
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 cat >conftest.$ac_ext <<_ACEOF
11338#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011339#include "confdefs.h"
11340 /* AF_INET6 available check */
11341#include <sys/types.h>
11342#include <sys/socket.h>
11343main()
11344{
11345 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11346 exit(1);
11347 else
11348 exit(0);
11349}
11350
Martin v. Löwis11437992002-04-12 09:54:03 +000011351_ACEOF
11352rm -f conftest$ac_exeext
11353if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11354 (eval $ac_link) 2>&5
11355 ac_status=$?
11356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11357 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11359 (eval $ac_try) 2>&5
11360 ac_status=$?
11361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11362 (exit $ac_status); }; }; then
11363 echo "$as_me:$LINENO: result: yes" >&5
11364echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011365 ipv6=yes
11366else
Martin v. Löwis11437992002-04-12 09:54:03 +000011367 echo "$as_me: program exited with status $ac_status" >&5
11368echo "$as_me: failed program was:" >&5
11369cat conftest.$ac_ext >&5
11370( exit $ac_status )
11371echo "$as_me:$LINENO: result: no" >&5
11372echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011373 ipv6=no
11374fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011375rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011376fi
11377
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011378if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11380echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11381 cat >conftest.$ac_ext <<_ACEOF
11382#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011383#include "confdefs.h"
11384#include <sys/types.h>
11385#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011386#ifdef F77_DUMMY_MAIN
11387# ifdef __cplusplus
11388 extern "C"
11389# endif
11390 int F77_DUMMY_MAIN() { return 1; }
11391#endif
11392int
11393main ()
11394{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011395struct sockaddr_in6 x;
11396x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 ;
11398 return 0;
11399}
11400_ACEOF
11401rm -f conftest.$ac_objext
11402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11403 (eval $ac_compile) 2>&5
11404 ac_status=$?
11405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11406 (exit $ac_status); } &&
11407 { ac_try='test -s conftest.$ac_objext'
11408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11409 (eval $ac_try) 2>&5
11410 ac_status=$?
11411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11412 (exit $ac_status); }; }; then
11413 echo "$as_me:$LINENO: result: yes" >&5
11414echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011415 ipv6=yes
11416else
Martin v. Löwis11437992002-04-12 09:54:03 +000011417 echo "$as_me: failed program was:" >&5
11418cat conftest.$ac_ext >&5
11419echo "$as_me:$LINENO: result: no" >&5
11420echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011421 ipv6=no
11422fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011423rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011424fi
11425
11426if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011428#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011429_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011430
11431fi
11432
Martin v. Löwis11437992002-04-12 09:54:03 +000011433fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011434
11435ipv6type=unknown
11436ipv6lib=none
11437ipv6trylibc=no
11438
11439if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011440 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11441echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011442 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11443 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011444 case $i in
11445 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 cat >conftest.$ac_ext <<_ACEOF
11447#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011448#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011449
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011450#include <netinet/in.h>
11451#ifdef IPV6_INRIA_VERSION
11452yes
11453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011454_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11456 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011457 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011458fi
11459rm -f conftest*
11460
11461 ;;
11462 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011463 cat >conftest.$ac_ext <<_ACEOF
11464#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011465#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011466
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011467#include <netinet/in.h>
11468#ifdef __KAME__
11469yes
11470#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011471_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11473 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011474 ipv6type=$i;
11475 ipv6lib=inet6
11476 ipv6libdir=/usr/local/v6/lib
11477 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011478fi
11479rm -f conftest*
11480
11481 ;;
11482 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011483 cat >conftest.$ac_ext <<_ACEOF
11484#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011485#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011486
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011487#include <features.h>
11488#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11489yes
11490#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011491_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11493 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011494 ipv6type=$i;
11495 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011496fi
11497rm -f conftest*
11498
11499 ;;
11500 linux-inet6)
11501 if test -d /usr/inet6; then
11502 ipv6type=$i
11503 ipv6lib=inet6
11504 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011505 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011506 fi
11507 ;;
11508 solaris)
11509 if test -f /etc/netconfig; then
11510 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11511 ipv6type=$i
11512 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011513 fi
11514 fi
11515 ;;
11516 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 cat >conftest.$ac_ext <<_ACEOF
11518#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011519#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011520
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011521#include <sys/param.h>
11522#ifdef _TOSHIBA_INET6
11523yes
11524#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011525_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011526if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11527 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011528 ipv6type=$i;
11529 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011530 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011531fi
11532rm -f conftest*
11533
11534 ;;
11535 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011536 cat >conftest.$ac_ext <<_ACEOF
11537#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011538#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011539
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011540#include </usr/local/v6/include/sys/v6config.h>
11541#ifdef __V6D__
11542yes
11543#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011544_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011545if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11546 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011547 ipv6type=$i;
11548 ipv6lib=v6;
11549 ipv6libdir=/usr/local/v6/lib;
11550 OPT="-I/usr/local/v6/include $OPT"
11551fi
11552rm -f conftest*
11553
11554 ;;
11555 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011556 cat >conftest.$ac_ext <<_ACEOF
11557#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011558#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011559
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011560#include <sys/param.h>
11561#ifdef _ZETA_MINAMI_INET6
11562yes
11563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011564_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11566 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011567 ipv6type=$i;
11568 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011569 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011570fi
11571rm -f conftest*
11572
11573 ;;
11574 esac
11575 if test "$ipv6type" != "unknown"; then
11576 break
11577 fi
11578 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011579 echo "$as_me:$LINENO: result: $ipv6type" >&5
11580echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011581fi
11582
11583if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11584 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11585 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11586 echo "using lib$ipv6lib"
11587 else
11588 if test $ipv6trylibc = "yes"; then
11589 echo "using libc"
11590 else
11591 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11592 echo "You need to fetch lib$ipv6lib.a from appropriate"
11593 echo 'ipv6 kit and compile beforehand.'
11594 exit 1
11595 fi
11596 fi
11597fi
11598
Jack Jansen7b8c7542002-04-14 20:12:41 +000011599# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011600echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11601echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011602
11603# Check whether --with-universal-newlines or --without-universal-newlines was given.
11604if test "${with_universal_newlines+set}" = set; then
11605 withval="$with_universal_newlines"
11606
11607fi;
11608
11609if test -z "$with_universal_newlines"
11610then with_universal_newlines="yes"
11611fi
11612if test "$with_universal_newlines" != "no"
11613then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011614
11615cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011616#define WITH_UNIVERSAL_NEWLINES 1
11617_ACEOF
11618
11619fi
11620echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11621echo "${ECHO_T}$with_universal_newlines" >&6
11622
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011623# Check for --with-doc-strings
11624echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11625echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11626
11627# Check whether --with-doc-strings or --without-doc-strings was given.
11628if test "${with_doc_strings+set}" = set; then
11629 withval="$with_doc_strings"
11630
11631fi;
11632
11633if test -z "$with_doc_strings"
11634then with_doc_strings="yes"
11635fi
11636if test "$with_doc_strings" != "no"
11637then
11638
11639cat >>confdefs.h <<\_ACEOF
11640#define WITH_DOC_STRINGS 1
11641_ACEOF
11642
11643fi
11644echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11645echo "${ECHO_T}$with_doc_strings" >&6
11646
Neil Schemenauera35c6882001-02-27 04:45:05 +000011647# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011648echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11649echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11650
Neil Schemenauera35c6882001-02-27 04:45:05 +000011651# Check whether --with-pymalloc or --without-pymalloc was given.
11652if test "${with_pymalloc+set}" = set; then
11653 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011654
Martin v. Löwis11437992002-04-12 09:54:03 +000011655fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011656
Neil Schemenauer16c22972002-03-22 15:34:49 +000011657if test -z "$with_pymalloc"
11658then with_pymalloc="yes"
11659fi
11660if test "$with_pymalloc" != "no"
11661then
Martin v. Löwis11437992002-04-12 09:54:03 +000011662
11663cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011664#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011665_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011666
11667fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011668echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11669echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011670
Barry Warsawef82cd72000-06-30 16:21:01 +000011671# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011672echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11673echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11674
Barry Warsawef82cd72000-06-30 16:21:01 +000011675# Check whether --with-wctype-functions or --without-wctype-functions was given.
11676if test "${with_wctype_functions+set}" = set; then
11677 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011678
Barry Warsawef82cd72000-06-30 16:21:01 +000011679if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011680then
11681
11682cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011683#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011684_ACEOF
11685
11686 echo "$as_me:$LINENO: result: yes" >&5
11687echo "${ECHO_T}yes" >&6
11688else echo "$as_me:$LINENO: result: no" >&5
11689echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011690fi
11691else
Martin v. Löwis11437992002-04-12 09:54:03 +000011692 echo "$as_me:$LINENO: result: no" >&5
11693echo "${ECHO_T}no" >&6
11694fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011695
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011696# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011697
Guido van Rossum98935bf2001-09-05 19:13:16 +000011698DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011699
Martin v. Löwis11437992002-04-12 09:54:03 +000011700echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11701echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11702
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011703# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011704if test "${with_sgi_dl+set}" = set; then
11705 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011706
11707echo "$as_me:$LINENO: result: $withval" >&5
11708echo "${ECHO_T}$withval" >&6
11709
11710cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011711#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011712_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011713
Guido van Rossume97ee181999-12-20 21:27:22 +000011714DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011715dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011716if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011717then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011718else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11719echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11720 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011721fi
11722DLINCLDIR=${dldir}
11723LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011724else
Martin v. Löwis11437992002-04-12 09:54:03 +000011725 echo "$as_me:$LINENO: result: no" >&5
11726echo "${ECHO_T}no" >&6
11727fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011728
Martin v. Löwis11437992002-04-12 09:54:03 +000011729echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11730echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011731
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011732# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011733if test "${with_dl_dld+set}" = set; then
11734 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011735
11736echo "$as_me:$LINENO: result: $withval" >&5
11737echo "${ECHO_T}$withval" >&6
11738
11739cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011740#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011741_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011742
Guido van Rossume97ee181999-12-20 21:27:22 +000011743DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011744dldir=`echo "$withval" | sed 's/,.*//'`
11745dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011746if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011747then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011748else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11749echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11750 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011751fi
11752DLINCLDIR=${dldir}
11753LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011754else
Martin v. Löwis11437992002-04-12 09:54:03 +000011755 echo "$as_me:$LINENO: result: no" >&5
11756echo "${ECHO_T}no" >&6
11757fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011758
Guido van Rossume97ee181999-12-20 21:27:22 +000011759# the dlopen() function means we might want to use dynload_shlib.o. some
11760# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011761
Thomas Wouters3a584202000-08-05 23:28:51 +000011762for ac_func in dlopen
11763do
Martin v. Löwis11437992002-04-12 09:54:03 +000011764as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11765echo "$as_me:$LINENO: checking for $ac_func" >&5
11766echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11767if eval "test \"\${$as_ac_var+set}\" = set"; then
11768 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011769else
Martin v. Löwis11437992002-04-12 09:54:03 +000011770 cat >conftest.$ac_ext <<_ACEOF
11771#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011772#include "confdefs.h"
11773/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011774 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011775#include <assert.h>
11776/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011777#ifdef __cplusplus
11778extern "C"
11779#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011780/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011781 builtin and then its argument prototype would still apply. */
11782char $ac_func ();
11783char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011784
Martin v. Löwis11437992002-04-12 09:54:03 +000011785#ifdef F77_DUMMY_MAIN
11786# ifdef __cplusplus
11787 extern "C"
11788# endif
11789 int F77_DUMMY_MAIN() { return 1; }
11790#endif
11791int
11792main ()
11793{
Guido van Rossume97ee181999-12-20 21:27:22 +000011794/* The GNU C library defines this for functions which it implements
11795 to always fail with ENOSYS. Some functions are actually named
11796 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011797#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011798choke me
11799#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011800f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011801#endif
11802
Martin v. Löwis11437992002-04-12 09:54:03 +000011803 ;
11804 return 0;
11805}
11806_ACEOF
11807rm -f conftest.$ac_objext conftest$ac_exeext
11808if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11809 (eval $ac_link) 2>&5
11810 ac_status=$?
11811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11812 (exit $ac_status); } &&
11813 { ac_try='test -s conftest$ac_exeext'
11814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11815 (eval $ac_try) 2>&5
11816 ac_status=$?
11817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11818 (exit $ac_status); }; }; then
11819 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011820else
Martin v. Löwis11437992002-04-12 09:54:03 +000011821 echo "$as_me: failed program was:" >&5
11822cat conftest.$ac_ext >&5
11823eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011824fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011825rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011826fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011827echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11828echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11829if test `eval echo '${'$as_ac_var'}'` = yes; then
11830 cat >>confdefs.h <<_ACEOF
11831#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11832_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011833
Guido van Rossume97ee181999-12-20 21:27:22 +000011834fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011835done
Guido van Rossume97ee181999-12-20 21:27:22 +000011836
Michael W. Hudson54241132001-12-07 15:38:26 +000011837
Guido van Rossume97ee181999-12-20 21:27:22 +000011838# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11839# loading of modules.
11840
Martin v. Löwis11437992002-04-12 09:54:03 +000011841echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11842echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011843if test -z "$DYNLOADFILE"
11844then
11845 case $ac_sys_system/$ac_sys_release in
11846 AIX*) DYNLOADFILE="dynload_aix.o";;
11847 BeOS*) DYNLOADFILE="dynload_beos.o";;
11848 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011849 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011850 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011851 *)
11852 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11853 # out any dynamic loading
11854 if test "$ac_cv_func_dlopen" = yes
11855 then DYNLOADFILE="dynload_shlib.o"
11856 else DYNLOADFILE="dynload_stub.o"
11857 fi
11858 ;;
11859 esac
11860fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011861echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11862echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011863if test "$DYNLOADFILE" != "dynload_stub.o"
11864then
Martin v. Löwis11437992002-04-12 09:54:03 +000011865
11866cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011867#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011868_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011869
11870fi
11871
Neil Schemenauer4e425612001-06-19 15:44:15 +000011872# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11873
Michael W. Hudson54241132001-12-07 15:38:26 +000011874
Martin v. Löwis11437992002-04-12 09:54:03 +000011875echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11876echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011877if test -z "$MACHDEP_OBJS"
11878then
Jack Jansene578a632001-08-15 01:27:14 +000011879 MACHDEP_OBJS=$extra_machdep_objs
11880else
11881 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011882fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011883echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11884echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011885
Guido van Rossum627b2d71993-12-24 10:39:16 +000011886# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011887
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
11958
11959
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011960
Fred Drake6b3cc522002-04-15 19:20:27 +000011961
Jack Jansen0b06be72002-06-21 14:48:38 +000011962
Martin v. Löwis0cec0ff2002-07-28 16:33:45 +000011963
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011964
Martin v. Löwis244edc82001-10-04 22:44:26 +000011965for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011966 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011967 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000011968 hstrerror inet_pton kill killpg lchown link lstat mkfifo mknod mktime \
11969 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011970 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011971 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011972 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011973 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011974 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011975 truncate uname unsetenv utimes waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011976do
Martin v. Löwis11437992002-04-12 09:54:03 +000011977as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11978echo "$as_me:$LINENO: checking for $ac_func" >&5
11979echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11980if eval "test \"\${$as_ac_var+set}\" = set"; then
11981 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011982else
Martin v. Löwis11437992002-04-12 09:54:03 +000011983 cat >conftest.$ac_ext <<_ACEOF
11984#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011985#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011986/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011987 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011988#include <assert.h>
11989/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011990#ifdef __cplusplus
11991extern "C"
11992#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011993/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011994 builtin and then its argument prototype would still apply. */
11995char $ac_func ();
11996char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011997
Martin v. Löwis11437992002-04-12 09:54:03 +000011998#ifdef F77_DUMMY_MAIN
11999# ifdef __cplusplus
12000 extern "C"
12001# endif
12002 int F77_DUMMY_MAIN() { return 1; }
12003#endif
12004int
12005main ()
12006{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012007/* The GNU C library defines this for functions which it implements
12008 to always fail with ENOSYS. Some functions are actually named
12009 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012010#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012011choke me
12012#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012013f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012014#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012015
Martin v. Löwis11437992002-04-12 09:54:03 +000012016 ;
12017 return 0;
12018}
12019_ACEOF
12020rm -f conftest.$ac_objext conftest$ac_exeext
12021if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12022 (eval $ac_link) 2>&5
12023 ac_status=$?
12024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12025 (exit $ac_status); } &&
12026 { ac_try='test -s conftest$ac_exeext'
12027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12028 (eval $ac_try) 2>&5
12029 ac_status=$?
12030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12031 (exit $ac_status); }; }; then
12032 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012033else
Martin v. Löwis11437992002-04-12 09:54:03 +000012034 echo "$as_me: failed program was:" >&5
12035cat conftest.$ac_ext >&5
12036eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012037fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012038rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012039fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012040echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12041echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12042if test `eval echo '${'$as_ac_var'}'` = yes; then
12043 cat >>confdefs.h <<_ACEOF
12044#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12045_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012046
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012047fi
12048done
12049
Michael W. Hudson54241132001-12-07 15:38:26 +000012050
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012051# check for openpty and forkpty
12052
Martin v. Löwis11437992002-04-12 09:54:03 +000012053
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012054for ac_func in openpty
12055do
Martin v. Löwis11437992002-04-12 09:54:03 +000012056as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12057echo "$as_me:$LINENO: checking for $ac_func" >&5
12058echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12059if eval "test \"\${$as_ac_var+set}\" = set"; then
12060 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012061else
Martin v. Löwis11437992002-04-12 09:54:03 +000012062 cat >conftest.$ac_ext <<_ACEOF
12063#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012064#include "confdefs.h"
12065/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012066 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012067#include <assert.h>
12068/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012069#ifdef __cplusplus
12070extern "C"
12071#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012072/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012073 builtin and then its argument prototype would still apply. */
12074char $ac_func ();
12075char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012076
Martin v. Löwis11437992002-04-12 09:54:03 +000012077#ifdef F77_DUMMY_MAIN
12078# ifdef __cplusplus
12079 extern "C"
12080# endif
12081 int F77_DUMMY_MAIN() { return 1; }
12082#endif
12083int
12084main ()
12085{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012086/* The GNU C library defines this for functions which it implements
12087 to always fail with ENOSYS. Some functions are actually named
12088 something starting with __ and the normal name is an alias. */
12089#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12090choke me
12091#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012092f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012093#endif
12094
Martin v. Löwis11437992002-04-12 09:54:03 +000012095 ;
12096 return 0;
12097}
12098_ACEOF
12099rm -f conftest.$ac_objext conftest$ac_exeext
12100if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12101 (eval $ac_link) 2>&5
12102 ac_status=$?
12103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12104 (exit $ac_status); } &&
12105 { ac_try='test -s conftest$ac_exeext'
12106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12107 (eval $ac_try) 2>&5
12108 ac_status=$?
12109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12110 (exit $ac_status); }; }; then
12111 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012112else
Martin v. Löwis11437992002-04-12 09:54:03 +000012113 echo "$as_me: failed program was:" >&5
12114cat conftest.$ac_ext >&5
12115eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012116fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012117rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012118fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012119echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12120echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12121if test `eval echo '${'$as_ac_var'}'` = yes; then
12122 cat >>confdefs.h <<_ACEOF
12123#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12124_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012125
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012126else
Martin v. Löwis11437992002-04-12 09:54:03 +000012127 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12128echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12129if test "${ac_cv_lib_util_openpty+set}" = set; then
12130 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012131else
Martin v. Löwis11437992002-04-12 09:54:03 +000012132 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012133LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012134cat >conftest.$ac_ext <<_ACEOF
12135#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012136#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012137
Fred Drake8cef4cf2000-06-28 16:40:38 +000012138/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012139#ifdef __cplusplus
12140extern "C"
12141#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012142/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012143 builtin and then its argument prototype would still apply. */
12144char openpty ();
12145#ifdef F77_DUMMY_MAIN
12146# ifdef __cplusplus
12147 extern "C"
12148# endif
12149 int F77_DUMMY_MAIN() { return 1; }
12150#endif
12151int
12152main ()
12153{
12154openpty ();
12155 ;
12156 return 0;
12157}
12158_ACEOF
12159rm -f conftest.$ac_objext conftest$ac_exeext
12160if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12161 (eval $ac_link) 2>&5
12162 ac_status=$?
12163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12164 (exit $ac_status); } &&
12165 { ac_try='test -s conftest$ac_exeext'
12166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12167 (eval $ac_try) 2>&5
12168 ac_status=$?
12169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12170 (exit $ac_status); }; }; then
12171 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012172else
Martin v. Löwis11437992002-04-12 09:54:03 +000012173 echo "$as_me: failed program was:" >&5
12174cat conftest.$ac_ext >&5
12175ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012176fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012177rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12178LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012179fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012180echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12181echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12182if test $ac_cv_lib_util_openpty = yes; then
12183 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012184#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012185_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012186 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012187fi
12188
12189fi
12190done
12191
Martin v. Löwis11437992002-04-12 09:54:03 +000012192
Fred Drake8cef4cf2000-06-28 16:40:38 +000012193for ac_func in forkpty
12194do
Martin v. Löwis11437992002-04-12 09:54:03 +000012195as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12196echo "$as_me:$LINENO: checking for $ac_func" >&5
12197echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12198if eval "test \"\${$as_ac_var+set}\" = set"; then
12199 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012200else
Martin v. Löwis11437992002-04-12 09:54:03 +000012201 cat >conftest.$ac_ext <<_ACEOF
12202#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012203#include "confdefs.h"
12204/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012205 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000012206#include <assert.h>
12207/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012208#ifdef __cplusplus
12209extern "C"
12210#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012211/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012212 builtin and then its argument prototype would still apply. */
12213char $ac_func ();
12214char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012215
Martin v. Löwis11437992002-04-12 09:54:03 +000012216#ifdef F77_DUMMY_MAIN
12217# ifdef __cplusplus
12218 extern "C"
12219# endif
12220 int F77_DUMMY_MAIN() { return 1; }
12221#endif
12222int
12223main ()
12224{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012225/* The GNU C library defines this for functions which it implements
12226 to always fail with ENOSYS. Some functions are actually named
12227 something starting with __ and the normal name is an alias. */
12228#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12229choke me
12230#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012231f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012232#endif
12233
Martin v. Löwis11437992002-04-12 09:54:03 +000012234 ;
12235 return 0;
12236}
12237_ACEOF
12238rm -f conftest.$ac_objext conftest$ac_exeext
12239if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12240 (eval $ac_link) 2>&5
12241 ac_status=$?
12242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12243 (exit $ac_status); } &&
12244 { ac_try='test -s conftest$ac_exeext'
12245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12246 (eval $ac_try) 2>&5
12247 ac_status=$?
12248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12249 (exit $ac_status); }; }; then
12250 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012251else
Martin v. Löwis11437992002-04-12 09:54:03 +000012252 echo "$as_me: failed program was:" >&5
12253cat conftest.$ac_ext >&5
12254eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012255fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012256rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012257fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012258echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12259echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12260if test `eval echo '${'$as_ac_var'}'` = yes; then
12261 cat >>confdefs.h <<_ACEOF
12262#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12263_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012264
Fred Drake8cef4cf2000-06-28 16:40:38 +000012265else
Martin v. Löwis11437992002-04-12 09:54:03 +000012266 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12267echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12268if test "${ac_cv_lib_util_forkpty+set}" = set; then
12269 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012270else
Martin v. Löwis11437992002-04-12 09:54:03 +000012271 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012272LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012273cat >conftest.$ac_ext <<_ACEOF
12274#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012275#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012276
Fred Drake8cef4cf2000-06-28 16:40:38 +000012277/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012278#ifdef __cplusplus
12279extern "C"
12280#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012281/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012282 builtin and then its argument prototype would still apply. */
12283char forkpty ();
12284#ifdef F77_DUMMY_MAIN
12285# ifdef __cplusplus
12286 extern "C"
12287# endif
12288 int F77_DUMMY_MAIN() { return 1; }
12289#endif
12290int
12291main ()
12292{
12293forkpty ();
12294 ;
12295 return 0;
12296}
12297_ACEOF
12298rm -f conftest.$ac_objext conftest$ac_exeext
12299if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12300 (eval $ac_link) 2>&5
12301 ac_status=$?
12302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12303 (exit $ac_status); } &&
12304 { ac_try='test -s conftest$ac_exeext'
12305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12306 (eval $ac_try) 2>&5
12307 ac_status=$?
12308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12309 (exit $ac_status); }; }; then
12310 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012311else
Martin v. Löwis11437992002-04-12 09:54:03 +000012312 echo "$as_me: failed program was:" >&5
12313cat conftest.$ac_ext >&5
12314ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012315fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012316rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12317LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012318fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012319echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12320echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12321if test $ac_cv_lib_util_forkpty = yes; then
12322 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012323#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012324_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012325 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012326fi
12327
12328fi
12329done
12330
Jack Jansendd19cf82001-12-06 22:36:17 +000012331
Michael W. Hudson54241132001-12-07 15:38:26 +000012332# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012333
12334
12335
12336
12337
12338
Fred Drake8cef4cf2000-06-28 16:40:38 +000012339for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12340do
Martin v. Löwis11437992002-04-12 09:54:03 +000012341as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12342echo "$as_me:$LINENO: checking for $ac_func" >&5
12343echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12344if eval "test \"\${$as_ac_var+set}\" = set"; then
12345 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012346else
Martin v. Löwis11437992002-04-12 09:54:03 +000012347 cat >conftest.$ac_ext <<_ACEOF
12348#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012349#include "confdefs.h"
12350/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012351 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012352#include <assert.h>
12353/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012354#ifdef __cplusplus
12355extern "C"
12356#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012357/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012358 builtin and then its argument prototype would still apply. */
12359char $ac_func ();
12360char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012361
Martin v. Löwis11437992002-04-12 09:54:03 +000012362#ifdef F77_DUMMY_MAIN
12363# ifdef __cplusplus
12364 extern "C"
12365# endif
12366 int F77_DUMMY_MAIN() { return 1; }
12367#endif
12368int
12369main ()
12370{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012371/* The GNU C library defines this for functions which it implements
12372 to always fail with ENOSYS. Some functions are actually named
12373 something starting with __ and the normal name is an alias. */
12374#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12375choke me
12376#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012377f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012378#endif
12379
Martin v. Löwis11437992002-04-12 09:54:03 +000012380 ;
12381 return 0;
12382}
12383_ACEOF
12384rm -f conftest.$ac_objext conftest$ac_exeext
12385if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12386 (eval $ac_link) 2>&5
12387 ac_status=$?
12388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12389 (exit $ac_status); } &&
12390 { ac_try='test -s conftest$ac_exeext'
12391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12392 (eval $ac_try) 2>&5
12393 ac_status=$?
12394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12395 (exit $ac_status); }; }; then
12396 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012397else
Martin v. Löwis11437992002-04-12 09:54:03 +000012398 echo "$as_me: failed program was:" >&5
12399cat conftest.$ac_ext >&5
12400eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012401fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012402rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012403fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012404echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12405echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12406if test `eval echo '${'$as_ac_var'}'` = yes; then
12407 cat >>confdefs.h <<_ACEOF
12408#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12409_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012410
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012411fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012412done
12413
Michael W. Hudson54241132001-12-07 15:38:26 +000012414
Martin v. Löwis11437992002-04-12 09:54:03 +000012415
12416
12417
12418
12419
Martin v. Löwis1142de32002-03-29 16:28:31 +000012420for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012421do
Martin v. Löwis11437992002-04-12 09:54:03 +000012422as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12423echo "$as_me:$LINENO: checking for $ac_func" >&5
12424echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12425if eval "test \"\${$as_ac_var+set}\" = set"; then
12426 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012427else
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 cat >conftest.$ac_ext <<_ACEOF
12429#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012430#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012431/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012433#include <assert.h>
12434/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012435#ifdef __cplusplus
12436extern "C"
12437#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012438/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012439 builtin and then its argument prototype would still apply. */
12440char $ac_func ();
12441char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012442
Martin v. Löwis11437992002-04-12 09:54:03 +000012443#ifdef F77_DUMMY_MAIN
12444# ifdef __cplusplus
12445 extern "C"
12446# endif
12447 int F77_DUMMY_MAIN() { return 1; }
12448#endif
12449int
12450main ()
12451{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012452/* The GNU C library defines this for functions which it implements
12453 to always fail with ENOSYS. Some functions are actually named
12454 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012455#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012456choke me
12457#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012458f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012459#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012460
Martin v. Löwis11437992002-04-12 09:54:03 +000012461 ;
12462 return 0;
12463}
12464_ACEOF
12465rm -f conftest.$ac_objext conftest$ac_exeext
12466if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12467 (eval $ac_link) 2>&5
12468 ac_status=$?
12469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12470 (exit $ac_status); } &&
12471 { ac_try='test -s conftest$ac_exeext'
12472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12473 (eval $ac_try) 2>&5
12474 ac_status=$?
12475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12476 (exit $ac_status); }; }; then
12477 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012478else
Martin v. Löwis11437992002-04-12 09:54:03 +000012479 echo "$as_me: failed program was:" >&5
12480cat conftest.$ac_ext >&5
12481eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012482fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012483rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012484fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012485echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12486echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12487if test `eval echo '${'$as_ac_var'}'` = yes; then
12488 cat >>confdefs.h <<_ACEOF
12489#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12490_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012491
Martin v. Löwis1142de32002-03-29 16:28:31 +000012492else
Martin v. Löwis11437992002-04-12 09:54:03 +000012493 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012494fi
12495done
12496
12497
Martin v. Löwis11437992002-04-12 09:54:03 +000012498
Martin v. Löwis1142de32002-03-29 16:28:31 +000012499for ac_func in getpgrp
12500do
Martin v. Löwis11437992002-04-12 09:54:03 +000012501as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12502echo "$as_me:$LINENO: checking for $ac_func" >&5
12503echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12504if eval "test \"\${$as_ac_var+set}\" = set"; then
12505 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012506else
Martin v. Löwis11437992002-04-12 09:54:03 +000012507 cat >conftest.$ac_ext <<_ACEOF
12508#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012509#include "confdefs.h"
12510/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012511 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012512#include <assert.h>
12513/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012514#ifdef __cplusplus
12515extern "C"
12516#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012517/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012518 builtin and then its argument prototype would still apply. */
12519char $ac_func ();
12520char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012521
Martin v. Löwis11437992002-04-12 09:54:03 +000012522#ifdef F77_DUMMY_MAIN
12523# ifdef __cplusplus
12524 extern "C"
12525# endif
12526 int F77_DUMMY_MAIN() { return 1; }
12527#endif
12528int
12529main ()
12530{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012531/* The GNU C library defines this for functions which it implements
12532 to always fail with ENOSYS. Some functions are actually named
12533 something starting with __ and the normal name is an alias. */
12534#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12535choke me
12536#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012537f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012538#endif
12539
Martin v. Löwis11437992002-04-12 09:54:03 +000012540 ;
12541 return 0;
12542}
12543_ACEOF
12544rm -f conftest.$ac_objext conftest$ac_exeext
12545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12546 (eval $ac_link) 2>&5
12547 ac_status=$?
12548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12549 (exit $ac_status); } &&
12550 { ac_try='test -s conftest$ac_exeext'
12551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12552 (eval $ac_try) 2>&5
12553 ac_status=$?
12554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12555 (exit $ac_status); }; }; then
12556 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012557else
Martin v. Löwis11437992002-04-12 09:54:03 +000012558 echo "$as_me: failed program was:" >&5
12559cat conftest.$ac_ext >&5
12560eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012561fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012562rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012564echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12565echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12566if test `eval echo '${'$as_ac_var'}'` = yes; then
12567 cat >>confdefs.h <<_ACEOF
12568#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12569_ACEOF
12570 cat >conftest.$ac_ext <<_ACEOF
12571#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012572#include "confdefs.h"
12573#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012574#ifdef F77_DUMMY_MAIN
12575# ifdef __cplusplus
12576 extern "C"
12577# endif
12578 int F77_DUMMY_MAIN() { return 1; }
12579#endif
12580int
12581main ()
12582{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012583getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 ;
12585 return 0;
12586}
12587_ACEOF
12588rm -f conftest.$ac_objext
12589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12590 (eval $ac_compile) 2>&5
12591 ac_status=$?
12592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12593 (exit $ac_status); } &&
12594 { ac_try='test -s conftest.$ac_objext'
12595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12596 (eval $ac_try) 2>&5
12597 ac_status=$?
12598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12599 (exit $ac_status); }; }; then
12600
12601cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012602#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012603_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012604
Martin v. Löwis11437992002-04-12 09:54:03 +000012605
Guido van Rossumf78abae1997-01-21 22:02:36 +000012606else
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 echo "$as_me: failed program was:" >&5
12608cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012609fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012610rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012611
Guido van Rossum627b2d71993-12-24 10:39:16 +000012612fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012613done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012614
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012615echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12616echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12617if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012618 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012619else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012620 if test "$cross_compiling" = yes; then
12621 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12622echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12623 { (exit 1); exit 1; }; }
12624else
Martin v. Löwis11437992002-04-12 09:54:03 +000012625 cat >conftest.$ac_ext <<_ACEOF
12626#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012627#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012628#if HAVE_UNISTD_H
12629# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012630#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012631
Martin v. Löwis11437992002-04-12 09:54:03 +000012632#ifdef F77_DUMMY_MAIN
12633# ifdef __cplusplus
12634 extern "C"
12635# endif
12636 int F77_DUMMY_MAIN() { return 1; }
12637#endif
12638int
12639main ()
12640{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012641/* If this system has a BSD-style setpgrp which takes arguments,
12642 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12643 exit successfully. */
12644 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012645 ;
12646 return 0;
12647}
12648_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012649rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012650if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12651 (eval $ac_link) 2>&5
12652 ac_status=$?
12653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012654 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12656 (eval $ac_try) 2>&5
12657 ac_status=$?
12658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12659 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012660 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012661else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012662 echo "$as_me: program exited with status $ac_status" >&5
12663echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012664cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012665( exit $ac_status )
12666ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012667fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012668rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012669fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012670fi
12671echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12672echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12673if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012674
12675cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012676#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012677_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012678
12679fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012680
Martin v. Löwis11437992002-04-12 09:54:03 +000012681
Thomas Wouters3a584202000-08-05 23:28:51 +000012682for ac_func in gettimeofday
12683do
Martin v. Löwis11437992002-04-12 09:54:03 +000012684as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12685echo "$as_me:$LINENO: checking for $ac_func" >&5
12686echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12687if eval "test \"\${$as_ac_var+set}\" = set"; then
12688 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012689else
Martin v. Löwis11437992002-04-12 09:54:03 +000012690 cat >conftest.$ac_ext <<_ACEOF
12691#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012692#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012693/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012694 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012695#include <assert.h>
12696/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012697#ifdef __cplusplus
12698extern "C"
12699#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012700/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012701 builtin and then its argument prototype would still apply. */
12702char $ac_func ();
12703char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012704
Martin v. Löwis11437992002-04-12 09:54:03 +000012705#ifdef F77_DUMMY_MAIN
12706# ifdef __cplusplus
12707 extern "C"
12708# endif
12709 int F77_DUMMY_MAIN() { return 1; }
12710#endif
12711int
12712main ()
12713{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012714/* The GNU C library defines this for functions which it implements
12715 to always fail with ENOSYS. Some functions are actually named
12716 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012717#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012718choke me
12719#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012720f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012721#endif
12722
Martin v. Löwis11437992002-04-12 09:54:03 +000012723 ;
12724 return 0;
12725}
12726_ACEOF
12727rm -f conftest.$ac_objext conftest$ac_exeext
12728if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12729 (eval $ac_link) 2>&5
12730 ac_status=$?
12731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12732 (exit $ac_status); } &&
12733 { ac_try='test -s conftest$ac_exeext'
12734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12735 (eval $ac_try) 2>&5
12736 ac_status=$?
12737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12738 (exit $ac_status); }; }; then
12739 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012740else
Martin v. Löwis11437992002-04-12 09:54:03 +000012741 echo "$as_me: failed program was:" >&5
12742cat conftest.$ac_ext >&5
12743eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012744fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012745rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012746fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012747echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12748echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12749if test `eval echo '${'$as_ac_var'}'` = yes; then
12750 cat >>confdefs.h <<_ACEOF
12751#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12752_ACEOF
12753 cat >conftest.$ac_ext <<_ACEOF
12754#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012755#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012756#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012757#ifdef F77_DUMMY_MAIN
12758# ifdef __cplusplus
12759 extern "C"
12760# endif
12761 int F77_DUMMY_MAIN() { return 1; }
12762#endif
12763int
12764main ()
12765{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012766gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012767 ;
12768 return 0;
12769}
12770_ACEOF
12771rm -f conftest.$ac_objext
12772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12773 (eval $ac_compile) 2>&5
12774 ac_status=$?
12775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12776 (exit $ac_status); } &&
12777 { ac_try='test -s conftest.$ac_objext'
12778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12779 (eval $ac_try) 2>&5
12780 ac_status=$?
12781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12782 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012783 :
12784else
Martin v. Löwis11437992002-04-12 09:54:03 +000012785 echo "$as_me: failed program was:" >&5
12786cat conftest.$ac_ext >&5
12787
12788cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012789#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012790_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012791
Martin v. Löwis11437992002-04-12 09:54:03 +000012792
Guido van Rossum627b2d71993-12-24 10:39:16 +000012793fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012794rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012795
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012796fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012797done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012798
Michael W. Hudson54241132001-12-07 15:38:26 +000012799
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012800echo "$as_me:$LINENO: checking for major" >&5
12801echo $ECHO_N "checking for major... $ECHO_C" >&6
12802cat >conftest.$ac_ext <<_ACEOF
12803#line $LINENO "configure"
12804#include "confdefs.h"
12805
12806 #if defined(MAJOR_IN_MKDEV)
12807 #include <sys/mkdev.h>
12808 #elif defined(MAJOR_IN_SYSMACROS)
12809 #include <sys/sysmacros.h>
12810 #else
12811 #include <sys/types.h>
12812 #endif
12813
12814#ifdef F77_DUMMY_MAIN
12815# ifdef __cplusplus
12816 extern "C"
12817# endif
12818 int F77_DUMMY_MAIN() { return 1; }
12819#endif
12820int
12821main ()
12822{
12823
12824 makedev(major(0),minor(0));
12825
12826 ;
12827 return 0;
12828}
12829_ACEOF
12830rm -f conftest.$ac_objext
12831if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12832 (eval $ac_compile) 2>&5
12833 ac_status=$?
12834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12835 (exit $ac_status); } &&
12836 { ac_try='test -s conftest.$ac_objext'
12837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12838 (eval $ac_try) 2>&5
12839 ac_status=$?
12840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12841 (exit $ac_status); }; }; then
12842
12843
12844cat >>confdefs.h <<\_ACEOF
12845#define HAVE_DEVICE_MACROS 1
12846_ACEOF
12847
12848 echo "$as_me:$LINENO: result: yes" >&5
12849echo "${ECHO_T}yes" >&6
12850
12851else
12852 echo "$as_me: failed program was:" >&5
12853cat conftest.$ac_ext >&5
12854
12855 echo "$as_me:$LINENO: result: no" >&5
12856echo "${ECHO_T}no" >&6
12857
12858fi
12859rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012860
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012861# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012862# for [no]getaddrinfo in netdb.h.
12863echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12864echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12865cat >conftest.$ac_ext <<_ACEOF
12866#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012867#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012868
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012869#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012870#include <sys/socket.h>
12871#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012872#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012873
Martin v. Löwis11437992002-04-12 09:54:03 +000012874#ifdef F77_DUMMY_MAIN
12875# ifdef __cplusplus
12876 extern "C"
12877# endif
12878 int F77_DUMMY_MAIN() { return 1; }
12879#endif
12880int
12881main ()
12882{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012883
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012884getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012885
Martin v. Löwis11437992002-04-12 09:54:03 +000012886 ;
12887 return 0;
12888}
12889_ACEOF
12890rm -f conftest.$ac_objext conftest$ac_exeext
12891if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12892 (eval $ac_link) 2>&5
12893 ac_status=$?
12894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12895 (exit $ac_status); } &&
12896 { ac_try='test -s conftest$ac_exeext'
12897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12898 (eval $ac_try) 2>&5
12899 ac_status=$?
12900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12901 (exit $ac_status); }; }; then
12902
12903echo "$as_me:$LINENO: result: yes" >&5
12904echo "${ECHO_T}yes" >&6
12905echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12906echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012907if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012908 echo "$as_me:$LINENO: result: buggy" >&5
12909echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012910buggygetaddrinfo=yes
12911else
Martin v. Löwis11437992002-04-12 09:54:03 +000012912 cat >conftest.$ac_ext <<_ACEOF
12913#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012914#include "confdefs.h"
12915
12916#include <sys/types.h>
12917#include <netdb.h>
12918#include <string.h>
12919#include <sys/socket.h>
12920#include <netinet/in.h>
12921
12922main()
12923{
12924 int passive, gaierr, inet4 = 0, inet6 = 0;
12925 struct addrinfo hints, *ai, *aitop;
12926 char straddr[INET6_ADDRSTRLEN], strport[16];
12927
12928 for (passive = 0; passive <= 1; passive++) {
12929 memset(&hints, 0, sizeof(hints));
12930 hints.ai_family = AF_UNSPEC;
12931 hints.ai_flags = passive ? AI_PASSIVE : 0;
12932 hints.ai_socktype = SOCK_STREAM;
12933 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12934 (void)gai_strerror(gaierr);
12935 goto bad;
12936 }
12937 for (ai = aitop; ai; ai = ai->ai_next) {
12938 if (ai->ai_addr == NULL ||
12939 ai->ai_addrlen == 0 ||
12940 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12941 straddr, sizeof(straddr), strport, sizeof(strport),
12942 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12943 goto bad;
12944 }
12945 switch (ai->ai_family) {
12946 case AF_INET:
12947 if (strcmp(strport, "54321") != 0) {
12948 goto bad;
12949 }
12950 if (passive) {
12951 if (strcmp(straddr, "0.0.0.0") != 0) {
12952 goto bad;
12953 }
12954 } else {
12955 if (strcmp(straddr, "127.0.0.1") != 0) {
12956 goto bad;
12957 }
12958 }
12959 inet4++;
12960 break;
12961 case AF_INET6:
12962 if (strcmp(strport, "54321") != 0) {
12963 goto bad;
12964 }
12965 if (passive) {
12966 if (strcmp(straddr, "::") != 0) {
12967 goto bad;
12968 }
12969 } else {
12970 if (strcmp(straddr, "::1") != 0) {
12971 goto bad;
12972 }
12973 }
12974 inet6++;
12975 break;
12976 case AF_UNSPEC:
12977 goto bad;
12978 break;
12979 default:
12980 /* another family support? */
12981 break;
12982 }
12983 }
12984 }
12985
12986 if (!(inet4 == 0 || inet4 == 2))
12987 goto bad;
12988 if (!(inet6 == 0 || inet6 == 2))
12989 goto bad;
12990
12991 if (aitop)
12992 freeaddrinfo(aitop);
12993 exit(0);
12994
12995 bad:
12996 if (aitop)
12997 freeaddrinfo(aitop);
12998 exit(1);
12999}
13000
Martin v. Löwis11437992002-04-12 09:54:03 +000013001_ACEOF
13002rm -f conftest$ac_exeext
13003if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13004 (eval $ac_link) 2>&5
13005 ac_status=$?
13006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13007 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13009 (eval $ac_try) 2>&5
13010 ac_status=$?
13011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13012 (exit $ac_status); }; }; then
13013 echo "$as_me:$LINENO: result: good" >&5
13014echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013015buggygetaddrinfo=no
13016else
Martin v. Löwis11437992002-04-12 09:54:03 +000013017 echo "$as_me: program exited with status $ac_status" >&5
13018echo "$as_me: failed program was:" >&5
13019cat conftest.$ac_ext >&5
13020( exit $ac_status )
13021echo "$as_me:$LINENO: result: buggy" >&5
13022echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013023buggygetaddrinfo=yes
13024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013025rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013026fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013027else
Martin v. Löwis11437992002-04-12 09:54:03 +000013028 echo "$as_me: failed program was:" >&5
13029cat conftest.$ac_ext >&5
13030
13031echo "$as_me:$LINENO: result: no" >&5
13032echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013033buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013034
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013036rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013037
13038if test "$buggygetaddrinfo" = "yes"; then
13039 if test "$ipv6" = "yes"; then
13040 echo 'Fatal: You must get working getaddrinfo() function.'
13041 echo ' or you can specify "--disable-ipv6"'.
13042 exit 1
13043 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013044else
Martin v. Löwis11437992002-04-12 09:54:03 +000013045
13046cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013047#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013048_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013049
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013050fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013051
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013052for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013053do
Martin v. Löwis11437992002-04-12 09:54:03 +000013054as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13055echo "$as_me:$LINENO: checking for $ac_func" >&5
13056echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13057if eval "test \"\${$as_ac_var+set}\" = set"; then
13058 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013059else
Martin v. Löwis11437992002-04-12 09:54:03 +000013060 cat >conftest.$ac_ext <<_ACEOF
13061#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013062#include "confdefs.h"
13063/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013064 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013065#include <assert.h>
13066/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013067#ifdef __cplusplus
13068extern "C"
13069#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013070/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013071 builtin and then its argument prototype would still apply. */
13072char $ac_func ();
13073char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013074
Martin v. Löwis11437992002-04-12 09:54:03 +000013075#ifdef F77_DUMMY_MAIN
13076# ifdef __cplusplus
13077 extern "C"
13078# endif
13079 int F77_DUMMY_MAIN() { return 1; }
13080#endif
13081int
13082main ()
13083{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013084/* The GNU C library defines this for functions which it implements
13085 to always fail with ENOSYS. Some functions are actually named
13086 something starting with __ and the normal name is an alias. */
13087#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13088choke me
13089#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013090f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013091#endif
13092
Martin v. Löwis11437992002-04-12 09:54:03 +000013093 ;
13094 return 0;
13095}
13096_ACEOF
13097rm -f conftest.$ac_objext conftest$ac_exeext
13098if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13099 (eval $ac_link) 2>&5
13100 ac_status=$?
13101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13102 (exit $ac_status); } &&
13103 { ac_try='test -s conftest$ac_exeext'
13104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13105 (eval $ac_try) 2>&5
13106 ac_status=$?
13107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13108 (exit $ac_status); }; }; then
13109 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013110else
Martin v. Löwis11437992002-04-12 09:54:03 +000013111 echo "$as_me: failed program was:" >&5
13112cat conftest.$ac_ext >&5
13113eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013114fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013115rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013116fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013117echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13118echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13119if test `eval echo '${'$as_ac_var'}'` = yes; then
13120 cat >>confdefs.h <<_ACEOF
13121#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13122_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013123
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013124fi
13125done
13126
Michael W. Hudson54241132001-12-07 15:38:26 +000013127
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013128# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013129echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13130echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13131if test "${ac_cv_header_time+set}" = set; then
13132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013133else
Martin v. Löwis11437992002-04-12 09:54:03 +000013134 cat >conftest.$ac_ext <<_ACEOF
13135#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013136#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013137#include <sys/types.h>
13138#include <sys/time.h>
13139#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013140
13141#ifdef F77_DUMMY_MAIN
13142# ifdef __cplusplus
13143 extern "C"
13144# endif
13145 int F77_DUMMY_MAIN() { return 1; }
13146#endif
13147int
13148main ()
13149{
13150if ((struct tm *) 0)
13151return 0;
13152 ;
13153 return 0;
13154}
13155_ACEOF
13156rm -f conftest.$ac_objext
13157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13158 (eval $ac_compile) 2>&5
13159 ac_status=$?
13160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13161 (exit $ac_status); } &&
13162 { ac_try='test -s conftest.$ac_objext'
13163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13164 (eval $ac_try) 2>&5
13165 ac_status=$?
13166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13167 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013168 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013169else
Martin v. Löwis11437992002-04-12 09:54:03 +000013170 echo "$as_me: failed program was:" >&5
13171cat conftest.$ac_ext >&5
13172ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013173fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013174rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013175fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013176echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13177echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013178if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013179
13180cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013181#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013182_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013183
13184fi
13185
Martin v. Löwis11437992002-04-12 09:54:03 +000013186echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13187echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13188if test "${ac_cv_struct_tm+set}" = set; then
13189 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013190else
Martin v. Löwis11437992002-04-12 09:54:03 +000013191 cat >conftest.$ac_ext <<_ACEOF
13192#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013193#include "confdefs.h"
13194#include <sys/types.h>
13195#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013196
13197#ifdef F77_DUMMY_MAIN
13198# ifdef __cplusplus
13199 extern "C"
13200# endif
13201 int F77_DUMMY_MAIN() { return 1; }
13202#endif
13203int
13204main ()
13205{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013206struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000013207 ;
13208 return 0;
13209}
13210_ACEOF
13211rm -f conftest.$ac_objext
13212if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13213 (eval $ac_compile) 2>&5
13214 ac_status=$?
13215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13216 (exit $ac_status); } &&
13217 { ac_try='test -s conftest.$ac_objext'
13218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13219 (eval $ac_try) 2>&5
13220 ac_status=$?
13221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13222 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013223 ac_cv_struct_tm=time.h
13224else
Martin v. Löwis11437992002-04-12 09:54:03 +000013225 echo "$as_me: failed program was:" >&5
13226cat conftest.$ac_ext >&5
13227ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013228fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013229rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013231echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13232echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013233if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013234
13235cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013236#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013237_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013238
13239fi
13240
Martin v. Löwis11437992002-04-12 09:54:03 +000013241echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13242echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13243if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13244 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013245else
Martin v. Löwis11437992002-04-12 09:54:03 +000013246 cat >conftest.$ac_ext <<_ACEOF
13247#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013248#include "confdefs.h"
13249#include <sys/types.h>
13250#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013251
13252
13253#ifdef F77_DUMMY_MAIN
13254# ifdef __cplusplus
13255 extern "C"
13256# endif
13257 int F77_DUMMY_MAIN() { return 1; }
13258#endif
13259int
13260main ()
13261{
13262static struct tm ac_aggr;
13263if (ac_aggr.tm_zone)
13264return 0;
13265 ;
13266 return 0;
13267}
13268_ACEOF
13269rm -f conftest.$ac_objext
13270if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13271 (eval $ac_compile) 2>&5
13272 ac_status=$?
13273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13274 (exit $ac_status); } &&
13275 { ac_try='test -s conftest.$ac_objext'
13276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13277 (eval $ac_try) 2>&5
13278 ac_status=$?
13279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13280 (exit $ac_status); }; }; then
13281 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013282else
Martin v. Löwis11437992002-04-12 09:54:03 +000013283 echo "$as_me: failed program was:" >&5
13284cat conftest.$ac_ext >&5
13285ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013286fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013287rm -f conftest.$ac_objext conftest.$ac_ext
13288fi
13289echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13290echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13291if test $ac_cv_member_struct_tm_tm_zone = yes; then
13292
13293cat >>confdefs.h <<_ACEOF
13294#define HAVE_STRUCT_TM_TM_ZONE 1
13295_ACEOF
13296
13297
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013298fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013299
Martin v. Löwis11437992002-04-12 09:54:03 +000013300if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13301
13302cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013303#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013304_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305
13306else
Martin v. Löwis11437992002-04-12 09:54:03 +000013307 echo "$as_me:$LINENO: checking for tzname" >&5
13308echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13309if test "${ac_cv_var_tzname+set}" = set; then
13310 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013311else
Martin v. Löwis11437992002-04-12 09:54:03 +000013312 cat >conftest.$ac_ext <<_ACEOF
13313#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013314#include "confdefs.h"
13315#include <time.h>
13316#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013317extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013318#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013319
13320#ifdef F77_DUMMY_MAIN
13321# ifdef __cplusplus
13322 extern "C"
13323# endif
13324 int F77_DUMMY_MAIN() { return 1; }
13325#endif
13326int
13327main ()
13328{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013330 ;
13331 return 0;
13332}
13333_ACEOF
13334rm -f conftest.$ac_objext conftest$ac_exeext
13335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13336 (eval $ac_link) 2>&5
13337 ac_status=$?
13338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13339 (exit $ac_status); } &&
13340 { ac_try='test -s conftest$ac_exeext'
13341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13342 (eval $ac_try) 2>&5
13343 ac_status=$?
13344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13345 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013346 ac_cv_var_tzname=yes
13347else
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 echo "$as_me: failed program was:" >&5
13349cat conftest.$ac_ext >&5
13350ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013351fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013352rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013353fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013354echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13355echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013356 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013357
13358cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013359#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013360_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013361
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013362 fi
13363fi
13364
Martin v. Löwis11437992002-04-12 09:54:03 +000013365echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13366echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13367if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13368 echo $ECHO_N "(cached) $ECHO_C" >&6
13369else
13370 cat >conftest.$ac_ext <<_ACEOF
13371#line $LINENO "configure"
13372#include "confdefs.h"
13373$ac_includes_default
13374#ifdef F77_DUMMY_MAIN
13375# ifdef __cplusplus
13376 extern "C"
13377# endif
13378 int F77_DUMMY_MAIN() { return 1; }
13379#endif
13380int
13381main ()
13382{
13383static struct stat ac_aggr;
13384if (ac_aggr.st_rdev)
13385return 0;
13386 ;
13387 return 0;
13388}
13389_ACEOF
13390rm -f conftest.$ac_objext
13391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13392 (eval $ac_compile) 2>&5
13393 ac_status=$?
13394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13395 (exit $ac_status); } &&
13396 { ac_try='test -s conftest.$ac_objext'
13397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13398 (eval $ac_try) 2>&5
13399 ac_status=$?
13400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13401 (exit $ac_status); }; }; then
13402 ac_cv_member_struct_stat_st_rdev=yes
13403else
13404 echo "$as_me: failed program was:" >&5
13405cat conftest.$ac_ext >&5
13406ac_cv_member_struct_stat_st_rdev=no
13407fi
13408rm -f conftest.$ac_objext conftest.$ac_ext
13409fi
13410echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13411echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13412if test $ac_cv_member_struct_stat_st_rdev = yes; then
13413
13414cat >>confdefs.h <<_ACEOF
13415#define HAVE_STRUCT_STAT_ST_RDEV 1
13416_ACEOF
13417
13418
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013419fi
13420
Martin v. Löwis11437992002-04-12 09:54:03 +000013421echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13422echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13423if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13424 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013425else
Martin v. Löwis11437992002-04-12 09:54:03 +000013426 cat >conftest.$ac_ext <<_ACEOF
13427#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013428#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013429$ac_includes_default
13430#ifdef F77_DUMMY_MAIN
13431# ifdef __cplusplus
13432 extern "C"
13433# endif
13434 int F77_DUMMY_MAIN() { return 1; }
13435#endif
13436int
13437main ()
13438{
13439static struct stat ac_aggr;
13440if (ac_aggr.st_blksize)
13441return 0;
13442 ;
13443 return 0;
13444}
13445_ACEOF
13446rm -f conftest.$ac_objext
13447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13448 (eval $ac_compile) 2>&5
13449 ac_status=$?
13450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13451 (exit $ac_status); } &&
13452 { ac_try='test -s conftest.$ac_objext'
13453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13454 (eval $ac_try) 2>&5
13455 ac_status=$?
13456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13457 (exit $ac_status); }; }; then
13458 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013459else
Martin v. Löwis11437992002-04-12 09:54:03 +000013460 echo "$as_me: failed program was:" >&5
13461cat conftest.$ac_ext >&5
13462ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013463fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013464rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013465fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013466echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13467echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13468if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470cat >>confdefs.h <<_ACEOF
13471#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13472_ACEOF
13473
13474
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013475fi
13476
Martin v. Löwis11437992002-04-12 09:54:03 +000013477echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13478echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13479if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13480 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013481else
Martin v. Löwis11437992002-04-12 09:54:03 +000013482 cat >conftest.$ac_ext <<_ACEOF
13483#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013484#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013485$ac_includes_default
13486#ifdef F77_DUMMY_MAIN
13487# ifdef __cplusplus
13488 extern "C"
13489# endif
13490 int F77_DUMMY_MAIN() { return 1; }
13491#endif
13492int
13493main ()
13494{
13495static struct stat ac_aggr;
13496if (ac_aggr.st_blocks)
13497return 0;
13498 ;
13499 return 0;
13500}
13501_ACEOF
13502rm -f conftest.$ac_objext
13503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13504 (eval $ac_compile) 2>&5
13505 ac_status=$?
13506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13507 (exit $ac_status); } &&
13508 { ac_try='test -s conftest.$ac_objext'
13509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13510 (eval $ac_try) 2>&5
13511 ac_status=$?
13512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13513 (exit $ac_status); }; }; then
13514 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013515else
Martin v. Löwis11437992002-04-12 09:54:03 +000013516 echo "$as_me: failed program was:" >&5
13517cat conftest.$ac_ext >&5
13518ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013519fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013520rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013522echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13523echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13524if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013525
Martin v. Löwis11437992002-04-12 09:54:03 +000013526cat >>confdefs.h <<_ACEOF
13527#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13528_ACEOF
13529
13530
13531cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013532#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013533_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013534
13535else
Martin v. Löwis11437992002-04-12 09:54:03 +000013536 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013537fi
13538
Michael W. Hudson54241132001-12-07 15:38:26 +000013539
Martin v. Löwis11437992002-04-12 09:54:03 +000013540
13541echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13542echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13543if test "${ac_cv_header_time_altzone+set}" = set; then
13544 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013545else
Martin v. Löwis11437992002-04-12 09:54:03 +000013546 cat >conftest.$ac_ext <<_ACEOF
13547#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013548#include "confdefs.h"
13549#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013550#ifdef F77_DUMMY_MAIN
13551# ifdef __cplusplus
13552 extern "C"
13553# endif
13554 int F77_DUMMY_MAIN() { return 1; }
13555#endif
13556int
13557main ()
13558{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013559return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013560 ;
13561 return 0;
13562}
13563_ACEOF
13564rm -f conftest.$ac_objext
13565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13566 (eval $ac_compile) 2>&5
13567 ac_status=$?
13568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13569 (exit $ac_status); } &&
13570 { ac_try='test -s conftest.$ac_objext'
13571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13572 (eval $ac_try) 2>&5
13573 ac_status=$?
13574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13575 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013576 ac_cv_header_time_altzone=yes
13577else
Martin v. Löwis11437992002-04-12 09:54:03 +000013578 echo "$as_me: failed program was:" >&5
13579cat conftest.$ac_ext >&5
13580ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013581fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013582rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013583fi
13584
Martin v. Löwis11437992002-04-12 09:54:03 +000013585echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13586echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013587if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013588
13589cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013590#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013591_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013592
13593fi
13594
Guido van Rossumda88dad1995-01-26 00:46:29 +000013595was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013596echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13597echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13598cat >conftest.$ac_ext <<_ACEOF
13599#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013600#include "confdefs.h"
13601
13602#include <sys/types.h>
13603#include <sys/select.h>
13604#include <sys/time.h>
13605
Martin v. Löwis11437992002-04-12 09:54:03 +000013606#ifdef F77_DUMMY_MAIN
13607# ifdef __cplusplus
13608 extern "C"
13609# endif
13610 int F77_DUMMY_MAIN() { return 1; }
13611#endif
13612int
13613main ()
13614{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013615;
Martin v. Löwis11437992002-04-12 09:54:03 +000013616 ;
13617 return 0;
13618}
13619_ACEOF
13620rm -f conftest.$ac_objext
13621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13622 (eval $ac_compile) 2>&5
13623 ac_status=$?
13624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13625 (exit $ac_status); } &&
13626 { ac_try='test -s conftest.$ac_objext'
13627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13628 (eval $ac_try) 2>&5
13629 ac_status=$?
13630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13631 (exit $ac_status); }; }; then
13632
13633
13634cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013635#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013636_ACEOF
13637
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013638 was_it_defined=yes
13639
Guido van Rossumf78abae1997-01-21 22:02:36 +000013640else
Martin v. Löwis11437992002-04-12 09:54:03 +000013641 echo "$as_me: failed program was:" >&5
13642cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013643fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013644rm -f conftest.$ac_objext conftest.$ac_ext
13645echo "$as_me:$LINENO: result: $was_it_defined" >&5
13646echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013647
Martin v. Löwis11437992002-04-12 09:54:03 +000013648echo "$as_me:$LINENO: checking for addrinfo" >&5
13649echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13650if test "${ac_cv_struct_addrinfo+set}" = set; then
13651 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013652else
Martin v. Löwis11437992002-04-12 09:54:03 +000013653 cat >conftest.$ac_ext <<_ACEOF
13654#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013655#include "confdefs.h"
13656
13657# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013658#ifdef F77_DUMMY_MAIN
13659# ifdef __cplusplus
13660 extern "C"
13661# endif
13662 int F77_DUMMY_MAIN() { return 1; }
13663#endif
13664int
13665main ()
13666{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013667struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013668 ;
13669 return 0;
13670}
13671_ACEOF
13672rm -f conftest.$ac_objext
13673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13674 (eval $ac_compile) 2>&5
13675 ac_status=$?
13676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13677 (exit $ac_status); } &&
13678 { ac_try='test -s conftest.$ac_objext'
13679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13680 (eval $ac_try) 2>&5
13681 ac_status=$?
13682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13683 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013684 ac_cv_struct_addrinfo=yes
13685else
Martin v. Löwis11437992002-04-12 09:54:03 +000013686 echo "$as_me: failed program was:" >&5
13687cat conftest.$ac_ext >&5
13688ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013689fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013690rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013691fi
13692
Martin v. Löwis11437992002-04-12 09:54:03 +000013693echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13694echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013695if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013696
13697cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013698#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013699_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013700
13701fi
13702
Martin v. Löwis11437992002-04-12 09:54:03 +000013703echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13704echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13705if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13706 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013707else
Martin v. Löwis11437992002-04-12 09:54:03 +000013708 cat >conftest.$ac_ext <<_ACEOF
13709#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013710#include "confdefs.h"
13711
13712# include <sys/types.h>
13713# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013714#ifdef F77_DUMMY_MAIN
13715# ifdef __cplusplus
13716 extern "C"
13717# endif
13718 int F77_DUMMY_MAIN() { return 1; }
13719#endif
13720int
13721main ()
13722{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013723struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013724 ;
13725 return 0;
13726}
13727_ACEOF
13728rm -f conftest.$ac_objext
13729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13730 (eval $ac_compile) 2>&5
13731 ac_status=$?
13732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13733 (exit $ac_status); } &&
13734 { ac_try='test -s conftest.$ac_objext'
13735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13736 (eval $ac_try) 2>&5
13737 ac_status=$?
13738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13739 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013740 ac_cv_struct_sockaddr_storage=yes
13741else
Martin v. Löwis11437992002-04-12 09:54:03 +000013742 echo "$as_me: failed program was:" >&5
13743cat conftest.$ac_ext >&5
13744ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013745fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013746rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013747fi
13748
Martin v. Löwis11437992002-04-12 09:54:03 +000013749echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13750echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013751if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013752
13753cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013754#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013755_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013756
13757fi
13758
Guido van Rossum627b2d71993-12-24 10:39:16 +000013759# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013760
Michael W. Hudson54241132001-12-07 15:38:26 +000013761
Martin v. Löwis11437992002-04-12 09:54:03 +000013762echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13763echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13764if test "${ac_cv_c_char_unsigned+set}" = set; then
13765 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013766else
Martin v. Löwis11437992002-04-12 09:54:03 +000013767 cat >conftest.$ac_ext <<_ACEOF
13768#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013769#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013770$ac_includes_default
13771#ifdef F77_DUMMY_MAIN
13772# ifdef __cplusplus
13773 extern "C"
13774# endif
13775 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013777int
13778main ()
13779{
13780static int test_array [1 - 2 * !(((char) -1) < 0)];
13781test_array [0] = 0
13782
13783 ;
13784 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013785}
Martin v. Löwis11437992002-04-12 09:54:03 +000013786_ACEOF
13787rm -f conftest.$ac_objext
13788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13789 (eval $ac_compile) 2>&5
13790 ac_status=$?
13791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13792 (exit $ac_status); } &&
13793 { ac_try='test -s conftest.$ac_objext'
13794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13795 (eval $ac_try) 2>&5
13796 ac_status=$?
13797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13798 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013799 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013800else
13801 echo "$as_me: failed program was:" >&5
13802cat conftest.$ac_ext >&5
13803ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013804fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013805rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013806fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013807echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13808echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013809if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013810 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013811#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013812_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013813
13814fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013815
Martin v. Löwis11437992002-04-12 09:54:03 +000013816echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13817echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13818if test "${ac_cv_prog_cc_stdc+set}" = set; then
13819 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013820else
Martin v. Löwis11437992002-04-12 09:54:03 +000013821 ac_cv_prog_cc_stdc=no
13822ac_save_CC=$CC
13823cat >conftest.$ac_ext <<_ACEOF
13824#line $LINENO "configure"
13825#include "confdefs.h"
13826#include <stdarg.h>
13827#include <stdio.h>
13828#include <sys/types.h>
13829#include <sys/stat.h>
13830/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13831struct buf { int x; };
13832FILE * (*rcsopen) (struct buf *, struct stat *, int);
13833static char *e (p, i)
13834 char **p;
13835 int i;
13836{
13837 return p[i];
13838}
13839static char *f (char * (*g) (char **, int), char **p, ...)
13840{
13841 char *s;
13842 va_list v;
13843 va_start (v,p);
13844 s = g (p, va_arg (v,int));
13845 va_end (v);
13846 return s;
13847}
13848int test (int i, double x);
13849struct s1 {int (*f) (int a);};
13850struct s2 {int (*f) (double a);};
13851int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13852int argc;
13853char **argv;
13854#ifdef F77_DUMMY_MAIN
13855# ifdef __cplusplus
13856 extern "C"
13857# endif
13858 int F77_DUMMY_MAIN() { return 1; }
13859#endif
13860int
13861main ()
13862{
13863return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13864 ;
13865 return 0;
13866}
13867_ACEOF
13868# Don't try gcc -ansi; that turns off useful extensions and
13869# breaks some systems' header files.
13870# AIX -qlanglvl=ansi
13871# Ultrix and OSF/1 -std1
13872# HP-UX 10.20 and later -Ae
13873# HP-UX older versions -Aa -D_HPUX_SOURCE
13874# SVR4 -Xc -D__EXTENSIONS__
13875for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13876do
13877 CC="$ac_save_CC $ac_arg"
13878 rm -f conftest.$ac_objext
13879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13880 (eval $ac_compile) 2>&5
13881 ac_status=$?
13882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13883 (exit $ac_status); } &&
13884 { ac_try='test -s conftest.$ac_objext'
13885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13886 (eval $ac_try) 2>&5
13887 ac_status=$?
13888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13889 (exit $ac_status); }; }; then
13890 ac_cv_prog_cc_stdc=$ac_arg
13891break
13892else
13893 echo "$as_me: failed program was:" >&5
13894cat conftest.$ac_ext >&5
13895fi
13896rm -f conftest.$ac_objext
13897done
13898rm -f conftest.$ac_ext conftest.$ac_objext
13899CC=$ac_save_CC
13900
13901fi
13902
13903case "x$ac_cv_prog_cc_stdc" in
13904 x|xno)
13905 echo "$as_me:$LINENO: result: none needed" >&5
13906echo "${ECHO_T}none needed" >&6 ;;
13907 *)
13908 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13909echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13910 CC="$CC $ac_cv_prog_cc_stdc" ;;
13911esac
13912
13913echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13914echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13915if test "${ac_cv_c_const+set}" = set; then
13916 echo $ECHO_N "(cached) $ECHO_C" >&6
13917else
13918 cat >conftest.$ac_ext <<_ACEOF
13919#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013920#include "confdefs.h"
13921
Martin v. Löwis11437992002-04-12 09:54:03 +000013922#ifdef F77_DUMMY_MAIN
13923# ifdef __cplusplus
13924 extern "C"
13925# endif
13926 int F77_DUMMY_MAIN() { return 1; }
13927#endif
13928int
13929main ()
13930{
13931/* FIXME: Include the comments suggested by Paul. */
13932#ifndef __cplusplus
13933 /* Ultrix mips cc rejects this. */
13934 typedef int charset[2];
13935 const charset x;
13936 /* SunOS 4.1.1 cc rejects this. */
13937 char const *const *ccp;
13938 char **p;
13939 /* NEC SVR4.0.2 mips cc rejects this. */
13940 struct point {int x, y;};
13941 static struct point const zero = {0,0};
13942 /* AIX XL C 1.02.0.0 rejects this.
13943 It does not let you subtract one const X* pointer from another in
13944 an arm of an if-expression whose if-part is not a constant
13945 expression */
13946 const char *g = "string";
13947 ccp = &g + (g ? g-g : 0);
13948 /* HPUX 7.0 cc rejects these. */
13949 ++ccp;
13950 p = (char**) ccp;
13951 ccp = (char const *const *) p;
13952 { /* SCO 3.2v4 cc rejects this. */
13953 char *t;
13954 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013955
Martin v. Löwis11437992002-04-12 09:54:03 +000013956 *t++ = 0;
13957 }
13958 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13959 int x[] = {25, 17};
13960 const int *foo = &x[0];
13961 ++foo;
13962 }
13963 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13964 typedef const int *iptr;
13965 iptr p = 0;
13966 ++p;
13967 }
13968 { /* AIX XL C 1.02.0.0 rejects this saying
13969 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13970 struct s { int j; const int *ap[3]; };
13971 struct s *b; b->j = 5;
13972 }
13973 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13974 const int foo = 10;
13975 }
13976#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013977
Martin v. Löwis11437992002-04-12 09:54:03 +000013978 ;
13979 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013980}
Martin v. Löwis11437992002-04-12 09:54:03 +000013981_ACEOF
13982rm -f conftest.$ac_objext
13983if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13984 (eval $ac_compile) 2>&5
13985 ac_status=$?
13986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13987 (exit $ac_status); } &&
13988 { ac_try='test -s conftest.$ac_objext'
13989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13990 (eval $ac_try) 2>&5
13991 ac_status=$?
13992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13993 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013994 ac_cv_c_const=yes
13995else
Martin v. Löwis11437992002-04-12 09:54:03 +000013996 echo "$as_me: failed program was:" >&5
13997cat conftest.$ac_ext >&5
13998ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013999fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014000rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014001fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014002echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14003echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014004if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014005
14006cat >>confdefs.h <<\_ACEOF
14007#define const
14008_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014009
14010fi
14011
Michael W. Hudson54241132001-12-07 15:38:26 +000014012
Guido van Rossumda88dad1995-01-26 00:46:29 +000014013works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014014echo "$as_me:$LINENO: checking for working volatile" >&5
14015echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14016cat >conftest.$ac_ext <<_ACEOF
14017#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014018#include "confdefs.h"
14019
Martin v. Löwis11437992002-04-12 09:54:03 +000014020#ifdef F77_DUMMY_MAIN
14021# ifdef __cplusplus
14022 extern "C"
14023# endif
14024 int F77_DUMMY_MAIN() { return 1; }
14025#endif
14026int
14027main ()
14028{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014029volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014030 ;
14031 return 0;
14032}
14033_ACEOF
14034rm -f conftest.$ac_objext
14035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14036 (eval $ac_compile) 2>&5
14037 ac_status=$?
14038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14039 (exit $ac_status); } &&
14040 { ac_try='test -s conftest.$ac_objext'
14041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14042 (eval $ac_try) 2>&5
14043 ac_status=$?
14044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14045 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014046 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014047else
Martin v. Löwis11437992002-04-12 09:54:03 +000014048 echo "$as_me: failed program was:" >&5
14049cat conftest.$ac_ext >&5
14050
14051cat >>confdefs.h <<\_ACEOF
14052#define volatile
14053_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014054
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014055
Guido van Rossum627b2d71993-12-24 10:39:16 +000014056fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014057rm -f conftest.$ac_objext conftest.$ac_ext
14058echo "$as_me:$LINENO: result: $works" >&5
14059echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014060
Guido van Rossumda88dad1995-01-26 00:46:29 +000014061works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014062echo "$as_me:$LINENO: checking for working signed char" >&5
14063echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14064cat >conftest.$ac_ext <<_ACEOF
14065#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014066#include "confdefs.h"
14067
Martin v. Löwis11437992002-04-12 09:54:03 +000014068#ifdef F77_DUMMY_MAIN
14069# ifdef __cplusplus
14070 extern "C"
14071# endif
14072 int F77_DUMMY_MAIN() { return 1; }
14073#endif
14074int
14075main ()
14076{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014077signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 ;
14079 return 0;
14080}
14081_ACEOF
14082rm -f conftest.$ac_objext
14083if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14084 (eval $ac_compile) 2>&5
14085 ac_status=$?
14086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14087 (exit $ac_status); } &&
14088 { ac_try='test -s conftest.$ac_objext'
14089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14090 (eval $ac_try) 2>&5
14091 ac_status=$?
14092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14093 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014094 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014095else
Martin v. Löwis11437992002-04-12 09:54:03 +000014096 echo "$as_me: failed program was:" >&5
14097cat conftest.$ac_ext >&5
14098
14099cat >>confdefs.h <<\_ACEOF
14100#define signed
14101_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014102
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014103
Guido van Rossum7f43da71994-08-01 12:15:30 +000014104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014105rm -f conftest.$ac_objext conftest.$ac_ext
14106echo "$as_me:$LINENO: result: $works" >&5
14107echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014108
Guido van Rossumda88dad1995-01-26 00:46:29 +000014109have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014110echo "$as_me:$LINENO: checking for prototypes" >&5
14111echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14112cat >conftest.$ac_ext <<_ACEOF
14113#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014114#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014115int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014116#ifdef F77_DUMMY_MAIN
14117# ifdef __cplusplus
14118 extern "C"
14119# endif
14120 int F77_DUMMY_MAIN() { return 1; }
14121#endif
14122int
14123main ()
14124{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014125return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014126 ;
14127 return 0;
14128}
14129_ACEOF
14130rm -f conftest.$ac_objext
14131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14132 (eval $ac_compile) 2>&5
14133 ac_status=$?
14134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14135 (exit $ac_status); } &&
14136 { ac_try='test -s conftest.$ac_objext'
14137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14138 (eval $ac_try) 2>&5
14139 ac_status=$?
14140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14141 (exit $ac_status); }; }; then
14142
14143
14144cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014145#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014146_ACEOF
14147
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014148 have_prototypes=yes
14149
Guido van Rossumf78abae1997-01-21 22:02:36 +000014150else
Martin v. Löwis11437992002-04-12 09:54:03 +000014151 echo "$as_me: failed program was:" >&5
14152cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014153fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014154rm -f conftest.$ac_objext conftest.$ac_ext
14155echo "$as_me:$LINENO: result: $have_prototypes" >&5
14156echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014157
Guido van Rossumda88dad1995-01-26 00:46:29 +000014158works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014159echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
14160echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
14161cat >conftest.$ac_ext <<_ACEOF
14162#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014163#include "confdefs.h"
14164
14165#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014166int foo(int x, ...) {
14167 va_list va;
14168 va_start(va, x);
14169 va_arg(va, int);
14170 va_arg(va, char *);
14171 va_arg(va, double);
14172 return 0;
14173}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014174
Martin v. Löwis11437992002-04-12 09:54:03 +000014175#ifdef F77_DUMMY_MAIN
14176# ifdef __cplusplus
14177 extern "C"
14178# endif
14179 int F77_DUMMY_MAIN() { return 1; }
14180#endif
14181int
14182main ()
14183{
Guido van Rossum90eea071996-08-30 20:58:57 +000014184return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014185 ;
14186 return 0;
14187}
14188_ACEOF
14189rm -f conftest.$ac_objext
14190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14191 (eval $ac_compile) 2>&5
14192 ac_status=$?
14193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14194 (exit $ac_status); } &&
14195 { ac_try='test -s conftest.$ac_objext'
14196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14197 (eval $ac_try) 2>&5
14198 ac_status=$?
14199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14200 (exit $ac_status); }; }; then
14201
14202
14203cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014204#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014205_ACEOF
14206
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014207 works=yes
14208
Guido van Rossumf78abae1997-01-21 22:02:36 +000014209else
Martin v. Löwis11437992002-04-12 09:54:03 +000014210 echo "$as_me: failed program was:" >&5
14211cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000014212fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014213rm -f conftest.$ac_objext conftest.$ac_ext
14214echo "$as_me:$LINENO: result: $works" >&5
14215echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014216
Guido van Rossumda88dad1995-01-26 00:46:29 +000014217if test "$have_prototypes" = yes; then
14218bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014219echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
14220echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
14221cat >conftest.$ac_ext <<_ACEOF
14222#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014223#include "confdefs.h"
14224#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014225#ifdef F77_DUMMY_MAIN
14226# ifdef __cplusplus
14227 extern "C"
14228# endif
14229 int F77_DUMMY_MAIN() { return 1; }
14230#endif
14231int
14232main ()
14233{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014234char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000014235 ;
14236 return 0;
14237}
14238_ACEOF
14239rm -f conftest.$ac_objext
14240if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14241 (eval $ac_compile) 2>&5
14242 ac_status=$?
14243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14244 (exit $ac_status); } &&
14245 { ac_try='test -s conftest.$ac_objext'
14246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14247 (eval $ac_try) 2>&5
14248 ac_status=$?
14249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14250 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014251 :
14252else
Martin v. Löwis11437992002-04-12 09:54:03 +000014253 echo "$as_me: failed program was:" >&5
14254cat conftest.$ac_ext >&5
14255
14256cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014257#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014258_ACEOF
14259
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014260 bad_prototypes=yes
14261
Guido van Rossum627b2d71993-12-24 10:39:16 +000014262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014263rm -f conftest.$ac_objext conftest.$ac_ext
14264echo "$as_me:$LINENO: result: $bad_prototypes" >&5
14265echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014266fi
14267
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014268# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000014269echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
14270echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
14271cat >conftest.$ac_ext <<_ACEOF
14272#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014273#include "confdefs.h"
14274#include <sys/types.h>
14275#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014276#ifdef F77_DUMMY_MAIN
14277# ifdef __cplusplus
14278 extern "C"
14279# endif
14280 int F77_DUMMY_MAIN() { return 1; }
14281#endif
14282int
14283main ()
14284{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014285struct sockaddr x;
14286x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014287 ;
14288 return 0;
14289}
14290_ACEOF
14291rm -f conftest.$ac_objext
14292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14293 (eval $ac_compile) 2>&5
14294 ac_status=$?
14295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14296 (exit $ac_status); } &&
14297 { ac_try='test -s conftest.$ac_objext'
14298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14299 (eval $ac_try) 2>&5
14300 ac_status=$?
14301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14302 (exit $ac_status); }; }; then
14303 echo "$as_me:$LINENO: result: yes" >&5
14304echo "${ECHO_T}yes" >&6
14305
14306cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014307#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014308_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014309
14310else
Martin v. Löwis11437992002-04-12 09:54:03 +000014311 echo "$as_me: failed program was:" >&5
14312cat conftest.$ac_ext >&5
14313echo "$as_me:$LINENO: result: no" >&5
14314echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014315fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014316rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014317
Guido van Rossumda88dad1995-01-26 00:46:29 +000014318va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014319echo "$as_me:$LINENO: checking whether va_list is an array" >&5
14320echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
14321cat >conftest.$ac_ext <<_ACEOF
14322#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014323#include "confdefs.h"
14324
14325#ifdef HAVE_STDARG_PROTOTYPES
14326#include <stdarg.h>
14327#else
14328#include <varargs.h>
14329#endif
14330
Martin v. Löwis11437992002-04-12 09:54:03 +000014331#ifdef F77_DUMMY_MAIN
14332# ifdef __cplusplus
14333 extern "C"
14334# endif
14335 int F77_DUMMY_MAIN() { return 1; }
14336#endif
14337int
14338main ()
14339{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014340va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000014341 ;
14342 return 0;
14343}
14344_ACEOF
14345rm -f conftest.$ac_objext
14346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14347 (eval $ac_compile) 2>&5
14348 ac_status=$?
14349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14350 (exit $ac_status); } &&
14351 { ac_try='test -s conftest.$ac_objext'
14352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14353 (eval $ac_try) 2>&5
14354 ac_status=$?
14355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14356 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014357 :
14358else
Martin v. Löwis11437992002-04-12 09:54:03 +000014359 echo "$as_me: failed program was:" >&5
14360cat conftest.$ac_ext >&5
14361
14362
14363cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014364#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014365_ACEOF
14366
Guido van Rossumda88dad1995-01-26 00:46:29 +000014367 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014368
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014370rm -f conftest.$ac_objext conftest.$ac_ext
14371echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14372echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014373
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014374# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014375
14376
14377
14378echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14379echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14380if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14381 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014382else
Martin v. Löwis11437992002-04-12 09:54:03 +000014383 cat >conftest.$ac_ext <<_ACEOF
14384#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014385#include "confdefs.h"
14386/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014387 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014388#include <assert.h>
14389/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014390#ifdef __cplusplus
14391extern "C"
14392#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014393/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014394 builtin and then its argument prototype would still apply. */
14395char gethostbyname_r ();
14396char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014397
Martin v. Löwis11437992002-04-12 09:54:03 +000014398#ifdef F77_DUMMY_MAIN
14399# ifdef __cplusplus
14400 extern "C"
14401# endif
14402 int F77_DUMMY_MAIN() { return 1; }
14403#endif
14404int
14405main ()
14406{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014407/* The GNU C library defines this for functions which it implements
14408 to always fail with ENOSYS. Some functions are actually named
14409 something starting with __ and the normal name is an alias. */
14410#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14411choke me
14412#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014413f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014414#endif
14415
Martin v. Löwis11437992002-04-12 09:54:03 +000014416 ;
14417 return 0;
14418}
14419_ACEOF
14420rm -f conftest.$ac_objext conftest$ac_exeext
14421if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14422 (eval $ac_link) 2>&5
14423 ac_status=$?
14424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14425 (exit $ac_status); } &&
14426 { ac_try='test -s conftest$ac_exeext'
14427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14428 (eval $ac_try) 2>&5
14429 ac_status=$?
14430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14431 (exit $ac_status); }; }; then
14432 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014433else
Martin v. Löwis11437992002-04-12 09:54:03 +000014434 echo "$as_me: failed program was:" >&5
14435cat conftest.$ac_ext >&5
14436ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014438rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014440echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14441echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14442if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014443
Martin v. Löwis11437992002-04-12 09:54:03 +000014444 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014445#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014446_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014447
Martin v. Löwis11437992002-04-12 09:54:03 +000014448 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14449echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014450 OLD_CFLAGS=$CFLAGS
14451 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014452 cat >conftest.$ac_ext <<_ACEOF
14453#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014454#include "confdefs.h"
14455
14456# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014457
14458#ifdef F77_DUMMY_MAIN
14459# ifdef __cplusplus
14460 extern "C"
14461# endif
14462 int F77_DUMMY_MAIN() { return 1; }
14463#endif
14464int
14465main ()
14466{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014467
14468 char *name;
14469 struct hostent *he, *res;
14470 char buffer[2048];
14471 int buflen = 2048;
14472 int h_errnop;
14473
14474 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014475
14476 ;
14477 return 0;
14478}
14479_ACEOF
14480rm -f conftest.$ac_objext
14481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14482 (eval $ac_compile) 2>&5
14483 ac_status=$?
14484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14485 (exit $ac_status); } &&
14486 { ac_try='test -s conftest.$ac_objext'
14487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14488 (eval $ac_try) 2>&5
14489 ac_status=$?
14490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14491 (exit $ac_status); }; }; then
14492
14493 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014494#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014495_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014496
Martin v. Löwis11437992002-04-12 09:54:03 +000014497
14498cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014499#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014500_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014501
Martin v. Löwis11437992002-04-12 09:54:03 +000014502 echo "$as_me:$LINENO: result: yes" >&5
14503echo "${ECHO_T}yes" >&6
14504
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014505else
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 echo "$as_me: failed program was:" >&5
14507cat conftest.$ac_ext >&5
14508
14509 echo "$as_me:$LINENO: result: no" >&5
14510echo "${ECHO_T}no" >&6
14511 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14512echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14513 cat >conftest.$ac_ext <<_ACEOF
14514#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014515#include "confdefs.h"
14516
14517# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014518
14519#ifdef F77_DUMMY_MAIN
14520# ifdef __cplusplus
14521 extern "C"
14522# endif
14523 int F77_DUMMY_MAIN() { return 1; }
14524#endif
14525int
14526main ()
14527{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014528
14529 char *name;
14530 struct hostent *he;
14531 char buffer[2048];
14532 int buflen = 2048;
14533 int h_errnop;
14534
14535 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014536
14537 ;
14538 return 0;
14539}
14540_ACEOF
14541rm -f conftest.$ac_objext
14542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14543 (eval $ac_compile) 2>&5
14544 ac_status=$?
14545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14546 (exit $ac_status); } &&
14547 { ac_try='test -s conftest.$ac_objext'
14548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14549 (eval $ac_try) 2>&5
14550 ac_status=$?
14551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14552 (exit $ac_status); }; }; then
14553
14554 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014555#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014556_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014557
Martin v. Löwis11437992002-04-12 09:54:03 +000014558
14559cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014560#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014561_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014562
Martin v. Löwis11437992002-04-12 09:54:03 +000014563 echo "$as_me:$LINENO: result: yes" >&5
14564echo "${ECHO_T}yes" >&6
14565
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014566else
Martin v. Löwis11437992002-04-12 09:54:03 +000014567 echo "$as_me: failed program was:" >&5
14568cat conftest.$ac_ext >&5
14569
14570 echo "$as_me:$LINENO: result: no" >&5
14571echo "${ECHO_T}no" >&6
14572 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14573echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14574 cat >conftest.$ac_ext <<_ACEOF
14575#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014576#include "confdefs.h"
14577
14578# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014579
14580#ifdef F77_DUMMY_MAIN
14581# ifdef __cplusplus
14582 extern "C"
14583# endif
14584 int F77_DUMMY_MAIN() { return 1; }
14585#endif
14586int
14587main ()
14588{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014589
14590 char *name;
14591 struct hostent *he;
14592 struct hostent_data data;
14593
14594 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014595
14596 ;
14597 return 0;
14598}
14599_ACEOF
14600rm -f conftest.$ac_objext
14601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14602 (eval $ac_compile) 2>&5
14603 ac_status=$?
14604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14605 (exit $ac_status); } &&
14606 { ac_try='test -s conftest.$ac_objext'
14607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14608 (eval $ac_try) 2>&5
14609 ac_status=$?
14610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14611 (exit $ac_status); }; }; then
14612
14613 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014614#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014615_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014616
Martin v. Löwis11437992002-04-12 09:54:03 +000014617
14618cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014619#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014620_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014621
Martin v. Löwis11437992002-04-12 09:54:03 +000014622 echo "$as_me:$LINENO: result: yes" >&5
14623echo "${ECHO_T}yes" >&6
14624
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014625else
Martin v. Löwis11437992002-04-12 09:54:03 +000014626 echo "$as_me: failed program was:" >&5
14627cat conftest.$ac_ext >&5
14628
14629 echo "$as_me:$LINENO: result: no" >&5
14630echo "${ECHO_T}no" >&6
14631
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014632fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014633rm -f conftest.$ac_objext conftest.$ac_ext
14634
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014636rm -f conftest.$ac_objext conftest.$ac_ext
14637
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014638fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014639rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014640 CFLAGS=$OLD_CFLAGS
14641
14642else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014643
Martin v. Löwis11437992002-04-12 09:54:03 +000014644
14645for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014646do
Martin v. Löwis11437992002-04-12 09:54:03 +000014647as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14648echo "$as_me:$LINENO: checking for $ac_func" >&5
14649echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14650if eval "test \"\${$as_ac_var+set}\" = set"; then
14651 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014652else
Martin v. Löwis11437992002-04-12 09:54:03 +000014653 cat >conftest.$ac_ext <<_ACEOF
14654#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014655#include "confdefs.h"
14656/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014657 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014658#include <assert.h>
14659/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014660#ifdef __cplusplus
14661extern "C"
14662#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014663/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014664 builtin and then its argument prototype would still apply. */
14665char $ac_func ();
14666char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014667
Martin v. Löwis11437992002-04-12 09:54:03 +000014668#ifdef F77_DUMMY_MAIN
14669# ifdef __cplusplus
14670 extern "C"
14671# endif
14672 int F77_DUMMY_MAIN() { return 1; }
14673#endif
14674int
14675main ()
14676{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014677/* The GNU C library defines this for functions which it implements
14678 to always fail with ENOSYS. Some functions are actually named
14679 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014680#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014681choke me
14682#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014683f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014684#endif
14685
Martin v. Löwis11437992002-04-12 09:54:03 +000014686 ;
14687 return 0;
14688}
14689_ACEOF
14690rm -f conftest.$ac_objext conftest$ac_exeext
14691if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14692 (eval $ac_link) 2>&5
14693 ac_status=$?
14694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14695 (exit $ac_status); } &&
14696 { ac_try='test -s conftest$ac_exeext'
14697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14698 (eval $ac_try) 2>&5
14699 ac_status=$?
14700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14701 (exit $ac_status); }; }; then
14702 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014703else
Martin v. Löwis11437992002-04-12 09:54:03 +000014704 echo "$as_me: failed program was:" >&5
14705cat conftest.$ac_ext >&5
14706eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014707fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014708rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014709fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014710echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14711echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14712if test `eval echo '${'$as_ac_var'}'` = yes; then
14713 cat >>confdefs.h <<_ACEOF
14714#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14715_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014716
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014717fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014718done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014719
Michael W. Hudson54241132001-12-07 15:38:26 +000014720
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014721fi
14722
Michael W. Hudson54241132001-12-07 15:38:26 +000014723
14724
14725
14726
14727
14728
Guido van Rossum627b2d71993-12-24 10:39:16 +000014729# checks for system services
14730# (none yet)
14731
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014732# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014733echo "$as_me:$LINENO: checking for __fpu_control" >&5
14734echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14735if test "${ac_cv_func___fpu_control+set}" = set; then
14736 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014737else
Martin v. Löwis11437992002-04-12 09:54:03 +000014738 cat >conftest.$ac_ext <<_ACEOF
14739#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014740#include "confdefs.h"
14741/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014742 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014743#include <assert.h>
14744/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014745#ifdef __cplusplus
14746extern "C"
14747#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014748/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014749 builtin and then its argument prototype would still apply. */
14750char __fpu_control ();
14751char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014752
Martin v. Löwis11437992002-04-12 09:54:03 +000014753#ifdef F77_DUMMY_MAIN
14754# ifdef __cplusplus
14755 extern "C"
14756# endif
14757 int F77_DUMMY_MAIN() { return 1; }
14758#endif
14759int
14760main ()
14761{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014762/* The GNU C library defines this for functions which it implements
14763 to always fail with ENOSYS. Some functions are actually named
14764 something starting with __ and the normal name is an alias. */
14765#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14766choke me
14767#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014768f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014769#endif
14770
Martin v. Löwis11437992002-04-12 09:54:03 +000014771 ;
14772 return 0;
14773}
14774_ACEOF
14775rm -f conftest.$ac_objext conftest$ac_exeext
14776if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14777 (eval $ac_link) 2>&5
14778 ac_status=$?
14779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14780 (exit $ac_status); } &&
14781 { ac_try='test -s conftest$ac_exeext'
14782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14783 (eval $ac_try) 2>&5
14784 ac_status=$?
14785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14786 (exit $ac_status); }; }; then
14787 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014788else
Martin v. Löwis11437992002-04-12 09:54:03 +000014789 echo "$as_me: failed program was:" >&5
14790cat conftest.$ac_ext >&5
14791ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014792fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014793rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014794fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014795echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14796echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14797if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014798 :
14799else
Martin v. Löwis11437992002-04-12 09:54:03 +000014800
14801echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14802echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14803if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14804 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014805else
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014807LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014808cat >conftest.$ac_ext <<_ACEOF
14809#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014810#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014811
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014812/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014813#ifdef __cplusplus
14814extern "C"
14815#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014816/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014817 builtin and then its argument prototype would still apply. */
14818char __fpu_control ();
14819#ifdef F77_DUMMY_MAIN
14820# ifdef __cplusplus
14821 extern "C"
14822# endif
14823 int F77_DUMMY_MAIN() { return 1; }
14824#endif
14825int
14826main ()
14827{
14828__fpu_control ();
14829 ;
14830 return 0;
14831}
14832_ACEOF
14833rm -f conftest.$ac_objext conftest$ac_exeext
14834if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14835 (eval $ac_link) 2>&5
14836 ac_status=$?
14837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14838 (exit $ac_status); } &&
14839 { ac_try='test -s conftest$ac_exeext'
14840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14841 (eval $ac_try) 2>&5
14842 ac_status=$?
14843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14844 (exit $ac_status); }; }; then
14845 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014846else
Martin v. Löwis11437992002-04-12 09:54:03 +000014847 echo "$as_me: failed program was:" >&5
14848cat conftest.$ac_ext >&5
14849ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014850fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014851rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14852LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014853fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014854echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14855echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14856if test $ac_cv_lib_ieee___fpu_control = yes; then
14857 cat >>confdefs.h <<_ACEOF
14858#define HAVE_LIBIEEE 1
14859_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014860
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014861 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014862
Guido van Rossum627b2d71993-12-24 10:39:16 +000014863fi
14864
Michael W. Hudson54241132001-12-07 15:38:26 +000014865
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014866fi
14867
Michael W. Hudson54241132001-12-07 15:38:26 +000014868
Guido van Rossum7f253911997-05-09 02:42:48 +000014869# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014870echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14871echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14872
Guido van Rossum7f253911997-05-09 02:42:48 +000014873# Check whether --with-fpectl or --without-fpectl was given.
14874if test "${with_fpectl+set}" = set; then
14875 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014876
Guido van Rossum7f253911997-05-09 02:42:48 +000014877if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014878then
14879
14880cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014881#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014882_ACEOF
14883
14884 echo "$as_me:$LINENO: result: yes" >&5
14885echo "${ECHO_T}yes" >&6
14886else echo "$as_me:$LINENO: result: no" >&5
14887echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014888fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014889else
Martin v. Löwis11437992002-04-12 09:54:03 +000014890 echo "$as_me:$LINENO: result: no" >&5
14891echo "${ECHO_T}no" >&6
14892fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014893
Guido van Rossum7f43da71994-08-01 12:15:30 +000014894# check for --with-libm=...
14895
Guido van Rossum563e7081996-09-10 18:20:48 +000014896case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014897Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014898BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014899*) LIBM=-lm
14900esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014901echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14902echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14903
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014904# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014905if test "${with_libm+set}" = set; then
14906 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014907
Guido van Rossum7f253911997-05-09 02:42:48 +000014908if test "$withval" = no
14909then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014910 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14911echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014912elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014913then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014914 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14915echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14916else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14917echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14918 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014919fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014920else
Martin v. Löwis11437992002-04-12 09:54:03 +000014921 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14922echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14923fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014924
14925# check for --with-libc=...
14926
Martin v. Löwis11437992002-04-12 09:54:03 +000014927echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14928echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14929
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014930# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014931if test "${with_libc+set}" = set; then
14932 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014933
Guido van Rossum7f253911997-05-09 02:42:48 +000014934if test "$withval" = no
14935then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14937echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014938elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014939then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014940 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14941echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14942else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14943echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14944 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014945fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014946else
Martin v. Löwis11437992002-04-12 09:54:03 +000014947 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14948echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14949fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014950
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014951# check for hypot() in math library
14952LIBS_SAVE=$LIBS
14953LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014954
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014955for ac_func in hypot
14956do
Martin v. Löwis11437992002-04-12 09:54:03 +000014957as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14958echo "$as_me:$LINENO: checking for $ac_func" >&5
14959echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14960if eval "test \"\${$as_ac_var+set}\" = set"; then
14961 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014962else
Martin v. Löwis11437992002-04-12 09:54:03 +000014963 cat >conftest.$ac_ext <<_ACEOF
14964#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014965#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014966/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014967 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014968#include <assert.h>
14969/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014970#ifdef __cplusplus
14971extern "C"
14972#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014973/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014974 builtin and then its argument prototype would still apply. */
14975char $ac_func ();
14976char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014977
Martin v. Löwis11437992002-04-12 09:54:03 +000014978#ifdef F77_DUMMY_MAIN
14979# ifdef __cplusplus
14980 extern "C"
14981# endif
14982 int F77_DUMMY_MAIN() { return 1; }
14983#endif
14984int
14985main ()
14986{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014987/* The GNU C library defines this for functions which it implements
14988 to always fail with ENOSYS. Some functions are actually named
14989 something starting with __ and the normal name is an alias. */
14990#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14991choke me
14992#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014993f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014994#endif
14995
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 ;
14997 return 0;
14998}
14999_ACEOF
15000rm -f conftest.$ac_objext conftest$ac_exeext
15001if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15002 (eval $ac_link) 2>&5
15003 ac_status=$?
15004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15005 (exit $ac_status); } &&
15006 { ac_try='test -s conftest$ac_exeext'
15007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15008 (eval $ac_try) 2>&5
15009 ac_status=$?
15010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15011 (exit $ac_status); }; }; then
15012 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015013else
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 echo "$as_me: failed program was:" >&5
15015cat conftest.$ac_ext >&5
15016eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015017fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015018rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015020echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15021echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15022if test `eval echo '${'$as_ac_var'}'` = yes; then
15023 cat >>confdefs.h <<_ACEOF
15024#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15025_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015026
Michael W. Hudson54241132001-12-07 15:38:26 +000015027else
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015029fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015030done
15031
Michael W. Hudson54241132001-12-07 15:38:26 +000015032
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015033LIBS=$LIBS_SAVE
15034
Guido van Rossumad713701997-07-10 22:42:38 +000015035# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000015036echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
15037echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
15038if test "${ac_cv_malloc_zero+set}" = set; then
15039 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015040else
15041 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015042 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000015043else
Martin v. Löwis11437992002-04-12 09:54:03 +000015044 cat >conftest.$ac_ext <<_ACEOF
15045#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000015046#include "confdefs.h"
15047#include <stdio.h>
15048#ifdef HAVE_STDLIB
15049#include <stdlib.h>
15050#else
15051char *malloc(), *realloc();
15052int *free();
15053#endif
15054main() {
15055 char *p;
15056 p = malloc(0);
15057 if (p == NULL) exit(1);
15058 p = realloc(p, 0);
15059 if (p == NULL) exit(1);
15060 free(p);
15061 exit(0);
15062}
Martin v. Löwis11437992002-04-12 09:54:03 +000015063_ACEOF
15064rm -f conftest$ac_exeext
15065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15066 (eval $ac_link) 2>&5
15067 ac_status=$?
15068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15069 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15071 (eval $ac_try) 2>&5
15072 ac_status=$?
15073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15074 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000015075 ac_cv_malloc_zero=nonnull
15076else
Martin v. Löwis11437992002-04-12 09:54:03 +000015077 echo "$as_me: program exited with status $ac_status" >&5
15078echo "$as_me: failed program was:" >&5
15079cat conftest.$ac_ext >&5
15080( exit $ac_status )
15081ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000015082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015083rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000015084fi
Guido van Rossumad713701997-07-10 22:42:38 +000015085fi
Guido van Rossum3065c942001-09-17 04:03:14 +000015086 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000015087echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
15088echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015089if test "$ac_cv_malloc_zero" = null
15090then
Martin v. Löwis11437992002-04-12 09:54:03 +000015091
15092cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015093#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015094_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015095
15096fi
15097
Guido van Rossumef2255b2000-03-10 22:30:29 +000015098# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015099if test "${ac_cv_header_wchar_h+set}" = set; then
15100 echo "$as_me:$LINENO: checking for wchar.h" >&5
15101echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15102if test "${ac_cv_header_wchar_h+set}" = set; then
15103 echo $ECHO_N "(cached) $ECHO_C" >&6
15104fi
15105echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15106echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015107else
Martin v. Löwis11437992002-04-12 09:54:03 +000015108 # Is the header compilable?
15109echo "$as_me:$LINENO: checking wchar.h usability" >&5
15110echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15111cat >conftest.$ac_ext <<_ACEOF
15112#line $LINENO "configure"
15113#include "confdefs.h"
15114$ac_includes_default
15115#include <wchar.h>
15116_ACEOF
15117rm -f conftest.$ac_objext
15118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15119 (eval $ac_compile) 2>&5
15120 ac_status=$?
15121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15122 (exit $ac_status); } &&
15123 { ac_try='test -s conftest.$ac_objext'
15124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15125 (eval $ac_try) 2>&5
15126 ac_status=$?
15127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15128 (exit $ac_status); }; }; then
15129 ac_header_compiler=yes
15130else
15131 echo "$as_me: failed program was:" >&5
15132cat conftest.$ac_ext >&5
15133ac_header_compiler=no
15134fi
15135rm -f conftest.$ac_objext conftest.$ac_ext
15136echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15137echo "${ECHO_T}$ac_header_compiler" >&6
15138
15139# Is the header present?
15140echo "$as_me:$LINENO: checking wchar.h presence" >&5
15141echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15142cat >conftest.$ac_ext <<_ACEOF
15143#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015144#include "confdefs.h"
15145#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015146_ACEOF
15147if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15148 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15149 ac_status=$?
15150 egrep -v '^ *\+' conftest.er1 >conftest.err
15151 rm -f conftest.er1
15152 cat conftest.err >&5
15153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15154 (exit $ac_status); } >/dev/null; then
15155 if test -s conftest.err; then
15156 ac_cpp_err=$ac_c_preproc_warn_flag
15157 else
15158 ac_cpp_err=
15159 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015160else
Martin v. Löwis11437992002-04-12 09:54:03 +000015161 ac_cpp_err=yes
15162fi
15163if test -z "$ac_cpp_err"; then
15164 ac_header_preproc=yes
15165else
15166 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015167 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015168 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015169fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015170rm -f conftest.err conftest.$ac_ext
15171echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15172echo "${ECHO_T}$ac_header_preproc" >&6
15173
15174# So? What about this header?
15175case $ac_header_compiler:$ac_header_preproc in
15176 yes:no )
15177 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15178echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15179 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15180echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15181 no:yes )
15182 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15183echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15184 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15185echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15186 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15187echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15188esac
15189echo "$as_me:$LINENO: checking for wchar.h" >&5
15190echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15191if test "${ac_cv_header_wchar_h+set}" = set; then
15192 echo $ECHO_N "(cached) $ECHO_C" >&6
15193else
15194 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015195fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015196echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15197echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15198
15199fi
15200if test $ac_cv_header_wchar_h = yes; then
15201
15202
15203cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015204#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015205_ACEOF
15206
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015207 wchar_h="yes"
15208
Guido van Rossumef2255b2000-03-10 22:30:29 +000015209else
Martin v. Löwis11437992002-04-12 09:54:03 +000015210 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015211
15212fi
15213
Michael W. Hudson54241132001-12-07 15:38:26 +000015214
Martin v. Löwis11437992002-04-12 09:54:03 +000015215
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015216# determine wchar_t size
15217if test "$wchar_h" = yes
15218then
Martin v. Löwis11437992002-04-12 09:54:03 +000015219 echo "$as_me:$LINENO: checking for wchar_t" >&5
15220echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
15221if test "${ac_cv_type_wchar_t+set}" = set; then
15222 echo $ECHO_N "(cached) $ECHO_C" >&6
15223else
15224 cat >conftest.$ac_ext <<_ACEOF
15225#line $LINENO "configure"
15226#include "confdefs.h"
15227#include <wchar.h>
15228
15229#ifdef F77_DUMMY_MAIN
15230# ifdef __cplusplus
15231 extern "C"
15232# endif
15233 int F77_DUMMY_MAIN() { return 1; }
15234#endif
15235int
15236main ()
15237{
15238if ((wchar_t *) 0)
15239 return 0;
15240if (sizeof (wchar_t))
15241 return 0;
15242 ;
15243 return 0;
15244}
15245_ACEOF
15246rm -f conftest.$ac_objext
15247if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15248 (eval $ac_compile) 2>&5
15249 ac_status=$?
15250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15251 (exit $ac_status); } &&
15252 { ac_try='test -s conftest.$ac_objext'
15253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15254 (eval $ac_try) 2>&5
15255 ac_status=$?
15256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15257 (exit $ac_status); }; }; then
15258 ac_cv_type_wchar_t=yes
15259else
15260 echo "$as_me: failed program was:" >&5
15261cat conftest.$ac_ext >&5
15262ac_cv_type_wchar_t=no
15263fi
15264rm -f conftest.$ac_objext conftest.$ac_ext
15265fi
15266echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
15267echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
15268
15269echo "$as_me:$LINENO: checking size of wchar_t" >&5
15270echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
15271if test "${ac_cv_sizeof_wchar_t+set}" = set; then
15272 echo $ECHO_N "(cached) $ECHO_C" >&6
15273else
15274 if test "$ac_cv_type_wchar_t" = yes; then
15275 # The cast to unsigned long works around a bug in the HP C Compiler
15276 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15277 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15278 # This bug is HP SR number 8606223364.
15279 if test "$cross_compiling" = yes; then
15280 # Depending upon the size, compute the lo and hi bounds.
15281cat >conftest.$ac_ext <<_ACEOF
15282#line $LINENO "configure"
15283#include "confdefs.h"
15284#include <wchar.h>
15285
15286#ifdef F77_DUMMY_MAIN
15287# ifdef __cplusplus
15288 extern "C"
15289# endif
15290 int F77_DUMMY_MAIN() { return 1; }
15291#endif
15292int
15293main ()
15294{
15295static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
15296test_array [0] = 0
15297
15298 ;
15299 return 0;
15300}
15301_ACEOF
15302rm -f conftest.$ac_objext
15303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15304 (eval $ac_compile) 2>&5
15305 ac_status=$?
15306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15307 (exit $ac_status); } &&
15308 { ac_try='test -s conftest.$ac_objext'
15309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15310 (eval $ac_try) 2>&5
15311 ac_status=$?
15312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15313 (exit $ac_status); }; }; then
15314 ac_lo=0 ac_mid=0
15315 while :; do
15316 cat >conftest.$ac_ext <<_ACEOF
15317#line $LINENO "configure"
15318#include "confdefs.h"
15319#include <wchar.h>
15320
15321#ifdef F77_DUMMY_MAIN
15322# ifdef __cplusplus
15323 extern "C"
15324# endif
15325 int F77_DUMMY_MAIN() { return 1; }
15326#endif
15327int
15328main ()
15329{
15330static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15331test_array [0] = 0
15332
15333 ;
15334 return 0;
15335}
15336_ACEOF
15337rm -f conftest.$ac_objext
15338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15339 (eval $ac_compile) 2>&5
15340 ac_status=$?
15341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15342 (exit $ac_status); } &&
15343 { ac_try='test -s conftest.$ac_objext'
15344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15345 (eval $ac_try) 2>&5
15346 ac_status=$?
15347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15348 (exit $ac_status); }; }; then
15349 ac_hi=$ac_mid; break
15350else
15351 echo "$as_me: failed program was:" >&5
15352cat conftest.$ac_ext >&5
15353ac_lo=`expr $ac_mid + 1`
15354 if test $ac_lo -le $ac_mid; then
15355 ac_lo= ac_hi=
15356 break
15357 fi
15358 ac_mid=`expr 2 '*' $ac_mid + 1`
15359fi
15360rm -f conftest.$ac_objext conftest.$ac_ext
15361 done
15362else
15363 echo "$as_me: failed program was:" >&5
15364cat conftest.$ac_ext >&5
15365cat >conftest.$ac_ext <<_ACEOF
15366#line $LINENO "configure"
15367#include "confdefs.h"
15368#include <wchar.h>
15369
15370#ifdef F77_DUMMY_MAIN
15371# ifdef __cplusplus
15372 extern "C"
15373# endif
15374 int F77_DUMMY_MAIN() { return 1; }
15375#endif
15376int
15377main ()
15378{
15379static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
15380test_array [0] = 0
15381
15382 ;
15383 return 0;
15384}
15385_ACEOF
15386rm -f conftest.$ac_objext
15387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15388 (eval $ac_compile) 2>&5
15389 ac_status=$?
15390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15391 (exit $ac_status); } &&
15392 { ac_try='test -s conftest.$ac_objext'
15393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15394 (eval $ac_try) 2>&5
15395 ac_status=$?
15396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15397 (exit $ac_status); }; }; then
15398 ac_hi=-1 ac_mid=-1
15399 while :; do
15400 cat >conftest.$ac_ext <<_ACEOF
15401#line $LINENO "configure"
15402#include "confdefs.h"
15403#include <wchar.h>
15404
15405#ifdef F77_DUMMY_MAIN
15406# ifdef __cplusplus
15407 extern "C"
15408# endif
15409 int F77_DUMMY_MAIN() { return 1; }
15410#endif
15411int
15412main ()
15413{
15414static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15415test_array [0] = 0
15416
15417 ;
15418 return 0;
15419}
15420_ACEOF
15421rm -f conftest.$ac_objext
15422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15423 (eval $ac_compile) 2>&5
15424 ac_status=$?
15425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15426 (exit $ac_status); } &&
15427 { ac_try='test -s conftest.$ac_objext'
15428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15429 (eval $ac_try) 2>&5
15430 ac_status=$?
15431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15432 (exit $ac_status); }; }; then
15433 ac_lo=$ac_mid; break
15434else
15435 echo "$as_me: failed program was:" >&5
15436cat conftest.$ac_ext >&5
15437ac_hi=`expr '(' $ac_mid ')' - 1`
15438 if test $ac_mid -le $ac_hi; then
15439 ac_lo= ac_hi=
15440 break
15441 fi
15442 ac_mid=`expr 2 '*' $ac_mid`
15443fi
15444rm -f conftest.$ac_objext conftest.$ac_ext
15445 done
15446else
15447 echo "$as_me: failed program was:" >&5
15448cat conftest.$ac_ext >&5
15449ac_lo= ac_hi=
15450fi
15451rm -f conftest.$ac_objext conftest.$ac_ext
15452fi
15453rm -f conftest.$ac_objext conftest.$ac_ext
15454# Binary search between lo and hi bounds.
15455while test "x$ac_lo" != "x$ac_hi"; do
15456 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15457 cat >conftest.$ac_ext <<_ACEOF
15458#line $LINENO "configure"
15459#include "confdefs.h"
15460#include <wchar.h>
15461
15462#ifdef F77_DUMMY_MAIN
15463# ifdef __cplusplus
15464 extern "C"
15465# endif
15466 int F77_DUMMY_MAIN() { return 1; }
15467#endif
15468int
15469main ()
15470{
15471static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15472test_array [0] = 0
15473
15474 ;
15475 return 0;
15476}
15477_ACEOF
15478rm -f conftest.$ac_objext
15479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15480 (eval $ac_compile) 2>&5
15481 ac_status=$?
15482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15483 (exit $ac_status); } &&
15484 { ac_try='test -s conftest.$ac_objext'
15485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15486 (eval $ac_try) 2>&5
15487 ac_status=$?
15488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15489 (exit $ac_status); }; }; then
15490 ac_hi=$ac_mid
15491else
15492 echo "$as_me: failed program was:" >&5
15493cat conftest.$ac_ext >&5
15494ac_lo=`expr '(' $ac_mid ')' + 1`
15495fi
15496rm -f conftest.$ac_objext conftest.$ac_ext
15497done
15498case $ac_lo in
15499?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15500'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15501echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15502 { (exit 1); exit 1; }; } ;;
15503esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015504else
15505 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015506 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15507echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15508 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015509else
Martin v. Löwis11437992002-04-12 09:54:03 +000015510 cat >conftest.$ac_ext <<_ACEOF
15511#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015512#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015513#include <wchar.h>
15514
15515long longval () { return (long) (sizeof (wchar_t)); }
15516unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015517#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015518#include <stdlib.h>
15519#ifdef F77_DUMMY_MAIN
15520# ifdef __cplusplus
15521 extern "C"
15522# endif
15523 int F77_DUMMY_MAIN() { return 1; }
15524#endif
15525int
15526main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015527{
Martin v. Löwis11437992002-04-12 09:54:03 +000015528
15529 FILE *f = fopen ("conftest.val", "w");
15530 if (! f)
15531 exit (1);
15532 if (((long) (sizeof (wchar_t))) < 0)
15533 {
15534 long i = longval ();
15535 if (i != ((long) (sizeof (wchar_t))))
15536 exit (1);
15537 fprintf (f, "%ld\n", i);
15538 }
15539 else
15540 {
15541 unsigned long i = ulongval ();
15542 if (i != ((long) (sizeof (wchar_t))))
15543 exit (1);
15544 fprintf (f, "%lu\n", i);
15545 }
15546 exit (ferror (f) || fclose (f) != 0);
15547
15548 ;
15549 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015550}
Martin v. Löwis11437992002-04-12 09:54:03 +000015551_ACEOF
15552rm -f conftest$ac_exeext
15553if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15554 (eval $ac_link) 2>&5
15555 ac_status=$?
15556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15557 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15559 (eval $ac_try) 2>&5
15560 ac_status=$?
15561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15562 (exit $ac_status); }; }; then
15563 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015564else
Martin v. Löwis11437992002-04-12 09:54:03 +000015565 echo "$as_me: program exited with status $ac_status" >&5
15566echo "$as_me: failed program was:" >&5
15567cat conftest.$ac_ext >&5
15568( exit $ac_status )
15569{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15570echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15571 { (exit 1); exit 1; }; }
15572fi
15573rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15574fi
15575fi
15576rm -f conftest.val
15577else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015578 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015579fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015580fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015581echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15582echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15583cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015584#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015585_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015586
Michael W. Hudson54241132001-12-07 15:38:26 +000015587
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015588fi
15589
Martin v. Löwis11437992002-04-12 09:54:03 +000015590echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15591echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015592# Check whether --enable-unicode or --disable-unicode was given.
15593if test "${enable_unicode+set}" = set; then
15594 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015595
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015596else
15597 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015598fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015599
15600if test $enable_unicode = yes
15601then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015602 # Without any arguments, Py_UNICODE defaults to two-byte mode
15603 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015604fi
15605
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015606
15607
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015608case "$enable_unicode" in
15609ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015610 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015611#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015612_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015613
15614 ;;
15615ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015616 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015617#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015618_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015619
15620 ;;
15621esac
15622
Michael W. Hudson54241132001-12-07 15:38:26 +000015623
Martin v. Löwis11437992002-04-12 09:54:03 +000015624
15625
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015626
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015627if test "$enable_unicode" = "no"
15628then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015629 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015630 echo "$as_me:$LINENO: result: not used" >&5
15631echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015632else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015633 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015634
15635cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015636#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015637_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015638
15639 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15640 then
15641 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015642
Martin v. Löwis11437992002-04-12 09:54:03 +000015643cat >>confdefs.h <<\_ACEOF
15644#define HAVE_USABLE_WCHAR_T 1
15645_ACEOF
15646
15647 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015648#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015649_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015650
15651 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15652 then
15653 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015654 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015655#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015656_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015657
15658 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15659 then
15660 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015661 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015662#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015663_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015664
15665 else
15666 PY_UNICODE_TYPE="no type found"
15667 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015668 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15669echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015670fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015671
15672# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015673echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15674echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15675if test "${ac_cv_c_bigendian+set}" = set; then
15676 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015677else
Martin v. Löwis11437992002-04-12 09:54:03 +000015678 # See if sys/param.h defines the BYTE_ORDER macro.
15679cat >conftest.$ac_ext <<_ACEOF
15680#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015681#include "confdefs.h"
15682#include <sys/types.h>
15683#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015684
Martin v. Löwis11437992002-04-12 09:54:03 +000015685#ifdef F77_DUMMY_MAIN
15686# ifdef __cplusplus
15687 extern "C"
15688# endif
15689 int F77_DUMMY_MAIN() { return 1; }
15690#endif
15691int
15692main ()
15693{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015694#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15695 bogus endian macros
15696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015697
15698 ;
15699 return 0;
15700}
15701_ACEOF
15702rm -f conftest.$ac_objext
15703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15704 (eval $ac_compile) 2>&5
15705 ac_status=$?
15706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15707 (exit $ac_status); } &&
15708 { ac_try='test -s conftest.$ac_objext'
15709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15710 (eval $ac_try) 2>&5
15711 ac_status=$?
15712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15713 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015714 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015715cat >conftest.$ac_ext <<_ACEOF
15716#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015717#include "confdefs.h"
15718#include <sys/types.h>
15719#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015720
Martin v. Löwis11437992002-04-12 09:54:03 +000015721#ifdef F77_DUMMY_MAIN
15722# ifdef __cplusplus
15723 extern "C"
15724# endif
15725 int F77_DUMMY_MAIN() { return 1; }
15726#endif
15727int
15728main ()
15729{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015730#if BYTE_ORDER != BIG_ENDIAN
15731 not big endian
15732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015733
15734 ;
15735 return 0;
15736}
15737_ACEOF
15738rm -f conftest.$ac_objext
15739if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15740 (eval $ac_compile) 2>&5
15741 ac_status=$?
15742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15743 (exit $ac_status); } &&
15744 { ac_try='test -s conftest.$ac_objext'
15745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15746 (eval $ac_try) 2>&5
15747 ac_status=$?
15748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15749 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015750 ac_cv_c_bigendian=yes
15751else
Martin v. Löwis11437992002-04-12 09:54:03 +000015752 echo "$as_me: failed program was:" >&5
15753cat conftest.$ac_ext >&5
15754ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015755fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015756rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015757else
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 echo "$as_me: failed program was:" >&5
15759cat conftest.$ac_ext >&5
15760# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015761if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015762 # try to guess the endianess by grep'ing values into an object file
15763 ac_cv_c_bigendian=unknown
15764 cat >conftest.$ac_ext <<_ACEOF
15765#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015766#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015767short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15768short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15769void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15770short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15771short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15772void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15773#ifdef F77_DUMMY_MAIN
15774# ifdef __cplusplus
15775 extern "C"
15776# endif
15777 int F77_DUMMY_MAIN() { return 1; }
15778#endif
15779int
15780main ()
15781{
15782 _ascii (); _ebcdic ();
15783 ;
15784 return 0;
15785}
15786_ACEOF
15787rm -f conftest.$ac_objext
15788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15789 (eval $ac_compile) 2>&5
15790 ac_status=$?
15791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15792 (exit $ac_status); } &&
15793 { ac_try='test -s conftest.$ac_objext'
15794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15795 (eval $ac_try) 2>&5
15796 ac_status=$?
15797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15798 (exit $ac_status); }; }; then
15799 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15800 ac_cv_c_bigendian=yes
15801fi
15802if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15803 if test "$ac_cv_c_bigendian" = unknown; then
15804 ac_cv_c_bigendian=no
15805 else
15806 # finding both strings is unlikely to happen, but who knows?
15807 ac_cv_c_bigendian=unknown
15808 fi
15809fi
15810else
15811 echo "$as_me: failed program was:" >&5
15812cat conftest.$ac_ext >&5
15813fi
15814rm -f conftest.$ac_objext conftest.$ac_ext
15815else
15816 cat >conftest.$ac_ext <<_ACEOF
15817#line $LINENO "configure"
15818#include "confdefs.h"
15819int
15820main ()
15821{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015822 /* Are we little or big endian? From Harbison&Steele. */
15823 union
15824 {
15825 long l;
15826 char c[sizeof (long)];
15827 } u;
15828 u.l = 1;
15829 exit (u.c[sizeof (long) - 1] == 1);
15830}
Martin v. Löwis11437992002-04-12 09:54:03 +000015831_ACEOF
15832rm -f conftest$ac_exeext
15833if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15834 (eval $ac_link) 2>&5
15835 ac_status=$?
15836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15837 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15839 (eval $ac_try) 2>&5
15840 ac_status=$?
15841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15842 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015843 ac_cv_c_bigendian=no
15844else
Martin v. Löwis11437992002-04-12 09:54:03 +000015845 echo "$as_me: program exited with status $ac_status" >&5
15846echo "$as_me: failed program was:" >&5
15847cat conftest.$ac_ext >&5
15848( exit $ac_status )
15849ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015850fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015851rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015852fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015853fi
15854rm -f conftest.$ac_objext conftest.$ac_ext
15855fi
15856echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15857echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15858case $ac_cv_c_bigendian in
15859 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015860
Martin v. Löwis11437992002-04-12 09:54:03 +000015861cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015862#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015863_ACEOF
15864 ;;
15865 no)
15866 ;;
15867 *)
15868 { { echo "$as_me:$LINENO: error: unknown endianess
15869presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15870echo "$as_me: error: unknown endianess
15871presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15872 { (exit 1); exit 1; }; } ;;
15873esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015874
Michael W. Hudson54241132001-12-07 15:38:26 +000015875
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015876# Check whether right shifting a negative integer extends the sign bit
15877# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015878echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15879echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15880if test "${ac_cv_rshift_extends_sign+set}" = set; then
15881 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015882else
Martin v. Löwis11437992002-04-12 09:54:03 +000015883
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015884if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015885 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015886else
Martin v. Löwis11437992002-04-12 09:54:03 +000015887 cat >conftest.$ac_ext <<_ACEOF
15888#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015889#include "confdefs.h"
15890
15891int main()
15892{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015893 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015894}
15895
Martin v. Löwis11437992002-04-12 09:54:03 +000015896_ACEOF
15897rm -f conftest$ac_exeext
15898if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15899 (eval $ac_link) 2>&5
15900 ac_status=$?
15901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15902 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15904 (eval $ac_try) 2>&5
15905 ac_status=$?
15906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15907 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015908 ac_cv_rshift_extends_sign=yes
15909else
Martin v. Löwis11437992002-04-12 09:54:03 +000015910 echo "$as_me: program exited with status $ac_status" >&5
15911echo "$as_me: failed program was:" >&5
15912cat conftest.$ac_ext >&5
15913( exit $ac_status )
15914ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015915fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015916rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15917fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015918fi
15919
Martin v. Löwis11437992002-04-12 09:54:03 +000015920echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15921echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015922if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015923then
Martin v. Löwis11437992002-04-12 09:54:03 +000015924
15925cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015926#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015927_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015928
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015929fi
15930
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015931# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015932echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15933echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15934if test "${ac_cv_have_getc_unlocked+set}" = set; then
15935 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015936else
Martin v. Löwis11437992002-04-12 09:54:03 +000015937
15938cat >conftest.$ac_ext <<_ACEOF
15939#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015940#include "confdefs.h"
15941#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015942#ifdef F77_DUMMY_MAIN
15943# ifdef __cplusplus
15944 extern "C"
15945# endif
15946 int F77_DUMMY_MAIN() { return 1; }
15947#endif
15948int
15949main ()
15950{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015951
15952 FILE *f = fopen("/dev/null", "r");
15953 flockfile(f);
15954 getc_unlocked(f);
15955 funlockfile(f);
15956
Martin v. Löwis11437992002-04-12 09:54:03 +000015957 ;
15958 return 0;
15959}
15960_ACEOF
15961rm -f conftest.$ac_objext conftest$ac_exeext
15962if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15963 (eval $ac_link) 2>&5
15964 ac_status=$?
15965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15966 (exit $ac_status); } &&
15967 { ac_try='test -s conftest$ac_exeext'
15968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15969 (eval $ac_try) 2>&5
15970 ac_status=$?
15971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15972 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015973 ac_cv_have_getc_unlocked=yes
15974else
Martin v. Löwis11437992002-04-12 09:54:03 +000015975 echo "$as_me: failed program was:" >&5
15976cat conftest.$ac_ext >&5
15977ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015978fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015979rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015980fi
15981
Martin v. Löwis11437992002-04-12 09:54:03 +000015982echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15983echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015984if test "$ac_cv_have_getc_unlocked" = yes
15985then
Martin v. Löwis11437992002-04-12 09:54:03 +000015986
15987cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015988#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015989_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015990
15991fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015992
Martin v. Löwis0daad592001-09-30 21:09:59 +000015993# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015994echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15995echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15996if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15997 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015998else
Martin v. Löwis11437992002-04-12 09:54:03 +000015999 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016000LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016001cat >conftest.$ac_ext <<_ACEOF
16002#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016003#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016004
Guido van Rossum353ae582001-07-10 16:45:32 +000016005/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016006#ifdef __cplusplus
16007extern "C"
16008#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016009/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016010 builtin and then its argument prototype would still apply. */
16011char rl_pre_input_hook ();
16012#ifdef F77_DUMMY_MAIN
16013# ifdef __cplusplus
16014 extern "C"
16015# endif
16016 int F77_DUMMY_MAIN() { return 1; }
16017#endif
16018int
16019main ()
16020{
16021rl_pre_input_hook ();
16022 ;
16023 return 0;
16024}
16025_ACEOF
16026rm -f conftest.$ac_objext conftest$ac_exeext
16027if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16028 (eval $ac_link) 2>&5
16029 ac_status=$?
16030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16031 (exit $ac_status); } &&
16032 { ac_try='test -s conftest$ac_exeext'
16033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16034 (eval $ac_try) 2>&5
16035 ac_status=$?
16036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16037 (exit $ac_status); }; }; then
16038 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016039else
Martin v. Löwis11437992002-04-12 09:54:03 +000016040 echo "$as_me: failed program was:" >&5
16041cat conftest.$ac_ext >&5
16042ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016043fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016044rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16045LIBS=$ac_check_lib_save_LIBS
16046fi
16047echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16048echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16049if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016050
Martin v. Löwis11437992002-04-12 09:54:03 +000016051cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016052#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016053_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016054
Martin v. Löwis0daad592001-09-30 21:09:59 +000016055fi
16056
Michael W. Hudson54241132001-12-07 15:38:26 +000016057
Martin v. Löwis0daad592001-09-30 21:09:59 +000016058# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016059echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16060echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16061if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16062 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016063else
Martin v. Löwis11437992002-04-12 09:54:03 +000016064 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016065LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016066cat >conftest.$ac_ext <<_ACEOF
16067#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016068#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016069
Martin v. Löwis0daad592001-09-30 21:09:59 +000016070/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016071#ifdef __cplusplus
16072extern "C"
16073#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016074/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016075 builtin and then its argument prototype would still apply. */
16076char rl_completion_matches ();
16077#ifdef F77_DUMMY_MAIN
16078# ifdef __cplusplus
16079 extern "C"
16080# endif
16081 int F77_DUMMY_MAIN() { return 1; }
16082#endif
16083int
16084main ()
16085{
16086rl_completion_matches ();
16087 ;
16088 return 0;
16089}
16090_ACEOF
16091rm -f conftest.$ac_objext conftest$ac_exeext
16092if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16093 (eval $ac_link) 2>&5
16094 ac_status=$?
16095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16096 (exit $ac_status); } &&
16097 { ac_try='test -s conftest$ac_exeext'
16098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16099 (eval $ac_try) 2>&5
16100 ac_status=$?
16101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16102 (exit $ac_status); }; }; then
16103 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016104else
Martin v. Löwis11437992002-04-12 09:54:03 +000016105 echo "$as_me: failed program was:" >&5
16106cat conftest.$ac_ext >&5
16107ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016108fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016109rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16110LIBS=$ac_check_lib_save_LIBS
16111fi
16112echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16113echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16114if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016115
Martin v. Löwis11437992002-04-12 09:54:03 +000016116cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016117#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016118_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016119
Guido van Rossum353ae582001-07-10 16:45:32 +000016120fi
16121
Jack Jansendd19cf82001-12-06 22:36:17 +000016122
Martin v. Löwis11437992002-04-12 09:54:03 +000016123echo "$as_me:$LINENO: checking for broken nice()" >&5
16124echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16125if test "${ac_cv_broken_nice+set}" = set; then
16126 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016127else
Martin v. Löwis11437992002-04-12 09:54:03 +000016128
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016129if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016130 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016131else
Martin v. Löwis11437992002-04-12 09:54:03 +000016132 cat >conftest.$ac_ext <<_ACEOF
16133#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016134#include "confdefs.h"
16135
16136int main()
16137{
16138 int val1 = nice(1);
16139 if (val1 != -1 && val1 == nice(2))
16140 exit(0);
16141 exit(1);
16142}
16143
Martin v. Löwis11437992002-04-12 09:54:03 +000016144_ACEOF
16145rm -f conftest$ac_exeext
16146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16147 (eval $ac_link) 2>&5
16148 ac_status=$?
16149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16150 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16152 (eval $ac_try) 2>&5
16153 ac_status=$?
16154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16155 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016156 ac_cv_broken_nice=yes
16157else
Martin v. Löwis11437992002-04-12 09:54:03 +000016158 echo "$as_me: program exited with status $ac_status" >&5
16159echo "$as_me: failed program was:" >&5
16160cat conftest.$ac_ext >&5
16161( exit $ac_status )
16162ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016163fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016164rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16165fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016166fi
16167
Martin v. Löwis11437992002-04-12 09:54:03 +000016168echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
16169echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016170if test "$ac_cv_broken_nice" = yes
16171then
Martin v. Löwis11437992002-04-12 09:54:03 +000016172
16173cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016174#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016175_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016176
16177fi
16178
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016179# Look for subsecond timestamps in struct stat
16180echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
16181echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
16182if test "${ac_cv_stat_tv_nsec+set}" = set; then
16183 echo $ECHO_N "(cached) $ECHO_C" >&6
16184else
16185 cat >conftest.$ac_ext <<_ACEOF
16186#line $LINENO "configure"
16187#include "confdefs.h"
16188#include <sys/stat.h>
16189#ifdef F77_DUMMY_MAIN
16190# ifdef __cplusplus
16191 extern "C"
16192# endif
16193 int F77_DUMMY_MAIN() { return 1; }
16194#endif
16195int
16196main ()
16197{
16198
16199struct stat st;
16200st.st_mtim.tv_nsec = 1;
16201
16202 ;
16203 return 0;
16204}
16205_ACEOF
16206rm -f conftest.$ac_objext
16207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16208 (eval $ac_compile) 2>&5
16209 ac_status=$?
16210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16211 (exit $ac_status); } &&
16212 { ac_try='test -s conftest.$ac_objext'
16213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16214 (eval $ac_try) 2>&5
16215 ac_status=$?
16216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16217 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016218 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016219else
16220 echo "$as_me: failed program was:" >&5
16221cat conftest.$ac_ext >&5
16222ac_cv_stat_tv_nsec=no
16223fi
16224rm -f conftest.$ac_objext conftest.$ac_ext
16225fi
16226
16227echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
16228echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
16229if test "$ac_cv_stat_tv_nsec" = yes
16230then
16231
16232cat >>confdefs.h <<\_ACEOF
16233#define HAVE_STAT_TV_NSEC 1
16234_ACEOF
16235
16236fi
16237
Jack Jansen666b1e72001-10-31 12:11:48 +000016238# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000016239echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
16240echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
16241if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
16242 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016243else
Martin v. Löwis11437992002-04-12 09:54:03 +000016244 cat >conftest.$ac_ext <<_ACEOF
16245#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016246#include "confdefs.h"
16247#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016248#ifdef F77_DUMMY_MAIN
16249# ifdef __cplusplus
16250 extern "C"
16251# endif
16252 int F77_DUMMY_MAIN() { return 1; }
16253#endif
16254int
16255main ()
16256{
Jack Jansen666b1e72001-10-31 12:11:48 +000016257
16258 int rtn;
16259 rtn = mvwdelch(0,0,0);
16260
Martin v. Löwis11437992002-04-12 09:54:03 +000016261 ;
16262 return 0;
16263}
16264_ACEOF
16265rm -f conftest.$ac_objext
16266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16267 (eval $ac_compile) 2>&5
16268 ac_status=$?
16269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16270 (exit $ac_status); } &&
16271 { ac_try='test -s conftest.$ac_objext'
16272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16273 (eval $ac_try) 2>&5
16274 ac_status=$?
16275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16276 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016277 ac_cv_mvwdelch_is_expression=yes
16278else
Martin v. Löwis11437992002-04-12 09:54:03 +000016279 echo "$as_me: failed program was:" >&5
16280cat conftest.$ac_ext >&5
16281ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016283rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016284fi
16285
Martin v. Löwis11437992002-04-12 09:54:03 +000016286echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
16287echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016288
16289if test "$ac_cv_mvwdelch_is_expression" = yes
16290then
Martin v. Löwis11437992002-04-12 09:54:03 +000016291
16292cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016293#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016294_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016295
16296fi
16297
Martin v. Löwis11437992002-04-12 09:54:03 +000016298echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
16299echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
16300if test "${ac_cv_window_has_flags+set}" = set; then
16301 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016302else
Martin v. Löwis11437992002-04-12 09:54:03 +000016303 cat >conftest.$ac_ext <<_ACEOF
16304#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016305#include "confdefs.h"
16306#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016307#ifdef F77_DUMMY_MAIN
16308# ifdef __cplusplus
16309 extern "C"
16310# endif
16311 int F77_DUMMY_MAIN() { return 1; }
16312#endif
16313int
16314main ()
16315{
Jack Jansen666b1e72001-10-31 12:11:48 +000016316
16317 WINDOW *w;
16318 w->_flags = 0;
16319
Martin v. Löwis11437992002-04-12 09:54:03 +000016320 ;
16321 return 0;
16322}
16323_ACEOF
16324rm -f conftest.$ac_objext
16325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16326 (eval $ac_compile) 2>&5
16327 ac_status=$?
16328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16329 (exit $ac_status); } &&
16330 { ac_try='test -s conftest.$ac_objext'
16331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16332 (eval $ac_try) 2>&5
16333 ac_status=$?
16334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16335 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016336 ac_cv_window_has_flags=yes
16337else
Martin v. Löwis11437992002-04-12 09:54:03 +000016338 echo "$as_me: failed program was:" >&5
16339cat conftest.$ac_ext >&5
16340ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016341fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016342rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016343fi
16344
Martin v. Löwis11437992002-04-12 09:54:03 +000016345echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
16346echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016347
Jack Jansen666b1e72001-10-31 12:11:48 +000016348
16349if test "$ac_cv_window_has_flags" = yes
16350then
Martin v. Löwis11437992002-04-12 09:54:03 +000016351
16352cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016353#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016354_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016355
16356fi
16357
Guido van Rossum95713eb2000-05-18 20:53:31 +000016358# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
16359# Add sys/socket.h to confdefs.h
16360cat >> confdefs.h <<\EOF
16361#ifdef HAVE_SYS_SOCKET_H
16362#include <sys/socket.h>
16363#endif
16364EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016365echo "$as_me:$LINENO: checking for socklen_t" >&5
16366echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
16367if test "${ac_cv_type_socklen_t+set}" = set; then
16368 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000016369else
Martin v. Löwis11437992002-04-12 09:54:03 +000016370 cat >conftest.$ac_ext <<_ACEOF
16371#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000016372#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016373$ac_includes_default
16374#ifdef F77_DUMMY_MAIN
16375# ifdef __cplusplus
16376 extern "C"
16377# endif
16378 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016379#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016380int
16381main ()
16382{
16383if ((socklen_t *) 0)
16384 return 0;
16385if (sizeof (socklen_t))
16386 return 0;
16387 ;
16388 return 0;
16389}
16390_ACEOF
16391rm -f conftest.$ac_objext
16392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16393 (eval $ac_compile) 2>&5
16394 ac_status=$?
16395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16396 (exit $ac_status); } &&
16397 { ac_try='test -s conftest.$ac_objext'
16398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16399 (eval $ac_try) 2>&5
16400 ac_status=$?
16401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16402 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016403 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000016404else
Martin v. Löwis11437992002-04-12 09:54:03 +000016405 echo "$as_me: failed program was:" >&5
16406cat conftest.$ac_ext >&5
16407ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000016408fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016409rm -f conftest.$ac_objext conftest.$ac_ext
16410fi
16411echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
16412echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
16413if test $ac_cv_type_socklen_t = yes; then
16414 :
16415else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016416
Martin v. Löwis11437992002-04-12 09:54:03 +000016417cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016418#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000016419_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016420
16421fi
16422
Michael W. Hudson54241132001-12-07 15:38:26 +000016423
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016424#AC_MSG_CHECKING(for Modules/Setup)
16425#if test ! -f Modules/Setup ; then
16426# if test ! -d Modules ; then
16427# mkdir Modules
16428# fi
16429# cp "$srcdir/Modules/Setup.dist" Modules/Setup
16430# AC_MSG_RESULT(creating)
16431#else
16432# AC_MSG_RESULT(already exists)
16433#fi
16434
Michael W. Hudson54241132001-12-07 15:38:26 +000016435
16436
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016437for h in `(cd $srcdir;echo Python/thread_*.h)`
16438do
16439 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16440done
16441
Michael W. Hudson54241132001-12-07 15:38:26 +000016442
Jack Jansen0b06be72002-06-21 14:48:38 +000016443SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000016444echo "$as_me:$LINENO: checking for build directories" >&5
16445echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016446for dir in $SRCDIRS; do
16447 if test ! -d $dir; then
16448 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016449 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016450done
Martin v. Löwis11437992002-04-12 09:54:03 +000016451echo "$as_me:$LINENO: result: done" >&5
16452echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016453
Guido van Rossum627b2d71993-12-24 10:39:16 +000016454# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016455ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016456
Martin v. Löwis11437992002-04-12 09:54:03 +000016457cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016458# This file is a shell script that caches the results of configure
16459# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016460# scripts and configure runs, see configure's option --config-cache.
16461# It is not useful on other systems. If it contains results you don't
16462# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016463#
Martin v. Löwis11437992002-04-12 09:54:03 +000016464# config.status only pays attention to the cache file if you give it
16465# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016466#
Martin v. Löwis11437992002-04-12 09:54:03 +000016467# `ac_cv_env_foo' variables (set or unset) will be overriden when
16468# loading this file, other *unset* `ac_cv_foo' will be assigned the
16469# following values.
16470
16471_ACEOF
16472
Guido van Rossumf78abae1997-01-21 22:02:36 +000016473# The following way of writing the cache mishandles newlines in values,
16474# but we know of no workaround that is simple, portable, and efficient.
16475# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016476# Ultrix sh set writes to stderr and can't be redirected directly,
16477# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016478{
16479 (set) 2>&1 |
16480 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16481 *ac_space=\ *)
16482 # `set' does not quote correctly, so add quotes (double-quote
16483 # substitution turns \\\\ into \\, and sed turns \\ into \).
16484 sed -n \
16485 "s/'/'\\\\''/g;
16486 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16487 ;;
16488 *)
16489 # `set' quotes correctly as required by POSIX, so do not add quotes.
16490 sed -n \
16491 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16492 ;;
16493 esac;
16494} |
16495 sed '
16496 t clear
16497 : clear
16498 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16499 t end
16500 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16501 : end' >>confcache
16502if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016503 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016504 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16505 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016506 else
16507 echo "not updating unwritable cache $cache_file"
16508 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016509fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016510rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016511
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016512test "x$prefix" = xNONE && prefix=$ac_default_prefix
16513# Let make expand exec_prefix.
16514test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016515
Martin v. Löwis11437992002-04-12 09:54:03 +000016516# VPATH may cause trouble with some makes, so we remove $(srcdir),
16517# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16518# trailing colons and then remove the whole line if VPATH becomes empty
16519# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016520if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016521 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16522s/:*\$(srcdir):*/:/;
16523s/:*\${srcdir}:*/:/;
16524s/:*@srcdir@:*/:/;
16525s/^\([^=]*=[ ]*\):*/\1/;
16526s/:*$//;
16527s/^[^=]*=[ ]*$//;
16528}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016529fi
16530
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016531DEFS=-DHAVE_CONFIG_H
16532
Martin v. Löwis11437992002-04-12 09:54:03 +000016533
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016534: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016535ac_clean_files_save=$ac_clean_files
16536ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16537{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16538echo "$as_me: creating $CONFIG_STATUS" >&6;}
16539cat >$CONFIG_STATUS <<_ACEOF
16540#! $SHELL
16541# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016542# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016543# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016544# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016545
Martin v. Löwis11437992002-04-12 09:54:03 +000016546debug=false
16547SHELL=\${CONFIG_SHELL-$SHELL}
16548_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016549
Martin v. Löwis11437992002-04-12 09:54:03 +000016550cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016551
Martin v. Löwis11437992002-04-12 09:54:03 +000016552## --------------------- ##
16553## M4sh Initialization. ##
16554## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016555
Martin v. Löwis11437992002-04-12 09:54:03 +000016556# Be Bourne compatible
16557if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16558 emulate sh
16559 NULLCMD=:
16560elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16561 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016562fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016563
Martin v. Löwis11437992002-04-12 09:54:03 +000016564# NLS nuisances.
16565# Support unset when possible.
16566if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16567 as_unset=unset
16568else
16569 as_unset=false
16570fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016571
Martin v. Löwis11437992002-04-12 09:54:03 +000016572(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16573 { $as_unset LANG || test "${LANG+set}" != set; } ||
16574 { LANG=C; export LANG; }
16575(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16576 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16577 { LC_ALL=C; export LC_ALL; }
16578(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16579 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16580 { LC_TIME=C; export LC_TIME; }
16581(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16582 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16583 { LC_CTYPE=C; export LC_CTYPE; }
16584(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16585 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16586 { LANGUAGE=C; export LANGUAGE; }
16587(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16588 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16589 { LC_COLLATE=C; export LC_COLLATE; }
16590(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16591 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16592 { LC_NUMERIC=C; export LC_NUMERIC; }
16593(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16594 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16595 { LC_MESSAGES=C; export LC_MESSAGES; }
16596
16597
16598# Name of the executable.
16599as_me=`(basename "$0") 2>/dev/null ||
16600$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16601 X"$0" : 'X\(//\)$' \| \
16602 X"$0" : 'X\(/\)$' \| \
16603 . : '\(.\)' 2>/dev/null ||
16604echo X/"$0" |
16605 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16606 /^X\/\(\/\/\)$/{ s//\1/; q; }
16607 /^X\/\(\/\).*/{ s//\1/; q; }
16608 s/.*/./; q'`
16609
16610# PATH needs CR, and LINENO needs CR and PATH.
16611# Avoid depending upon Character Ranges.
16612as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16613as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16614as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16615as_cr_digits='0123456789'
16616as_cr_alnum=$as_cr_Letters$as_cr_digits
16617
16618# The user is always right.
16619if test "${PATH_SEPARATOR+set}" != set; then
16620 echo "#! /bin/sh" >conftest.sh
16621 echo "exit 0" >>conftest.sh
16622 chmod +x conftest.sh
16623 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16624 PATH_SEPARATOR=';'
16625 else
16626 PATH_SEPARATOR=:
16627 fi
16628 rm -f conftest.sh
16629fi
16630
16631
16632 as_lineno_1=$LINENO
16633 as_lineno_2=$LINENO
16634 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16635 test "x$as_lineno_1" != "x$as_lineno_2" &&
16636 test "x$as_lineno_3" = "x$as_lineno_2" || {
16637 # Find who we are. Look in the path if we contain no path at all
16638 # relative or not.
16639 case $0 in
16640 *[\\/]* ) as_myself=$0 ;;
16641 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16642for as_dir in $PATH
16643do
16644 IFS=$as_save_IFS
16645 test -z "$as_dir" && as_dir=.
16646 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16647done
16648
16649 ;;
16650 esac
16651 # We did not find ourselves, most probably we were run as `sh COMMAND'
16652 # in which case we are not to be found in the path.
16653 if test "x$as_myself" = x; then
16654 as_myself=$0
16655 fi
16656 if test ! -f "$as_myself"; then
16657 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16658echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16659 { (exit 1); exit 1; }; }
16660 fi
16661 case $CONFIG_SHELL in
16662 '')
16663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16664for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16665do
16666 IFS=$as_save_IFS
16667 test -z "$as_dir" && as_dir=.
16668 for as_base in sh bash ksh sh5; do
16669 case $as_dir in
16670 /*)
16671 if ("$as_dir/$as_base" -c '
16672 as_lineno_1=$LINENO
16673 as_lineno_2=$LINENO
16674 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16675 test "x$as_lineno_1" != "x$as_lineno_2" &&
16676 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16677 CONFIG_SHELL=$as_dir/$as_base
16678 export CONFIG_SHELL
16679 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16680 fi;;
16681 esac
16682 done
16683done
16684;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016685 esac
16686
Martin v. Löwis11437992002-04-12 09:54:03 +000016687 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16688 # uniformly replaced by the line number. The first 'sed' inserts a
16689 # line-number line before each line; the second 'sed' does the real
16690 # work. The second script uses 'N' to pair each line-number line
16691 # with the numbered line, and appends trailing '-' during
16692 # substitution so that $LINENO is not a special case at line end.
16693 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16694 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16695 sed '=' <$as_myself |
16696 sed '
16697 N
16698 s,$,-,
16699 : loop
16700 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16701 t loop
16702 s,-$,,
16703 s,^['$as_cr_digits']*\n,,
16704 ' >$as_me.lineno &&
16705 chmod +x $as_me.lineno ||
16706 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16707echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16708 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016709
Martin v. Löwis11437992002-04-12 09:54:03 +000016710 # Don't try to exec as it changes $[0], causing all sort of problems
16711 # (the dirname of $[0] is not the place where we might find the
16712 # original and so on. Autoconf is especially sensible to this).
16713 . ./$as_me.lineno
16714 # Exit status is that of the last command.
16715 exit
16716}
16717
16718
16719case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16720 *c*,-n*) ECHO_N= ECHO_C='
16721' ECHO_T=' ' ;;
16722 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16723 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16724esac
16725
16726if expr a : '\(a\)' >/dev/null 2>&1; then
16727 as_expr=expr
16728else
16729 as_expr=false
16730fi
16731
16732rm -f conf$$ conf$$.exe conf$$.file
16733echo >conf$$.file
16734if ln -s conf$$.file conf$$ 2>/dev/null; then
16735 # We could just check for DJGPP; but this test a) works b) is more generic
16736 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16737 if test -f conf$$.exe; then
16738 # Don't use ln at all; we don't have any links
16739 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016740 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016741 as_ln_s='ln -s'
16742 fi
16743elif ln conf$$.file conf$$ 2>/dev/null; then
16744 as_ln_s=ln
16745else
16746 as_ln_s='cp -p'
16747fi
16748rm -f conf$$ conf$$.exe conf$$.file
16749
16750as_executable_p="test -f"
16751
16752# Sed expression to map a string onto a valid CPP name.
16753as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16754
16755# Sed expression to map a string onto a valid variable name.
16756as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16757
16758
16759# IFS
16760# We need space, tab and new line, in precisely that order.
16761as_nl='
16762'
16763IFS=" $as_nl"
16764
16765# CDPATH.
16766$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16767
16768exec 6>&1
16769
16770# Open the log real soon, to keep \$[0] and so on meaningful, and to
16771# report actual input values of CONFIG_FILES etc. instead of their
16772# values after options handling. Logging --version etc. is OK.
16773exec 5>>config.log
16774{
16775 echo
16776 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16777## Running $as_me. ##
16778_ASBOX
16779} >&5
16780cat >&5 <<_CSEOF
16781
Martin v. Löwis88afe662002-10-26 13:47:44 +000016782This file was extended by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +000016783generated by GNU Autoconf 2.53. Invocation command line was
16784
16785 CONFIG_FILES = $CONFIG_FILES
16786 CONFIG_HEADERS = $CONFIG_HEADERS
16787 CONFIG_LINKS = $CONFIG_LINKS
16788 CONFIG_COMMANDS = $CONFIG_COMMANDS
16789 $ $0 $@
16790
16791_CSEOF
16792echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16793echo >&5
16794_ACEOF
16795
16796# Files that config.status was made for.
16797if test -n "$ac_config_files"; then
16798 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16799fi
16800
16801if test -n "$ac_config_headers"; then
16802 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16803fi
16804
16805if test -n "$ac_config_links"; then
16806 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16807fi
16808
16809if test -n "$ac_config_commands"; then
16810 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16811fi
16812
16813cat >>$CONFIG_STATUS <<\_ACEOF
16814
16815ac_cs_usage="\
16816\`$as_me' instantiates files from templates according to the
16817current configuration.
16818
16819Usage: $0 [OPTIONS] [FILE]...
16820
16821 -h, --help print this help, then exit
16822 -V, --version print version number, then exit
16823 -d, --debug don't remove temporary files
16824 --recheck update $as_me by reconfiguring in the same conditions
16825 --file=FILE[:TEMPLATE]
16826 instantiate the configuration file FILE
16827 --header=FILE[:TEMPLATE]
16828 instantiate the configuration header FILE
16829
16830Configuration files:
16831$config_files
16832
16833Configuration headers:
16834$config_headers
16835
16836Report bugs to <bug-autoconf@gnu.org>."
16837_ACEOF
16838
16839cat >>$CONFIG_STATUS <<_ACEOF
16840ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000016841python config.status 2.3
Martin v. Löwis11437992002-04-12 09:54:03 +000016842configured by $0, generated by GNU Autoconf 2.53,
16843 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16844
16845Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16846Free Software Foundation, Inc.
16847This config.status script is free software; the Free Software Foundation
16848gives unlimited permission to copy, distribute and modify it."
16849srcdir=$srcdir
16850INSTALL="$INSTALL"
16851_ACEOF
16852
16853cat >>$CONFIG_STATUS <<\_ACEOF
16854# If no file are specified by the user, then we need to provide default
16855# value. By we need to know if files were specified by the user.
16856ac_need_defaults=:
16857while test $# != 0
16858do
16859 case $1 in
16860 --*=*)
16861 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16862 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16863 shift
16864 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16865 shift
16866 ;;
16867 -*);;
16868 *) # This is not an option, so the user has probably given explicit
16869 # arguments.
16870 ac_need_defaults=false;;
16871 esac
16872
16873 case $1 in
16874 # Handling of the options.
16875_ACEOF
16876cat >>$CONFIG_STATUS <<_ACEOF
16877 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16878 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16879 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16880_ACEOF
16881cat >>$CONFIG_STATUS <<\_ACEOF
16882 --version | --vers* | -V )
16883 echo "$ac_cs_version"; exit 0 ;;
16884 --he | --h)
16885 # Conflict between --help and --header
16886 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16887Try \`$0 --help' for more information." >&5
16888echo "$as_me: error: ambiguous option: $1
16889Try \`$0 --help' for more information." >&2;}
16890 { (exit 1); exit 1; }; };;
16891 --help | --hel | -h )
16892 echo "$ac_cs_usage"; exit 0 ;;
16893 --debug | --d* | -d )
16894 debug=: ;;
16895 --file | --fil | --fi | --f )
16896 shift
16897 CONFIG_FILES="$CONFIG_FILES $1"
16898 ac_need_defaults=false;;
16899 --header | --heade | --head | --hea )
16900 shift
16901 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16902 ac_need_defaults=false;;
16903
16904 # This is an error.
16905 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16906Try \`$0 --help' for more information." >&5
16907echo "$as_me: error: unrecognized option: $1
16908Try \`$0 --help' for more information." >&2;}
16909 { (exit 1); exit 1; }; } ;;
16910
16911 *) ac_config_targets="$ac_config_targets $1" ;;
16912
16913 esac
16914 shift
16915done
16916
16917_ACEOF
16918
16919
16920
16921
16922
16923cat >>$CONFIG_STATUS <<\_ACEOF
16924for ac_config_target in $ac_config_targets
16925do
16926 case "$ac_config_target" in
16927 # Handling of arguments.
16928 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16929 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16930 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16931 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16932echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16933 { (exit 1); exit 1; }; };;
16934 esac
16935done
16936
16937# If the user did not use the arguments to specify the items to instantiate,
16938# then the envvar interface is used. Set only those that are not.
16939# We use the long form for the default assignment because of an extremely
16940# bizarre bug on SunOS 4.1.3.
16941if $ac_need_defaults; then
16942 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16943 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16944fi
16945
16946# Create a temporary directory, and hook for its removal unless debugging.
16947$debug ||
16948{
16949 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16950 trap '{ (exit 1); exit 1; }' 1 2 13 15
16951}
16952
16953# Create a (secure) tmp directory for tmp files.
16954: ${TMPDIR=/tmp}
16955{
16956 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16957 test -n "$tmp" && test -d "$tmp"
16958} ||
16959{
16960 tmp=$TMPDIR/cs$$-$RANDOM
16961 (umask 077 && mkdir $tmp)
16962} ||
16963{
16964 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16965 { (exit 1); exit 1; }
16966}
16967
16968_ACEOF
16969
16970cat >>$CONFIG_STATUS <<_ACEOF
16971
16972#
16973# CONFIG_FILES section.
16974#
16975
16976# No need to generate the scripts if there are no CONFIG_FILES.
16977# This happens for instance when ./config.status config.h
16978if test -n "\$CONFIG_FILES"; then
16979 # Protect against being on the right side of a sed subst in config.status.
16980 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16981 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16982s,@SHELL@,$SHELL,;t t
16983s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16984s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16985s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16986s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16987s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16988s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16989s,@exec_prefix@,$exec_prefix,;t t
16990s,@prefix@,$prefix,;t t
16991s,@program_transform_name@,$program_transform_name,;t t
16992s,@bindir@,$bindir,;t t
16993s,@sbindir@,$sbindir,;t t
16994s,@libexecdir@,$libexecdir,;t t
16995s,@datadir@,$datadir,;t t
16996s,@sysconfdir@,$sysconfdir,;t t
16997s,@sharedstatedir@,$sharedstatedir,;t t
16998s,@localstatedir@,$localstatedir,;t t
16999s,@libdir@,$libdir,;t t
17000s,@includedir@,$includedir,;t t
17001s,@oldincludedir@,$oldincludedir,;t t
17002s,@infodir@,$infodir,;t t
17003s,@mandir@,$mandir,;t t
17004s,@build_alias@,$build_alias,;t t
17005s,@host_alias@,$host_alias,;t t
17006s,@target_alias@,$target_alias,;t t
17007s,@DEFS@,$DEFS,;t t
17008s,@ECHO_C@,$ECHO_C,;t t
17009s,@ECHO_N@,$ECHO_N,;t t
17010s,@ECHO_T@,$ECHO_T,;t t
17011s,@LIBS@,$LIBS,;t t
17012s,@VERSION@,$VERSION,;t t
17013s,@SOVERSION@,$SOVERSION,;t t
17014s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
17015s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
17016s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
17017s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17018s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17019s,@MACHDEP@,$MACHDEP,;t t
17020s,@SGI_ABI@,$SGI_ABI,;t t
17021s,@CXX@,$CXX,;t t
17022s,@MAINOBJ@,$MAINOBJ,;t t
17023s,@EXEEXT@,$EXEEXT,;t t
17024s,@CC@,$CC,;t t
17025s,@CFLAGS@,$CFLAGS,;t t
17026s,@LDFLAGS@,$LDFLAGS,;t t
17027s,@CPPFLAGS@,$CPPFLAGS,;t t
17028s,@ac_ct_CC@,$ac_ct_CC,;t t
17029s,@OBJEXT@,$OBJEXT,;t t
17030s,@CPP@,$CPP,;t t
17031s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17032s,@LIBRARY@,$LIBRARY,;t t
17033s,@LDLIBRARY@,$LDLIBRARY,;t t
17034s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17035s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17036s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17037s,@INSTSONAME@,$INSTSONAME,;t t
17038s,@RUNSHARED@,$RUNSHARED,;t t
17039s,@LINKCC@,$LINKCC,;t t
17040s,@RANLIB@,$RANLIB,;t t
17041s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17042s,@AR@,$AR,;t t
17043s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17044s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17045s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17046s,@LN@,$LN,;t t
17047s,@OPT@,$OPT,;t t
17048s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17049s,@SO@,$SO,;t t
17050s,@LDSHARED@,$LDSHARED,;t t
17051s,@BLDSHARED@,$BLDSHARED,;t t
17052s,@CCSHARED@,$CCSHARED,;t t
17053s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17054s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017055s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017056s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17057s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17058s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17059s,@LDLAST@,$LDLAST,;t t
17060s,@THREADOBJ@,$THREADOBJ,;t t
17061s,@DLINCLDIR@,$DLINCLDIR,;t t
17062s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17063s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17064s,@LIBOBJS@,$LIBOBJS,;t t
17065s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17066s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17067s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17068s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17069s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17070s,@LIBM@,$LIBM,;t t
17071s,@LIBC@,$LIBC,;t t
17072s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
17073s,@THREADHEADERS@,$THREADHEADERS,;t t
17074s,@SRCDIRS@,$SRCDIRS,;t t
17075CEOF
17076
17077_ACEOF
17078
17079 cat >>$CONFIG_STATUS <<\_ACEOF
17080 # Split the substitutions into bite-sized pieces for seds with
17081 # small command number limits, like on Digital OSF/1 and HP-UX.
17082 ac_max_sed_lines=48
17083 ac_sed_frag=1 # Number of current file.
17084 ac_beg=1 # First line for current file.
17085 ac_end=$ac_max_sed_lines # Line after last line for current file.
17086 ac_more_lines=:
17087 ac_sed_cmds=
17088 while $ac_more_lines; do
17089 if test $ac_beg -gt 1; then
17090 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17091 else
17092 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17093 fi
17094 if test ! -s $tmp/subs.frag; then
17095 ac_more_lines=false
17096 else
17097 # The purpose of the label and of the branching condition is to
17098 # speed up the sed processing (if there are no `@' at all, there
17099 # is no need to browse any of the substitutions).
17100 # These are the two extra sed commands mentioned above.
17101 (echo ':t
17102 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17103 if test -z "$ac_sed_cmds"; then
17104 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17105 else
17106 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17107 fi
17108 ac_sed_frag=`expr $ac_sed_frag + 1`
17109 ac_beg=$ac_end
17110 ac_end=`expr $ac_end + $ac_max_sed_lines`
17111 fi
17112 done
17113 if test -z "$ac_sed_cmds"; then
17114 ac_sed_cmds=cat
17115 fi
17116fi # test -n "$CONFIG_FILES"
17117
17118_ACEOF
17119cat >>$CONFIG_STATUS <<\_ACEOF
17120for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17121 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17122 case $ac_file in
17123 - | *:- | *:-:* ) # input from stdin
17124 cat >$tmp/stdin
17125 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17126 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17127 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17128 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17129 * ) ac_file_in=$ac_file.in ;;
17130 esac
17131
17132 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17133 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17134$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17135 X"$ac_file" : 'X\(//\)[^/]' \| \
17136 X"$ac_file" : 'X\(//\)$' \| \
17137 X"$ac_file" : 'X\(/\)' \| \
17138 . : '\(.\)' 2>/dev/null ||
17139echo X"$ac_file" |
17140 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17141 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17142 /^X\(\/\/\)$/{ s//\1/; q; }
17143 /^X\(\/\).*/{ s//\1/; q; }
17144 s/.*/./; q'`
17145 { case "$ac_dir" in
17146 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17147 *) as_incr_dir=.;;
17148esac
17149as_dummy="$ac_dir"
17150for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17151 case $as_mkdir_dir in
17152 # Skip DOS drivespec
17153 ?:) as_incr_dir=$as_mkdir_dir ;;
17154 *)
17155 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17156 test -d "$as_incr_dir" ||
17157 mkdir "$as_incr_dir" ||
17158 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17159echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17160 { (exit 1); exit 1; }; }
17161 ;;
17162 esac
17163done; }
17164
17165 ac_builddir=.
17166
17167if test "$ac_dir" != .; then
17168 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17169 # A "../" for each directory in $ac_dir_suffix.
17170 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17171else
17172 ac_dir_suffix= ac_top_builddir=
17173fi
17174
17175case $srcdir in
17176 .) # No --srcdir option. We are building in place.
17177 ac_srcdir=.
17178 if test -z "$ac_top_builddir"; then
17179 ac_top_srcdir=.
17180 else
17181 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17182 fi ;;
17183 [\\/]* | ?:[\\/]* ) # Absolute path.
17184 ac_srcdir=$srcdir$ac_dir_suffix;
17185 ac_top_srcdir=$srcdir ;;
17186 *) # Relative path.
17187 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17188 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17189esac
17190# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17191# absolute.
17192ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise4826582002-10-26 13:33:00 +000017193ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000017194ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17195ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17196
17197
17198 case $INSTALL in
17199 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17200 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17201 esac
17202
17203 if test x"$ac_file" != x-; then
17204 { echo "$as_me:$LINENO: creating $ac_file" >&5
17205echo "$as_me: creating $ac_file" >&6;}
17206 rm -f "$ac_file"
17207 fi
17208 # Let's still pretend it is `configure' which instantiates (i.e., don't
17209 # use $as_me), people would be surprised to read:
17210 # /* config.h. Generated by config.status. */
17211 if test x"$ac_file" = x-; then
17212 configure_input=
17213 else
17214 configure_input="$ac_file. "
17215 fi
17216 configure_input=$configure_input"Generated from `echo $ac_file_in |
17217 sed 's,.*/,,'` by configure."
17218
17219 # First look for the input files in the build tree, otherwise in the
17220 # src tree.
17221 ac_file_inputs=`IFS=:
17222 for f in $ac_file_in; do
17223 case $f in
17224 -) echo $tmp/stdin ;;
17225 [\\/$]*)
17226 # Absolute (can't be DOS-style, as IFS=:)
17227 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17228echo "$as_me: error: cannot find input file: $f" >&2;}
17229 { (exit 1); exit 1; }; }
17230 echo $f;;
17231 *) # Relative
17232 if test -f "$f"; then
17233 # Build tree
17234 echo $f
17235 elif test -f "$srcdir/$f"; then
17236 # Source tree
17237 echo $srcdir/$f
17238 else
17239 # /dev/null tree
17240 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17241echo "$as_me: error: cannot find input file: $f" >&2;}
17242 { (exit 1); exit 1; }; }
17243 fi;;
17244 esac
17245 done` || { (exit 1); exit 1; }
17246_ACEOF
17247cat >>$CONFIG_STATUS <<_ACEOF
17248 sed "$ac_vpsub
17249$extrasub
17250_ACEOF
17251cat >>$CONFIG_STATUS <<\_ACEOF
17252:t
17253/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17254s,@configure_input@,$configure_input,;t t
17255s,@srcdir@,$ac_srcdir,;t t
17256s,@abs_srcdir@,$ac_abs_srcdir,;t t
17257s,@top_srcdir@,$ac_top_srcdir,;t t
17258s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17259s,@builddir@,$ac_builddir,;t t
17260s,@abs_builddir@,$ac_abs_builddir,;t t
17261s,@top_builddir@,$ac_top_builddir,;t t
17262s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17263s,@INSTALL@,$ac_INSTALL,;t t
17264" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17265 rm -f $tmp/stdin
17266 if test x"$ac_file" != x-; then
17267 mv $tmp/out $ac_file
17268 else
17269 cat $tmp/out
17270 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017271 fi
17272
Martin v. Löwis11437992002-04-12 09:54:03 +000017273done
17274_ACEOF
17275cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017276
Martin v. Löwis11437992002-04-12 09:54:03 +000017277#
17278# CONFIG_HEADER section.
17279#
Guido van Rossum627b2d71993-12-24 10:39:16 +000017280
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017281# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17282# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017283#
17284# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000017285ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17286ac_dB='[ ].*$,\1#\2'
17287ac_dC=' '
17288ac_dD=',;t'
17289# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17290ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17291ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017292ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000017293ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017294
Martin v. Löwis11437992002-04-12 09:54:03 +000017295for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000017296 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000017297 case $ac_file in
17298 - | *:- | *:-:* ) # input from stdin
17299 cat >$tmp/stdin
17300 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17301 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17302 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17303 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17304 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017305 esac
17306
Martin v. Löwis11437992002-04-12 09:54:03 +000017307 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17308echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017309
Martin v. Löwis11437992002-04-12 09:54:03 +000017310 # First look for the input files in the build tree, otherwise in the
17311 # src tree.
17312 ac_file_inputs=`IFS=:
17313 for f in $ac_file_in; do
17314 case $f in
17315 -) echo $tmp/stdin ;;
17316 [\\/$]*)
17317 # Absolute (can't be DOS-style, as IFS=:)
17318 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17319echo "$as_me: error: cannot find input file: $f" >&2;}
17320 { (exit 1); exit 1; }; }
17321 echo $f;;
17322 *) # Relative
17323 if test -f "$f"; then
17324 # Build tree
17325 echo $f
17326 elif test -f "$srcdir/$f"; then
17327 # Source tree
17328 echo $srcdir/$f
17329 else
17330 # /dev/null tree
17331 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17332echo "$as_me: error: cannot find input file: $f" >&2;}
17333 { (exit 1); exit 1; }; }
17334 fi;;
17335 esac
17336 done` || { (exit 1); exit 1; }
17337 # Remove the trailing spaces.
17338 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017339
Martin v. Löwis11437992002-04-12 09:54:03 +000017340_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017341
Martin v. Löwis11437992002-04-12 09:54:03 +000017342# Transform confdefs.h into two sed scripts, `conftest.defines' and
17343# `conftest.undefs', that substitutes the proper values into
17344# config.h.in to produce config.h. The first handles `#define'
17345# templates, and the second `#undef' templates.
17346# And first: Protect against being on the right side of a sed subst in
17347# config.status. Protect against being in an unquoted here document
17348# in config.status.
17349rm -f conftest.defines conftest.undefs
17350# Using a here document instead of a string reduces the quoting nightmare.
17351# Putting comments in sed scripts is not portable.
17352#
17353# `end' is used to avoid that the second main sed command (meant for
17354# 0-ary CPP macros) applies to n-ary macro definitions.
17355# See the Autoconf documentation for `clear'.
17356cat >confdef2sed.sed <<\_ACEOF
17357s/[\\&,]/\\&/g
17358s,[\\$`],\\&,g
17359t clear
17360: clear
17361s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17362t end
17363s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17364: end
17365_ACEOF
17366# If some macros were called several times there might be several times
17367# the same #defines, which is useless. Nevertheless, we may not want to
17368# sort them, since we want the *last* AC-DEFINE to be honored.
17369uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17370sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17371rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017372
17373# This sed command replaces #undef with comments. This is necessary, for
17374# example, in the case of _POSIX_SOURCE, which is predefined and required
17375# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017376cat >>conftest.undefs <<\_ACEOF
17377s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17378_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017379
Martin v. Löwis11437992002-04-12 09:54:03 +000017380# Break up conftest.defines because some shells have a limit on the size
17381# of here documents, and old seds have small limits too (100 cmds).
17382echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17383echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17384echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17385echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017386rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000017387while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000017388do
Martin v. Löwis11437992002-04-12 09:54:03 +000017389 # Write a limited-size here document to $tmp/defines.sed.
17390 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17391 # Speed up: don't consider the non `#define' lines.
17392 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
17393 # Work around the forget-to-reset-the-flag bug.
17394 echo 't clr' >>$CONFIG_STATUS
17395 echo ': clr' >>$CONFIG_STATUS
17396 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017397 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017398 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17399 rm -f $tmp/in
17400 mv $tmp/out $tmp/in
17401' >>$CONFIG_STATUS
17402 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17403 rm -f conftest.defines
17404 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000017405done
Martin v. Löwis11437992002-04-12 09:54:03 +000017406rm -f conftest.defines
17407echo ' fi # egrep' >>$CONFIG_STATUS
17408echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017409
Martin v. Löwis11437992002-04-12 09:54:03 +000017410# Break up conftest.undefs because some shells have a limit on the size
17411# of here documents, and old seds have small limits too (100 cmds).
17412echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17413rm -f conftest.tail
17414while grep . conftest.undefs >/dev/null
17415do
17416 # Write a limited-size here document to $tmp/undefs.sed.
17417 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17418 # Speed up: don't consider the non `#undef'
17419 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17420 # Work around the forget-to-reset-the-flag bug.
17421 echo 't clr' >>$CONFIG_STATUS
17422 echo ': clr' >>$CONFIG_STATUS
17423 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17424 echo 'CEOF
17425 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17426 rm -f $tmp/in
17427 mv $tmp/out $tmp/in
17428' >>$CONFIG_STATUS
17429 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17430 rm -f conftest.undefs
17431 mv conftest.tail conftest.undefs
17432done
17433rm -f conftest.undefs
17434
17435cat >>$CONFIG_STATUS <<\_ACEOF
17436 # Let's still pretend it is `configure' which instantiates (i.e., don't
17437 # use $as_me), people would be surprised to read:
17438 # /* config.h. Generated by config.status. */
17439 if test x"$ac_file" = x-; then
17440 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000017441 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017442 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000017443 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017444 cat $tmp/in >>$tmp/config.h
17445 rm -f $tmp/in
17446 if test x"$ac_file" != x-; then
17447 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17448 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17449echo "$as_me: $ac_file is unchanged" >&6;}
17450 else
17451 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17452$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17453 X"$ac_file" : 'X\(//\)[^/]' \| \
17454 X"$ac_file" : 'X\(//\)$' \| \
17455 X"$ac_file" : 'X\(/\)' \| \
17456 . : '\(.\)' 2>/dev/null ||
17457echo X"$ac_file" |
17458 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17459 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17460 /^X\(\/\/\)$/{ s//\1/; q; }
17461 /^X\(\/\).*/{ s//\1/; q; }
17462 s/.*/./; q'`
17463 { case "$ac_dir" in
17464 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17465 *) as_incr_dir=.;;
17466esac
17467as_dummy="$ac_dir"
17468for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17469 case $as_mkdir_dir in
17470 # Skip DOS drivespec
17471 ?:) as_incr_dir=$as_mkdir_dir ;;
17472 *)
17473 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17474 test -d "$as_incr_dir" ||
17475 mkdir "$as_incr_dir" ||
17476 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17477echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17478 { (exit 1); exit 1; }; }
17479 ;;
17480 esac
17481done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017482
Martin v. Löwis11437992002-04-12 09:54:03 +000017483 rm -f $ac_file
17484 mv $tmp/config.h $ac_file
17485 fi
17486 else
17487 cat $tmp/config.h
17488 rm -f $tmp/config.h
17489 fi
17490done
17491_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017492
Martin v. Löwis11437992002-04-12 09:54:03 +000017493cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017494
Martin v. Löwis11437992002-04-12 09:54:03 +000017495{ (exit 0); exit 0; }
17496_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017497chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017498ac_clean_files=$ac_clean_files_save
17499
17500
17501# configure is writing to config.log, and then calls config.status.
17502# config.status does its own redirection, appending to config.log.
17503# Unfortunately, on DOS this fails, as config.log is still kept open
17504# by configure, so config.status won't be able to write to it; its
17505# output is simply discarded. So we exec the FD to /dev/null,
17506# effectively closing config.log, so it can be properly (re)opened and
17507# appended to by config.status. When coming back to configure, we
17508# need to make the FD available again.
17509if test "$no_create" != yes; then
17510 ac_cs_success=:
17511 exec 5>/dev/null
17512 $SHELL $CONFIG_STATUS || ac_cs_success=false
17513 exec 5>>config.log
17514 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17515 # would make configure fail if this is the last instruction.
17516 $ac_cs_success || { (exit 1); exit 1; }
17517fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017518
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017519
17520echo "creating Setup"
17521if test ! -f Modules/Setup
17522then
17523 cp $srcdir/Modules/Setup.dist Modules/Setup
17524fi
17525
17526echo "creating Setup.local"
17527if test ! -f Modules/Setup.local
17528then
17529 echo "# Edit this file for local setup changes" >Modules/Setup.local
17530fi
17531
17532echo "creating Makefile"
17533$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17534 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017535 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017536mv config.c Modules